Procházet zdrojové kódy

[租金管理][修改]修改业务逻辑

release_toaliyun_real
gongbiao před 7 roky
rodič
revize
9bb32df838
4 změnil soubory, kde provedl 31 přidání a 20 odebrání
  1. +17
    -14
      mallinkService/src/main/java/com/simple/domain/po/WxBillRent.java
  2. +1
    -1
      mallinkService/src/main/java/com/simple/service/WxBillRentService.java
  3. +7
    -2
      mallinkService/src/main/java/com/simple/service/impl/WxBillRentServiceImpl.java
  4. +6
    -3
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml

+ 17
- 14
mallinkService/src/main/java/com/simple/domain/po/WxBillRent.java Zobrazit soubor

@@ -39,10 +39,8 @@ public class WxBillRent implements Serializable {
} }


@Transient @Transient
protected WxMerchant wxMerchant;
protected String shopNumber;


@Transient
protected WxShop wxShop;




/*商铺ID**/ /*商铺ID**/
@@ -93,6 +91,18 @@ public class WxBillRent implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="欠缴金额",name="owe") @io.swagger.annotations.ApiModelProperty(value="欠缴金额",name="owe")
private BigDecimal owe; private BigDecimal owe;


/***/
@io.swagger.annotations.ApiModelProperty(value="payStatus",name="payStatus")
private Integer payStatus;


public String getShopNumber() {
return shopNumber;
}

public void setShopNumber(String shopNumber) {
this.shopNumber = shopNumber;
}


public Integer getShopId() { public Integer getShopId() {
return shopId; return shopId;
@@ -181,13 +191,6 @@ public class WxBillRent implements Serializable {
this.tenantId = tenantId; this.tenantId = tenantId;
} }


public WxMerchant getWxMerchant() {
return wxMerchant;
}

public void setWxMerchant(WxMerchant wxMerchant) {
this.wxMerchant = wxMerchant;
}


public BigDecimal getOwe() { public BigDecimal getOwe() {
return owe; return owe;
@@ -197,12 +200,12 @@ public class WxBillRent implements Serializable {
this.owe = owe; this.owe = owe;
} }


public WxShop getWxShop() {
return wxShop;
public Integer getPayStatus() {
return payStatus;
} }


public void setWxShop(WxShop wxShop) {
this.wxShop = wxShop;
public void setPayStatus(Integer payStatus) {
this.payStatus = payStatus;
} }


public static enum Field public static enum Field


+ 1
- 1
mallinkService/src/main/java/com/simple/service/WxBillRentService.java Zobrazit soubor

@@ -22,7 +22,7 @@ public interface WxBillRentService {
* @param id * @param id
* @return * @return
*/ */
WxBillRent getById(String id);
Map<String, Object> getById(Long id);
/** /**
* 保存或更新实体 * 保存或更新实体


+ 7
- 2
mallinkService/src/main/java/com/simple/service/impl/WxBillRentServiceImpl.java Zobrazit soubor

@@ -27,8 +27,10 @@ public class WxBillRentServiceImpl implements WxBillRentService {
} }


@Override @Override
public WxBillRent getById(String id) {
return wxBillRentMapper.selectByPrimaryKey(id);
public Map<String, Object> getById(Long id) {
WxBillRent record = new WxBillRent();
record.setId(id);
return wxBillRentMapper.findListMap(record).get(0);
} }


@Override @Override
@@ -36,8 +38,11 @@ public class WxBillRentServiceImpl implements WxBillRentService {
if (record.getId() == null) { if (record.getId() == null) {
final IdWorker idWorker = IdWorker.get(); final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId()); record.setId(idWorker.nextId());
record.setCreatetime(new Date());
record.setPayStatus(record.getOwe().doubleValue()>0?0:1);
wxBillRentMapper.insertSelective(record); wxBillRentMapper.insertSelective(record);
} else { } else {
record.setPayStatus(record.getOwe().doubleValue()>0?0:1);
wxBillRentMapper.updateByPrimaryKeySelective(record); wxBillRentMapper.updateByPrimaryKeySelective(record);
} }
} }


+ 6
- 3
mallinkService/src/main/resources/mapper/WxBillRentMapper.xml Zobrazit soubor

@@ -18,12 +18,12 @@
<result column="receipt_num" jdbcType="VARCHAR" property="receiptNum" /> <result column="receipt_num" jdbcType="VARCHAR" property="receiptNum" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="owe" jdbcType="DECIMAL" property="owe" /> <result column="owe" jdbcType="DECIMAL" property="owe" />
<result column="pay_status" jdbcType="Integer" property="payStatus" />
</resultMap> </resultMap>
<sql id="allColumns"> <sql id="allColumns">
`id`,`shop_id`,`user_area`,`price`,`need_pay`,`receive_pay`,`pay`,`receive_period`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`pay_way`,`receipt_num`,`tenant_id`,`owe`
`id`,`shop_id`,`user_area`,`price`,`need_pay`,`receive_pay`,`pay`,`receive_period`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`pay_way`,`receipt_num`,`tenant_id`,`owe`,`pay_status`
</sql> </sql>


<sql id="dynamicWhereConditions"> <sql id="dynamicWhereConditions">
@@ -61,7 +61,7 @@
select br.id,br.shop_id shopId,br.user_area userArea,br.price,br.need_pay needPay,br.receive_pay receivePay, select br.id,br.shop_id shopId,br.user_area userArea,br.price,br.need_pay needPay,br.receive_pay receivePay,
br.pay,br.receive_period receivePeriod,br.receive_date receiveDate,br.pay_date payDate,br.createtime, br.pay,br.receive_period receivePeriod,br.receive_date receiveDate,br.pay_date payDate,br.createtime,
br.expired_day expiredDay,br.pay_way payWay,br.receipt_num receiptNum,m.`name` merchantName, br.expired_day expiredDay,br.pay_way payWay,br.receipt_num receiptNum,m.`name` merchantName,
s.build_area buildArea,s.operation_area operationArea,s.shop_number shopNumber,br.owe
s.build_area buildArea,s.operation_area operationArea,s.shop_number shopNumber,br.owe,br.pay_status payStatus
from wx_bill_rent br left join wx_merchant_shop ms on br.shop_id=ms.shop_id and ms.is_del=0 from wx_bill_rent br left join wx_merchant_shop ms on br.shop_id=ms.shop_id and ms.is_del=0
inner join wx_merchant m on ms.merchant_id=m.id inner join wx_merchant m on ms.merchant_id=m.id
inner join wx_shop s on ms.shop_id=s.id inner join wx_shop s on ms.shop_id=s.id
@@ -81,6 +81,9 @@
<if test=" null != payWay "> and br.`pay_way` = #{payWay} </if> <if test=" null != payWay "> and br.`pay_way` = #{payWay} </if>
<if test=" null != receiptNum "> and br.`receipt_num` = #{receiptNum} </if> <if test=" null != receiptNum "> and br.`receipt_num` = #{receiptNum} </if>
<if test=" null != tenantId "> and br.`tenant_id` = #{tenantId} </if> <if test=" null != tenantId "> and br.`tenant_id` = #{tenantId} </if>
<if test=" null != shopNumber "> and br.`shop_number` = #{shopNumber} </if>
<if test=" null != payStatus "> and br.`pay_status` = #{payStatus} </if>
<if test=" null != ids "> <if test=" null != ids ">
and br.id in and br.id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


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