| | |
| | | </if> |
| | | order by insertTime desc |
| | | </select> |
| | | <select id="ticketList" resultType="java.util.Map"> |
| | | SELECT id, |
| | | `name`, |
| | | cardType, |
| | | `cover`, |
| | | date_format(startTime ,'%Y-%m-%d') as startTime, |
| | | date_format(endTime ,'%Y-%m-%d') as endTime, |
| | | `type`, |
| | | useScope, |
| | | userPopulation, |
| | | quantityIssued, |
| | | pickUpQuantity, |
| | | `sort`, |
| | | shelves |
| | | from t_points_merchandise |
| | | where 1 = 1 |
| | | <if test="query.name != null"> |
| | | and `name` like concat('%', #{query.name}, '%') |
| | | </if> |
| | | <if test="query.type != null"> |
| | | and cardType = #{query.type} |
| | | </if> |
| | | <if test="query.redemptionMethod != null"> |
| | | and redemptionMethod = #{query.redemptionMethod} |
| | | </if> |
| | | <if test="query.userPopulation != null"> |
| | | and userPopulation = #{query.userPopulation} |
| | | </if> |
| | | <if test="query.state != null"> |
| | | and `state` = #{query.state} |
| | | </if> |
| | | and `type` = 3 |
| | | order by sort desc |
| | | </select> |
| | | <select id="changeState" resultType="java.lang.Integer"> |
| | | update t_points_merchandise set |
| | | shelves = #{query.state} |
| | | <where> |
| | | <if test="query.ids != null and query.ids.size()>0"> |
| | | AND t_points_merchandise.id IN |
| | | <foreach collection="query.ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |