diff --git a/src/main/resources/mapper/bl/commission/fxy/FxyDataDao.xml b/src/main/resources/mapper/bl/commission/fxy/FxyDataDao.xml index 50fcbfe..01ce0a6 100644 --- a/src/main/resources/mapper/bl/commission/fxy/FxyDataDao.xml +++ b/src/main/resources/mapper/bl/commission/fxy/FxyDataDao.xml @@ -193,11 +193,11 @@ select x.id,x.user_id,y.avatar,y.user_name,x.name,x.phone,x.remarks,x.create_time,x.status,x.opinion,y.invitation_code,x.approve_time, - ifnull(select count(*) from tb_user ac inner join artificer aa on a.user_id = aa.user_id where ac.bl_jjr_code = y.invitation_code,0) as artificerCount, - ifnull(select count(*) from tb_user ac inner join artificer aa on a.user_id = aa.user_id - where ac.bl_jjr_code = y.invitation_code and date_format(aa.create_time, '%Y-%m-%d') = date_format(now(),'%Y-%m-%d'),0) as curArtificerCount, + ifnull((select count(*) from tb_user ac inner join artificer aa on ac.user_id = aa.user_id where ac.bl_jjr_code = y.invitation_code),0) as artificerCount, + ifnull((select count(*) from tb_user ac inner join artificer aa on ac.user_id = aa.user_id + where ac.bl_jjr_code = y.invitation_code and date_format(aa.create_time, '%Y-%m-%d') = date_format(now(),'%Y-%m-%d')),0) as curArtificerCount, ifnull(t1.ordersCount,0) as ordersCount, ifnull(t2.ordersCount,0) as curOrdersCount, ifnull(t3.money,0) as money