|
|
@@ -395,4 +395,96 @@
|
|
|
and a.buyer_id= #{uid}
|
|
|
group by a.buyer_id
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectSignSummaryList" resultType="com.goafanti.order.bo.OutSignSummary">
|
|
|
+ select a.id ,a.nickname ,b.sign_number signNumber,b.sign_amount signAmount,
|
|
|
+ date_format(b.first_signing_time ,'%Y-%m-%d') firstSigningTime,
|
|
|
+ date_format(b.last_signing_time ,'%Y-%m-%d') lastSigningTime ,
|
|
|
+ b.last_sales_type lastSalesType,c.name,b.follow_dep followDep,
|
|
|
+ b.last_follow_type lastFollowType,b.follow_explain followExplain ,b.follow_number followNumber ,
|
|
|
+ date_format(b.last_follow_time ,'%Y-%m-%d %H:%i:%S') lastFollowTime ,b.task_names taskNames ,
|
|
|
+ b.`member` ,b.chargeback ,b.big_customer bigCustomer
|
|
|
+ from user a left join user_mid b on a.id=b.uid left join admin c on a.aid=c.id
|
|
|
+ where 1=1
|
|
|
+ <if test="userName != null">
|
|
|
+ and a.nickname like concat('%',#{userName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="adminName != null">
|
|
|
+ and c.name like concat('%',#{adminName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="member != null">
|
|
|
+ and b.`member` = #{member}
|
|
|
+ </if>
|
|
|
+ <if test="chargeback != null">
|
|
|
+ and b.chargeback = #{chargeback}
|
|
|
+ </if>
|
|
|
+ <if test="bigCustomer != null">
|
|
|
+ and b.big_customer = #{bigCustomer}
|
|
|
+ </if>
|
|
|
+ <if test="lastFollowType != null">
|
|
|
+ and b.last_follow_type = #{lastFollowType}
|
|
|
+ </if>
|
|
|
+ <if test="followDep != null">
|
|
|
+ and b.follow_dep = #{followDep}
|
|
|
+ </if>
|
|
|
+ <if test="lastFollowTimeStart != null and lastFollowTimeEnd !=null">
|
|
|
+ and b.last_follow_time BETWEEN #{lastFollowTimeStart} and #{lastFollowTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="firstSigningTimeStart != null and firstSigningTimeEnd !=null">
|
|
|
+ and b.first_signing_time BETWEEN #{firstSigningTimeStart} and #{firstSigningTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="lastSigningTimeStart != null and lastSigningTimeStart !=null">
|
|
|
+ and b.last_signing_time BETWEEN #{lastSigningTimeStart} and #{lastSigningTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="signNumber != null">
|
|
|
+ and b.sign_number = #{signNumber}
|
|
|
+ </if>
|
|
|
+ <if test="lastSalesType != null">
|
|
|
+ and b.last_sales_type = #{lastSalesType}
|
|
|
+ </if>
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectSignSummaryCount" resultType="integer">
|
|
|
+ select count(*)
|
|
|
+ from user a left join user_mid b on a.id=b.uid left join admin c on a.aid=c.id
|
|
|
+ where 1=1
|
|
|
+ <if test="userName != null">
|
|
|
+ and a.nickname like concat('%',#{userName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="adminName != null">
|
|
|
+ and c.name like concat('%',#{adminName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="member != null">
|
|
|
+ and b.`member` = #{member}
|
|
|
+ </if>
|
|
|
+ <if test="chargeback != null">
|
|
|
+ and b.chargeback = #{chargeback}
|
|
|
+ </if>
|
|
|
+ <if test="bigCustomer != null">
|
|
|
+ and b.big_customer = #{bigCustomer}
|
|
|
+ </if>
|
|
|
+ <if test="lastFollowType != null">
|
|
|
+ and b.last_follow_type = #{lastFollowType}
|
|
|
+ </if>
|
|
|
+ <if test="followDep != null">
|
|
|
+ and b.follow_dep = #{followDep}
|
|
|
+ </if>
|
|
|
+ <if test="lastFollowTimeStart != null and lastFollowTimeEnd !=null">
|
|
|
+ and b.last_follow_time BETWEEN #{lastFollowTimeStart} and #{lastFollowTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="firstSigningTimeStart != null and firstSigningTimeEnd !=null">
|
|
|
+ and b.first_signing_time BETWEEN #{firstSigningTimeStart} and #{firstSigningTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="lastSigningTimeStart != null and lastSigningTimeStart !=null">
|
|
|
+ and b.last_signing_time BETWEEN #{lastSigningTimeStart} and #{lastSigningTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="signNumber != null">
|
|
|
+ and b.sign_number = #{signNumber}
|
|
|
+ </if>
|
|
|
+ <if test="lastSalesType != null">
|
|
|
+ and b.last_sales_type = #{lastSalesType}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|