diff --git a/app/common/dao/system/merchant/MerchantDao.php b/app/common/dao/system/merchant/MerchantDao.php index 1138c2d..a2bc7e7 100644 --- a/app/common/dao/system/merchant/MerchantDao.php +++ b/app/common/dao/system/merchant/MerchantDao.php @@ -90,6 +90,9 @@ class MerchantDao extends BaseDao }) ->when(isset($where['delivery_way']) && $where['delivery_way'] !== '', function ($query) use ($where) { $query->whereLike('delivery_way', "%{$where['delivery_way']}%"); + }) + ->when(isset($where['invite_agent_id']) && $where['invite_agent_id'] !== '',function($query) use ($where){ + $query->whereLike('invite_agent_id', $where['invite_agent_id']); }); diff --git a/app/common/repositories/system/merchant/MerchantRepository.php b/app/common/repositories/system/merchant/MerchantRepository.php index a194f29..c84dffe 100644 --- a/app/common/repositories/system/merchant/MerchantRepository.php +++ b/app/common/repositories/system/merchant/MerchantRepository.php @@ -256,7 +256,7 @@ class MerchantRepository extends BaseRepository */ public function getList($where, $page, $limit, $userInfo) { - $field = 'care_count,is_trader,type_id,mer_id,mer_banner,mini_banner,mer_name, mark,mer_avatar,product_score,service_score,postage_score,sales,status,is_best,create_time,long,lat,is_margin'; + $field = 'real_name,mer_phone,care_count,is_trader,type_id,mer_id,mer_banner,mini_banner,mer_name, mark,mer_avatar,product_score,service_score,postage_score,sales,status,is_best,create_time,long,lat,is_margin'; $where['status'] = 1; $where['mer_state'] = 1; $where['is_del'] = 0; diff --git a/app/controller/api/Agent.php b/app/controller/api/Agent.php index 0579f09..ee830bd 100644 --- a/app/controller/api/Agent.php +++ b/app/controller/api/Agent.php @@ -7,6 +7,7 @@ use app\common\model\system\merchant\Merchant; use app\common\repositories\marketing\AgentApplyRepository; use app\common\repositories\marketing\AgentBrokerageRepository; use app\common\repositories\marketing\AgentRepository; +use app\common\repositories\system\merchant\MerchantRepository; use crmeb\basic\BaseController; use think\App; use think\exception\ValidateException; @@ -386,6 +387,21 @@ class Agent extends BaseController{ 'corporate_name' => in_array($agentInfo['agent_type'],[1,9,10]) ? '万马奔腾总部' : $corporateName ]); } + /** + * Common: 获取我邀请的所有店铺 + * Author: wu-hui + * Time: 2024/03/29 11:55 + * @return mixed + */ + public function getMyInvite(){ + $where = $this->request->params(['merchant_type', 'invite_agent_id']); + [$page, $limit] = $this->getPage(); + $data = app()->make(MerchantRepository::class)->lst($where, $page, $limit); + + return app('json')->success($data); + } + + } diff --git a/route/api.php b/route/api.php index 12dcb95..3463de4 100644 --- a/route/api.php +++ b/route/api.php @@ -409,6 +409,7 @@ Route::group('api/', function () { Route::get('commission_list', 'commissionList');// 佣金明细 Route::get('identity_list', 'getIdentityList');// 获取用户身份信息列表 Route::get('role_and_correlation_role', 'getRoleAndCorrelationRole');// 获取指定角色及相关角色的信息 + Route::get('my_invite', 'getMyInvite');// 我的邀请(商户) })->prefix('api.Agent/');