|
|
@@ -131,6 +131,14 @@ public class BizQuestionGroupServiceImpl implements IBizQuestionGroupService {
|
|
|
source.setFrequency(null);
|
|
|
source.setInterval(null);
|
|
|
}
|
|
|
+ if(QuestionGroupTypeEnums.AFTER.equals(source.getType())){
|
|
|
+ if(ObjectUtil.isNull(source.getFrequency())){
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "请选择推送频率");
|
|
|
+ }
|
|
|
+ if(ObjectUtil.isNull(source.getInterval())){
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "请选择推送间隔");
|
|
|
+ }
|
|
|
+ }
|
|
|
BizQuestionGroupPO oldQuestionGroup = baseRepository.selectById(source.getId());
|
|
|
if (Objects.isNull(oldQuestionGroup)) {
|
|
|
throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "该问卷组不存在");
|
|
|
@@ -156,6 +164,14 @@ public class BizQuestionGroupServiceImpl implements IBizQuestionGroupService {
|
|
|
source.setFrequency(null);
|
|
|
source.setInterval(null);
|
|
|
}
|
|
|
+ if(QuestionGroupTypeEnums.AFTER.equals(source.getType())){
|
|
|
+ if(ObjectUtil.isNull(source.getFrequency())){
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "请选择推送频率");
|
|
|
+ }
|
|
|
+ if(ObjectUtil.isNull(source.getInterval())){
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "请选择推送间隔");
|
|
|
+ }
|
|
|
+ }
|
|
|
BizQuestionGroupPO bizQuestionGroupPO = BizQuestionGroupMapper.INSTANCE.convertPO(source);
|
|
|
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(source, MD5_FIELDS);
|
|
|
bizQuestionGroupPO.setVersion(1);
|