| @@ -76,7 +76,6 @@ public class WxCouponSendController extends BaseController { | |||||
| return new ResultData(ErrorCode.COUPON_TYPE_IS_NOT_PASSIVE); | return new ResultData(ErrorCode.COUPON_TYPE_IS_NOT_PASSIVE); | ||||
| } | } | ||||
| wxCouponSend.setType(wxCoupon.getType()); | |||||
| wxCouponSend.setTenantId(wxCoupon.getTenantId()); | wxCouponSend.setTenantId(wxCoupon.getTenantId()); | ||||
| wxCouponSend.setTitle(wxCoupon.getTitle()); | wxCouponSend.setTitle(wxCoupon.getTitle()); | ||||
| wxCouponSend.setCreateDate(new Date()); | wxCouponSend.setCreateDate(new Date()); | ||||
| @@ -38,7 +38,6 @@ public class CouponExpiringSchedule { | |||||
| @Scheduled(cron = "0 10 0 * * ?") // 每天凌晨00:10 下架定向发放 | @Scheduled(cron = "0 10 0 * * ?") // 每天凌晨00:10 下架定向发放 | ||||
| //@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次 | //@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次 | ||||
| public void couponSendExpiringSchedule() { | public void couponSendExpiringSchedule() { | ||||
| wxCouponSendMapper.offExpiriedCouponSendBySendEndTime(); | |||||
| wxCouponSendMapper.offExpiriedCouponSendByCouponStatus(); | wxCouponSendMapper.offExpiriedCouponSendByCouponStatus(); | ||||
| } | } | ||||
| @@ -47,9 +47,7 @@ public class WxCouponSend implements Serializable { | |||||
| /*卡券id**/ | /*卡券id**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="卡券id",name="couponId") | @io.swagger.annotations.ApiModelProperty(value="卡券id",name="couponId") | ||||
| private Long couponId; | private Long couponId; | ||||
| /*券类型(1.满减券,2.代金券,3.团购券,4.礼品券,5.停车券)**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="券类型(1.满减券,2.代金券,3.团购券,4.礼品券,5.停车券)",name="type") | |||||
| private Integer type; | |||||
| /*券名称**/ | /*券名称**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="券名称",name="title") | @io.swagger.annotations.ApiModelProperty(value="券名称",name="title") | ||||
| private String title; | private String title; | ||||
| @@ -59,12 +57,7 @@ public class WxCouponSend implements Serializable { | |||||
| /*0:有效 1:无效**/ | /*0:有效 1:无效**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="0:有效 1:无效",name="status") | @io.swagger.annotations.ApiModelProperty(value="0:有效 1:无效",name="status") | ||||
| private Integer status; | private Integer status; | ||||
| /***/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="sendStartTime") | |||||
| private Date sendStartTime; | |||||
| /***/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="sendEndTime") | |||||
| private Date sendEndTime; | |||||
| /*创建时间**/ | /*创建时间**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | ||||
| private Date createDate; | private Date createDate; | ||||
| @@ -89,12 +82,6 @@ public class WxCouponSend implements Serializable { | |||||
| public void setCouponId(Long _couponId) { | public void setCouponId(Long _couponId) { | ||||
| couponId = _couponId; | couponId = _couponId; | ||||
| } | } | ||||
| public Integer getType() { | |||||
| return type; | |||||
| } | |||||
| public void setType(Integer _type) { | |||||
| type = _type; | |||||
| } | |||||
| public String getTitle() { | public String getTitle() { | ||||
| return title; | return title; | ||||
| } | } | ||||
| @@ -113,18 +100,7 @@ public class WxCouponSend implements Serializable { | |||||
| public void setStatus(Integer _status) { | public void setStatus(Integer _status) { | ||||
| status = _status; | status = _status; | ||||
| } | } | ||||
| public Date getSendStartTime() { | |||||
| return sendStartTime; | |||||
| } | |||||
| public void setSendStartTime(Date _sendStartTime) { | |||||
| sendStartTime = _sendStartTime; | |||||
| } | |||||
| public Date getSendEndTime() { | |||||
| return sendEndTime; | |||||
| } | |||||
| public void setSendEndTime(Date _sendEndTime) { | |||||
| sendEndTime = _sendEndTime; | |||||
| } | |||||
| public Date getCreateDate() { | public Date getCreateDate() { | ||||
| return createDate; | return createDate; | ||||
| } | } | ||||
| @@ -151,12 +127,9 @@ public class WxCouponSend implements Serializable { | |||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") | ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") | ||||
| ,CouponId_ASC("`coupon_id` ASC"),CouponId_DESC("`coupon_id` DESC") | ,CouponId_ASC("`coupon_id` ASC"),CouponId_DESC("`coupon_id` DESC") | ||||
| ,Type_ASC("`type` ASC"),Type_DESC("`type` DESC") | |||||
| ,Title_ASC("`title` ASC"),Title_DESC("`title` DESC") | ,Title_ASC("`title` ASC"),Title_DESC("`title` DESC") | ||||
| ,SendType_ASC("`send_type` ASC"),SendType_DESC("`send_type` DESC") | ,SendType_ASC("`send_type` ASC"),SendType_DESC("`send_type` DESC") | ||||
| ,Status_ASC("`status` ASC"),Status_DESC("`status` DESC") | ,Status_ASC("`status` ASC"),Status_DESC("`status` DESC") | ||||
| ,SendStartTime_ASC("`send_start_time` ASC"),SendStartTime_DESC("`send_start_time` DESC") | |||||
| ,SendEndTime_ASC("`send_end_time` ASC"),SendEndTime_DESC("`send_end_time` DESC") | |||||
| ,CreateDate_ASC("`create_date` ASC"),CreateDate_DESC("`create_date` DESC") | ,CreateDate_ASC("`create_date` ASC"),CreateDate_DESC("`create_date` DESC") | ||||
| ,UpdateDate_ASC("`update_date` ASC"),UpdateDate_DESC("`update_date` DESC") | ,UpdateDate_ASC("`update_date` ASC"),UpdateDate_DESC("`update_date` DESC") | ||||
| ; | ; | ||||
| @@ -154,6 +154,4 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { | |||||
| wxCouponSend.setUpdateDate(new Date()); | wxCouponSend.setUpdateDate(new Date()); | ||||
| wxCouponSendMapper.updateStatusByCouponId(wxCouponSend); | wxCouponSendMapper.updateStatusByCouponId(wxCouponSend); | ||||
| } | } | ||||
| } | } | ||||
| @@ -5,18 +5,15 @@ | |||||
| <id column="id" jdbcType="BIGINT" property="id" /> | <id column="id" jdbcType="BIGINT" property="id" /> | ||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | ||||
| <result column="coupon_id" jdbcType="BIGINT" property="couponId" /> | <result column="coupon_id" jdbcType="BIGINT" property="couponId" /> | ||||
| <result column="type" jdbcType="INTEGER" property="type" /> | |||||
| <result column="title" jdbcType="VARCHAR" property="title" /> | <result column="title" jdbcType="VARCHAR" property="title" /> | ||||
| <result column="send_type" jdbcType="INTEGER" property="sendType" /> | <result column="send_type" jdbcType="INTEGER" property="sendType" /> | ||||
| <result column="status" jdbcType="INTEGER" property="status" /> | <result column="status" jdbcType="INTEGER" property="status" /> | ||||
| <result column="send_start_time" jdbcType="TIMESTAMP" property="sendStartTime" /> | |||||
| <result column="send_end_time" jdbcType="TIMESTAMP" property="sendEndTime" /> | |||||
| <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" /> | ||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`coupon_id`,`type`,`title`,`send_type`,`status`,`send_start_time`,`send_end_time`,`create_date`,`update_date` | |||||
| `id`,`tenant_id`,`coupon_id`,`title`,`send_type`,`status`,`create_date`,`update_date` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -37,11 +34,6 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != type "> | |||||
| and `type` = #{type} | |||||
| </if> | |||||
| <if test=" null != title "> | <if test=" null != title "> | ||||
| and `title` like concat('%', #{title},'%') | and `title` like concat('%', #{title},'%') | ||||
| @@ -57,16 +49,6 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != sendStartTime "> | |||||
| and `send_start_time` = #{sendStartTime} | |||||
| </if> | |||||
| <if test=" null != sendEndTime "> | |||||
| and `send_end_time` = #{sendEndTime} | |||||
| </if> | |||||
| <if test=" null != createDate "> | <if test=" null != createDate "> | ||||
| and `create_date` = #{createDate} | and `create_date` = #{createDate} | ||||
| @@ -102,11 +84,6 @@ | |||||
| ((c.status = 1) or (c.valid_type = 1 and c.valid_end_date < now())) | ((c.status = 1) or (c.valid_type = 1 and c.valid_end_date < now())) | ||||
| </update> | </update> | ||||
| <update id="offExpiriedCouponSendBySendEndTime"> | |||||
| update wx_coupon_send | |||||
| set status=1, update_date = now() | |||||
| where status = 0 and send_end_time < now() | |||||
| </update> | |||||
| </mapper> | </mapper> | ||||