diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java index b2ebe61..0c781e9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java @@ -1,10 +1,17 @@ package com.ningdatech.pmapi.ding.controller; +import com.alibaba.fastjson.JSON; +import com.ningdatech.pmapi.common.util.CryptUtils; +import com.ningdatech.pmapi.common.util.RefreshKeyUtil; import com.ningdatech.pmapi.ding.task.EmployeeBatchGetTask; import com.ningdatech.pmapi.ding.task.GovBusinessStripsTask; import com.ningdatech.pmapi.ding.task.OrganizationBatchGetTask; import lombok.RequiredArgsConstructor; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; +import org.springframework.web.client.RestTemplate; + +import java.security.NoSuchAlgorithmException; /** *

@@ -58,4 +65,27 @@ public class DingInfoPullController { public void getBatchEmployeeByCode(@PathVariable String orgCode) { employeeBatchGetTask.getBatchEmployeeByCode(orgCode); } + + @GetMapping("/test-app") + public void testApp() throws NoSuchAlgorithmException { + long timestamp = System.currentTimeMillis(); + String areaCode = "331121"; + String appKey = "A331101453557202109017383"; + String appScret = "496f0f2a19994f76b4fd9dae087366c7"; + + String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret); + String capCode = CryptUtils.MD5Encode(timestamp + areaCode); + String capTime = String.valueOf(timestamp); + String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp); + String url = "https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/94wbaL1I1Pbz0648.htm?requestTime=" + timestamp + + "&sign=" + sign + "&appKey=" + appKey + "&capCode=" + capCode + "&capTime=" + capTime + + "&baseProjSys=测试应用&areaCode=331121&baseProjName=nsl-丽水演示项目&baseProjId=331100230130112233001" + + "&isEffective=1&baseProjSysCode=25083657"; + RestTemplate restTemplate = new RestTemplate(); + ResponseEntity forEntity = restTemplate.getForEntity(url, String.class); + + System.out.println(JSON.toJSONString(forEntity)); + } + + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java index 932a2dd..2d4b1a9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -409,6 +409,7 @@ public class UserInfoManage { resUserDetailVO.setPhoneNo(userInfo.getMobile()); resUserDetailVO.setStatus(userInfo.getAvailable()); resUserDetailVO.setEmployeeCode(userInfo.getEmployeeCode()); + resUserDetailVO.setAvatar(userInfo.getAvatar()); // 装配用户角色信息列表 List userRoleList = iUserRoleService.list(Wrappers.lambdaQuery(UserRole.class) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserDetailVO.java index f5b50e8..4d4ed26 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserDetailVO.java @@ -59,6 +59,9 @@ public class ResUserDetailVO { @ApiModelProperty("更新时间") private LocalDateTime updateTime; + @ApiModelProperty("头像") + private String avatar; + //是否是市级单位 public Boolean getIsMunicipalOrg(){ //如果是丽水市本级的code 就是