Helius
2022-05-27 4351e71d782741143a98f86f6648acd16689165f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?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.matrix.system.shopXcx.dao.ShopOrderV2Dao">
 
    <select id="selectReceivedOrderCount" resultType="java.lang.Integer">
        select count(*)  from shop_order where user_id = #{userId} and order_status in (4,5)
    </select>
 
    <select id="countOrderAmount" resultType="java.lang.Double">
        select IFNULL(sum(IFNULL( order_money, 0 )),0)  from shop_order where user_id = #{userId} and order_status in (4,5)
    </select>
 
    <select id="countBuyZdcp" resultType="java.lang.Integer">
        select count(*) from shop_order a
                          left join shop_order_details b on a.id=b.order_id
        where a.user_id=#{userId}
          and  order_status in (4,5)
          and find_in_set(b.p_id,#{productIds})
    </select>
 
 
 
</mapper>