From 41f699af68c52d54c83d635eb04d6efbc5a9b07e Mon Sep 17 00:00:00 2001 From: liujun Date: Thu, 25 Apr 2024 17:58:31 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=9B=B8=E5=85=B3=E6=96=B9=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E5=A4=B4=E5=83=8F=E4=BF=AE=E6=94=B9=E5=90=8E=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=9B=B4=E6=96=B0=E4=BC=81=E4=B8=9A=E7=AB=AF=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/api/ApiXgfUserController.java | 24 +++++++++++++++++++ .../zcloud/service/xgf/XgfUserService.java | 2 ++ .../service/xgf/impl/XgfUserServiceImpl.java | 12 ++++++++++ 3 files changed, 38 insertions(+) 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)) {