| @@ -53,7 +53,7 @@ public class WxRentContract implements Serializable { | |||||
| /*商户**/ | /*商户**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="商户",name="merchantId") | @io.swagger.annotations.ApiModelProperty(value="商户",name="merchantId") | ||||
| private Integer merchantId; | |||||
| private Long merchantId; | |||||
| /*月租金/分成(分)**/ | /*月租金/分成(分)**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="月租金/分成(分)",name="price") | @io.swagger.annotations.ApiModelProperty(value="月租金/分成(分)",name="price") | ||||
| private Integer price; | private Integer price; | ||||
| @@ -99,13 +99,13 @@ public class WxRentContract implements Serializable { | |||||
| private String brand; | private String brand; | ||||
| /*经常业态ID**/ | /*经常业态ID**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="经常业态ID",name="businessId") | @io.swagger.annotations.ApiModelProperty(value="经常业态ID",name="businessId") | ||||
| private Integer businessId; | |||||
| private Long businessId; | |||||
| /*店铺类型**/ | /*店铺类型**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="店铺类型",name="shopType") | @io.swagger.annotations.ApiModelProperty(value="店铺类型",name="shopType") | ||||
| private Integer shopType; | private Integer shopType; | ||||
| /*商铺ID**/ | /*商铺ID**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="商铺ID",name="shopId") | @io.swagger.annotations.ApiModelProperty(value="商铺ID",name="shopId") | ||||
| private Integer shopId; | |||||
| private Long shopId; | |||||
| /*更新时间**/ | /*更新时间**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | ||||
| private Date updatetime; | private Date updatetime; | ||||
| @@ -122,10 +122,14 @@ public class WxRentContract implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value="联系电话",name="linkPhone") | @io.swagger.annotations.ApiModelProperty(value="联系电话",name="linkPhone") | ||||
| private String linkPhone; | private String linkPhone; | ||||
| public Integer getMerchantId() { | |||||
| @io.swagger.annotations.ApiModelProperty(value="联系电话",name="payAccount") | |||||
| private String payAccount; | |||||
| public Long getMerchantId() { | |||||
| return merchantId; | return merchantId; | ||||
| } | } | ||||
| public void setMerchantId(Integer _merchantId) { | |||||
| public void setMerchantId(Long _merchantId) { | |||||
| merchantId = _merchantId; | merchantId = _merchantId; | ||||
| } | } | ||||
| public Integer getPrice() { | public Integer getPrice() { | ||||
| @@ -212,10 +216,10 @@ public class WxRentContract implements Serializable { | |||||
| public void setBrand(String _brand) { | public void setBrand(String _brand) { | ||||
| brand = _brand; | brand = _brand; | ||||
| } | } | ||||
| public Integer getBusinessId() { | |||||
| public Long getBusinessId() { | |||||
| return businessId; | return businessId; | ||||
| } | } | ||||
| public void setBusinessId(Integer _businessId) { | |||||
| public void setBusinessId(Long _businessId) { | |||||
| businessId = _businessId; | businessId = _businessId; | ||||
| } | } | ||||
| public Integer getShopType() { | public Integer getShopType() { | ||||
| @@ -224,10 +228,10 @@ public class WxRentContract implements Serializable { | |||||
| public void setShopType(Integer _shopType) { | public void setShopType(Integer _shopType) { | ||||
| shopType = _shopType; | shopType = _shopType; | ||||
| } | } | ||||
| public Integer getShopId() { | |||||
| public Long getShopId() { | |||||
| return shopId; | return shopId; | ||||
| } | } | ||||
| public void setShopId(Integer _shopId) { | |||||
| public void setShopId(Long _shopId) { | |||||
| shopId = _shopId; | shopId = _shopId; | ||||
| } | } | ||||
| public Date getUpdatetime() { | public Date getUpdatetime() { | ||||
| @@ -269,6 +273,14 @@ public class WxRentContract implements Serializable { | |||||
| this.linkPhone = linkPhone; | this.linkPhone = linkPhone; | ||||
| } | } | ||||
| public String getPayAccount() { | |||||
| return payAccount; | |||||
| } | |||||
| public void setPayAccount(String payAccount) { | |||||
| this.payAccount = payAccount; | |||||
| } | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| @@ -134,6 +134,10 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| @Override | @Override | ||||
| public void disable(Long id) { | public void disable(Long id) { | ||||
| WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id); | WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id); | ||||
| if(wxMerchant==null){ | |||||
| logger.info("未发现要停用的商户"); | |||||
| return; | |||||
| } | |||||
| wxMerchant.setStatus(EnumMerchantStatus.NOT_VALID.getCode()); | wxMerchant.setStatus(EnumMerchantStatus.NOT_VALID.getCode()); | ||||
| wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); | wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); | ||||
| @@ -12,6 +12,7 @@ import com.iformall.enums.EnumShopStatus; | |||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.WxRentContractMapper; | import com.iformall.mapper.WxRentContractMapper; | ||||
| import com.iformall.mapper.WxShopMapper; | import com.iformall.mapper.WxShopMapper; | ||||
| import com.iformall.service.WxMerchantService; | |||||
| import com.iformall.service.WxRentContractService; | import com.iformall.service.WxRentContractService; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| @@ -41,6 +42,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| @Autowired | @Autowired | ||||
| WxShopMapper wxShopMapper; | WxShopMapper wxShopMapper; | ||||
| @Autowired | |||||
| WxMerchantService wxMerchantService; | |||||
| @Override | @Override | ||||
| public Map<String, Object> listAsPage(WxRentContract record, Integer pageIndex, Integer pageSize) { | public Map<String, Object> listAsPage(WxRentContract record, Integer pageIndex, Integer pageSize) { | ||||
| Object rentContractStatusInfo = getRentContractStatusInfo(record.getTenantId().toString()); | Object rentContractStatusInfo = getRentContractStatusInfo(record.getTenantId().toString()); | ||||
| @@ -135,6 +139,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| wxRentContract.setStatus(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()); | wxRentContract.setStatus(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()); | ||||
| try { | try { | ||||
| wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract); | wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract); | ||||
| //停用商户 | |||||
| wxMerchantService.disable(wxRentContract.getMerchantId()); | |||||
| }catch (MallinkException e){ | }catch (MallinkException e){ | ||||
| logger.info("终止合同失败:"+e.getMessage()); | logger.info("终止合同失败:"+e.getMessage()); | ||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| @@ -2,8 +2,8 @@ | |||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
| <mapper namespace="com.iformall.mapper.WxRentContractMapper"> | <mapper namespace="com.iformall.mapper.WxRentContractMapper"> | ||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxRentContract"> | <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="price" jdbcType="INTEGER" property="price"/> | ||||
| <result column="rental_start_date" jdbcType="TIMESTAMP" property="rentalStartDate"/> | <result column="rental_start_date" jdbcType="TIMESTAMP" property="rentalStartDate"/> | ||||
| <result column="rental_end_date" jdbcType="TIMESTAMP" property="rentalEndDate"/> | <result column="rental_end_date" jdbcType="TIMESTAMP" property="rentalEndDate"/> | ||||
| @@ -18,18 +18,19 @@ | |||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/> | <result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/> | ||||
| <result column="brand" jdbcType="VARCHAR" property="brand"/> | <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_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="updatetime" jdbcType="TIMESTAMP" property="updatetime"/> | ||||
| <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/> | <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/> | ||||
| <result column="link_person" jdbcType="VARCHAR" property="linkPerson"/> | <result column="link_person" jdbcType="VARCHAR" property="linkPerson"/> | ||||
| <result column="link_phone" jdbcType="VARCHAR" property="linkPhone"/> | <result column="link_phone" jdbcType="VARCHAR" property="linkPhone"/> | ||||
| <result column="pay_account" jdbcType="VARCHAR" property="payAccount"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <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> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -57,6 +58,7 @@ | |||||
| <if test=" null != createtime ">and `createtime` = #{createtime}</if> | <if test=" null != createtime ">and `createtime` = #{createtime}</if> | ||||
| <if test=" null != linkPerson ">and `link_person` = #{linkPerson}</if> | <if test=" null != linkPerson ">and `link_person` = #{linkPerson}</if> | ||||
| <if test=" null != linkPhone ">and `link_phone` = #{linkPhone}</if> | <if test=" null != linkPhone ">and `link_phone` = #{linkPhone}</if> | ||||
| <if test=" null != payAccount ">and `pay_account` = #{payAccount}</if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||