配置充电停车优惠

This commit is contained in:
Guoqs
2025-02-17 16:15:54 +08:00
parent f7057f925f
commit bf673bc5bf
9 changed files with 252 additions and 106 deletions

View File

@@ -1,6 +1,6 @@
package com.jsowell.pile.service.impl;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.SecurityUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.domain.ChargeParkingDiscount;
import com.jsowell.pile.mapper.ChargeParkingDiscountMapper;
@@ -52,8 +52,8 @@ public class ChargeParkingDiscountServiceImpl implements ChargeParkingDiscountSe
discountVO.setConditionValue(chargeParkingDiscount.getConditionValue());
discountVO.setDiscountType(chargeParkingDiscount.getDiscountType());
discountVO.setDiscountValue(chargeParkingDiscount.getDiscountValue());
discountVO.setStartTime(DateUtils.formatDateTime(chargeParkingDiscount.getStartTime()));
discountVO.setEndTime(DateUtils.formatDateTime(chargeParkingDiscount.getEndTime()));
discountVO.setStartTime(chargeParkingDiscount.getStartTime());
discountVO.setEndTime(chargeParkingDiscount.getEndTime());
return discountVO;
}
@@ -79,6 +79,11 @@ public class ChargeParkingDiscountServiceImpl implements ChargeParkingDiscountSe
@Override
public int insertOrUpdateSelective(ChargeParkingDiscount record) {
if (record.getId() == null) {
record.setCreateBy(SecurityUtils.getUsername());
} else {
record.setUpdateBy(SecurityUtils.getUsername());
}
return chargeParkingDiscountMapper.insertOrUpdateSelective(record);
}