diff --git a/src/main/java/com/zcloud/controller/api/ApiXgfUserController.java b/src/main/java/com/zcloud/controller/api/ApiXgfUserController.java index 539d0b03..f37451b6 100644 --- a/src/main/java/com/zcloud/controller/api/ApiXgfUserController.java +++ b/src/main/java/com/zcloud/controller/api/ApiXgfUserController.java @@ -13,6 +13,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +/** + * created by liu jun 相关方人员同步接口 + */ @Controller @RequestMapping("/openApi/xfgUser") public class ApiXgfUserController extends BaseController { @@ -35,6 +38,27 @@ public class ApiXgfUserController extends BaseController { } } + @RequestMapping(value = "/syncPhoto") + @ResponseBody + public Object syncPhoto() throws Exception { + Map response = new HashMap(); + try { + PageData request = this.getPageData(); + xgfUserService.syncPhoto(request); + + response.put("code","0"); + response.put("result", "success"); + return response; + } catch (Exception e) { + e.printStackTrace(); + response.put("code","9999"); + response.put("result", "success"); + return response; + } + } + + + @RequestMapping(value = "/approvalApplication") @ResponseBody public Object approvalApplication() throws Exception { diff --git a/src/main/java/com/zcloud/service/xgf/XgfUserService.java b/src/main/java/com/zcloud/service/xgf/XgfUserService.java index 9e948b61..0509d206 100644 --- a/src/main/java/com/zcloud/service/xgf/XgfUserService.java +++ b/src/main/java/com/zcloud/service/xgf/XgfUserService.java @@ -44,4 +44,6 @@ public interface XgfUserService { void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception; List getWorkTask(PageData condition) throws Exception; + + void syncPhoto(PageData request) throws Exception; } diff --git a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java index e6388516..8d0cdc49 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -1077,6 +1077,18 @@ public class XgfUserServiceImpl implements XgfUserService { return xgfUserMapper.getWorkTask(condition); } + @Override + public void syncPhoto(PageData request) throws Exception { + PageData condition = new PageData(); + condition.put("XGF_USER_DETAILS_ID",request.get("USER_ID")); + PageData detailEntity = xgfUserDetailsMapper.findById(condition); + if (detailEntity == null || detailEntity.size() == 0){ + throw new RuntimeException("未找到该用户详细信息"); + } + detailEntity.put("PHOTO",request.get("PHOTO")); + xgfUserDetailsMapper.edit(detailEntity); + } + private String getType(String corpInfoId) { // created bu liu jun - 港务局要求,可以直接指定集团单位 if ("1".equals(corpInfoId)) {