Преглед изворни кода

[等级、折扣添加字段][新增]:等级,商户折扣添加字段

release_toaliyun_real
Stormeye Wu пре 7 година
родитељ
комит
b9825928a5
4 измењених фајлова са 174 додато и 133 уклоњено
  1. +26
    -15
      mallinkService/src/main/java/com/iformall/domain/po/WxLevelConfig.java
  2. +33
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  3. +11
    -4
      mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml
  4. +104
    -114
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 26
- 15
mallinkService/src/main/java/com/iformall/domain/po/WxLevelConfig.java Прегледај датотеку

@@ -38,29 +38,37 @@ public class WxLevelConfig implements Serializable {
public void setIds(List<Long> ids) {
this.ids = ids;
}

/**租户id**/
@io.swagger.annotations.ApiModelProperty(value="租户id",name="tenantId")
private String tenantId;
/*成长值**/
/**成长值**/
@io.swagger.annotations.ApiModelProperty(value="成长值",name="points")
private Integer points;
/*等级**/
/**等级**/
@io.swagger.annotations.ApiModelProperty(value="等级",name="level")
private String level;
/*描述**/
/**描述**/
@io.swagger.annotations.ApiModelProperty(value="描述",name="description")
private String description;
/*创建时间**/
/**创建时间**/
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
private Date createDate;
/*租户id**/
@io.swagger.annotations.ApiModelProperty(value="租户id",name="tenantId")
private String tenantId;

/**是否启用,0:未启用,启用1,2,3,分别对应wx_merchant_discount里的rate_vip1, rate_vip2, rate_vip3**/
@io.swagger.annotations.ApiModelProperty(value="是否启用",name="discountEnable")
private Integer discountEnable;

@Transient
protected Long count;

public String getTenantId() {
return tenantId;
}
public void setTenantId(String _tenantId) {
tenantId = _tenantId;
}

public Integer getPoints() {
return points;
@@ -86,12 +94,7 @@ public class WxLevelConfig implements Serializable {
public void setCreateDate(Date _createDate) {
createDate = _createDate;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String _tenantId) {
tenantId = _tenantId;
}


public Long getCount() {
return count;
@@ -101,6 +104,14 @@ public class WxLevelConfig implements Serializable {
this.count = count;
}

public Integer getDiscountEnable() {
return discountEnable;
}

public void setDiscountEnable(Integer discountEnable) {
this.discountEnable = discountEnable;
}

public static enum Field
{
Id_ASC("`id` ASC"),Id_DESC("`id` DESC")


+ 33
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java Прегледај датотеку

@@ -172,6 +172,15 @@ public class WxMerchant implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="银行账号",name="bankAccount")
private String bankAccount;

@io.swagger.annotations.ApiModelProperty(value="VIP折扣率1",name="vipDiscountRate1")
private Integer vipDiscountRate1;

@io.swagger.annotations.ApiModelProperty(value="VIP折扣率2",name="vipDiscountRate2")
private Integer vipDiscountRate2;

@io.swagger.annotations.ApiModelProperty(value="VIP折扣率3",name="vipDiscountRate3")
private Integer vipDiscountRate3;


public List<Map<String, Object>> getShoplist() {
return shoplist;
@@ -497,6 +506,30 @@ public class WxMerchant implements Serializable {
this.bankAccount = bankAccount;
}

public Integer getVipDiscountRate1() {
return vipDiscountRate1;
}

public void setVipDiscountRate1(Integer vipDiscountRate1) {
this.vipDiscountRate1 = vipDiscountRate1;
}

public Integer getVipDiscountRate2() {
return vipDiscountRate2;
}

public void setVipDiscountRate2(Integer vipDiscountRate2) {
this.vipDiscountRate2 = vipDiscountRate2;
}

public Integer getVipDiscountRate3() {
return vipDiscountRate3;
}

public void setVipDiscountRate3(Integer vipDiscountRate3) {
this.vipDiscountRate3 = vipDiscountRate3;
}

public static enum Field
{
Id_ASC("`id` ASC"),Id_DESC("`id` DESC")


+ 11
- 4
mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml Прегледај датотеку

@@ -3,15 +3,16 @@
<mapper namespace="com.iformall.mapper.WxLevelConfigMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxLevelConfig">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="points" jdbcType="INTEGER" property="points"/>
<result column="level" jdbcType="VARCHAR" property="level"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="discount_enable" jdbcType="SMALLINT" property="discountEnable"/>
</resultMap>

<sql id="allColumns">
`id`,`points`,`level`,`description`,`create_date`,`tenant_id`
`id`, `tenant_id`, `points`, `level`, `description`, `create_date`, `discount_enable`
</sql>

<sql id="dynamicWhereConditions">
@@ -21,6 +22,10 @@
and `id` = #{id}
</if>

<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
</if>

<if test=" null != points ">
and `points` = #{points}
</if>
@@ -37,9 +42,11 @@
and `create_date` = #{createDate}
</if>

<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
<if test=" null != discountEnable ">
and `discount_enable` = #{discountEnable}
</if>


<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


+ 104
- 114
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Прегледај датотеку

@@ -1,123 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.iformall.mapper.WxMerchantMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMerchant">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="link_phone" jdbcType="VARCHAR" property="linkPhone" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
<result column="car_vendor_type" jdbcType="INTEGER" property="carVendorType" />
<result column="car_params" jdbcType="VARCHAR" property="carParams" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="link_person" jdbcType="VARCHAR" property="linkPerson" />
<result column="business_id" jdbcType="INTEGER" property="businessId" />
<result column="shop_type" jdbcType="INTEGER" property="shopType" />
<result column="brand" jdbcType="VARCHAR" property="brand" />
<result column="corp_papers_type" jdbcType="INTEGER" property="corpPapersType" />
<result column="corp_papers_number" jdbcType="VARCHAR" property="corpPapersNumber" />
<result column="corp_papers_person" jdbcType="VARCHAR" property="corpPapersPerson" />
<result column="corp_papers_pic_face" jdbcType="VARCHAR" property="corpPapersPicFace" />
<result column="corp_papers_pic_back" jdbcType="VARCHAR" property="corpPapersPicBack" />
<result column="taxpayer_type" jdbcType="INTEGER" property="taxpayerType" />
<result column="tax_papers_type" jdbcType="INTEGER" property="taxPapersType" />
<result column="tax_papers_number" jdbcType="VARCHAR" property="taxPapersNumber" />
<result column="invoice_type" jdbcType="INTEGER" property="invoiceType" />
<result column="invoice_buyer" jdbcType="VARCHAR" property="invoiceBuyer" />
<result column="taxpayer_identify_number" jdbcType="VARCHAR" property="taxpayerIdentifyNumber" />
<result column="invoice_address_phone" jdbcType="VARCHAR" property="invoiceAddressPhone" />
<result column="bank_account_number" jdbcType="VARCHAR" property="bankAccountNumber" />
<result column="bank_account_person" jdbcType="VARCHAR" property="bankAccountPerson" />
<result column="bank_name" jdbcType="VARCHAR" property="bankName" />
<result column="bank_account" jdbcType="VARCHAR" property="bankAccount" />

</resultMap>
<sql id="allColumns">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMerchant">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="img_url" jdbcType="VARCHAR" property="imgUrl"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="link_phone" jdbcType="VARCHAR" property="linkPhone"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="car_vendor_type" jdbcType="INTEGER" property="carVendorType"/>
<result column="car_params" jdbcType="VARCHAR" property="carParams"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="link_person" jdbcType="VARCHAR" property="linkPerson"/>
<result column="business_id" jdbcType="INTEGER" property="businessId"/>
<result column="shop_type" jdbcType="INTEGER" property="shopType"/>
<result column="brand" jdbcType="VARCHAR" property="brand"/>
<result column="corp_papers_type" jdbcType="INTEGER" property="corpPapersType"/>
<result column="corp_papers_number" jdbcType="VARCHAR" property="corpPapersNumber"/>
<result column="corp_papers_person" jdbcType="VARCHAR" property="corpPapersPerson"/>
<result column="corp_papers_pic_face" jdbcType="VARCHAR" property="corpPapersPicFace"/>
<result column="corp_papers_pic_back" jdbcType="VARCHAR" property="corpPapersPicBack"/>
<result column="taxpayer_type" jdbcType="INTEGER" property="taxpayerType"/>
<result column="tax_papers_type" jdbcType="INTEGER" property="taxPapersType"/>
<result column="tax_papers_number" jdbcType="VARCHAR" property="taxPapersNumber"/>
<result column="invoice_type" jdbcType="INTEGER" property="invoiceType"/>
<result column="invoice_buyer" jdbcType="VARCHAR" property="invoiceBuyer"/>
<result column="taxpayer_identify_number" jdbcType="VARCHAR" property="taxpayerIdentifyNumber"/>
<result column="invoice_address_phone" jdbcType="VARCHAR" property="invoiceAddressPhone"/>
<result column="bank_account_number" jdbcType="VARCHAR" property="bankAccountNumber"/>
<result column="bank_account_person" jdbcType="VARCHAR" property="bankAccountPerson"/>
<result column="bank_name" jdbcType="VARCHAR" property="bankName"/>
<result column="bank_account" jdbcType="VARCHAR" property="bankAccount"/>
<result column="vip_discount_rate1" jdbcType="SMALLINT" property="vipDiscountRate1"/>
<result column="vip_discount_rate2" jdbcType="SMALLINT" property="vipDiscountRate2"/>
<result column="vip_discount_rate3" jdbcType="SMALLINT" property="vipDiscountRate3"/>


</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`img_url`,`name`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`,
`business_id`,`shop_type`,`brand`,`corp_papers_type`,`corp_papers_number`,`corp_papers_person`,`corp_papers_pic_face`,
`corp_papers_pic_back`,`taxpayer_type`,`tax_papers_type`,`tax_papers_number`,`invoice_type`,`invoice_buyer`,
`taxpayer_identify_number``invoice_address_phone`,`bank_account_number`,`bank_account_person`,`bank_name`,`bank_account`
`taxpayer_identify_number``invoice_address_phone`,`bank_account_number`,`bank_account_person`,`bank_name`,`bank_account`,
`vip_discount_rate1`,`vip_discount_rate2`,`vip_discount_rate3`
</sql>

<sql id="dynamicWhereConditions">
where 1 = 1
<if test=" null != id ">
and `id` = #{id}
</if>
<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != imgUrl ">
and `img_url` like concat('%', #{imgUrl},'%')
</if>
<if test=" null != name ">
and `name` like concat('%', #{name},'%')
</if>
<if test=" null != linkPhone ">
and `link_phone` like concat('%', #{linkPhone},'%')
</if>
<if test=" null != createDate ">
and `create_date` = #{createDate}
</if>
<if test=" null != updateDate ">
and `update_date` = #{updateDate}
</if>
<if test=" null != carVendorType ">
and `car_vendor_type` = #{carVendorType}
</if>
<if test=" null != carParams ">
and `car_params` like concat('%', #{carParams},'%')
</if>


<if test=" null != status ">
and `status` = #{status}
</if>
<if test=" null != linkPerson ">
and `link_person` = #{linkPerson}
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns"> order by ${sortColumns} </if>
</sql>
<select id="findList" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap">
select <include refid="allColumns" /> from wx_merchant
<include refid="dynamicWhereConditions" />
</select>
<sql id="dynamicWhereConditions">
where 1 = 1

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

<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
</if>

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

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

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

<if test=" null != createDate ">
and `create_date` = #{createDate}
</if>

<if test=" null != updateDate ">
and `update_date` = #{updateDate}
</if>

<if test=" null != carVendorType ">
and `car_vendor_type` = #{carVendorType}
</if>

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


<if test=" null != status ">
and `status` = #{status}
</if>
<if test=" null != linkPerson ">
and `link_person` = #{linkPerson}
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>

<select id="findList" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_merchant
<include refid="dynamicWhereConditions"/>
</select>


</mapper>

Loading…
Откажи
Сачувај