|
|
@@ -97,7 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="queryAvailableBalance" resultType="java.math.BigDecimal">
|
|
|
select sum(u.balance) from tb_user u
|
|
|
- <include refid="whereByStatis"/>
|
|
|
+ <where>
|
|
|
+ <include refid="whereByStatis"/>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
<select id="statistics" resultType="com.ruoyi.user.domain.vo.UserStatisticsVo">
|
|
|
@@ -109,8 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="bo.id == null">
|
|
|
join tb_user u on u.id = ub.user_id
|
|
|
</if>
|
|
|
- <include refid="whereByStatis"/>
|
|
|
<where>
|
|
|
+ <include refid="whereByStatis"/>
|
|
|
<if test="bo.id != null">
|
|
|
and ub.user_id = #{bo.id}
|
|
|
</if>
|
|
|
@@ -148,8 +150,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="bo.businessId != null">
|
|
|
and tsq.current_business_id = #{bo.businessId}
|
|
|
</if>
|
|
|
+ <include refid="whereByStatis"/>
|
|
|
</where>
|
|
|
- <include refid="whereByStatis"/>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectBusinessPage" resultType="com.ruoyi.user.domain.vo.UserVo">
|
|
|
@@ -175,19 +177,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<sql id="whereByStatis">
|
|
|
- <where>
|
|
|
- <if test="bo.mobile != null and bo.mobile != ''">
|
|
|
- and u.mobile like concat('%',#{bo.mobile},'%')
|
|
|
- </if>
|
|
|
- <if test="bo.nickname != null and bo.nickname != ''">
|
|
|
- and u.nickname like concat('%',#{bo.nickname},'%')
|
|
|
- </if>
|
|
|
- <if test="bo.createDayStart != null">
|
|
|
- and u.create_day >= #{bo.createDayStart}
|
|
|
- </if>
|
|
|
- <if test="bo.createDayEnd != null">
|
|
|
- and u.create_day <= #{bo.createDayEnd}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ <if test="bo.mobile != null and bo.mobile != ''">
|
|
|
+ and u.mobile like concat('%',#{bo.mobile},'%')
|
|
|
+ </if>
|
|
|
+ <if test="bo.nickname != null and bo.nickname != ''">
|
|
|
+ and u.nickname like concat('%',#{bo.nickname},'%')
|
|
|
+ </if>
|
|
|
+ <if test="bo.createDayStart != null">
|
|
|
+ and u.create_day >= #{bo.createDayStart}
|
|
|
+ </if>
|
|
|
+ <if test="bo.createDayEnd != null">
|
|
|
+ and u.create_day <= #{bo.createDayEnd}
|
|
|
+ </if>
|
|
|
</sql>
|
|
|
</mapper>
|