Просмотр исходного кода

[A端][修复]:删除场景发券表中一些冗余字段

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
c396d2a184
5 измененных файлов: 4 добавлений и 58 удалений
  1. +0
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/WxCouponSendController.java
  2. +0
    -1
      mallinkSchedule/src/main/java/com/iformall/schedule/CouponExpiringSchedule.java
  3. +3
    -30
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java
  4. +0
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java
  5. +1
    -24
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml

+ 0
- 1
mallinkAdmin/src/main/java/com/iformall/controller/WxCouponSendController.java Просмотреть файл

@@ -76,7 +76,6 @@ public class WxCouponSendController extends BaseController {
return new ResultData(ErrorCode.COUPON_TYPE_IS_NOT_PASSIVE);
}

wxCouponSend.setType(wxCoupon.getType());
wxCouponSend.setTenantId(wxCoupon.getTenantId());
wxCouponSend.setTitle(wxCoupon.getTitle());
wxCouponSend.setCreateDate(new Date());


+ 0
- 1
mallinkSchedule/src/main/java/com/iformall/schedule/CouponExpiringSchedule.java Просмотреть файл

@@ -38,7 +38,6 @@ public class CouponExpiringSchedule {
@Scheduled(cron = "0 10 0 * * ?") // 每天凌晨00:10 下架定向发放
//@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次
public void couponSendExpiringSchedule() {
wxCouponSendMapper.offExpiriedCouponSendBySendEndTime();
wxCouponSendMapper.offExpiriedCouponSendByCouponStatus();
}



+ 3
- 30
mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java Просмотреть файл

@@ -47,9 +47,7 @@ public class WxCouponSend implements Serializable {
/*卡券id**/
@io.swagger.annotations.ApiModelProperty(value="卡券id",name="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")
private String title;
@@ -59,12 +57,7 @@ public class WxCouponSend implements Serializable {
/*0:有效 1:无效**/
@io.swagger.annotations.ApiModelProperty(value="0:有效 1:无效",name="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")
private Date createDate;
@@ -89,12 +82,6 @@ public class WxCouponSend implements Serializable {
public void setCouponId(Long _couponId) {
couponId = _couponId;
}
public Integer getType() {
return type;
}
public void setType(Integer _type) {
type = _type;
}
public String getTitle() {
return title;
}
@@ -113,18 +100,7 @@ public class WxCouponSend implements Serializable {
public void setStatus(Integer _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() {
return createDate;
}
@@ -151,12 +127,9 @@ public class WxCouponSend implements Serializable {
Id_ASC("`id` ASC"),Id_DESC("`id` DESC")
,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_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")
,SendType_ASC("`send_type` ASC"),SendType_DESC("`send_type` 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")
,UpdateDate_ASC("`update_date` ASC"),UpdateDate_DESC("`update_date` DESC")
;


+ 0
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java Просмотреть файл

@@ -154,6 +154,4 @@ public class WxCouponSendServiceImpl implements WxCouponSendService {
wxCouponSend.setUpdateDate(new Date());
wxCouponSendMapper.updateStatusByCouponId(wxCouponSend);
}


}

+ 1
- 24
mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml Просмотреть файл

@@ -5,18 +5,15 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="send_type" jdbcType="INTEGER" property="sendType" />
<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="update_date" jdbcType="TIMESTAMP" property="updateDate" />
</resultMap>

<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 id="dynamicWhereConditions">
@@ -37,11 +34,6 @@

</if>

<if test=" null != type ">
and `type` = #{type}

</if>

<if test=" null != title ">
and `title` like concat('%', #{title},'%')

@@ -57,16 +49,6 @@

</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 ">
and `create_date` = #{createDate}

@@ -102,11 +84,6 @@
((c.status = 1) or (c.valid_type = 1 and c.valid_end_date &lt; now()))
</update>

<update id="offExpiriedCouponSendBySendEndTime">
update wx_coupon_send
set status=1, update_date = now()
where status = 0 and send_end_time &lt; now()
</update>


</mapper>

Загрузка…
Отмена
Сохранить