From fe923f19877500f3f95bb55d1853ffd129e01f1d Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Mon, 28 Nov 2022 09:52:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BD=91=E7=AB=99=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E6=9B=B4=E6=96=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/userexpand/UserExpandController.java | 2 +- .../userexpand/UserExpandAppController.java | 2 +- .../userexpand/IUserExpandService.java | 2 +- .../impl/UserExpandServiceImpl.java | 43 ++++++++----------- 4 files changed, 20 insertions(+), 29 deletions(-) diff --git a/src/main/java/cn/com/tenlion/xzszwhy/base/controller/api/userexpand/UserExpandController.java b/src/main/java/cn/com/tenlion/xzszwhy/base/controller/api/userexpand/UserExpandController.java index 439f7c3..604a3b9 100644 --- a/src/main/java/cn/com/tenlion/xzszwhy/base/controller/api/userexpand/UserExpandController.java +++ b/src/main/java/cn/com/tenlion/xzszwhy/base/controller/api/userexpand/UserExpandController.java @@ -43,7 +43,7 @@ public class UserExpandController extends DefaultBaseController { @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-byuserid/{userId}") @CheckRequestBodyAnnotation - public SuccessResult update(@PathVariable("userId") String userId, @RequestBody UserExpandVO userExpandVO) { + public SuccessResult update(@PathVariable("userId") String userId, @RequestBody UserExpandVO userExpandVO) throws Exception { userExpandService.updateByUserId(null, userId, userExpandVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/xzszwhy/base/controller/app/api/userexpand/UserExpandAppController.java b/src/main/java/cn/com/tenlion/xzszwhy/base/controller/app/api/userexpand/UserExpandAppController.java index 587f6a0..e56fba3 100644 --- a/src/main/java/cn/com/tenlion/xzszwhy/base/controller/app/api/userexpand/UserExpandAppController.java +++ b/src/main/java/cn/com/tenlion/xzszwhy/base/controller/app/api/userexpand/UserExpandAppController.java @@ -44,7 +44,7 @@ public class UserExpandAppController extends DefaultBaseController { @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-byuserid/{userId}") @CheckRequestBodyAnnotation - public SuccessResult updateUserExpand(@RequestHeader("token") String token, @PathVariable("userId") String userId, @RequestBody UserExpandVO userExpandVO) { + public SuccessResult updateUserExpand(@RequestHeader("token") String token, @PathVariable("userId") String userId, @RequestBody UserExpandVO userExpandVO) throws Exception { userExpandService.updateByUserId(token, userId, userExpandVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/xzszwhy/base/service/userexpand/IUserExpandService.java b/src/main/java/cn/com/tenlion/xzszwhy/base/service/userexpand/IUserExpandService.java index eb6ea8b..51d731c 100644 --- a/src/main/java/cn/com/tenlion/xzszwhy/base/service/userexpand/IUserExpandService.java +++ b/src/main/java/cn/com/tenlion/xzszwhy/base/service/userexpand/IUserExpandService.java @@ -35,7 +35,7 @@ public interface IUserExpandService extends IUserExpandBaseService params = super.getHashMap(3); - params.put("userId",userId); + Map params = super.getHashMap(3); + params.put("userId", userId); UserExpandDTO userExpandDTO = this.get(params); - if(userExpandDTO == null){ + if (userExpandDTO == null) { userExpandDTO = new UserExpandDTO(); } userExpandDTO.setUserName(userDTO.getUserName()); @@ -69,32 +69,28 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx } - public void updateByUserId(String token, String userId, UserExpandVO userExpandVO){ - Map params = super.getHashMap(1); + public void updateByUserId(String token, String userId, UserExpandVO userExpandVO) throws Exception { + Map params = super.getHashMap(1); params.put("userId", userId); UserExpandDTO userExpandDTO = this.get(params); // 1.保存拓展信息 - if(userExpandDTO == null){ + if (userExpandDTO == null) { this.saveReturnId(token, userId, userExpandVO); - }else{ - this.update(token,userExpandDTO.getUserExpandId(),userExpandVO); + } else { + this.update(token, userExpandDTO.getUserExpandId(), userExpandVO); + } + if (StringUtils.isBlank(token)) { + return; } // 2.更新用户信息 UpdateUserVO updateUserVO = new UpdateUserVO(); - try { - updateUserVO.setName(userExpandVO.getName()); - updateUserVO.setPhone(userExpandVO.getPhone()); - updateUserVO.setEmail(userExpandVO.getEmail()); - userService.updateInfo(token,updateUserVO); - } catch (Exception e) { - throw new UpdateException("更新用户信息失败"); - } - - + updateUserVO.setName(userExpandVO.getName()); + updateUserVO.setPhone(userExpandVO.getPhone()); + updateUserVO.setEmail(userExpandVO.getEmail()); + userService.updateInfo(token, updateUserVO); } - @Override public UserExpandDTO getByUsername(String username) { return null; @@ -137,11 +133,6 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx } - - - - - @Override public void save(UserExpandVO userExpandVO) { saveReturnId(userExpandVO); @@ -156,6 +147,7 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx public String saveReturnId(UserExpandVO userExpandVO) { return saveReturnId(null, userExpandVO); } + @Override public String saveReturnId(String token, UserExpandVO userExpandVO) { String userExpandId = UUIDUtil.getUUID(); @@ -287,7 +279,6 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx } - @Override public Integer count(Map params) { Integer count = userExpandDao.count(params); From 7bbaff0cf4218c88db95297af621cc06f4807c6a Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Tue, 13 Dec 2022 15:12:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=84=E7=90=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 46 +++++++++++++++++++ .../groundbooking/groundbooking-mapper.xml | 10 +++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 37971c7..544c7da 100644 --- a/pom.xml +++ b/pom.xml @@ -167,8 +167,54 @@ + org.springframework.boot spring-boot-maven-plugin + + ZIP + + + non-exists + non-exists + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + package + + copy-dependencies + + + + target/lib + false + false + runtime + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + **/*.properties + **/*.xml + **/*.yml + static/** + templates/** + mybatis/** + + diff --git a/src/main/resources/mybatis/mapper/venuebooking/groundbooking/groundbooking-mapper.xml b/src/main/resources/mybatis/mapper/venuebooking/groundbooking/groundbooking-mapper.xml index d534b18..1baef11 100644 --- a/src/main/resources/mybatis/mapper/venuebooking/groundbooking/groundbooking-mapper.xml +++ b/src/main/resources/mybatis/mapper/venuebooking/groundbooking/groundbooking-mapper.xml @@ -175,7 +175,15 @@ AND t1.order_type = '1' GROUP BY - t1.ground_booking_id + t1.ground_booking_id, + t1.serial, + t1.venues_name, + t1.project_name, + t1.order_type, + t1.gmt_create, + t2.venue_panorama, + t3.price, + t3.booking_item_id ORDER BY t1.order_type ASC,t1.gmt_create DESC