|
|
@@ -89,15 +89,14 @@
|
|
|
as intention
|
|
|
from (select relation_id
|
|
|
from `corp_user_tag` ct
|
|
|
- where tag_id = #{tagIdStr}
|
|
|
- group by relation_id
|
|
|
- <if test="thisDate != null">
|
|
|
- having date_format(min(ct.created_time),'%Y-%m-%d') = #{thisDate}
|
|
|
- </if>) s
|
|
|
+ where tag_id = #{tagIdStr}) s
|
|
|
left join corp_user_follow_relation cufr on cufr.id = s.relation_id
|
|
|
left join corp_user_auth ca on ca.external_userid = cufr.corp_user_id
|
|
|
left join corp_user cu on cu.id = ca.corp_user_id
|
|
|
inner join corp_user_pay_intention ccc on ccc.union_id = cu.unionid
|
|
|
+ <if test="thisDate != null">
|
|
|
+ and date_format(cu.created_time,'%Y-%m-%d') = #{thisDate}
|
|
|
+ </if>
|
|
|
group by ccc.intention
|
|
|
</select>
|
|
|
|