This commit is contained in:
dute7liang
2024-01-21 19:55:39 +08:00
parent e36ad030e4
commit 5c9218ea83
18 changed files with 222 additions and 76 deletions

View File

@@ -30,7 +30,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.type != null and query.type == 3">
and t1.city_id = #{query.cityId}
</if>
order by t1.create_time desc
<if test="query.type != null and query.type == 1">
order by t1.sort desc, t1.create_time desc
</if>
<if test="query.type == null or query.type != 1">
order by t1.create_time desc
</if>
</select>
<select id="selectDynamicImageList" resultType="java.lang.String">
select t2.url
@@ -54,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and t1.audit_status = #{bo.auditStatus}
</if>
</where>
order by t1.create_time desc
order by t1.sort desc, t1.create_time desc
</select>

View File

@@ -22,6 +22,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by t1.create_time
</select>
<select id="countByUnionIds" resultType="com.ruoyi.cai.dto.admin.UnionCountDTO">
select
t1.union_id,
count(t1.id) all_num,
sum(if(t2.id,1,0)) anchor_num
from cai_union_user t1
left join cai_user t2 on t1.user_id = t2.id and t2.is_anchor = 1
where t1.union_id in
<foreach collection="unionIds" item="value" open="(" close=")" separator=",">
#{value}
</foreach>
group by t1.union_id;
</select>
</mapper>