|
|
|
@@ -142,10 +142,10 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData saveOrUpdate(WxBillOther record, MallUserInfo user) { |
|
|
|
int receivepay = record.getReceivePay()==null?0:record.getReceivePay().intValue(); |
|
|
|
int receivepay = record.getRealReceivePay() == null ? 0 : record.getRealReceivePay().intValue(); |
|
|
|
int pay = record.getPay()==null?0:record.getPay().intValue(); |
|
|
|
if(pay>receivepay){ |
|
|
|
return new ResultData(ErrorCode.BILL_PAY_ERROR,"实收金额不能大于实际应收金额"); |
|
|
|
return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收总金额"); |
|
|
|
} |
|
|
|
Date date = new Date(); |
|
|
|
if (record.getId() == null) { |
|
|
|
@@ -166,7 +166,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { |
|
|
|
record.setCreatetime(date); |
|
|
|
record.setUpdatetime(date); |
|
|
|
record.setExpiredDay(0L); |
|
|
|
record.setOwe(record.getReceivePay()-record.getPay()); |
|
|
|
record.setOwe(record.getRealReceivePay() - record.getPay()); |
|
|
|
record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); |
|
|
|
try { |
|
|
|
wxBillOtherMapper.insert(record); |
|
|
|
|