Browse Source

业态添加type

release_toaliyun_real
masterspirit 7 years ago
parent
commit
ae4eceec34
4 changed files with 123 additions and 48 deletions
  1. +12
    -2
      mallinkService/src/main/java/com/simple/domain/po/WxBusiness.java
  2. +79
    -43
      mallinkService/src/main/java/com/simple/domain/po/WxCoupon.java
  3. +7
    -1
      mallinkService/src/main/resources/mapper/WxBusinessMapper.xml
  4. +25
    -2
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 12
- 2
mallinkService/src/main/java/com/simple/domain/po/WxBusiness.java View File

@@ -47,6 +47,9 @@ public class WxBusiness implements Serializable {
/*业态名**/
@io.swagger.annotations.ApiModelProperty(value="业态名",name="title")
private String title;
/*1.优惠券**/
@io.swagger.annotations.ApiModelProperty(value="1.优惠券",name="type")
private Integer type;
/*创建时间**/
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
private Date createDate;
@@ -65,6 +68,12 @@ public class WxBusiness implements Serializable {
public void setTitle(String _title) {
title = _title;
}
public Integer getType() {
return type;
}
public void setType(Integer _type) {
type = _type;
}
public Date getCreateDate() {
return createDate;
}
@@ -85,6 +94,7 @@ public class WxBusiness implements Serializable {
Id_ASC("`id` ASC"),Id_DESC("`id` DESC")
,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC")
,Title_ASC("`title` ASC"),Title_DESC("`title` DESC")
,Type_ASC("`type` ASC"),Type_DESC("`type` DESC")
,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC")
,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC")
;
@@ -104,7 +114,7 @@ public class WxBusiness implements Serializable {
}
}
public void setSortColumns(WxBusiness.Field... fields)
public void setSortColumns(Field... fields)
{
if (fields == null || fields.length == 0) {
return;
@@ -129,7 +139,7 @@ public class WxBusiness implements Serializable {
}
if (sortColumns.contains(",")) {
String[] cols = sortColumns.split(",");
java.util.List<Field> fList = new java.util.ArrayList();
List<Field> fList = new ArrayList();
for (int k = 0; k < cols.length; k++) {
fList.add(Field.valueOf(cols[k]));
}


+ 79
- 43
mallinkService/src/main/java/com/simple/domain/po/WxCoupon.java View File

@@ -11,15 +11,15 @@ import java.io.Serializable;
@Table(name = "wx_coupon")
public class WxCoupon implements Serializable {
private static final long serialVersionUID = 1L;
@Id
protected Long id;
@Transient
protected List<String> ids;
@Transient
protected String sortColumns;
protected Long id;
@Transient
protected List<String> ids;
@Transient
protected String sortColumns;
public Long getId() {
return id;
}
@@ -27,20 +27,20 @@ public class WxCoupon implements Serializable {
public void setId(Long id) {
this.id = id;
}
public String getSortColumns() {
return sortColumns;
}
public List<String> getIds() {
return ids;
}
public void setIds(List<String> ids) {
this.ids = ids;
}
/*租户ID**/
@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
@@ -68,6 +68,12 @@ public class WxCoupon implements Serializable {
/*限领张数**/
@io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity")
private Integer useLimitQuantity;
/*投放频道位置(1.banner图,2.限时抢购)**/
@io.swagger.annotations.ApiModelProperty(value="投放频道位置(1.banner图,2.限时抢购)",name="targetAd")
private Integer targetAd;
/*1.主动领取2.定向投放**/
@io.swagger.annotations.ApiModelProperty(value="1.主动领取2.定向投放",name="sendType")
private Integer sendType;
/*发放开始时间**/
@io.swagger.annotations.ApiModelProperty(value="发放开始时间",name="sendStartDate")
private Date sendStartDate;
@@ -86,7 +92,6 @@ public class WxCoupon implements Serializable {
/*须知**/
@io.swagger.annotations.ApiModelProperty(value="须知",name="detail")
private String detail;

/*业态**/
@io.swagger.annotations.ApiModelProperty(value="业态",name="businesses")
private String businesses;
@@ -99,6 +104,9 @@ public class WxCoupon implements Serializable {
/*总数**/
@io.swagger.annotations.ApiModelProperty(value="总数",name="total")
private Integer total;
/***/
@io.swagger.annotations.ApiModelProperty(value="使用须知",name="remark")
private String remark;
/*状态(0:草稿,1:待生效,2:已生效,3:已失效,4:已作废)**/
@io.swagger.annotations.ApiModelProperty(value="状态(0:草稿,1:待生效,2:已生效,3:已失效,4:已作废)",name="status")
private Integer status;
@@ -108,6 +116,9 @@ public class WxCoupon implements Serializable {
/*更新时间**/
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")
private Date updateDate;
/*业态**/
@io.swagger.annotations.ApiModelProperty(value="业态",name="business")
private String business;
public String getTenantId() {
return tenantId;
}
@@ -162,6 +173,18 @@ public class WxCoupon implements Serializable {
public void setUseLimitQuantity(Integer _useLimitQuantity) {
useLimitQuantity = _useLimitQuantity;
}
public Integer getTargetAd() {
return targetAd;
}
public void setTargetAd(Integer _targetAd) {
targetAd = _targetAd;
}
public Integer getSendType() {
return sendType;
}
public void setSendType(Integer _sendType) {
sendType = _sendType;
}
public Date getSendStartDate() {
return sendStartDate;
}
@@ -198,7 +221,6 @@ public class WxCoupon implements Serializable {
public void setDetail(String _detail) {
detail = _detail;
}

public String getBusinesses() {
return businesses;
}
@@ -223,6 +245,12 @@ public class WxCoupon implements Serializable {
public void setTotal(Integer _total) {
total = _total;
}
public String getRemark() {
return remark;
}
public void setRemark(String _remark) {
remark = _remark;
}
public Integer getStatus() {
return status;
}
@@ -241,37 +269,45 @@ public class WxCoupon implements Serializable {
public void setUpdateDate(Date _updateDate) {
updateDate = _updateDate;
}
public String getBusiness() {
return business;
}
public void setBusiness(String _business) {
business = _business;
}



public static enum Field
{
Id_ASC("`id` ASC"),Id_DESC("`id` DESC")
,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC")
,MerchantId_ASC("`merchantId` ASC"),MerchantId_DESC("`merchantId` DESC")
,Type_ASC("`type` ASC"),Type_DESC("`type` DESC")
,CoverImg_ASC("`coverImg` ASC"),CoverImg_DESC("`coverImg` DESC")
,Title_ASC("`title` ASC"),Title_DESC("`title` DESC")
,SubTitle_ASC("`subTitle` ASC"),SubTitle_DESC("`subTitle` DESC")
,SalePrice_ASC("`salePrice` ASC"),SalePrice_DESC("`salePrice` DESC")
,UsePrice_ASC("`usePrice` ASC"),UsePrice_DESC("`usePrice` DESC")
,UseLimitQuantity_ASC("`useLimitQuantity` ASC"),UseLimitQuantity_DESC("`useLimitQuantity` DESC")
,SendStartDate_ASC("`sendStartDate` ASC"),SendStartDate_DESC("`sendStartDate` DESC")
,SendEndDate_ASC("`sendEndDate` ASC"),SendEndDate_DESC("`sendEndDate` DESC")
,ValidStartDate_ASC("`validStartDate` ASC"),ValidStartDate_DESC("`validStartDate` DESC")
,ValidEndDate_ASC("`validEndDate` ASC"),ValidEndDate_DESC("`validEndDate` DESC")
,ValidDays_ASC("`validDays` ASC"),ValidDays_DESC("`validDays` DESC")
,Detail_ASC("`detail` ASC"),Detail_DESC("`detail` DESC")
,SendType_ASC("`sendType` ASC"),SendType_DESC("`sendType` DESC")
,TargetAd_ASC("`targetAd` ASC"),TargetAd_DESC("`targetAd` DESC")
,Businesses_ASC("`businesses` ASC"),Businesses_DESC("`businesses` DESC")
,Price_ASC("`price` ASC"),Price_DESC("`price` DESC")
,Number_ASC("`number` ASC"),Number_DESC("`number` DESC")
,Total_ASC("`total` ASC"),Total_DESC("`total` DESC")
,Status_ASC("`status` ASC"),Status_DESC("`status` DESC")
,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC")
,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC")
;
,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC")
,MerchantId_ASC("`merchantId` ASC"),MerchantId_DESC("`merchantId` DESC")
,Type_ASC("`type` ASC"),Type_DESC("`type` DESC")
,CoverImg_ASC("`coverImg` ASC"),CoverImg_DESC("`coverImg` DESC")
,Title_ASC("`title` ASC"),Title_DESC("`title` DESC")
,SubTitle_ASC("`subTitle` ASC"),SubTitle_DESC("`subTitle` DESC")
,SalePrice_ASC("`salePrice` ASC"),SalePrice_DESC("`salePrice` DESC")
,UsePrice_ASC("`usePrice` ASC"),UsePrice_DESC("`usePrice` 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")
,SendStartDate_ASC("`sendStartDate` ASC"),SendStartDate_DESC("`sendStartDate` DESC")
,SendEndDate_ASC("`sendEndDate` ASC"),SendEndDate_DESC("`sendEndDate` DESC")
,ValidStartDate_ASC("`validStartDate` ASC"),ValidStartDate_DESC("`validStartDate` DESC")
,ValidEndDate_ASC("`validEndDate` ASC"),ValidEndDate_DESC("`validEndDate` DESC")
,ValidDays_ASC("`validDays` ASC"),ValidDays_DESC("`validDays` DESC")
,Detail_ASC("`detail` ASC"),Detail_DESC("`detail` DESC")
,Businesses_ASC("`businesses` ASC"),Businesses_DESC("`businesses` DESC")
,Price_ASC("`price` ASC"),Price_DESC("`price` DESC")
,Number_ASC("`number` ASC"),Number_DESC("`number` DESC")
,Total_ASC("`total` ASC"),Total_DESC("`total` DESC")
,Remark_ASC("`remark` ASC"),Remark_DESC("`remark` DESC")
,Status_ASC("`status` ASC"),Status_DESC("`status` DESC")
,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC")
,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC")
,Business_ASC("`business` ASC"),Business_DESC("`business` DESC")
;
private String value;
Field(String value){
this.value = value;
@@ -287,7 +323,7 @@ public class WxCoupon implements Serializable {
return this.getValue();
}
}
public void setSortColumns(WxCoupon.Field... fields)
{
if (fields == null || fields.length == 0) {
@@ -303,9 +339,9 @@ public class WxCoupon implements Serializable {
sb.append(",");
sb.append(fields[k].toString());
}
}
public void setSortColumns(String sortColumns)
{
if (sortColumns == null || "".equals(sortColumns.trim())) {


+ 7
- 1
mallinkService/src/main/resources/mapper/WxBusinessMapper.xml View File

@@ -5,12 +5,13 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
</resultMap>
<sql id="allColumns">
`id`,`tenant_id`,`title`,`create_date`,`update_date`
`id`,`tenant_id`,`title`,`type`,`create_date`,`update_date`
</sql>

<sql id="dynamicWhereConditions">
@@ -31,6 +32,11 @@
</if>
<if test=" null != type ">
and `type` = #{type}
</if>
<if test=" null != createDate ">
and `create_date` = #{createDate}


+ 25
- 2
mallinkService/src/main/resources/mapper/WxCouponMapper.xml View File

@@ -12,6 +12,8 @@
<result column="sale_price" jdbcType="DECIMAL" property="salePrice" />
<result column="use_price" jdbcType="DECIMAL" property="usePrice" />
<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_start_date" jdbcType="TIMESTAMP" property="sendStartDate" />
<result column="send_end_date" jdbcType="TIMESTAMP" property="sendEndDate" />
<result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate" />
@@ -22,13 +24,15 @@
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="number" jdbcType="INTEGER" property="number" />
<result column="total" jdbcType="INTEGER" property="total" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
<result column="business" jdbcType="VARCHAR" property="business" />
</resultMap>
<sql id="allColumns">
`id`,`tenant_id`,`merchant_id`,`type`,`cover_img`,`title`,`sub_title`,`sale_price`,`use_price`,`use_limit_quantity`,`send_start_date`,`send_end_date`,`valid_start_date`,`valid_end_date`,`valid_days`,`detail`,`send_type`,`target_ad`,`businesses`,`price`,`number`,`total`,`status`,`create_date`,`update_date`
`id`,`tenant_id`,`merchant_id`,`type`,`cover_img`,`title`,`sub_title`,`sale_price`,`use_price`,`use_limit_quantity`,`target_ad`,`send_type`,`send_start_date`,`send_end_date`,`valid_start_date`,`valid_end_date`,`valid_days`,`detail`,`businesses`,`price`,`number`,`total`,`remark`,`status`,`create_date`,`update_date`,`business`
</sql>

<sql id="dynamicWhereConditions">
@@ -84,6 +88,16 @@
</if>
<if test=" null != targetAd ">
and `target_ad` = #{targetAd}
</if>
<if test=" null != sendType ">
and `send_type` = #{sendType}
</if>
<if test=" null != sendStartDate ">
and `send_start_date` = #{sendStartDate}
@@ -113,7 +127,6 @@
and `detail` like concat('%', #{detail},'%')
</if>

<if test=" null != businesses ">
and `businesses` like concat('%', #{businesses},'%')
@@ -135,6 +148,11 @@
</if>
<if test=" null != remark ">
and `remark` like concat('%', #{remark},'%')
</if>
<if test=" null != status ">
and `status` = #{status}
@@ -148,6 +166,11 @@
<if test=" null != updateDate ">
and `update_date` = #{updateDate}
</if>
<if test=" null != business ">
and `business` like concat('%', #{business},'%')
</if>
<if test=" null != ids ">
and id in


Loading…
Cancel
Save