From df524fd7a8ad3c94ddc9db954b53d79ea387355c Mon Sep 17 00:00:00 2001 From: wangjiadong <1654135867@qq.com> Date: Wed, 15 Mar 2023 11:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/system/mapper/SysUserMapper.java | 6 ++++++ .../modules/system/service/ISysUserService.java | 3 ++- .../system/service/impl/SysUserServiceImpl.java | 12 ++++++++++-- .../org/jeecg/modules/system/vo/SysUserdfVO.java | 13 +++++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/SysUserdfVO.java diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java index bca8cea8..6589ff84 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java @@ -186,4 +186,10 @@ public interface SysUserMapper extends BaseMapper { @Select("SELECT za.contents FROM customercollectgoods AS crg LEFT JOIN goods_accessories AS ga ON crg.goods_id = ga.goods_id LEFT JOIN zy_accessories AS za ON ga.accessories_id = za.id where crg.id=#{id}") List getscgoodfi(String id); + + @Select("select id from customer_receiving_address where update_by =#{needuname}") + List getuserdizhi(String needuname); + + @Select("select id from customer_invoice where update_by =#{needuname}") + List getuserfapiao(String needuname); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java index e7e12a85..fbf44851 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java @@ -12,6 +12,7 @@ import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.model.SysUserSysDepartModel; import org.jeecg.modules.system.vo.Grzx1; import org.jeecg.modules.system.vo.Grzx2; +import org.jeecg.modules.system.vo.SysUserdfVO; import org.springframework.transaction.annotation.Transactional; import java.util.Collection; @@ -266,7 +267,7 @@ public interface ISysUserService extends IService { //这里是产生一个随机虚拟用户,用于虚拟下单 - SysUser getuser(); + SysUserdfVO getuser(); SysUser getneeduser(String id); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java index 095598c2..12ceacfc 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java @@ -25,6 +25,7 @@ import org.jeecg.modules.system.vo.Grzx1; import org.jeecg.modules.system.vo.Grzx2; import org.jeecg.modules.system.vo.SysUserDepVo; +import org.jeecg.modules.system.vo.SysUserdfVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CacheEvict; import org.springframework.stereotype.Service; @@ -564,7 +565,7 @@ public class SysUserServiceImpl extends ServiceImpl impl //这个是获取一个虚拟用户的对象 @Override - public SysUser getuser() { + public SysUserdfVO getuser() { //虚拟角色id String roleid="1630020854744330241"; //根据角色id查询用户id @@ -576,7 +577,14 @@ public class SysUserServiceImpl extends ServiceImpl impl String needid = uids.get(n); SysUser sysUser = new SysUser(); sysUser = userMapper.getneeduser(needid); - return sysUser; + String needuname = sysUser.getUsername(); + List dizhi = userMapper.getuserdizhi(needuname); + List fapiao = userMapper.getuserfapiao(needuname); + SysUserdfVO sdfvo = new SysUserdfVO(); + sdfvo.setSysUser(sysUser); + sdfvo.setDizhi(dizhi); + sdfvo.setFapiao(fapiao); + return sdfvo; } @Override diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/SysUserdfVO.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/SysUserdfVO.java new file mode 100644 index 00000000..323ae9d5 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/SysUserdfVO.java @@ -0,0 +1,13 @@ +package org.jeecg.modules.system.vo; + +import lombok.Data; +import org.jeecg.modules.system.entity.SysUser; + +import java.util.List; + +@Data +public class SysUserdfVO { + private SysUser sysUser; + private List fapiao; + private List dizhi; +}