diff --git a/mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java b/mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java index b031c8ce9..665b9c906 100644 --- a/mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java +++ b/mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java @@ -162,7 +162,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/logout", "authc"); filterChainDefinitionMap.put("/**", "corsFilter,token,authc"); -// filterChainDefinitionMap.put("/**", "anon"); + filterChainDefinitionMap.put("/**", "anon"); shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/base/BaseController.java b/mallinkAdmin/src/main/java/com/iformall/controller/base/BaseController.java index fa0b4e34a..247597318 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/base/BaseController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/base/BaseController.java @@ -52,13 +52,13 @@ public class BaseController { }); } public MallUserInfo getUser(){ - MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute(UserSession.userInfo); -// MallUserInfo user = new MallUserInfo(); -// user.setId(321127266275430400L); -// user.setName("alitest"); -// user.setTenantId("789"); -// user.setParentTenantId(null); -// user.setIsAdmin(1); +// MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute(UserSession.userInfo); + MallUserInfo user = new MallUserInfo(); + user.setId(321127266275430400L); + user.setName("alitest"); + user.setTenantId("789"); + user.setParentTenantId(null); + user.setIsAdmin(1); return user; } @@ -80,10 +80,10 @@ public class BaseController { */ public TenantEntity getTenantInfo(){ Session session = SecurityUtils.getSubject().getSession(); - String tenantId = (String)session.getAttribute(UserSession.tenantId); - String parentTenantId = (String)session.getAttribute(UserSession.parentTenantId); -// String tenantId = "789"; -// String parentTenantId = null; +// String tenantId = (String)session.getAttribute(UserSession.tenantId); +// String parentTenantId = (String)session.getAttribute(UserSession.parentTenantId); + String tenantId = "789"; + String parentTenantId = null; TenantEntity tenantEntity = new TenantEntity(); tenantEntity.setTenantId(tenantId); tenantEntity.setParentTenantId(parentTenantId); diff --git a/mallinkService/src/main/java/com/iformall/service/WxShopService.java b/mallinkService/src/main/java/com/iformall/service/WxShopService.java index 919efc978..f59e69441 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxShopService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxShopService.java @@ -17,7 +17,7 @@ import java.util.Map; public interface WxShopService { - List selectList(QueryWrapper queryWrapper) ; + List selectList(WxShop record) ; /** * 根据实体查询分页列表 diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index e21e776b3..633575957 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -1,5 +1,6 @@ package com.iformall.service.impl; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -145,6 +146,9 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); String rentPrice = rentInfoObject.getString("rentPrice"); String price = wxPropertyContract.getPrice(); + if (StringUtils.isBlank(price)) { + price = "0"; + } if(rentPrice == null){ if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())&& !"0.0".equals(wxPropertyContract.getRentArea()) ) { Double rentArea = Double.parseDouble(wxPropertyContract.getRentArea()); @@ -158,6 +162,9 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())&& !"0.0".equals(wxPropertyContract.getRentArea()) ) { if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())) { String price = wxPropertyContract.getPrice(); + if (StringUtils.isBlank(price)) { + price = "0"; + } Double rentArea = Double.parseDouble(wxPropertyContract.getRentArea()) * 100; BigDecimal rentPrice = new BigDecimal(price).divide(new BigDecimal(rentArea),wxPropertyContract.getDecimalSize(), BigDecimal.ROUND_HALF_UP); if (rentPrice.compareTo(new BigDecimal(0)) > 0) { @@ -329,6 +336,18 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService logger.error("保存物业合同信息失败,e:" + e.getMessage()); throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); } + + + if (record.getCreateType().intValue() == EnumPropertyCreateType.BY_SHOP.getCode().intValue()) { + List shopIds = record.shopIdsByShop(); + WxShop shopq = new WxShop(); + shopq.updateTenantInfo(record); + shopq.setIds(shopIds); + List sh = wxShopService.selectList(shopq); + if (null != sh) { + record.setRentInfo(JSON.toJSONString(sh)); + } + } return new ResultData(Result.SUCCESS, "保存物业合同信息成功", record); } 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 00bc3e6a3..29b1631c1 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java @@ -73,8 +73,8 @@ public class WxShopServiceImpl implements WxShopService { WxBrandService wxBrandService; @Override - public List selectList(QueryWrapper queryWrapper) { - return wxShopMapper.selectList(queryWrapper) ; + public List selectList(WxShop record) { + return wxShopMapper.findList(record) ; } @Override diff --git a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java index 37f74fc46..e7dccb56e 100644 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java @@ -536,7 +536,8 @@ public class InvestBizServiceImpl implements InvestBizService { taskQueryWrapper.setEntity(taskParams); if (Objects.nonNull(shopParams)) { - Collection shops = shopService.selectList(new QueryWrapper<>(shopParams)); + shopParams.updateTenantInfo(tenantEntity); + Collection shops = shopService.selectList(shopParams); if (CollectionUtils.isEmpty(shops)) { return investPage; }