导粉记录
This commit is contained in:
@ -87,4 +87,22 @@
|
||||
and import_wx_account_id = #{importWxAccountId} order by id desc limit 1
|
||||
</select>
|
||||
|
||||
<!-- 根据微信号ID查询导粉多少 -->
|
||||
<select id="getTotalImportFanNum" parameterType="SysImportFanWxAccount" resultType="Map">
|
||||
select w.import_wx_account_id as wxAccountId,sum(w.import_fan_num) as fanNum
|
||||
from
|
||||
(
|
||||
select fwa.import_wx_account_id,fwa.import_fan_num from sys_import_fan_wx_account fwa
|
||||
left join sys_import_fan_record ifr on fwa.import_fan_record_id = ifr.id and ifr.del_flag = 0
|
||||
where fwa.del_flag = 0
|
||||
<if test="importFanDate != null">
|
||||
and ifr.import_fan_date = #{importFanDate}
|
||||
</if>
|
||||
<if test="importWxAccountId != null">
|
||||
and fwa.import_wx_account_id = #{importWxAccountId}
|
||||
</if>
|
||||
) w
|
||||
group by w.import_wx_account_id order by w.import_wx_account_id desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user