Showing
2 changed files
with
44 additions
and
12 deletions
@@ -26,8 +26,6 @@ public interface InviteSettlementItemMapper { | @@ -26,8 +26,6 @@ public interface InviteSettlementItemMapper { | ||
26 | @Param("type") Integer type, | 26 | @Param("type") Integer type, |
27 | @Param("inviteSettlementId") Integer inviteSettlementId); | 27 | @Param("inviteSettlementId") Integer inviteSettlementId); |
28 | 28 | ||
29 | - List<InviteSettlementItem> selectOrderNumByInviterUid(@Param("inviterUid") Integer inviterUid); | ||
30 | - | ||
31 | int updateByPrimaryKeySelective(InviteSettlementItem record); | 29 | int updateByPrimaryKeySelective(InviteSettlementItem record); |
32 | 30 | ||
33 | List<InviteSettlementItemStats> selectStatsByUidTypeAndInviteSettlementIdGroupBySellerUid(@Param("uid") Integer uid, | 31 | List<InviteSettlementItemStats> selectStatsByUidTypeAndInviteSettlementIdGroupBySellerUid(@Param("uid") Integer uid, |
@@ -40,11 +38,37 @@ public interface InviteSettlementItemMapper { | @@ -40,11 +38,37 @@ public interface InviteSettlementItemMapper { | ||
40 | @Param("sellerUid") Integer sellerUid); | 38 | @Param("sellerUid") Integer sellerUid); |
41 | 39 | ||
42 | 40 | ||
41 | + | ||
42 | + /** | ||
43 | + * 查询type1 结算方式的待结算和已结算订单数 | ||
44 | + * @param inviterUid | ||
45 | + * @return | ||
46 | + */ | ||
47 | + List<InviteSettlementItem> selectOrderNumByInviterUid(@Param("inviterUid") Integer inviterUid); | ||
48 | + | ||
49 | + /** | ||
50 | + * 根据条件查询,待结算和已结算的统计数据 | ||
51 | + * @param uid | ||
52 | + * @param type | ||
53 | + * @param startTime | ||
54 | + * @param endTime | ||
55 | + * @return | ||
56 | + */ | ||
43 | InviteSettlementItemStats selectStats(@Param("uid") Integer uid, | 57 | InviteSettlementItemStats selectStats(@Param("uid") Integer uid, |
44 | @Param("type") Integer type, | 58 | @Param("type") Integer type, |
45 | @Param("startTime") Integer startTime, | 59 | @Param("startTime") Integer startTime, |
46 | @Param("endTime") Integer endTime); | 60 | @Param("endTime") Integer endTime); |
47 | 61 | ||
62 | + /** | ||
63 | + * 根据条件查询,待结算和已结算的数据 | ||
64 | + * @param uid | ||
65 | + * @param type | ||
66 | + * @param startTime | ||
67 | + * @param endTime | ||
68 | + * @param start | ||
69 | + * @param limit | ||
70 | + * @return | ||
71 | + */ | ||
48 | List<InviteSettlementItem> select(@Param("uid") Integer uid, | 72 | List<InviteSettlementItem> select(@Param("uid") Integer uid, |
49 | @Param("type") Integer type, | 73 | @Param("type") Integer type, |
50 | @Param("startTime") Integer startTime, | 74 | @Param("startTime") Integer startTime, |
@@ -75,14 +75,6 @@ | @@ -75,14 +75,6 @@ | ||
75 | limit 1 | 75 | limit 1 |
76 | </select> | 76 | </select> |
77 | 77 | ||
78 | - <select id="selectOrderNumByInviterUid" resultMap="BaseResultMap" > | ||
79 | - select | ||
80 | - seller_uid, count(buyer_order_code) order_num | ||
81 | - from invite_settlement_item | ||
82 | - where uid = #{inviterUid,jdbcType=INTEGER} and status in (1,3) | ||
83 | - GROUP by seller_uid | ||
84 | - </select> | ||
85 | - | ||
86 | <select id="selectCountByUidTypeAndInviteSettlementId" resultType="java.lang.Integer" > | 78 | <select id="selectCountByUidTypeAndInviteSettlementId" resultType="java.lang.Integer" > |
87 | select | 79 | select |
88 | count(1) | 80 | count(1) |
@@ -97,7 +89,9 @@ | @@ -97,7 +89,9 @@ | ||
97 | sum(order_amount) as 'totalOrderAmount', | 89 | sum(order_amount) as 'totalOrderAmount', |
98 | sum(settle_amount) as 'totalSettleAmount' | 90 | sum(settle_amount) as 'totalSettleAmount' |
99 | from invite_settlement_item | 91 | from invite_settlement_item |
100 | - where uid = #{uid,jdbcType=INTEGER} and type = #{type,jdbcType=INTEGER} and invite_settlement_id = #{inviteSettlementId,jdbcType=INTEGER} | 92 | + where uid = #{uid,jdbcType=INTEGER} |
93 | + and type = #{type,jdbcType=INTEGER} | ||
94 | + and invite_settlement_id = #{inviteSettlementId,jdbcType=INTEGER} | ||
101 | group by seller_uid | 95 | group by seller_uid |
102 | </select> | 96 | </select> |
103 | 97 | ||
@@ -107,10 +101,24 @@ | @@ -107,10 +101,24 @@ | ||
107 | select | 101 | select |
108 | <include refid="Base_Column_List" /> | 102 | <include refid="Base_Column_List" /> |
109 | from invite_settlement_item | 103 | from invite_settlement_item |
110 | - where uid = #{uid,jdbcType=INTEGER} and type = #{type,jdbcType=INTEGER} and invite_settlement_id = #{inviteSettlementId,jdbcType=INTEGER} | 104 | + where uid = #{uid,jdbcType=INTEGER} |
105 | + and type = #{type,jdbcType=INTEGER} | ||
106 | + and invite_settlement_id = #{inviteSettlementId,jdbcType=INTEGER} | ||
111 | and seller_uid = #{sellerUid,jdbcType=INTEGER} | 107 | and seller_uid = #{sellerUid,jdbcType=INTEGER} |
112 | </select> | 108 | </select> |
113 | 109 | ||
110 | + | ||
111 | + | ||
112 | + <select id="selectOrderNumByInviterUid" resultMap="BaseResultMap" > | ||
113 | + select | ||
114 | + seller_uid, count(buyer_order_code) order_num | ||
115 | + from invite_settlement_item | ||
116 | + where uid = #{inviterUid,jdbcType=INTEGER} | ||
117 | + and status in (1,3) | ||
118 | + and type = 1 | ||
119 | + GROUP by seller_uid | ||
120 | + </select> | ||
121 | + | ||
114 | <select id="selectStats" resultType="com.yohoufo.dal.order.model.InviteSettlementItemStats" > | 122 | <select id="selectStats" resultType="com.yohoufo.dal.order.model.InviteSettlementItemStats" > |
115 | select | 123 | select |
116 | count(1) as 'totalElements', | 124 | count(1) as 'totalElements', |
-
Please register or login to post a comment