mybatisflex分页修改
This commit is contained in:
@@ -19,17 +19,7 @@
|
||||
and amount - #{money} >= 0
|
||||
</update>
|
||||
|
||||
<select id="selectPageByKeyAndIsVip" resultType="com.czg.account.entity.ShopUser">
|
||||
select a.* from tb_user_info as a
|
||||
left join tb_shop_user as b on a.id=b.user_id
|
||||
where b.shop_id=#{shopId}
|
||||
<if test="key != null and key != ''">
|
||||
and (a.nick_name like %#{key}% or a.phone like %#{key}%)
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
and b.is_vip=#{isVip}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectUserSummary" resultType="com.czg.account.dto.shopuser.ShopUserSummaryDTO">
|
||||
select count(a.id) userTotal, sum(IFNULL(a.amount, 0)) balanceTotal,sum(IFNULL(b.amount,0)) chargeTotal from
|
||||
tb_shop_user as a
|
||||
@@ -53,4 +43,12 @@
|
||||
left join tb_shop_activate_in_record as c on c.shop_id = b.shop_id
|
||||
where a.id=#{userId}
|
||||
</select>
|
||||
<select id="selectPageByKeyAndIsVip" resultType="com.czg.account.entity.ShopUser">
|
||||
select tb_user_info.* from tb_user_info
|
||||
left join tb_shop_user on tb_user_info.id=tb_shop_user.user_id ${qwSql} limit ${pageOffset}, ${pageSize}
|
||||
</select>
|
||||
<select id="selectPageByKeyAndIsVip_COUNT" resultType="java.lang.Long">
|
||||
select count(1) from tb_user_info
|
||||
left join tb_shop_user on tb_user_info.id=tb_shop_user.user_id ${qwSql}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user