| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, couponId, userId, type, amount, storeId, endTime, amountCondition, status, createTime, updateTime, createBy, updateBy, isDelete |
| | | id, couponId, userId, `type`, amount, storeId, endTime, amountCondition, status, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.applet.vo.TCouponReceiveVO"> |
| | | select tcr.id, tcr.couponId, tcr.userId, tcr.`type`, tcr.amount, tcr.storeId, tcr.endTime, tcr.amountCondition, tcr.status, |
| | | tcr.createTime, tcr.updateTime, tcr.createBy, tcr.updateBy, tcr.isDelete,tc.name as couponName |
| | | from t_coupon_receive tcr |
| | | left join t_coupon tc on tc.id = tcr.couponId |
| | | <where> |
| | | <if test="query.userId != null"> |
| | | and tcr.userId = #{query.userId} |
| | | </if> |
| | | AND tcr.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tcr.status ASC,tcr.createTime DESC |
| | | </select> |
| | | |
| | | </mapper> |