@@ -5,6 +5,8 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.mapper.WxBillPropertyMapper;
import com.iformall.mapper.WxBillRentMapper;
import com.iformall.mapper.WxPayAccountBillMapper;
import com.iformall.service.WxPayAccountBillService;
import org.slf4j.Logger;
@@ -19,6 +21,11 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService {
@Autowired
WxPayAccountBillMapper wxPayAccountBillMapper;
@Autowired
WxBillRentMapper wxBillRentMapper;
@Autowired
WxBillPropertyMapper wxBillPropertyMapper;
@Override
public PageInfo<WxPayAccountBill> listAsPage(WxPayAccountBill record, Integer pageIndex, Integer pageSize) {
@@ -40,13 +47,17 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService {
@Override
public void saveOrUpdate(WxPayAccountBill record) {
if (record.getId() == null) {
//record.setId(UUID.randomUUID().toString().replaceAll("-", ""));
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
wxPayAccountBillMapper.insert(record);
} else {
wxPayAccountBillMapper.updateById(record);
}
//更新手续费
wxBillRentMapper.updateServiceCharge(record);
wxBillPropertyMapper.updateServiceCharge(record);
}
@Override