|
|
|
@@ -38,6 +38,8 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
|
public PageInfo<Map<String, Object>> listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize) { |
|
|
|
//更新逾期天数及状态 |
|
|
|
updateNotPaidStatus(record); |
|
|
|
//更新待缴的状态 |
|
|
|
updateWaidPayStatus(record); |
|
|
|
PageHelper.startPage(pageIndex, pageSize); |
|
|
|
List<Map<String, Object>> billRentList = wxBillRentMapper.queryBillRentList(record); |
|
|
|
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billRentList); |
|
|
|
@@ -45,18 +47,34 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
|
//return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBillRentMapper.findList(record)); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = {Exception.class}) |
|
|
|
public void updateWaidPayStatus(WxBillRent record) { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("tenantId", record.getTenantId()); |
|
|
|
params.put("waitPay", EnumBillRentStatus.WAIT_PAY.getCode()); |
|
|
|
params.put("paid", EnumBillRentStatus.PAID.getCode()); |
|
|
|
|
|
|
|
try { |
|
|
|
wxBillRentMapper.updateWaitPayStatus(params); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("更新租赁待缴账单状态失败,e:" + e.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = {Exception.class}) |
|
|
|
public void updateNotPaidStatus(WxBillRent record) { |
|
|
|
Map<String,Object> params=new HashMap<>(); |
|
|
|
params.put("tenantId",record.getTenantId()); |
|
|
|
params.put("notPaid",EnumBillRentStatus.NOT_PAID); |
|
|
|
params.put("paid",EnumBillRentStatus.PAID); |
|
|
|
try{ |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("tenantId", record.getTenantId()); |
|
|
|
params.put("notPaid", EnumBillRentStatus.NOT_PAID.getCode()); |
|
|
|
params.put("paid", EnumBillRentStatus.PAID.getCode()); |
|
|
|
try { |
|
|
|
wxBillRentMapper.updateNotPaidStatus(params); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("更新租赁账单失败,e:" + e.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); |
|
|
|
} |
|
|
|
logger.error("更新租赁欠缴账单状态失败,e:" + e.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|