From 2970c9e589fef2b552ffd387a3202cf7e470befd Mon Sep 17 00:00:00 2001 From: winter <664946893@qq.com> Date: Sun, 10 Nov 2024 20:31:27 +0800 Subject: [PATCH] fix --- .../controller/rent/WxAllBillController.java | 12 ++++++------ .../java/com/iformall/service/WxShopService.java | 2 +- .../com/iformall/service/helper/WxBillAllHelper.java | 2 +- .../com/iformall/service/impl/WxShopServiceImpl.java | 10 ++++++---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxAllBillController.java b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxAllBillController.java index bd236d85f..6a0a727a7 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxAllBillController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxAllBillController.java @@ -697,7 +697,7 @@ public class WxAllBillController extends BillBaseController { wxShop.setNeedPayNoDays(EnumYesOrNo.YES.getCode()); WxShop shop = wxShopSerivce.getById(wxShop.getId()); - WxShopUsersInfo shopUser = wxShopSerivce.getCurrentShopUser(shop, shop.getId()); + WxShopUsers shopUser = wxShopSerivce.getCurrentShopUser(shop, shop.getId()); List list = billAllHelper.getMerchantBillList(wxShop); if (null != list && list.size() > 0 ) { @@ -713,8 +713,8 @@ public class WxAllBillController extends BillBaseController { be.setEnergyFeesName(fees.getName()); } } - if (null != shopUser) { - be.setRentName(shopUser.getName()); + if (null != shopUser && StringUtils.isBlank(be.getCusName())) { + be.setCusName(shopUser.getName()); } } } @@ -747,7 +747,7 @@ public class WxAllBillController extends BillBaseController { } List list = billAllHelper.getMerchantBillList(wxShop); WxShop shop = wxShopSerivce.getById(wxShop.getId()); - WxShopUsersInfo shopUser = wxShopSerivce.getCurrentShopUser(shop, shop.getId()); + WxShopUsers shopUser = wxShopSerivce.getCurrentShopUser(shop, shop.getId()); if (null != list && list.size() > 0 ) { WxEnergyFees fq = new WxEnergyFees(); fq.updateTenantInfo(shop); @@ -761,8 +761,8 @@ public class WxAllBillController extends BillBaseController { be.setEnergyFeesName(fees.getName()); } } - if (null != shopUser) { - be.setRentName(shopUser.getName()); + if (null != shopUser && StringUtils.isBlank(be.getCusName())) { + be.setCusName(shopUser.getName()); } } } diff --git a/mallinkService/src/main/java/com/iformall/service/WxShopService.java b/mallinkService/src/main/java/com/iformall/service/WxShopService.java index 1f82af58f..df0f35ff2 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxShopService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxShopService.java @@ -149,7 +149,7 @@ public interface WxShopService { List getUserShopIds(WxShopUsers wxShopUsers); Map getShopUserMap(WxShopUsers wxShopUsers); - WxShopUsersInfo getCurrentShopUser(TenantEntity tenantEntity,Long shopId); + WxShopUsers getCurrentShopUser(TenantEntity tenantEntity,Long shopId); List getFloorBuildShopIds(TenantEntity tenantEntity,String floorRule,Long building,Long floor,Integer shopDel ,String shopNumber) ; diff --git a/mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java b/mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java index 25cf27382..414e28409 100644 --- a/mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java +++ b/mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java @@ -287,7 +287,7 @@ public class WxBillAllHelper { if (null != shop) { result.put("shopNumber", shop.getShopNumber()); } - WxShopUsersInfo su = wxShopService.getCurrentShopUser(bill, bill.getShopId()); + WxShopUsers su = wxShopService.getCurrentShopUser(bill, bill.getShopId()); if (null != su) { result.put("merchantName", su.getName()); result.put("linkPerson", su.getLinkPerson()); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java index 5e72d8499..0f76a0c0a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java @@ -1191,17 +1191,19 @@ public class WxShopServiceImpl implements WxShopService { } @Override - public WxShopUsersInfo getCurrentShopUser(TenantEntity tenantEntity, Long shopId) { - WxShopUsersInfo suq = new WxShopUsersInfo(); + public WxShopUsers getCurrentShopUser(TenantEntity tenantEntity, Long shopId) { + WxShopUsers suq = new WxShopUsers(); suq.updateTenantInfo(tenantEntity); suq.setShopId(shopId); suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); suq.setSortColumn("type desc"); - List list = wxShopUsersMapper.findList(suq); + List list = wxShopUsersMapper.findList(suq); if (null == list || list.size() <= 0 ) { return null; }; - return list.get(0); + WxShopUsers wsu = list.get(0); + this.setShopUserProperty(wsu); + return wsu; } @Override