Просмотр исходного кода

[日常、其他及其他押金][修改][创建时判断是否存在账单]

release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
514efb7673
4 измененных файлов: 31 добавлений и 1 удалений
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/common/ErrorCode.java
  2. +10
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java
  3. +11
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java
  4. +9
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java

+ 1
- 1
mallinkService/src/main/java/com/iformall/common/ErrorCode.java Просмотреть файл

@@ -356,7 +356,7 @@ public enum ErrorCode{
BILL_UPDATE_FAILED(21001,"账单更新失败"),
BILL_OWE_ZERO(21002,"账单欠缴为0"),
BILL_PAY_ERROR(21003,"账单支付错误"),
BILL_IS_FOUND(21004, "创建的账单已存在"),
/**
* 商铺
* */


+ 10
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java Просмотреть файл

@@ -129,6 +129,16 @@ public class WxBillDailyServiceImpl implements WxBillDailyService {
Date date = new Date();
if (record.getId() == null) {
logger.info("新增日常账单");
WxBillDaily dailyQuery = new WxBillDaily();
dailyQuery.setType(record.getType());
dailyQuery.setTenantId(record.getTenantId());
dailyQuery.setMerchantId(record.getMerchantId());
dailyQuery.setReceiveDate(record.getReceiveDate());
dailyQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode());
WxBillDaily daily = wxBillDailyMapper.selectOne(dailyQuery);
if (daily != null) {
return new ResultData(ErrorCode.BILL_IS_FOUND);
}
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
record.setStatus(record.getReceiveDate().after(date)?EnumBillDailyStatus.WAIT_PAY.getCode():EnumBillDailyStatus.NOT_PAID.getCode());


+ 11
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java Просмотреть файл

@@ -121,6 +121,17 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService
Date date = new Date();
if (record.getId() == null) {
logger.info("新增其他账单");

WxBillOtherDeposit otherDepositQuery = new WxBillOtherDeposit();
otherDepositQuery.setTenantId(record.getTenantId());
otherDepositQuery.setMerchantId(record.getMerchantId());
otherDepositQuery.setReceiveDate(record.getReceiveDate());
otherDepositQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode());
WxBillOtherDeposit otherDeposit = wxBillOtherDepositMapper.selectOne(otherDepositQuery);
if (otherDeposit != null) {
return new ResultData(ErrorCode.BILL_IS_FOUND);
}

final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
record.setStatus(EnumBillDailyStatus.WAIT_PAY.getCode());


+ 9
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java Просмотреть файл

@@ -123,6 +123,15 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
Date date = new Date();
if (record.getId() == null) {
logger.info("新增其他账单");
WxBillOther otherQuery = new WxBillOther();
otherQuery.setTenantId(record.getTenantId());
otherQuery.setMerchantId(record.getMerchantId());
otherQuery.setReceiveDate(record.getReceiveDate());
otherQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode());
WxBillOther other = wxBillOtherMapper.selectOne(otherQuery);
if (other != null) {
return new ResultData(ErrorCode.BILL_IS_FOUND);
}
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
record.setStatus(record.getReceiveDate().after(date)?EnumBillDailyStatus.WAIT_PAY.getCode():EnumBillDailyStatus.NOT_PAID.getCode());


Загрузка…
Отмена
Сохранить