| | |
| | | <if test="null != type and 4 == type"> |
| | | and a.payStatus = 3 |
| | | </if> |
| | | order by a.insertTime desc limit #{pageNo}, #{pageSize} |
| | | order by a.insertTime desc, a.id desc limit #{pageNo}, #{pageSize} |
| | | </select> |
| | | <select id="queryDatas" resultType="com.dsh.competition.feignclient.model.BillingRequest"> |
| | | SELECT DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`, |
| | | amount |
| | | SELECT |
| | | DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`, |
| | | amount, |
| | | UNIX_TIMESTAMP(payTime) * 1000 as dateTime |
| | | from t_payment_competition |
| | | where payStatus in (2,3) and payType in (1,2) |
| | | <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd"> |
| | |
| | | </if> |
| | | </select> |
| | | <select id="queryCancelDatas" resultType="com.dsh.competition.feignclient.model.BillingRequest"> |
| | | SELECT DATE_FORMAT(refundTime, '%m-%d %H:%i')as `time`, |
| | | amount |
| | | SELECT |
| | | DATE_FORMAT(refundTime, '%m-%d %H:%i')as `time`, |
| | | amount, |
| | | UNIX_TIMESTAMP(refundTime) * 1000 as dateTime |
| | | from t_payment_competition |
| | | where payStatus = 3 and payType in (1,2) |
| | | <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd"> |
| | |
| | | select * from t_payment_competition t1 |
| | | <where> |
| | | <if test="query.amount!=null and query.amount!= ''"> |
| | | and t1.amount <= #{query.amount} |
| | | and t1.amount = #{query.amount} |
| | | </if> |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND t1.competitionId IN |
| | |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | AND FIND_IN_SET(#{query.storeId}, t1.competitionStoreIds) |
| | | </if> |
| | | <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> |
| | | and t1.insertTime between #{sTime} and #{eTime} |
| | | </if> |
| | | <choose> |
| | | <when test="query.includeRefund != null and query.includeRefund"> |
| | | and t1.payStatus IN (2, 3) |
| | | </when> |
| | | <otherwise> |
| | | and t1.payStatus = 2 |
| | | </otherwise> |
| | | </choose> |
| | | </where> |
| | | order by t1.insertTime desc, t1.id desc |
| | | </select> |
| | | <select id="queryBycode" resultType="java.lang.Integer"> |
| | | SELECT cp.storeId |
| | |
| | | select count(1) |
| | | from t_user_competition where competitionId = #{id} |
| | | </select> |
| | | </mapper> |
| | | </mapper> |