Merge branch 'feature_business_apply' into dev
This commit is contained in:
commit
6ee81319b2
@ -1363,6 +1363,7 @@ class Auth extends BaseController
|
|||||||
if (!$repository->getWhereCount(['mer_intention_id' => $id, 'is_del' => 0]))
|
if (!$repository->getWhereCount(['mer_intention_id' => $id, 'is_del' => 0]))
|
||||||
return app('json')->fail('数据不存在');
|
return app('json')->fail('数据不存在');
|
||||||
$status = $this->request->post('status', 0);
|
$status = $this->request->post('status', 0);
|
||||||
|
$remark = $this->request->post('remark', '');
|
||||||
$type = $this->request->post('type', 1);
|
$type = $this->request->post('type', 1);
|
||||||
if ($type == 1) {
|
if ($type == 1) {
|
||||||
//商户入驻申请
|
//商户入驻申请
|
||||||
@ -1372,7 +1373,13 @@ class Auth extends BaseController
|
|||||||
$repository->updateStatus($id, $data);
|
$repository->updateStatus($id, $data);
|
||||||
} else {
|
} else {
|
||||||
//商户交易申请
|
//商户交易申请
|
||||||
Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 2)->update(['status' => ($status == 1 ? 1 : 2)]);
|
//fail_msg
|
||||||
|
$updData = [
|
||||||
|
'status' => ($status == 1 ? 1 : 2),
|
||||||
|
'fail_msg' => $remark
|
||||||
|
];
|
||||||
|
|
||||||
|
Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 2)->update($updData);
|
||||||
$merId = Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 2)->value('mer_id', 0);
|
$merId = Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 2)->value('mer_id', 0);
|
||||||
Db::name('merchant')->where('mer_id', $merId)->where('status', 1)->update(['business_status' => ($status == 1 ? 2 : 3)]);
|
Db::name('merchant')->where('mer_id', $merId)->where('status', 1)->update(['business_status' => ($status == 1 ? 2 : 3)]);
|
||||||
}
|
}
|
||||||
|
@ -178,8 +178,8 @@ class MerchantIntention extends BaseController
|
|||||||
$merIntentionInfo = $this->repository->getWhere(['mer_intention_id' => (int)$id, 'uid' => $this->userInfo->uid, 'is_del' => 0]);
|
$merIntentionInfo = $this->repository->getWhere(['mer_intention_id' => (int)$id, 'uid' => $this->userInfo->uid, 'is_del' => 0]);
|
||||||
if (!$merIntentionInfo)
|
if (!$merIntentionInfo)
|
||||||
return app('json')->fail('数据不存在');
|
return app('json')->fail('数据不存在');
|
||||||
if ($merIntentionInfo['status']) {
|
if ($merIntentionInfo['status'] == 1) {
|
||||||
return app('json')->fail('已审核数据不能修改');
|
return app('json')->fail('已通过审核数据不能修改');
|
||||||
}
|
}
|
||||||
$data = $this->checkParams();
|
$data = $this->checkParams();
|
||||||
if (!systemConfig('mer_intention_open')) {
|
if (!systemConfig('mer_intention_open')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user