服务内容修改时使用枚举类

This commit is contained in:
youxilong 2024-03-08 16:03:37 +08:00
parent 58c54e6fd3
commit 681fb980c2
2 changed files with 14 additions and 4 deletions

View File

@ -19,8 +19,18 @@ public enum ServiceWayContentServiceType {
SERVICE_CONTENT,
/**
*服务频次
* 服务频次
*/
SERVICE_FREQUENCY
SERVICE_FREQUENCY,
/**
* 服务频次类型数字DIGIT
*/
DIGIT,
/**
* 服务频次类型文本TEXT
*/
TEXT
}

View File

@ -177,9 +177,9 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
// 如果服务频次改变了检查新服务频次的重复性
if (serviceFrequencyChanged) {
boolean isFrequencyDuplicate = false;
if ("TEXT".equals(serviceWayContentEditDTO.getServiceFrequencyType())) {
if (ServiceWayContentServiceType.TEXT.toString().equals(serviceWayContentEditDTO.getServiceFrequencyType())) {
isFrequencyDuplicate = serviceWayContentMapper.isServiceFrequencyTextDuplicate(serviceWayContentEditDTO);
} else if ("DIGIT".equals(serviceWayContentEditDTO.getServiceFrequencyType())) {
} else if (ServiceWayContentServiceType.DIGIT.toString().equals(serviceWayContentEditDTO.getServiceFrequencyType())) {
isFrequencyDuplicate = serviceWayContentMapper.isServiceFrequencyDigitDuplicate(serviceWayContentEditDTO);
}
if (isFrequencyDuplicate) {