|
@ -105,7 +105,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl<PointAdditiveR |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Result addcategory(AddcategoryFormDTO dto) { |
|
|
public Result addcategory(AddcategoryFormDTO dto) { |
|
|
PointAdditiveRuleEntity isExist = baseDao.selectEntityByName(dto.getCustomerId(),dto.getCategoryName(),null); |
|
|
PointAdditiveRuleEntity isExist = baseDao.selectEntityByName(null,dto.getCustomerId(),dto.getCategoryName(),null); |
|
|
if(isExist != null){ |
|
|
if(isExist != null){ |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该名称已存在","该名称已存在"); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该名称已存在","该名称已存在"); |
|
|
} |
|
|
} |
|
@ -133,7 +133,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl<PointAdditiveR |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Result addrule(AddruleFormDTO dto) { |
|
|
public Result addrule(AddruleFormDTO dto) { |
|
|
PointAdditiveRuleEntity isExist = baseDao.selectEntityByName(dto.getCustomerId(),null,dto.getRuleName()); |
|
|
PointAdditiveRuleEntity isExist = baseDao.selectEntityByName(null,dto.getCustomerId(),null,dto.getRuleName()); |
|
|
if(isExist != null){ |
|
|
if(isExist != null){ |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该名称已存在","该名称已存在"); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该名称已存在","该名称已存在"); |
|
|
} |
|
|
} |
|
@ -214,7 +214,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl<PointAdditiveR |
|
|
} |
|
|
} |
|
|
if(PointAddRuleEnum.CATEGORY_TYPE.getCode().equals(dto.getType())){ |
|
|
if(PointAddRuleEnum.CATEGORY_TYPE.getCode().equals(dto.getType())){ |
|
|
//类别
|
|
|
//类别
|
|
|
PointAdditiveRuleEntity isExist = baseDao.selectEntityByName(dto.getCustomerId(),dto.getCategoryName(),null); |
|
|
PointAdditiveRuleEntity isExist = baseDao.selectEntityByName(null,dto.getCustomerId(),dto.getCategoryName(),null); |
|
|
if(isExist != null){ |
|
|
if(isExist != null){ |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该名称已存在","该名称已存在"); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该名称已存在","该名称已存在"); |
|
|
} |
|
|
} |
|
@ -224,7 +224,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl<PointAdditiveR |
|
|
} |
|
|
} |
|
|
}else if(PointAddRuleEnum.RULE_TYPE.getCode().equals(dto.getType())){ |
|
|
}else if(PointAddRuleEnum.RULE_TYPE.getCode().equals(dto.getType())){ |
|
|
//规则
|
|
|
//规则
|
|
|
PointAdditiveRuleEntity isExist = baseDao.selectEntityByName(dto.getCustomerId(),null,dto.getRuleName()); |
|
|
PointAdditiveRuleEntity isExist = baseDao.selectEntityByName(null,dto.getCustomerId(),null,dto.getRuleName()); |
|
|
if(isExist != null){ |
|
|
if(isExist != null){ |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该名称已存在","该名称已存在"); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该名称已存在","该名称已存在"); |
|
|
} |
|
|
} |
|
|