Browse Source

党员认证通过后参数调整

dev_shibei_match
jianjun 5 years ago
parent
commit
5cd92d4377
  1. 4
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java
  2. 9
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  3. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
  4. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBadgeController.java

4
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

@ -367,9 +367,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
if (StringUtils.isBlank(partyUserId)) {
throw new RenException("addUserPartyBadge,用户Id不能为空");
}
AddUserPartyBadgeFormDTO badgeFormDTO = new AddUserPartyBadgeFormDTO();
badgeFormDTO.setUserId(partyUserId);
Result<Boolean> result = epmetUserOpenFeignClient.initBadge(badgeFormDTO);
Result<Boolean> result = epmetUserOpenFeignClient.initBadge(partyUserId);
if (result == null || !result.success()) {
throw new RenException("初始化党员徽章信息失败");
}

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

@ -10,10 +10,7 @@ import com.epmet.dto.result.*;
import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@ -445,11 +442,11 @@ public interface EpmetUserOpenFeignClient {
Result<List<GridAuditingBadgeCountResultDTO>> queryGridAuditingBadgeCount(@RequestBody List<String> gridIdList);
/**
* @param formDTO
* @param userId
* @author yinzuomei
* @description 党员认证成功后 添加userBadge记录到数据库
* @Date 2020/11/12 15:41
**/
@PostMapping(value = "/epmetuser/more/badge/initbadge")
Result<Boolean> initBadge(@RequestBody AddUserPartyBadgeFormDTO formDTO);
Result<Boolean> initBadge(@RequestParam String userId);
}

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

@ -313,7 +313,7 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien
}
@Override
public Result<Boolean> initBadge(AddUserPartyBadgeFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "initBadge", formDTO);
public Result<Boolean> initBadge(String partyUserId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "initBadge", partyUserId);
}
}

9
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBadgeController.java

@ -11,10 +11,7 @@ import com.epmet.dto.result.UserBadgeListResultDTO;
import com.epmet.dto.result.UserOperListResultDTO;
import com.epmet.service.UserBadgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -119,8 +116,8 @@ public class UserBadgeController {
* @date 2020/11/18 下午3:03
*/
@PostMapping("initbadge")
public Result initPartyMemberBadge(@RequestBody AddUserPartyBadgeFormDTO formDTO) {
userBadgeService.initPartyMemberBadge(formDTO.getUserId());
public Result initPartyMemberBadge(@RequestParam(required = false) String userId) {
userBadgeService.initPartyMemberBadge(userId);
return new Result();
}
}

Loading…
Cancel
Save