| @@ -15,10 +15,14 @@ | |||||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | ||||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | ||||
| <result column="detail" jdbcType="VARCHAR" property="detail"/> | <result column="detail" jdbcType="VARCHAR" property="detail"/> | ||||
| <result column="press_end_date" jdbcType="TIMESTAMP" property="pressEndDate"/> | |||||
| <result column="press_current_num" jdbcType="INTEGER" property="pressCurrentNum"/> | |||||
| <result column="press_current_value" jdbcType="INTEGER" property="pressCurrentValue"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`order_number`,`tenant_id`,`c_user_id`,`product_id`,`type`,`payment_type`,`payment`,`payment_time`,`order_status`,`create_date`,`update_date`,`detail` | |||||
| `id`,`order_number`,`tenant_id`,`c_user_id`,`product_id`,`type`,`payment_type`,`payment`,`payment_time`,`order_status`,`create_date`,`update_date`,`detail`, | |||||
| `press_end_date`,`press_current_num`,`press_current_value` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -75,6 +79,19 @@ | |||||
| <if test=" null != detail "> | <if test=" null != detail "> | ||||
| and `detail` like concat('%', #{detail},'%') | and `detail` like concat('%', #{detail},'%') | ||||
| </if> | </if> | ||||
| <if test=" null != pressEndDate "> | |||||
| and `press_end_date` = #{pressEndDate} | |||||
| </if> | |||||
| <if test=" null != pressCurrentNum "> | |||||
| and `press_current_num` = #{pressCurrentNum} | |||||
| </if> | |||||
| <if test=" null != pressCurrentValue "> | |||||
| and `press_current_value` = #{pressCurrentValue} | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -123,10 +140,10 @@ | |||||
| AND type = #{type,jdbcType=TINYINT} | AND type = #{type,jdbcType=TINYINT} | ||||
| </if> | </if> | ||||
| <if test="startDate != null"> | <if test="startDate != null"> | ||||
| AND create_date > #{startDate,jdbcType=TIMESTAMP} | |||||
| AND `create_date` > #{startDate,jdbcType=TIMESTAMP} | |||||
| </if> | </if> | ||||
| <if test="endDate != null"> | <if test="endDate != null"> | ||||
| AND create_date < #{endDate,jdbcType=TIMESTAMP} | |||||
| AND `create_date` < #{endDate,jdbcType=TIMESTAMP} | |||||
| </if> | </if> | ||||
| </select> | </select> | ||||
| @@ -139,10 +156,10 @@ | |||||
| AND type = #{type,jdbcType=TINYINT} | AND type = #{type,jdbcType=TINYINT} | ||||
| </if> | </if> | ||||
| <if test="startDate != null"> | <if test="startDate != null"> | ||||
| AND create_date > #{startDate,jdbcType=TIMESTAMP} | |||||
| AND `create_date` > #{startDate,jdbcType=TIMESTAMP} | |||||
| </if> | </if> | ||||
| <if test="endDate != null"> | <if test="endDate != null"> | ||||
| AND press_end_date < #{endDate,jdbcType=TIMESTAMP} | |||||
| AND `press_end_date` < #{endDate,jdbcType=TIMESTAMP} | |||||
| </if> | </if> | ||||
| </select> | </select> | ||||
| @@ -202,7 +219,7 @@ | |||||
| from wx_coupon c,wx_order o | from wx_coupon c,wx_order o | ||||
| left join wx_coupon_order co on co.order_id = o.id | left join wx_coupon_order co on co.order_id = o.id | ||||
| left join wx_coupon_action_log cal on cal.coupon_order_id = co.id | left join wx_coupon_action_log cal on cal.coupon_order_id = co.id | ||||
| where o.product_id = c.id | |||||
| where o.product_id = c.id and c.type != 7 and c.type != 8 | |||||
| <if test="cUserId != null"> | <if test="cUserId != null"> | ||||
| and o.c_user_id = #{cUserId} | and o.c_user_id = #{cUserId} | ||||
| </if> | </if> | ||||