wzh преди 4 месеца
родител
ревизия
61640544e1

+ 2 - 2
crmeb/app/api/controller/v2/wechat/WechatController.php

@@ -43,9 +43,9 @@ class WechatController
      * @email: 442384644@qq.com
      * @date: 2023/8/12
      */
-    public function authLogin($spread = '', $agent_id = '')
+    public function authLogin($spread = '', $agent_id = '',$goods_user_type = '')
     {
-        $data = $this->services->authLogin($spread, $agent_id);
+        $data = $this->services->authLogin($spread, $agent_id,$goods_user_type);
         return app('json')->success($data);
     }
 

+ 2 - 0
crmeb/app/dao/product/product/StoreProductDao.php

@@ -131,6 +131,8 @@ class StoreProductDao extends BaseDao
             $query->whereIn('id', function ($query) use ($where) {
                 $query->name('store_product_cate')->where('cate_id', is_array($where['sid']) ? 'in' : '=', $where['sid'])->field('product_id')->select();
             });
+        })->when(isset($where['goods_user_type']), function($query) use ($where) {
+            $query->where('goods_user_type', $where['goods_user_type']);
         })->when(isset($where['cid']) && $where['cid'], function ($query) use ($where) {
             $query->whereIn('id', function ($query) use ($where) {
                 $query->name('store_product_cate')->whereIn('cate_id', function ($query) use ($where) {

+ 1 - 1
crmeb/app/services/product/product/StoreProductServices.php

@@ -43,7 +43,7 @@ use crmeb\exceptions\ApiException;
 use crmeb\services\FileService;
 use crmeb\services\GroupDataService;
 use think\facade\Config;
-
+use think\facade\Log;
 /**
  * Class StoreProductService
  * @package app\services\product\product

+ 2 - 1
crmeb/app/services/wechat/WechatServices.php

@@ -112,11 +112,12 @@ class WechatServices extends BaseServices
      * @email: 442384644@qq.com
      * @date: 2023/8/12
      */
-    public function authLogin($spread = '', $agent_id = '')
+    public function authLogin($spread = '', $agent_id = '',$goods_user_type = '')
     {
         /** @var OAuth $oauth */
         $oauth = app()->make(OAuth::class);
         $wechatInfo = $oauth->oauth();
+        $wechatInfo['goods_user_type'] = $goods_user_type;
         if (!isset($wechatInfo['nickname'])) {
             $wechatInfo = $oauth->getUserInfo($wechatInfo['openid']);
             if (!isset($wechatInfo['nickname']))