Commit 70503703 authored by luzhuang's avatar luzhuang

权限验证接口 参数类型变化Long-String

parent bb9d21d7
...@@ -28,7 +28,7 @@ public class MicroappFeignClientFallBack implements MicroappFeignClient { ...@@ -28,7 +28,7 @@ public class MicroappFeignClientFallBack implements MicroappFeignClient {
} }
@Override @Override
public Ret<List<Long>> haveJurisdictionUserFast(HaveJurisdictionReqDTO haveJurisdictionReqDTO, String zxClientType, Long zxAccountId) { public Ret<List<String>> haveJurisdictionUserFast(HaveJurisdictionReqDTO haveJurisdictionReqDTO, String zxClientType, Long zxAccountId) {
log.error("---------------调智信接口 /micro_app/haveJurisdictionUserFast(筛选有通知权限的人-优化) 失败-------------------"); log.error("---------------调智信接口 /micro_app/haveJurisdictionUserFast(筛选有通知权限的人-优化) 失败-------------------");
......
...@@ -49,7 +49,7 @@ public interface MicroappFeignClient { ...@@ -49,7 +49,7 @@ public interface MicroappFeignClient {
* @return * @return
*/ */
@RequestMapping(value = "/micro_app/haveJurisdictionUserFast",method = RequestMethod.POST) @RequestMapping(value = "/micro_app/haveJurisdictionUserFast",method = RequestMethod.POST)
Ret<List<Long>> haveJurisdictionUserFast(@RequestBody HaveJurisdictionReqDTO haveJurisdictionReqDTO, Ret<List<String>> haveJurisdictionUserFast(@RequestBody HaveJurisdictionReqDTO haveJurisdictionReqDTO,
@RequestParam("zxClientType") String zxClientType, @RequestParam("zxClientType") String zxClientType,
@RequestParam("zxAccountId") Long zxAccountId); @RequestParam("zxAccountId") Long zxAccountId);
......
...@@ -13,15 +13,15 @@ import java.util.List; ...@@ -13,15 +13,15 @@ import java.util.List;
public class HaveJurisdictionReqDTO { public class HaveJurisdictionReqDTO {
@NotNull @NotNull
private Long corpId; private String corpId;
@NotNull @NotNull
private List<Long> userIds; private List<String> userIds;
@NotNull @NotNull
private Long appId; private String appId;
public HaveJurisdictionReqDTO(Long corpId,List<Long> userIds){ public HaveJurisdictionReqDTO(String corpId,List<String> userIds){
this.corpId = corpId; this.corpId = corpId;
this.userIds = userIds; this.userIds = userIds;
} }
......
...@@ -13,6 +13,6 @@ public class MTUserGetsAccountReqDTO { ...@@ -13,6 +13,6 @@ public class MTUserGetsAccountReqDTO {
private String corpId; private String corpId;
private List<Long> userIds; private List<String> userIds;
} }
...@@ -27,28 +27,28 @@ public class MTMicroappApiRequestClient { ...@@ -27,28 +27,28 @@ public class MTMicroappApiRequestClient {
public static Long zxAccountId = (long)1; public static Long zxAccountId = (long)1;
@Value("${appId.noticeAppId}") @Value("${appId.noticeAppId}")
private Long appId; private String appId;
@Autowired @Autowired
private MicroappFeignClient microappFeignClient; private MicroappFeignClient microappFeignClient;
//
public boolean isHaveApps(long userId, long corpId) { // public boolean isHaveApps(long userId, long corpId) {
Ret ret = microappFeignClient.isHaveApps(userId,corpId,appId,zxClientType,zxAccountId); // Ret ret = microappFeignClient.isHaveApps(userId,corpId,appId,zxClientType,zxAccountId);
if(ret != null && "M0000".equals(ret.getCode())){ // if(ret != null && "M0000".equals(ret.getCode())){
return (boolean) ret.getData(); // return (boolean) ret.getData();
} // }
return false; // return false;
} // }
//
public Ret haveJurisdictionUser(HaveJurisdictionReqDTO haveJurisdictionReqDTO) { // public Ret haveJurisdictionUser(HaveJurisdictionReqDTO haveJurisdictionReqDTO) {
haveJurisdictionReqDTO.setAppId(appId); // haveJurisdictionReqDTO.setAppId(appId);
Ret ret = microappFeignClient.haveJurisdictionUser(haveJurisdictionReqDTO,zxClientType,zxAccountId); // Ret ret = microappFeignClient.haveJurisdictionUser(haveJurisdictionReqDTO,zxClientType,zxAccountId);
return ret; // return ret;
} // }
public Ret<List<Long>> haveJurisdictionUserFast(HaveJurisdictionReqDTO haveJurisdictionReqDTO) { public Ret<List<String>> haveJurisdictionUserFast(HaveJurisdictionReqDTO haveJurisdictionReqDTO) {
haveJurisdictionReqDTO.setAppId(appId); haveJurisdictionReqDTO.setAppId(appId);
Ret<List<Long>> ret = microappFeignClient.haveJurisdictionUserFast(haveJurisdictionReqDTO,zxClientType,zxAccountId); Ret<List<String>> ret = microappFeignClient.haveJurisdictionUserFast(haveJurisdictionReqDTO,zxClientType,zxAccountId);
return ret; return ret;
} }
......
...@@ -126,20 +126,20 @@ public class MTNotificationApiRequestClient { ...@@ -126,20 +126,20 @@ public class MTNotificationApiRequestClient {
if (null != message.getRecipientIds() && message.getRecipientIds().size() > 0 && message.getRecipientIds().get(0) != null) { if (null != message.getRecipientIds() && message.getRecipientIds().size() > 0 && message.getRecipientIds().get(0) != null) {
List<Long> recipientIdLongList = new ArrayList<>(); List<String> recipientIdList = new ArrayList<>();
message.getRecipientIds().forEach(recipientId -> { message.getRecipientIds().forEach(recipientId -> {
recipientIdLongList.add(Long.parseLong(recipientId)); recipientIdList.add(recipientId);
}); });
HaveJurisdictionReqDTO haveJurisdictionReqDTO = new HaveJurisdictionReqDTO(Long.parseLong(message.getCorpId()),recipientIdLongList); HaveJurisdictionReqDTO haveJurisdictionReqDTO = new HaveJurisdictionReqDTO(message.getCorpId(),recipientIdList);
log.debug("----------------------通知-权限验证---------------------"); log.debug("----------------------通知-权限验证---------------------"+haveJurisdictionReqDTO);
Ret<List<Long>> haveJurisList = microappApiRequestClient.haveJurisdictionUserFast(haveJurisdictionReqDTO); Ret<List<String>> haveJurisList = microappApiRequestClient.haveJurisdictionUserFast(haveJurisdictionReqDTO);
log.debug("----------------------通知-权限验证返回结果----------------------"+haveJurisList.getData()); log.debug("----------------------通知-权限验证返回结果----------------------"+haveJurisList.getData());
if (haveJurisList.getData() == null || haveJurisList.getData().size() < 1){ if (haveJurisList.getData() == null || haveJurisList.getData().size() < 1){
return false; return false;
} }
List<String> haveJurisAccountIds = new ArrayList<>(); List<String> haveJurisAccountIds = new ArrayList<>();
// List<String> getUserAccountList = new ArrayList<>(); // List<String> getUserAccountList = new ArrayList<>();
List<Long> getUserAccountLongList = haveJurisList.getData(); List<String> getUserAccountLongList = haveJurisList.getData();
// getUserAccountLongList.forEach(getUserAccount ->{ // getUserAccountLongList.forEach(getUserAccount ->{
// getUserAccountList.add(String.valueOf(getUserAccount)); // getUserAccountList.add(String.valueOf(getUserAccount));
// }); // });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment