From 4ee77a0ee732b1d760b08d986ab308dc8d89f6be Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期三, 01 十一月 2023 10:43:54 +0800 Subject: [PATCH] 支付会员购买bug --- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TAppUserController.java | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TAppUserController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TAppUserController.java index d2e43da..d23cb31 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TAppUserController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TAppUserController.java @@ -15,6 +15,7 @@ import com.dsh.course.feignClient.other.StoreClient; import com.dsh.course.feignClient.other.model.SiteChangeStateVO; import com.dsh.guns.config.UserExt; +import com.dsh.guns.modular.system.controller.util.MD5; import com.dsh.guns.modular.system.model.*; import com.dsh.guns.modular.system.service.ICityService; import com.dsh.guns.modular.system.service.IRoleService; @@ -81,6 +82,9 @@ Integer roleType = UserExt.getUser().getObjectType(); List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); List<User> sales = userService.list(new QueryWrapper<User>().eq("deptid", 2)); + if(UserExt.getUser().getObjectType()==3){ + sales = userService.list(new QueryWrapper<User>().eq("deptid", 2).eq("objectType",3).eq("objectId",UserExt.getUser().getObjectId())); + } model.addAttribute("list",list); model.addAttribute("roleType",roleType); model.addAttribute("sales",sales); @@ -133,6 +137,9 @@ SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); String format3 = format2.format(data.getVipEndTime()); model.addAttribute("vipEndTime",format3); + }else { + model.addAttribute("vipEndTime",""); + } if (data.getViplevelId()!=null){ // todo创建会员等级表 @@ -173,7 +180,10 @@ List<QueryAppUserVO> queryAppUserVOS = appUserClient.listAll(queryAppUser); for (QueryAppUserVO queryAppUserVO : queryAppUserVOS) { if (queryAppUserVO.getSalesmanUserId()!=null){ - queryAppUserVO.setSalesmanUserName(userService.getById(queryAppUserVO.getSalesmanUserId()).getName()); + User byId = userService.getById(queryAppUserVO.getSalesmanUserId()); + if (byId!=null){ + queryAppUserVO.setSalesmanUserName(byId.getName()); + } } } if (salesmanUserName!=null && (!salesmanUserName.equals(""))){ @@ -200,6 +210,7 @@ @ResponseBody public Object addAppUser(@RequestBody TAppUser appUser){ Integer objectType = UserExt.getUser().getObjectType(); + appUser.setPassword(MD5.md5("111111")); appUser.setInsertType(objectType); appUser.setAddUserId(UserExt.getUser().getObjectId()); Object o = appUserClient.addAppUser1(appUser); -- Gitblit v1.7.1