Procházet zdrojové kódy

[合同管理][修改][添加字段,停用商户]

release_toaliyun_real
gongbiao před 7 roky
rodič
revize
fbc1b864f2
4 změnil soubory, kde provedl 38 přidání a 14 odebrání
  1. +21
    -9
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  2. +4
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  3. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  4. +7
    -5
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 21
- 9
mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java Zobrazit soubor

@@ -53,7 +53,7 @@ public class WxRentContract implements Serializable {

/*商户**/
@io.swagger.annotations.ApiModelProperty(value="商户",name="merchantId")
private Integer merchantId;
private Long merchantId;
/*月租金/分成(分)**/
@io.swagger.annotations.ApiModelProperty(value="月租金/分成(分)",name="price")
private Integer price;
@@ -99,13 +99,13 @@ public class WxRentContract implements Serializable {
private String brand;
/*经常业态ID**/
@io.swagger.annotations.ApiModelProperty(value="经常业态ID",name="businessId")
private Integer businessId;
private Long businessId;
/*店铺类型**/
@io.swagger.annotations.ApiModelProperty(value="店铺类型",name="shopType")
private Integer shopType;
/*商铺ID**/
@io.swagger.annotations.ApiModelProperty(value="商铺ID",name="shopId")
private Integer shopId;
private Long shopId;
/*更新时间**/
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime;
@@ -122,10 +122,14 @@ public class WxRentContract implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="联系电话",name="linkPhone")
private String linkPhone;

public Integer getMerchantId() {
@io.swagger.annotations.ApiModelProperty(value="联系电话",name="payAccount")
private String payAccount;


public Long getMerchantId() {
return merchantId;
}
public void setMerchantId(Integer _merchantId) {
public void setMerchantId(Long _merchantId) {
merchantId = _merchantId;
}
public Integer getPrice() {
@@ -212,10 +216,10 @@ public class WxRentContract implements Serializable {
public void setBrand(String _brand) {
brand = _brand;
}
public Integer getBusinessId() {
public Long getBusinessId() {
return businessId;
}
public void setBusinessId(Integer _businessId) {
public void setBusinessId(Long _businessId) {
businessId = _businessId;
}
public Integer getShopType() {
@@ -224,10 +228,10 @@ public class WxRentContract implements Serializable {
public void setShopType(Integer _shopType) {
shopType = _shopType;
}
public Integer getShopId() {
public Long getShopId() {
return shopId;
}
public void setShopId(Integer _shopId) {
public void setShopId(Long _shopId) {
shopId = _shopId;
}
public Date getUpdatetime() {
@@ -269,6 +273,14 @@ public class WxRentContract implements Serializable {
this.linkPhone = linkPhone;
}

public String getPayAccount() {
return payAccount;
}

public void setPayAccount(String payAccount) {
this.payAccount = payAccount;
}

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


+ 4
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Zobrazit soubor

@@ -134,6 +134,10 @@ public class WxMerchantServiceImpl implements WxMerchantService {
@Override
public void disable(Long id) {
WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id);
if(wxMerchant==null){
logger.info("未发现要停用的商户");
return;
}
wxMerchant.setStatus(EnumMerchantStatus.NOT_VALID.getCode());
wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant);



+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Zobrazit soubor

@@ -12,6 +12,7 @@ import com.iformall.enums.EnumShopStatus;
import com.iformall.exception.MallinkException;
import com.iformall.mapper.WxRentContractMapper;
import com.iformall.mapper.WxShopMapper;
import com.iformall.service.WxMerchantService;
import com.iformall.service.WxRentContractService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,6 +42,9 @@ public class WxRentContractServiceImpl implements WxRentContractService {
@Autowired
WxShopMapper wxShopMapper;

@Autowired
WxMerchantService wxMerchantService;

@Override
public Map<String, Object> listAsPage(WxRentContract record, Integer pageIndex, Integer pageSize) {
Object rentContractStatusInfo = getRentContractStatusInfo(record.getTenantId().toString());
@@ -135,6 +139,8 @@ public class WxRentContractServiceImpl implements WxRentContractService {
wxRentContract.setStatus(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode());
try {
wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract);
//停用商户
wxMerchantService.disable(wxRentContract.getMerchantId());
}catch (MallinkException e){
logger.info("终止合同失败:"+e.getMessage());
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage());


+ 7
- 5
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml Zobrazit soubor

@@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.iformall.mapper.WxRentContractMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxRentContract">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="merchant_id" jdbcType="INTEGER" property="merchantId"/>
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="merchant_id" jdbcType="BIGINT" property="merchantId"/>
<result column="price" jdbcType="INTEGER" property="price"/>
<result column="rental_start_date" jdbcType="TIMESTAMP" property="rentalStartDate"/>
<result column="rental_end_date" jdbcType="TIMESTAMP" property="rentalEndDate"/>
@@ -18,18 +18,19 @@
<result column="is_del" jdbcType="INTEGER" property="isDel"/>
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
<result column="brand" jdbcType="VARCHAR" property="brand"/>
<result column="business_id" jdbcType="INTEGER" property="businessId"/>
<result column="business_id" jdbcType="BIGINT" property="businessId"/>
<result column="shop_type" jdbcType="INTEGER" property="shopType"/>
<result column="shop_id" jdbcType="INTEGER" property="shopId"/>
<result column="shop_id" jdbcType="BIGINT" property="shopId"/>
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime"/>
<result column="createtime" jdbcType="TIMESTAMP" property="createtime"/>
<result column="link_person" jdbcType="VARCHAR" property="linkPerson"/>
<result column="link_phone" jdbcType="VARCHAR" property="linkPhone"/>
<result column="pay_account" jdbcType="VARCHAR" property="payAccount"/>
</resultMap>
<sql id="allColumns">
`id`,`merchant_id`,`price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`,`tenant_id`,`filepath`,`status`,`contract_number`,`deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`,`shop_type`,`shop_id`,`updatetime`,`createtime`,`link_person`,`link_phone`
`id`,`merchant_id`,`price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`,`tenant_id`,`filepath`,`status`,`contract_number`,`deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`,`shop_type`,`shop_id`,`updatetime`,`createtime`,`link_person`,`link_phone`,`pay_account`
</sql>
<sql id="dynamicWhereConditions">
@@ -57,6 +58,7 @@
<if test=" null != createtime ">and `createtime` = #{createtime}</if>
<if test=" null != linkPerson ">and `link_person` = #{linkPerson}</if>
<if test=" null != linkPhone ">and `link_phone` = #{linkPhone}</if>
<if test=" null != payAccount ">and `pay_account` = #{payAccount}</if>
<if test=" null != ids ">
and id in


Načítá se…
Zrušit
Uložit