|
|
@ -1159,6 +1159,15 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
public void addEventFromResi(AddEventFromResiFormDTO formDTO) { |
|
|
|
// 判断是否注册居民
|
|
|
|
Result<Boolean> isResiFlag = userOpenFeignClient.getIsResiFlag(formDTO.getUserId()); |
|
|
|
if (!isResiFlag.success()){ |
|
|
|
throw new EpmetException("查询是否注册居民失败..."); |
|
|
|
} |
|
|
|
// todo 未注册居民不允许随手拍、随时讲
|
|
|
|
if (!isResiFlag.getData()){ |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),""); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(formDTO.getContent()) && CollectionUtils.isEmpty(formDTO.getVoiceList())) { |
|
|
|
//话题内容和语音不能同时为空
|
|
|
|
log.error("事件内容和语音不能同时为空"); |
|
|
|