mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update会员计费模板
This commit is contained in:
@@ -116,15 +116,29 @@ public class TransactionService {
|
||||
*/
|
||||
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
|
||||
public void doUpdateBillingTemplate(BillingTemplateTransactionDTO dto) {
|
||||
if (dto.getBillingTemplate() == null || CollectionUtils.isEmpty(dto.getDetailList())) {
|
||||
return;
|
||||
// if (dto.getBillingTemplate() == null || CollectionUtils.isEmpty(dto.getDetailList())) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
String templateCode = null;
|
||||
// 更新计费模板基本信息
|
||||
if (dto.getBillingTemplate() != null) {
|
||||
templateCode = dto.getBillingTemplate().getTemplateCode();
|
||||
pileBillingTemplateMapper.updatePileBillingTemplate(dto.getBillingTemplate());
|
||||
}
|
||||
|
||||
// 更新计费模板详情
|
||||
if (CollectionUtils.isNotEmpty(dto.getDetailList())) {
|
||||
if (StringUtils.isBlank(templateCode)) {
|
||||
templateCode = dto.getDetailList().get(0).getTemplateCode();
|
||||
}
|
||||
if (StringUtils.isNotBlank(templateCode)) {
|
||||
// 计费模板 先删后插
|
||||
pileBillingTemplateMapper.deletePileBillingDetailByTemplateCode(templateCode);
|
||||
}
|
||||
// 保存计费模板详情
|
||||
pileBillingTemplateMapper.batchPileBillingDetail(dto.getDetailList());
|
||||
}
|
||||
// 保存计费模板基本信息
|
||||
pileBillingTemplateMapper.updatePileBillingTemplate(dto.getBillingTemplate());
|
||||
// 计费模板 先删后插
|
||||
pileBillingTemplateMapper.deletePileBillingDetailByTemplateCode(dto.getBillingTemplate().getTemplateCode());
|
||||
// 保存计费模板详情
|
||||
pileBillingTemplateMapper.batchPileBillingDetail(dto.getDetailList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user