This commit is contained in:
yaooo 2023-11-17 17:20:57 +08:00
commit b4afce7c10
2 changed files with 16 additions and 1 deletions

View File

@ -69,6 +69,8 @@ class TaskController extends BaseApiController
if (isset($param['status']) && $param['status'] > 0) {
$where[] = ['status', '=', $param['status']];
}
$serviceGroupTaskTypeList = DictData::where(['type_value' => 'task_type', 'status' => 1])->column('value', 'id');
$villageTaskTypeList = DictData::where(['type_value' => 'village_task_type', 'status' => 1])->column('value', 'id');
$townTaskTypeList = DictData::where(['type_value' => 'town_task_type', 'status' => 1])->column('value', 'id');
$townMarketingManagerTaskTypeList = DictData::where(['type_value' => 'town_task_type_marketing_director', 'status' => 1])->column('value', 'id');
@ -78,6 +80,19 @@ class TaskController extends BaseApiController
->order(['id' => 'desc', 'status' => 'asc'])
->select()->toArray();
foreach ($res as $k => $item) {
if (isset($serviceGroupTaskTypeList[$item['type']])) {
$res[$k]['task_type_value'] = $serviceGroupTaskTypeList[$item['type']];
}
if (isset($villageTaskTypeList[$item['type']])) {
$res[$k]['task_type_value'] = $villageTaskTypeList[$item['type']];
}
if (isset($townTaskTypeList[$item['type']])) {
$res[$k]['task_type_value'] = $townTaskTypeList[$item['type']];
}
if (isset($townMarketingManagerTaskTypeList[$item['type']])) {
$res[$k]['task_type_value'] = $townMarketingManagerTaskTypeList[$item['type']];
}
if ($item['type'] == 33) {
$company = Company::where('id', $item['company_id'])->field('id,deposit,company_money,user_id,day_count,company_type,province,city,area,street,village,brigade,responsible_area')->find(); // 可能要判断预存金是否满足
$find = App(RemoteController::class)->shang_date_total_price($company,$param,$item['template_id']);

View File

@ -76,7 +76,7 @@ class UserLogic extends BaseLogic
public static function info(int $userId)
{
$user = User::where(['id' => $userId])->with(['company'])
->field('id,sn,sex,is_new_user,account,nickname,real_name,avatar,mobile,create_time,user_money,deposit,income,admin_id,company_id,is_captain,province,province province_name,city,city city_name,area,area area_name,street,street street_name,village,village village_name,brigade,brigade brigade_name')
->field('id,sn,sex,is_new_user,account,nickname,real_name,avatar,mobile,create_time,user_money,deposit,income,admin_id,company_id,is_captain,province,province province_name,city,city city_name,area,area area_name,street,street street_name,village,village village_name,brigade,brigade brigade_name, group_id')
->findOrEmpty();
// $user['avatar'] = $user['avatar'] ? Request()->host() . $user['avatar'] : $user['avatar'];
$user['day_money_count']=UserAccountLog::where(['user_id'=>$userId,'action'=>1])->whereDay('create_time')->sum('change_amount');