Quellcode durchsuchen

[系统][修改]:删除Coupon表冗余字段targetAd,调整业态项为单选

release_toaliyun_real
hupeng vor 7 Jahren
Ursprung
Commit
ac64425708
7 geänderte Dateien mit 23 neuen und 60 gelöschten Zeilen
  1. +3
    -5
      mallinkAdmin/src/main/java/com/iformall/controller/WxCarController.java
  2. +2
    -8
      mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java
  3. +3
    -13
      mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java
  4. +3
    -3
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponChannel.java
  5. +3
    -13
      mallinkService/src/main/java/com/iformall/domain/vo/WxCouponCVo.java
  6. +3
    -3
      mallinkService/src/main/java/com/iformall/domain/vo/WxCouponCarVo.java
  7. +6
    -15
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 3
- 5
mallinkAdmin/src/main/java/com/iformall/controller/WxCarController.java Datei anzeigen

@@ -225,10 +225,9 @@ public class WxCarController extends BaseController {
priceStr = priceStr.replace("小时", ""); priceStr = priceStr.replace("小时", "");
wxCoupon.setPrice((int) (Double.parseDouble(priceStr) * 100)); wxCoupon.setPrice((int) (Double.parseDouble(priceStr) * 100));
} }
if (StringUtils.isNotBlank(coupon.getBusiness())) {
String[] arys = coupon.getBusiness().split(",");
wxCoupon.setBusiness(JSON.toJSONString(arys));
}

wxCoupon.setBusiness(coupon.getBusiness());

if(coupon.getId() != null && coupon.getId().longValue() > 0) { if(coupon.getId() != null && coupon.getId().longValue() > 0) {
wxCoupon.setId(coupon.getId()); wxCoupon.setId(coupon.getId());
} }
@@ -237,7 +236,6 @@ public class WxCarController extends BaseController {
wxCoupon.setTitle(coupon.getTitle()); wxCoupon.setTitle(coupon.getTitle());
wxCoupon.setSubTitle(coupon.getSubTitle()); wxCoupon.setSubTitle(coupon.getSubTitle());
wxCoupon.setUseLimitQuantity(coupon.getUseLimitQuantity()); wxCoupon.setUseLimitQuantity(coupon.getUseLimitQuantity());
wxCoupon.setTargetAd(coupon.getTargetAd());
wxCoupon.setSendType(coupon.getSendType()); wxCoupon.setSendType(coupon.getSendType());
wxCoupon.setValidType(coupon.getValidType()); wxCoupon.setValidType(coupon.getValidType());
wxCoupon.setValidStartDate(coupon.getValidStartDate()); wxCoupon.setValidStartDate(coupon.getValidStartDate());


+ 2
- 8
mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java Datei anzeigen

@@ -114,10 +114,7 @@ public class WxCouponController extends BaseController {
if (StringUtils.isNotEmpty(wxCoupon.getPriceStr())) { if (StringUtils.isNotEmpty(wxCoupon.getPriceStr())) {
wxCoupon.setPrice((int) (Double.parseDouble(wxCoupon.getPriceStr()) * 100)); wxCoupon.setPrice((int) (Double.parseDouble(wxCoupon.getPriceStr()) * 100));
} }
if (StringUtils.isNotBlank(wxCoupon.getBusiness())) {
String[] arys = wxCoupon.getBusiness().split(",");
wxCoupon.setBusiness(JSON.toJSONString(arys));
}

wxCoupon.setTenantId(getUser().getTenantId()); wxCoupon.setTenantId(getUser().getTenantId());
wxCoupon.setChannels(""); wxCoupon.setChannels("");
if (wxCoupon.getValidType() != null) { if (wxCoupon.getValidType() != null) {
@@ -148,10 +145,7 @@ public class WxCouponController extends BaseController {
if (StringUtils.isNotEmpty(wxCoupon.getPriceStr())) { if (StringUtils.isNotEmpty(wxCoupon.getPriceStr())) {
wxCoupon.setPrice((int) (Double.parseDouble(wxCoupon.getPriceStr()) * 100)); wxCoupon.setPrice((int) (Double.parseDouble(wxCoupon.getPriceStr()) * 100));
} }
if (StringUtils.isNotBlank(wxCoupon.getBusiness())) {
String[] arys = wxCoupon.getBusiness().split(",");
wxCoupon.setBusiness(JSON.toJSONString(arys));
}

if (wxCoupon.getValidType() != null) { if (wxCoupon.getValidType() != null) {
if (wxCoupon.getValidType().equals(EnumCouponValidType.DAYS_AFTER_RECEIVING)) { if (wxCoupon.getValidType().equals(EnumCouponValidType.DAYS_AFTER_RECEIVING)) {
wxCoupon.setValidStartDate(null); wxCoupon.setValidStartDate(null);


+ 3
- 13
mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java Datei anzeigen

@@ -89,9 +89,6 @@ public class WxCoupon implements Serializable {
/*限领张数**/ /*限领张数**/
@io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity") @io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity")
private Integer useLimitQuantity; private Integer useLimitQuantity;
/*投放频道位置(1.banner图,2.限时抢购)**/
@io.swagger.annotations.ApiModelProperty(value="投放频道位置(1.banner图,2.限时抢购)",name="targetAd")
private Integer targetAd;
/*1.主动领取2.定向投放**/ /*1.主动领取2.定向投放**/
@io.swagger.annotations.ApiModelProperty(value="1.主动领取2.定向投放",name="sendType") @io.swagger.annotations.ApiModelProperty(value="1.主动领取2.定向投放",name="sendType")
private Integer sendType; private Integer sendType;
@@ -136,7 +133,7 @@ public class WxCoupon implements Serializable {
private Date updateDate; private Date updateDate;
/*业态**/ /*业态**/
@io.swagger.annotations.ApiModelProperty(value="业态",name="business") @io.swagger.annotations.ApiModelProperty(value="业态",name="business")
private String business;
private Integer business;
public String getTenantId() { public String getTenantId() {
return tenantId; return tenantId;
} }
@@ -191,12 +188,6 @@ public class WxCoupon implements Serializable {
public void setUseLimitQuantity(Integer _useLimitQuantity) { public void setUseLimitQuantity(Integer _useLimitQuantity) {
useLimitQuantity = _useLimitQuantity; useLimitQuantity = _useLimitQuantity;
} }
public Integer getTargetAd() {
return targetAd;
}
public void setTargetAd(Integer _targetAd) {
targetAd = _targetAd;
}
public Integer getSendType() { public Integer getSendType() {
return sendType; return sendType;
} }
@@ -281,10 +272,10 @@ public class WxCoupon implements Serializable {
public void setUpdateDate(Date _updateDate) { public void setUpdateDate(Date _updateDate) {
updateDate = _updateDate; updateDate = _updateDate;
} }
public String getBusiness() {
public Integer getBusiness() {
return business; return business;
} }
public void setBusiness(String _business) {
public void setBusiness(Integer _business) {
business = _business; business = _business;
} }
public String getSalePriceStr() { public String getSalePriceStr() {
@@ -356,7 +347,6 @@ public class WxCoupon implements Serializable {
,SalePrice_ASC("`sale_price` ASC"),SalePrice_DESC("`sale_price` DESC") ,SalePrice_ASC("`sale_price` ASC"),SalePrice_DESC("`sale_price` DESC")
,UsePrice_ASC("`use_price` ASC"),UsePrice_DESC("`use_price` DESC") ,UsePrice_ASC("`use_price` ASC"),UsePrice_DESC("`use_price` DESC")
,UseLimitQuantity_ASC("`use_limit_quantity` ASC"),UseLimitQuantity_DESC("`use_limit_quantity` DESC") ,UseLimitQuantity_ASC("`use_limit_quantity` ASC"),UseLimitQuantity_DESC("`use_limit_quantity` DESC")
,TargetAd_ASC("`target_ad` ASC"),TargetAd_DESC("`target_ad` DESC")
,SendType_ASC("`send_type` ASC"),SendType_DESC("`send_type` DESC") ,SendType_ASC("`send_type` ASC"),SendType_DESC("`send_type` DESC")
,SendStartDate_ASC("`send_start_date` ASC"),SendStartDate_DESC("`send_start_date` DESC") ,SendStartDate_ASC("`send_start_date` ASC"),SendStartDate_DESC("`send_start_date` DESC")
,SendEndDate_ASC("`send_end_date` ASC"),SendEndDate_DESC("`send_end_ate` DESC") ,SendEndDate_ASC("`send_end_date` ASC"),SendEndDate_DESC("`send_end_ate` DESC")


+ 3
- 3
mallinkService/src/main/java/com/iformall/domain/po/WxCouponChannel.java Datei anzeigen

@@ -72,7 +72,7 @@ public class WxCouponChannel implements Serializable {
private Integer targetAd; private Integer targetAd;
/***/ /***/
@io.swagger.annotations.ApiModelProperty(value="",name="business") @io.swagger.annotations.ApiModelProperty(value="",name="business")
private String business;
private Integer business;
/*开始时间**/ /*开始时间**/
@io.swagger.annotations.ApiModelProperty(value="开始时间",name="beginTime") @io.swagger.annotations.ApiModelProperty(value="开始时间",name="beginTime")
private Date beginTime; private Date beginTime;
@@ -129,10 +129,10 @@ public class WxCouponChannel implements Serializable {
public void setTargetAd(Integer _targetAd) { public void setTargetAd(Integer _targetAd) {
targetAd = _targetAd; targetAd = _targetAd;
} }
public String getBusiness() {
public Integer getBusiness() {
return business; return business;
} }
public void setBusiness(String _business) {
public void setBusiness(Integer _business) {
business = _business; business = _business;
} }
public Date getBeginTime() { public Date getBeginTime() {


+ 3
- 13
mallinkService/src/main/java/com/iformall/domain/vo/WxCouponCVo.java Datei anzeigen

@@ -93,9 +93,6 @@ public class WxCouponCVo implements Serializable {
/*限领张数**/ /*限领张数**/
@io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity") @io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity")
private Integer useLimitQuantity; private Integer useLimitQuantity;
/*投放频道位置(1.banner图,2.限时抢购)**/
@io.swagger.annotations.ApiModelProperty(value="投放频道位置(1.banner图,2.限时抢购)",name="targetAd")
private Integer targetAd;
/*1.主动领取2.定向投放**/ /*1.主动领取2.定向投放**/
@io.swagger.annotations.ApiModelProperty(value="1.主动领取2.定向投放",name="sendType") @io.swagger.annotations.ApiModelProperty(value="1.主动领取2.定向投放",name="sendType")
private Integer sendType; private Integer sendType;
@@ -146,7 +143,7 @@ public class WxCouponCVo implements Serializable {
private Date updateDate; private Date updateDate;
/*业态**/ /*业态**/
@io.swagger.annotations.ApiModelProperty(value="业态",name="business") @io.swagger.annotations.ApiModelProperty(value="业态",name="business")
private String business;
private Integer business;




/*发券商户信息*/ /*发券商户信息*/
@@ -254,12 +251,6 @@ public class WxCouponCVo implements Serializable {
public void setUseLimitQuantity(Integer _useLimitQuantity) { public void setUseLimitQuantity(Integer _useLimitQuantity) {
useLimitQuantity = _useLimitQuantity; useLimitQuantity = _useLimitQuantity;
} }
public Integer getTargetAd() {
return targetAd;
}
public void setTargetAd(Integer _targetAd) {
targetAd = _targetAd;
}
public Integer getSendType() { public Integer getSendType() {
return sendType; return sendType;
} }
@@ -359,10 +350,10 @@ public class WxCouponCVo implements Serializable {
public void setUpdateDate(Date _updateDate) { public void setUpdateDate(Date _updateDate) {
updateDate = _updateDate; updateDate = _updateDate;
} }
public String getBusiness() {
public Integer getBusiness() {
return business; return business;
} }
public void setBusiness(String _business) {
public void setBusiness(Integer _business) {
business = _business; business = _business;
} }


@@ -467,7 +458,6 @@ public class WxCouponCVo implements Serializable {
,SalePrice_ASC("`salePrice` ASC"),SalePrice_DESC("`salePrice` DESC") ,SalePrice_ASC("`salePrice` ASC"),SalePrice_DESC("`salePrice` DESC")
,UsePrice_ASC("`usePrice` ASC"),UsePrice_DESC("`usePrice` DESC") ,UsePrice_ASC("`usePrice` ASC"),UsePrice_DESC("`usePrice` DESC")
,UseLimitQuantity_ASC("`useLimitQuantity` ASC"),UseLimitQuantity_DESC("`useLimitQuantity` DESC") ,UseLimitQuantity_ASC("`useLimitQuantity` ASC"),UseLimitQuantity_DESC("`useLimitQuantity` DESC")
,TargetAd_ASC("`targetAd` ASC"),TargetAd_DESC("`targetAd` DESC")
,SendType_ASC("`sendType` ASC"),SendType_DESC("`sendType` DESC") ,SendType_ASC("`sendType` ASC"),SendType_DESC("`sendType` DESC")
,SendStartDate_ASC("`sendStartDate` ASC"),SendStartDate_DESC("`sendStartDate` DESC") ,SendStartDate_ASC("`sendStartDate` ASC"),SendStartDate_DESC("`sendStartDate` DESC")
,SendEndDate_ASC("`sendEndDate` ASC"),SendEndDate_DESC("`sendEndDate` DESC") ,SendEndDate_ASC("`sendEndDate` ASC"),SendEndDate_DESC("`sendEndDate` DESC")


+ 3
- 3
mallinkService/src/main/java/com/iformall/domain/vo/WxCouponCarVo.java Datei anzeigen

@@ -125,7 +125,7 @@ public class WxCouponCarVo implements Serializable {
private Date updateDate; private Date updateDate;
/*业态**/ /*业态**/
@io.swagger.annotations.ApiModelProperty(value="业态",name="business") @io.swagger.annotations.ApiModelProperty(value="业态",name="business")
private String business;
private Integer business;
/*车场厂商类型**/ /*车场厂商类型**/
@io.swagger.annotations.ApiModelProperty(value="车场厂商类型1:ETCP,2:TJD",name="vendorType") @io.swagger.annotations.ApiModelProperty(value="车场厂商类型1:ETCP,2:TJD",name="vendorType")
private String vendorType; private String vendorType;
@@ -276,10 +276,10 @@ public class WxCouponCarVo implements Serializable {
public void setUpdateDate(Date _updateDate) { public void setUpdateDate(Date _updateDate) {
updateDate = _updateDate; updateDate = _updateDate;
} }
public String getBusiness() {
public Integer getBusiness() {
return business; return business;
} }
public void setBusiness(String _business) {
public void setBusiness(Integer _business) {
business = _business; business = _business;
} }




+ 6
- 15
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Datei anzeigen

@@ -12,7 +12,6 @@
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/> <result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/> <result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/> <result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="target_ad" jdbcType="INTEGER" property="targetAd"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/> <result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="valid_type" jdbcType="INTEGER" property="validType"/> <result column="valid_type" jdbcType="INTEGER" property="validType"/>
<result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/> <result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/>
@@ -27,11 +26,11 @@
<result column="status" jdbcType="INTEGER" property="status"/> <result column="status" jdbcType="INTEGER" property="status"/>
<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="business" jdbcType="VARCHAR" property="business"/>
<result column="business" jdbcType="INTEGER" property="business"/>
</resultMap> </resultMap>


<sql id="allColumns"> <sql id="allColumns">
`id`,`tenant_id`,`merchant_id`,`type`,`cover_img`,`title`,`sub_title`,`sale_price`,`use_price`,`use_limit_quantity`,`target_ad`,`send_type`,`valid_type`,`valid_start_date`,`valid_end_date`,`valid_days`,`detail`,`price`,`unit`,`remain_inventory`,`inventory`,`remark`,`status`,`create_date`,`update_date`,`business`
`id`,`tenant_id`,`merchant_id`,`type`,`cover_img`,`title`,`sub_title`,`sale_price`,`use_price`,`use_limit_quantity`,`send_type`,`valid_type`,`valid_start_date`,`valid_end_date`,`valid_days`,`detail`,`price`,`unit`,`remain_inventory`,`inventory`,`remark`,`status`,`create_date`,`update_date`,`business`
</sql> </sql>


<sql id="dynamicWhereConditions"> <sql id="dynamicWhereConditions">
@@ -77,15 +76,10 @@
and `use_limit_quantity` = #{useLimitQuantity} and `use_limit_quantity` = #{useLimitQuantity}
</if> </if>


<if test=" null != targetAd ">
and `target_ad` = #{targetAd}
</if>

<if test=" null != sendType "> <if test=" null != sendType ">
and `send_type` = #{sendType} and `send_type` = #{sendType}
</if> </if>



<if test=" null != validType "> <if test=" null != validType ">
and `valid_type` = #{validType} and `valid_type` = #{validType}
</if> </if>
@@ -138,12 +132,10 @@
and `update_date` = #{updateDate} and `update_date` = #{updateDate}
</if> </if>


<if test=" null != business and '0' == business">
and JSON_CONTAINS(`business`->'$',JSON_ARRAY('0'))
</if>
<if test=" null != business and '0' != business">
and (JSON_CONTAINS(`business`->'$',JSON_ARRAY('0')) or (JSON_CONTAINS(`business`->'$',JSON_ARRAY(#{business}))))
<if test=" null != business ">
and `business` = #{business}
</if> </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=")">
@@ -178,7 +170,6 @@
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/> <result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/> <result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/> <result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="target_ad" jdbcType="INTEGER" property="targetAd"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/> <result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="valid_type" jdbcType="INTEGER" property="validType"/> <result column="valid_type" jdbcType="INTEGER" property="validType"/>
<result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/> <result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/>
@@ -193,7 +184,7 @@
<result column="status" jdbcType="INTEGER" property="status"/> <result column="status" jdbcType="INTEGER" property="status"/>
<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="business" jdbcType="VARCHAR" property="business"/>
<result column="business" jdbcType="INTEGER" property="business"/>


<result column="img_url" jdbcType="VARCHAR" property="merchantImgUrl"/> <result column="img_url" jdbcType="VARCHAR" property="merchantImgUrl"/>
<result column="name" jdbcType="VARCHAR" property="merchantName"/> <result column="name" jdbcType="VARCHAR" property="merchantName"/>


Laden…
Abbrechen
Speichern