|
|
@@ -8,31 +8,31 @@ use common\components\util;
|
|
|
|
|
|
class OrderClearController extends BaseController
|
|
|
{
|
|
|
-
|
|
|
- //收款 ssh 2021.2.4
|
|
|
- public function actionClear()
|
|
|
- {
|
|
|
- $id = Yii::$app->request->post('id');
|
|
|
- $customId = Yii::$app->request->post('customId');
|
|
|
- if (empty($id)) {
|
|
|
- util::fail('请选择交易记录');
|
|
|
- }
|
|
|
- $connection = Yii::$app->db;
|
|
|
- $transaction = $connection->beginTransaction();
|
|
|
- $data = [
|
|
|
- 'customId' => $customId,
|
|
|
- 'ghsShopAdminId' => $this->shopAdminId,
|
|
|
- 'ghsShopAdminName' => $this->shopAdmin['name'],
|
|
|
- ];
|
|
|
- try {
|
|
|
- OrderClearClass::clear($data, $id, $this->sjId,$this->shopId);
|
|
|
- $transaction->commit();
|
|
|
- } catch (\Exception $exception) {
|
|
|
- $transaction->rollBack();
|
|
|
- Yii::info("批量收款失败:" . $exception->getMessage());
|
|
|
- util::fail('操作失败');
|
|
|
- }
|
|
|
- util::complete();
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ //收款 ssh 2021.2.4
|
|
|
+ public function actionClear()
|
|
|
+ {
|
|
|
+ $id = Yii::$app->request->post('id');
|
|
|
+ $customId = Yii::$app->request->post('customId');
|
|
|
+ if (empty($id)) {
|
|
|
+ util::fail('请选择交易记录');
|
|
|
+ }
|
|
|
+ $connection = Yii::$app->db;
|
|
|
+ $transaction = $connection->beginTransaction();
|
|
|
+ $data = [
|
|
|
+ 'customId' => $customId,
|
|
|
+ 'ghsShopAdminId' => $this->shopAdminId,
|
|
|
+ 'ghsShopAdminName' => $this->shopAdmin['name'],
|
|
|
+ ];
|
|
|
+ try {
|
|
|
+ OrderClearClass::clear($data, $id, $this->sjId, $this->shopId);
|
|
|
+ $transaction->commit();
|
|
|
+ } catch (\Exception $exception) {
|
|
|
+ $transaction->rollBack();
|
|
|
+ Yii::info("批量收款失败:" . $exception->getMessage());
|
|
|
+ util::fail('操作失败');
|
|
|
+ }
|
|
|
+ util::complete();
|
|
|
+ }
|
|
|
+
|
|
|
}
|