Commit d325d5ec authored by luzhuang's avatar luzhuang

accountGetUserHead

parent 6e332684
......@@ -21,7 +21,7 @@ public class PersonValueDto {
public String value;
@ApiModelProperty(value = "备注")
@Length(min = 1,max = 300,message = "长度最小为1,最大为300")
@Length(min = 0,max = 300,message = "长度最小为0,最大为300")
public String remarks;
public String userId;
......
......@@ -62,6 +62,13 @@ public interface ContactFeignClient {
@RequestParam("zxClientType") String zxClientType,
@RequestParam("zxAccountId") Long zxAccountId);
/**
* 根据用户id获取用户信息(多个)
*/
@RequestMapping(value = "/account/get_user_head",method = RequestMethod.POST)
Ret<List<MTAccountIdRspDTO>> accountGetUserHead(@RequestBody MTUserGetsReqDTO mtUserGetsReqDTO,
@RequestParam("zxClientType") String zxClientType,
@RequestParam("zxAccountId") Long zxAccountId);
/**
* 获取所有用户
* @param zxClientType
......
package org.rcisoft.common.util.feignDto;
import lombok.Data;
@Data
public class MTAccountIdRspDTO {
// [{
// "avatar": "http://zx-zgiot-002.oss-cn-qingdao.aliyuncs.com/image/d936d2b0ad6943a08ca33e58b3fdfa4d.jpg",
// "nickName": "刘焕彬",
// "userId": 1042237477358641154,
// "deptName": "APP组",
// "accountId": "124",
// "corpId": "6",
// "isDeleted": 0,
// "deptPositionStr": "APP组,无",
// "mobile": "13702184401"
// }]
private String avatar;
private String nickName;
private String userId;
private String deptName;
private String accountId;
private String corpId;
private String isDeleted;
private String deptPositionStr;
private String mobile;
}
......@@ -183,6 +183,29 @@ public class MTCotactApiRequestClient {
return contactFeignClient.userGets(mtUserGetsReqDTO,zxClientType,zxAccountId).getData();
}
/**
* 根据公司id和用户ids 获取用户信息(accountId)
*
* @return
*/
public List<MTAccountIdRspDTO> accountGetUserHead(MTUserGetsReqDTO mtUserGetsReqDTO) {
if("dev".equalsIgnoreCase(serverType)){
login();
Map<String, String> headerParams = new HashMap<>(2);
headerParams.put("clientType", "app");
headerParams.put("Authorization", "Bearer " + ACCESS_TOKEN);
String json = okHttpUtil.postForJson(api + "contact/v1/account/get_user_head", JSON.toJSONString(mtUserGetsReqDTO), headerParams);
if(StringUtils.isNotEmpty(json)) {
return JSON.parseObject(json, new TypeReference<Ret<List<MTAccountIdRspDTO>>>() {
}).getData();
}
return new ArrayList<>();
}
return contactFeignClient.accountGetUserHead(mtUserGetsReqDTO,zxClientType,zxAccountId).getData();
}
public List<GetAllRspDTO> userAll(String corpId) {
return contactFeignClient.userAll(corpId,zxClientType,zxAccountId).getData();
}
......
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