|
@@ -51,33 +51,33 @@ public interface FsUserMapper
|
|
* @param fsUser 用户
|
|
* @param fsUser 用户
|
|
* @return 用户集合
|
|
* @return 用户集合
|
|
*/
|
|
*/
|
|
- @Select({"<script> " +
|
|
|
|
- "select b.total_amount,b.last_buy_time,p.pay_money as number,p.payment_id,p.pay_time," +
|
|
|
|
- " u.* FROM fs_user u LEFT JOIN (" +
|
|
|
|
- " SELECT max(payment_id) as payment_id, max(pay_time) as last_buy_time,SUM(pay_money) as total_amount,user_id " +
|
|
|
|
- " FROM fs_store_payment" +
|
|
|
|
- " WHERE status = 1 and user_id is not null group by user_id " +
|
|
|
|
- ") b ON u.user_id=b.user_id " +
|
|
|
|
- " LEFT JOIN fs_store_payment p ON u.user_id=p.user_id AND b.last_buy_time=p.pay_time AND b.payment_id=p.payment_id"+
|
|
|
|
- " WHERE 1=1 " +
|
|
|
|
- "<if test = 'maps.nickname != null and maps.nickname !=\"\" '> " +
|
|
|
|
- "and u.nickname like CONCAT('%',#{maps.nickname},'%') " +
|
|
|
|
- "</if>" +
|
|
|
|
- "<if test = 'maps.phone != null and maps.phone !=\"\" '> " +
|
|
|
|
- "and u.phone=#{maps.phone} " +
|
|
|
|
- "</if>" +
|
|
|
|
- "<if test = 'maps.registerDate != null and maps.registerDate !=\"\"'> " +
|
|
|
|
- "and DATE_FORMAT(u.register_date, '%Y-%m-%d') = DATE_FORMAT(#{maps.registerDate}, '%Y-%m-%d') " +
|
|
|
|
- "</if>" +
|
|
|
|
- "<if test = 'maps.registerCode != null and maps.registerCode !=\"\" '> " +
|
|
|
|
- "and u.register_code=#{maps.registerCode} " +
|
|
|
|
- "</if>" +
|
|
|
|
- "<if test='maps.status != null and maps.status !=\"\"'> and u.status = #{maps.status}</if>"+
|
|
|
|
- "<if test='maps.level != null and maps.level !=\"\"'> and u.level = #{maps.level}</if>"+
|
|
|
|
- "<if test='maps.isPromoter != null and maps.isPromoter !=\"\"'> and u.is_promoter = #{maps.isPromoter}</if>" +
|
|
|
|
- " order by user_id desc "+
|
|
|
|
- "</script>"}
|
|
|
|
- )
|
|
|
|
|
|
+// @Select({"<script> " +
|
|
|
|
+// "select b.total_amount,b.last_buy_time,p.pay_money as number,p.payment_id,p.pay_time," +
|
|
|
|
+// " u.* FROM fs_user u LEFT JOIN (" +
|
|
|
|
+// " SELECT max(payment_id) as payment_id, max(pay_time) as last_buy_time,SUM(pay_money) as total_amount,user_id " +
|
|
|
|
+// " FROM fs_store_payment" +
|
|
|
|
+// " WHERE status = 1 and user_id is not null group by user_id " +
|
|
|
|
+// ") b ON u.user_id=b.user_id " +
|
|
|
|
+// " LEFT JOIN fs_store_payment p ON u.user_id=p.user_id AND b.last_buy_time=p.pay_time AND b.payment_id=p.payment_id"+
|
|
|
|
+// " WHERE 1=1 " +
|
|
|
|
+// "<if test = 'maps.nickname != null and maps.nickname !=\"\" '> " +
|
|
|
|
+// "and u.nickname like CONCAT('%',#{maps.nickname},'%') " +
|
|
|
|
+// "</if>" +
|
|
|
|
+// "<if test = 'maps.phone != null and maps.phone !=\"\" '> " +
|
|
|
|
+// "and u.phone=#{maps.phone} " +
|
|
|
|
+// "</if>" +
|
|
|
|
+// "<if test = 'maps.registerDate != null and maps.registerDate !=\"\"'> " +
|
|
|
|
+// "and DATE_FORMAT(u.register_date, '%Y-%m-%d') = DATE_FORMAT(#{maps.registerDate}, '%Y-%m-%d') " +
|
|
|
|
+// "</if>" +
|
|
|
|
+// "<if test = 'maps.registerCode != null and maps.registerCode !=\"\" '> " +
|
|
|
|
+// "and u.register_code=#{maps.registerCode} " +
|
|
|
|
+// "</if>" +
|
|
|
|
+// "<if test='maps.status != null and maps.status !=\"\"'> and u.status = #{maps.status}</if>"+
|
|
|
|
+// "<if test='maps.level != null and maps.level !=\"\"'> and u.level = #{maps.level}</if>"+
|
|
|
|
+// "<if test='maps.isPromoter != null and maps.isPromoter !=\"\"'> and u.is_promoter = #{maps.isPromoter}</if>" +
|
|
|
|
+// " order by user_id desc "+
|
|
|
|
+// "</script>"}
|
|
|
|
+// )
|
|
public List<FSUserVO> selectFsUserVOList(@Param("maps") FsUser fsUser);
|
|
public List<FSUserVO> selectFsUserVOList(@Param("maps") FsUser fsUser);
|
|
|
|
|
|
/**
|
|
/**
|