Browse Source

fix

release_toaliyun_real
winter 1 year ago
parent
commit
7aa7d542d5
6 changed files with 36 additions and 16 deletions
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java
  2. +11
    -11
      mallinkAdmin/src/main/java/com/iformall/controller/base/BaseController.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/WxShopService.java
  4. +19
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  5. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java
  6. +2
    -1
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java View File

@@ -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);


+ 11
- 11
mallinkAdmin/src/main/java/com/iformall/controller/base/BaseController.java View File

@@ -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);


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/WxShopService.java View File

@@ -17,7 +17,7 @@ import java.util.Map;

public interface WxShopService {

List<WxShop> selectList(QueryWrapper<WxShop> queryWrapper) ;
List<WxShop> selectList(WxShop record) ;

/**
* 根据实体查询分页列表


+ 19
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java View File

@@ -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<Long> shopIds = record.shopIdsByShop();
WxShop shopq = new WxShop();
shopq.updateTenantInfo(record);
shopq.setIds(shopIds);
List<WxShop> sh = wxShopService.selectList(shopq);
if (null != sh) {
record.setRentInfo(JSON.toJSONString(sh));
}
}
return new ResultData(Result.SUCCESS, "保存物业合同信息成功", record);
}


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java View File

@@ -73,8 +73,8 @@ public class WxShopServiceImpl implements WxShopService {
WxBrandService wxBrandService;

@Override
public List<WxShop> selectList(QueryWrapper<WxShop> queryWrapper) {
return wxShopMapper.selectList(queryWrapper) ;
public List<WxShop> selectList(WxShop record) {
return wxShopMapper.findList(record) ;
}

@Override


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java View File

@@ -536,7 +536,8 @@ public class InvestBizServiceImpl implements InvestBizService {
taskQueryWrapper.setEntity(taskParams);

if (Objects.nonNull(shopParams)) {
Collection<WxShop> shops = shopService.selectList(new QueryWrapper<>(shopParams));
shopParams.updateTenantInfo(tenantEntity);
Collection<WxShop> shops = shopService.selectList(shopParams);
if (CollectionUtils.isEmpty(shops)) {
return investPage;
}


Loading…
Cancel
Save