From 372713d9d50c73871d51fd98b655d8bd9e24df46 Mon Sep 17 00:00:00 2001 From: luo <2855143437@qq.com> Date: 星期二, 02 一月 2024 10:56:13 +0800 Subject: [PATCH] 1.2 --- guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/AppUserServiceImpl.java | 38 +++++++++++++++++++++++++++++++++----- 1 files changed, 33 insertions(+), 5 deletions(-) diff --git a/guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/AppUserServiceImpl.java b/guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/AppUserServiceImpl.java index 4f516d7..370a168 100644 --- a/guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/AppUserServiceImpl.java +++ b/guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/AppUserServiceImpl.java @@ -5,15 +5,13 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import com.stylefeng.guns.core.util.DateUtil; import com.stylefeng.guns.core.util.JwtTokenUtil; import com.stylefeng.guns.core.util.ToolUtil; import com.stylefeng.guns.modular.system.dao.AppUserMapper; import com.stylefeng.guns.modular.system.dto.Host; import com.stylefeng.guns.modular.system.dto.Medium; -import com.stylefeng.guns.modular.system.model.AppUser; -import com.stylefeng.guns.modular.system.model.CollectionHouseResource; -import com.stylefeng.guns.modular.system.model.HouseResource; -import com.stylefeng.guns.modular.system.model.Region; +import com.stylefeng.guns.modular.system.model.*; import com.stylefeng.guns.modular.system.service.IAppUserService; import com.stylefeng.guns.modular.system.service.ICollectionHouseResourceService; import com.stylefeng.guns.modular.system.service.IHousingDemandService; @@ -333,9 +331,39 @@ return ResultUtil.success(); } +// @Autowired +// private HouseResourceService houseResourceService; @Override public List<Host> listHost(String nickname, Integer userType, Integer status, String phone) { - return this.baseMapper.listHost(nickname,userType,status,phone); + List<Host> hosts = this.baseMapper.listHost(nickname, userType, status, phone); +// for (Host h : hosts) { +// HouseResource houseResource = houseResourceService.selectOne(new EntityWrapper<HouseResource>().eq("insert_user_id", h.getId()).last("order by insert_time desc limit 1")); +// HousingDemand housingDemand = housingDemandService.selectOne(new EntityWrapper<HousingDemand>().eq("insert_user_id", h.getId()).last("order by insert_time desc limit 1")); +// if (houseResource==null&&housingDemand!=null){ +// h.setWechatQRCode(housingDemand.getWechatQrCode()); +// h.setWatchApp(housingDemand.getWatchApp()); +// continue; +// } +// if (houseResource!=null&&housingDemand==null){ +// h.setWechatQRCode(houseResource.getWechatQRCode()); +// h.setWatchApp(houseResource.getWatchApp()); +// continue; +// } +// if (houseResource==null&&housingDemand==null){ +// continue; +// } +// Date insertTime = houseResource.getInsertTime(); +// Date insertTime1 = housingDemand.getInsertTime(); +// if (insertTime.after(insertTime1)) { +// h.setWechatQRCode(houseResource.getWechatQRCode()); +// h.setWatchApp(houseResource.getWatchApp()); +// } else { +// h.setWechatQRCode(housingDemand.getWechatQrCode()); +// h.setWatchApp(housingDemand.getWatchApp()); +// } +// } + + return hosts; } @Override -- Gitblit v1.7.1