更新用户审核委托商品

This commit is contained in:
yaooo 2023-08-31 17:05:53 +08:00
parent ac09055d1a
commit f9709a7edc

View File

@ -275,7 +275,7 @@ class Community extends BaseController
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']);
$data['status'] = 0;
$data['is_show'] = 0;
@ -624,6 +624,10 @@ class Community extends BaseController
public function entrust()
{
$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();
$data['uid'] = $this->request->uid();
$res = $this->repository->create($data);
@ -640,6 +644,10 @@ class Community extends BaseController
if (!$communityInfo) {
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');
if (!$status) {
return app('json')->fail('请设置审核状态');