Browse Source

随手拍家判断

master
zxc 3 years ago
parent
commit
234c79fd3d
  1. 9
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java
  2. 9
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  3. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
  4. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java
  5. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java
  6. 17
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java

9
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

@ -1159,6 +1159,15 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public void addEventFromResi(AddEventFromResiFormDTO formDTO) { 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())) { if(StringUtils.isBlank(formDTO.getContent()) && CollectionUtils.isEmpty(formDTO.getVoiceList())) {
//话题内容和语音不能同时为空 //话题内容和语音不能同时为空
log.error("事件内容和语音不能同时为空"); log.error("事件内容和语音不能同时为空");

9
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

@ -773,4 +773,13 @@ public interface EpmetUserOpenFeignClient {
*/ */
@PostMapping("/epmetuser/icresiuser/getAllUserIds") @PostMapping("/epmetuser/icresiuser/getAllUserIds")
Result<List<String>> getAllUserIds(@RequestParam("idcard") String idCard, @RequestParam("customerId") String customerId); Result<List<String>> getAllUserIds(@RequestParam("idcard") String idCard, @RequestParam("customerId") String customerId);
/**
* Desc: 获取是否注册居民标志true已注册false未注册
* @param userId
* @author zxc
* @date 2022/5/23 13:52
*/
@PostMapping("/epmetuser/userresiinfo/isResiFlag")
Result<Boolean> getIsResiFlag(@RequestParam("userId") String userId);
} }

5
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java

@ -569,4 +569,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien
public Result<List<String>> getAllUserIds(String idCard, String customerId) { public Result<List<String>> getAllUserIds(String idCard, String customerId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getAllUserIds", idCard,customerId); return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getAllUserIds", idCard,customerId);
} }
@Override
public Result<Boolean> getIsResiFlag(String userId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getIsResiFlag", userId);
}
} }

11
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java

@ -219,4 +219,15 @@ public class UserResiInfoController {
userResiInfoService.submitInLink(param); userResiInfoService.submitInLink(param);
return new Result(); return new Result();
} }
/**
* Desc: 获取是否注册居民标志true已注册false未注册
* @param userId
* @author zxc
* @date 2022/5/23 13:52
*/
@PostMapping("isResiFlag")
public Result<Boolean> getIsResiFlag(@RequestParam("userId") String userId){
return new Result<Boolean>().ok(userResiInfoService.getIsResiFlag(userId));
}
} }

8
epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java

@ -195,4 +195,12 @@ public interface UserResiInfoService extends BaseService<UserResiInfoEntity> {
* @date 2020.12.18 16:34 * @date 2020.12.18 16:34
*/ */
void submitInLink(AfterRegisterResidentInSharableLinkFormDTO param); void submitInLink(AfterRegisterResidentInSharableLinkFormDTO param);
/**
* Desc: 获取是否注册居民标志true已注册false未注册
* @param userId
* @author zxc
* @date 2022/5/23 13:52
*/
Boolean getIsResiFlag(String userId);
} }

17
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java

@ -499,8 +499,23 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us
} }
} }
/** /**
* Desc: 获取是否注册居民标志true已注册false未注册
* @param userId
* @author zxc
* @date 2022/5/23 13:52
*/
@Override
public Boolean getIsResiFlag(String userId) {
UserResiInfoDTO userResiInfoDTO = baseDao.selectByUserId(userId);
if (null != userResiInfoDTO){
return true;
}
return false;
}
/**
* 自动认证居民志愿者注册自动认证居民 * 自动认证居民志愿者注册自动认证居民
* *
* @param userResiInfoDTO * @param userResiInfoDTO

Loading…
Cancel
Save