增加操作人员信息

This commit is contained in:
codeliu 2024-03-23 14:16:58 +08:00
parent 2f084ec602
commit e29afd5c50
2 changed files with 23 additions and 2 deletions

View File

@ -13,6 +13,7 @@
namespace app\common\repositories\system\merchant; namespace app\common\repositories\system\merchant;
use app\common\Enum; use app\common\Enum;
use app\common\model\system\admin\Admin;
use app\common\model\system\merchant\Merchant; use app\common\model\system\merchant\Merchant;
use app\common\model\system\merchant\MerchantCategory; use app\common\model\system\merchant\MerchantCategory;
use app\common\model\system\merchant\MerchantIntention; use app\common\model\system\merchant\MerchantIntention;
@ -57,6 +58,18 @@ class MerchantIntentionRepository extends BaseRepository
$list = $query->page($page, $limit) $list = $query->page($page, $limit)
->order('create_time DESC , status ASC')->with(['merchantCategory', 'merchantType']) ->order('create_time DESC , status ASC')->with(['merchantCategory', 'merchantType'])
->select(); ->select();
foreach ($list as $k=> &$value){
if ($value['admin_id']) {
$checkInfo = Admin::getDB()->where('admin_id',$value['admin_id'])->find();
$value['check_name'] = $checkInfo['real_name'];
$value['check_phone'] = $checkInfo['phone'];
}else{
$value['check_name'] = '';
$value['check_phone'] = '';
}
}
return compact('count', 'list'); return compact('count', 'list');
} }

View File

@ -13,6 +13,7 @@
namespace app\controller\api\store\merchant; namespace app\controller\api\store\merchant;
use app\common\Enum; use app\common\Enum;
use app\common\model\system\admin\Admin;
use app\common\model\system\merchant\Merchant; use app\common\model\system\merchant\Merchant;
use app\common\repositories\system\merchant\MerchantAdminRepository; use app\common\repositories\system\merchant\MerchantAdminRepository;
use app\common\repositories\system\merchant\MerchantCategoryRepository; use app\common\repositories\system\merchant\MerchantCategoryRepository;
@ -363,8 +364,15 @@ class MerchantIntention extends BaseController
//后期看改 //后期看改
foreach ($list as $k => &$v){ foreach ($list as $k => &$v){
$v['mer_avatar'] = Merchant::getDB()->where('uid',$v['uid'])->value('mer_avatar'); $v['mer_avatar'] = Merchant::getDB()->where('uid',$v['uid'])->value('mer_avatar');
$v['check_name'] = "小方";
$v['check_phone'] = "18715236963"; if ($v['admin_id']) {
$checkInfo = Admin::getDB()->where('admin_id',$v['admin_id'])->find();
$v['check_name'] = $checkInfo['real_name'];
$v['check_phone'] = $checkInfo['phone'];
}else{
$v['check_name'] = '';
$v['check_phone'] = '';
}
$v['check_avatar'] = "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56d04202403211340336015.png"; $v['check_avatar'] = "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56d04202403211340336015.png";
} }