| | |
| | | and `id` = #{id} |
| | | </if> |
| | | </select> |
| | | <select id="queryCouponListOfSearch" resultType="java.util.Map"> |
| | | SELECT id, |
| | | `name`, |
| | | useScope, |
| | | `type`, |
| | | distributionMethod, |
| | | date_format(startTime ,'%Y-%m-%d') as startTime, |
| | | date_format(endTime ,'%Y-%m-%d') as endTime, |
| | | userPopulation, |
| | | quantityIssued, |
| | | pickUpQuantity, |
| | | `status`, |
| | | state |
| | | from t_coupon |
| | | where 1 = 1 |
| | | <if test="name != null"> |
| | | and `name` like concat('%', #{}, '%') |
| | | </if> |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="distributionMethod != null"> |
| | | and distributionMethod = #{distributionMethod} |
| | | </if> |
| | | <if test="userPopulation != null"> |
| | | and userPopulation = #{userPopulation} |
| | | </if> |
| | | <if test="status !=null"> |
| | | and `status` = #{status} |
| | | </if> |
| | | <if test="state != null"> |
| | | and `state` = #{state} |
| | | </if> |
| | | order by insertTime desc |
| | | </select> |
| | | |
| | | |
| | | </mapper> |