1
zj
2024-06-13 66c2ab8a29786a5ee15c649890c5ec3c876c4774
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yami.trading.dao.user.WalletMapper">
 
  <select id="sumMoney" resultType="java.math.BigDecimal">
      SELECT IFNULL(SUM(w.MONEY),0) AS totle_money FROM tz_wallet w LEFT JOIN tz_user u ON u.user_id=w.user_id
      WHERE 1=1 AND u.role_name ='MEMBER'
 
 
      <if test=" children !=null and children.size > 0">
          and u.user_id  in
          <foreach collection="children" item="item" index="index" open="(" close=")" separator=",">
              #{item}
          </foreach>
      </if>
  </select>
 
 
 
 
</mapper>