From ca45d0e4c1c038a1303340803caa107c295a58cd Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Mon, 29 Jul 2024 15:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pojo/dtos/user/info/UserInfoDTO.java | 90 +++++-------------- .../user/custom/UserCustomService.java | 6 +- .../service/user/info/UserInfoService.java | 9 +- .../resources/templates/user/custom/list.html | 15 +--- 4 files changed, 23 insertions(+), 97 deletions(-) diff --git a/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/info/UserInfoDTO.java b/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/info/UserInfoDTO.java index 00864f6..1bb6395 100644 --- a/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/info/UserInfoDTO.java +++ b/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/info/UserInfoDTO.java @@ -25,22 +25,12 @@ public class UserInfoDTO { private String idCardType; @ApiModelProperty(name = "idCardNumber", value = "证件号") private String idCardNumber; - @ApiModelProperty(name = "idCardFront", value = "证件照正面") - private String idCardFront; - @ApiModelProperty(name = "idCardBack", value = "证件照反面") - private String idCardBack; - @ApiModelProperty(name = "idCardStartDate", value = "证件开始时间") - private String idCardStartDate; - @ApiModelProperty(name = "idCardEndDate", value = "证件结束时间") - private String idCardEndDate; - @ApiModelProperty(name = "legalPerson", value = "法人") - private String legalPerson; - @ApiModelProperty(name = "establishDate", value = "成立时间") - private String establishDate; - @ApiModelProperty(name = "contactAddress", value = "联系地址") - private String contactAddress; @ApiModelProperty(name = "contactPhone", value = "联系电话") private String contactPhone; + @ApiModelProperty(name = "contactName", value = "联系人姓名") + private String contactName; + @ApiModelProperty(name = "contactName", value = "英文名称") + private String userInfoNameEn; @ApiModelProperty(name = "userUsername", value = "用户名") private String userUsername; @@ -92,62 +82,6 @@ public class UserInfoDTO { this.idCardNumber = idCardNumber; } - public String getIdCardFront() { - return idCardFront == null ? "" : idCardFront.trim(); - } - - public void setIdCardFront(String idCardFront) { - this.idCardFront = idCardFront; - } - - public String getIdCardBack() { - return idCardBack == null ? "" : idCardBack.trim(); - } - - public void setIdCardBack(String idCardBack) { - this.idCardBack = idCardBack; - } - - public String getIdCardStartDate() { - return idCardStartDate == null ? "" : idCardStartDate.trim(); - } - - public void setIdCardStartDate(String idCardStartDate) { - this.idCardStartDate = idCardStartDate; - } - - public String getIdCardEndDate() { - return idCardEndDate == null ? "" : idCardEndDate.trim(); - } - - public void setIdCardEndDate(String idCardEndDate) { - this.idCardEndDate = idCardEndDate; - } - - public String getLegalPerson() { - return legalPerson == null ? "" : legalPerson.trim(); - } - - public void setLegalPerson(String legalPerson) { - this.legalPerson = legalPerson; - } - - public String getEstablishDate() { - return establishDate == null ? "" : establishDate.trim(); - } - - public void setEstablishDate(String establishDate) { - this.establishDate = establishDate; - } - - public String getContactAddress() { - return contactAddress == null ? "" : contactAddress.trim(); - } - - public void setContactAddress(String contactAddress) { - this.contactAddress = contactAddress; - } - public String getContactPhone() { return contactPhone == null ? "" : contactPhone.trim(); } @@ -156,6 +90,22 @@ public class UserInfoDTO { this.contactPhone = contactPhone; } + public String getContactName() { + return contactName == null ? "" : contactName.trim(); + } + + public void setContactName(String contactName) { + this.contactName = contactName; + } + + public String getUserInfoNameEn() { + return userInfoNameEn == null ? "" : userInfoNameEn.trim(); + } + + public void setUserInfoNameEn(String userInfoNameEn) { + this.userInfoNameEn = userInfoNameEn; + } + public String getUserUsername() { return userUsername == null ? "" : userUsername.trim(); } diff --git a/src/main/java/cn/com/tenlion/operator/service/user/custom/UserCustomService.java b/src/main/java/cn/com/tenlion/operator/service/user/custom/UserCustomService.java index 6cd6e95..5b99e57 100644 --- a/src/main/java/cn/com/tenlion/operator/service/user/custom/UserCustomService.java +++ b/src/main/java/cn/com/tenlion/operator/service/user/custom/UserCustomService.java @@ -65,11 +65,7 @@ public class UserCustomService extends DefaultBaseService { List rolePOS = roleUserService.listRolePOByUserId(userDTO.getUserId()); List roles = rolePOS.stream().map(rolePO -> new UserCustomDTO.Role(rolePO.getRoleId(), rolePO.getRoleName())).collect(Collectors.toList()); userCustomDTO.setRoles(roles); - userInfoDTOS.stream().filter(dto -> StringUtils.equals(userDTO.getUserId(), dto.getUserId())).findFirst().ifPresent(userInfo -> { - userInfo.setIdCardFront(String.format("%sroute/file/download/true/%s", systemApiPathProperties.getCopyrightExternal(), userInfo.getIdCardFront())); - userInfo.setIdCardBack(String.format("%sroute/file/download/true/%s", systemApiPathProperties.getCopyrightExternal(), userInfo.getIdCardBack())); - userCustomDTO.setUserInfo(userInfo); - }); + userInfoDTOS.stream().filter(dto -> StringUtils.equals(userDTO.getUserId(), dto.getUserId())).findFirst().ifPresent(userCustomDTO::setUserInfo); return userCustomDTO; }).collect(Collectors.toList()); return new SuccessResultList<>(userCustomDTOS, successResultList.getPage(), successResultList.getTotal()); diff --git a/src/main/java/cn/com/tenlion/operator/service/user/info/UserInfoService.java b/src/main/java/cn/com/tenlion/operator/service/user/info/UserInfoService.java index 4f35998..b5a695e 100644 --- a/src/main/java/cn/com/tenlion/operator/service/user/info/UserInfoService.java +++ b/src/main/java/cn/com/tenlion/operator/service/user/info/UserInfoService.java @@ -36,13 +36,10 @@ public class UserInfoService extends DefaultBaseService { public UserInfoDTO get(String userInfoId) { String token = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(); - UserInfoDTO dto = userInfoRemoteService.get( + return userInfoRemoteService.get( systemApiPathProperties.getCopyright(), userInfoId, token); - dto.setIdCardFront(String.format("%sroute/file/download/true/%s", systemApiPathProperties.getCopyrightExternal(), dto.getIdCardFront())); - dto.setIdCardBack(String.format("%sroute/file/download/true/%s", systemApiPathProperties.getCopyrightExternal(), dto.getIdCardBack())); - return dto; } public List listByUserIds(List userIds) { @@ -77,10 +74,6 @@ public class UserInfoService extends DefaultBaseService { userPOS.stream().filter(po -> StringUtils.equals(dto.getUserId(), po.getUserId())).findFirst().ifPresent(userPO -> dto.setUserUsername(userPO.getUserUsername())); }); } - userInfoDTOS.forEach(dto -> { - dto.setIdCardFront(String.format("%sroute/file/download/true/%s", systemApiPathProperties.getCopyrightExternal(), dto.getIdCardFront())); - dto.setIdCardBack(String.format("%sroute/file/download/true/%s", systemApiPathProperties.getCopyrightExternal(), dto.getIdCardBack())); - }); return successResultList; } diff --git a/src/main/resources/templates/user/custom/list.html b/src/main/resources/templates/user/custom/list.html index 7101416..1cedc24 100644 --- a/src/main/resources/templates/user/custom/list.html +++ b/src/main/resources/templates/user/custom/list.html @@ -102,7 +102,7 @@ return `¥${(item.account.accountMoney / 100).toFixed(2)}`; } }, - {field:'userInfoName', width:200, title: '用户名称', align:'center', + {field:'userInfoName', width:200, title: '用户/公司名称', align:'center', templet: function(item) { if(!item.userInfo) { return '-'; @@ -118,19 +118,6 @@ return item.userInfo.idCardNumber; } }, - {field: 'idCardFrontBack', width: 120, title: '证件照正/反面', align:'center', - templet: function(item) { - if(!item.userInfo) { - return '-'; - } - return ` -
- - -
- `; - } - }, {field:'userType', width:90, title: '类型', sort: true, align:'center', templet: function(item) { if(item.userType == 1) {