更新用户审核委托商品
This commit is contained in:
parent
ac09055d1a
commit
f9709a7edc
@ -275,7 +275,7 @@ class Community extends BaseController
|
|||||||
|
|
||||||
public function checkParams()
|
public function checkParams()
|
||||||
{
|
{
|
||||||
$data = $this->request->params(['image','topic_id','content','spu_id','order_id',['is_type',1],'video_link', 'resale_type', 'product_info']);
|
$data = $this->request->params(['image','topic_id','content','spu_id','order_id',['is_type',1],'video_link', 'resale_type', 'product_info', 'entrust_mer_id', 'entrust_day']);
|
||||||
$config = systemConfig(["community_app_switch",'community_audit','community_video_audit']);
|
$config = systemConfig(["community_app_switch",'community_audit','community_video_audit']);
|
||||||
$data['status'] = 0;
|
$data['status'] = 0;
|
||||||
$data['is_show'] = 0;
|
$data['is_show'] = 0;
|
||||||
@ -624,6 +624,10 @@ class Community extends BaseController
|
|||||||
public function entrust()
|
public function entrust()
|
||||||
{
|
{
|
||||||
$data = $this->checkParams();
|
$data = $this->checkParams();
|
||||||
|
$merchantInfo = Db::name('merchant')->where('mer_id', $data['entrust_mer_id'] ?? 0)->where('type_id', Merchant::TypeSupplyChain)->fetchSql(false)->find();
|
||||||
|
if (!$merchantInfo) {
|
||||||
|
return app('json')->fail('此商户不支持委托');
|
||||||
|
}
|
||||||
$this->checkUserAuth();
|
$this->checkUserAuth();
|
||||||
$data['uid'] = $this->request->uid();
|
$data['uid'] = $this->request->uid();
|
||||||
$res = $this->repository->create($data);
|
$res = $this->repository->create($data);
|
||||||
@ -640,6 +644,10 @@ class Community extends BaseController
|
|||||||
if (!$communityInfo) {
|
if (!$communityInfo) {
|
||||||
return app('json')->fail('委托商品不存在');
|
return app('json')->fail('委托商品不存在');
|
||||||
}
|
}
|
||||||
|
$entrustInfo = Db::name('entrust')->where('community_id', $id)->where('entrust_mer_id', $this->request->uid())->where('is_del', 0)->where('status', 0)->fetchSql(false)->find();
|
||||||
|
if (!$entrustInfo) {
|
||||||
|
return app('json')->fail('用户无审核此委托商品权限');
|
||||||
|
}
|
||||||
$status = $this->request->param('status');
|
$status = $this->request->param('status');
|
||||||
if (!$status) {
|
if (!$status) {
|
||||||
return app('json')->fail('请设置审核状态');
|
return app('json')->fail('请设置审核状态');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user