소스 검색

fix

release_toaliyun_real
winter 2 년 전
부모
커밋
12898d0730
11개의 변경된 파일67개의 추가작업 그리고 75개의 파일을 삭제
  1. +6
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java
  2. +5
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java
  3. +6
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentPropertyContractController.java
  4. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java
  5. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  6. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxRentPropertyContractVo.java
  7. +10
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  8. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  9. +12
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxRentPropertyContractServiceImpl.java
  10. +4
    -19
      mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml
  11. +9
    -50
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 6
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java 파일 보기

@@ -11,6 +11,7 @@ import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxBillProperty; import com.iformall.domain.po.WxBillProperty;
import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxMerchant;
import com.iformall.domain.po.WxPropertyContract; import com.iformall.domain.po.WxPropertyContract;
import com.iformall.domain.po.WxUserDataRule;
import com.iformall.domain.po.base.BaseEntity.SortField; import com.iformall.domain.po.base.BaseEntity.SortField;
import com.iformall.enums.*; import com.iformall.enums.*;
import com.iformall.exception.MallinkException; import com.iformall.exception.MallinkException;
@@ -67,6 +68,11 @@ public class WxPropertyContractController extends WxContractBaseController {
wxPropertyContract.updateTenantInfo(getTenantInfo()); wxPropertyContract.updateTenantInfo(getTenantInfo());
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
wxPropertyContract.setSortColumns(SortField.Createtime_DESC); wxPropertyContract.setSortColumns(SortField.Createtime_DESC);
WxUserDataRule dataRule = this.getCurrentDataFloors();
if (null != dataRule) {
wxPropertyContract.setFloorForRule(dataRule.getFloorIds());
wxPropertyContract.setBusinessForRule(dataRule.getBussinessIds());
}
PageInfo<WxPropertyContract> pageInfo = wxPropertyContractService.listAsPage(wxPropertyContract, pageNum, pageSize); PageInfo<WxPropertyContract> pageInfo = wxPropertyContractService.listAsPage(wxPropertyContract, pageNum, pageSize);
Integer hasFlow = null; Integer hasFlow = null;
if (null != pageInfo && null != pageInfo.getList()) { if (null != pageInfo && null != pageInfo.getList()) {


+ 5
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java 파일 보기

@@ -77,6 +77,11 @@ public class WxRentContractController extends WxContractBaseController {
wxRentContract.updateTenantInfo(getTenantInfo()); wxRentContract.updateTenantInfo(getTenantInfo());
wxRentContract.setSortColumns(SortField.Createtime_DESC); wxRentContract.setSortColumns(SortField.Createtime_DESC);
//Map<String, Object> result = wxRentContractService.listAsPage(wxRentContract, pageNum, pageSize); //Map<String, Object> result = wxRentContractService.listAsPage(wxRentContract, pageNum, pageSize);
WxUserDataRule dataRule = this.getCurrentDataFloors();
if (null != dataRule) {
wxRentContract.setFloorForRule(dataRule.getFloorIds());
wxRentContract.setBusinessForRule(dataRule.getBussinessIds());
}
PageInfo<WxRentContract> page = wxRentContractService.getRentContractList(wxRentContract, pageNum, pageSize); PageInfo<WxRentContract> page = wxRentContractService.getRentContractList(wxRentContract, pageNum, pageSize);
Integer hasFlow = null; Integer hasFlow = null;
if (null != page && null != page.getList()) { if (null != page && null != page.getList()) {


+ 6
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentPropertyContractController.java 파일 보기

@@ -7,6 +7,7 @@ import com.iformall.annotation.UserDataRuleAnnotation;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxRentContract; import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.po.WxUserDataRule;
import com.iformall.domain.vo.WxRentPropertyContractVo; import com.iformall.domain.vo.WxRentPropertyContractVo;
import com.iformall.service.WxMallBuildingService; import com.iformall.service.WxMallBuildingService;
import com.iformall.service.WxMallFloorService; import com.iformall.service.WxMallFloorService;
@@ -52,6 +53,11 @@ public class WxRentPropertyContractController extends WxContractBaseController {
wxRentPropertyContractVo = new WxRentPropertyContractVo(); wxRentPropertyContractVo = new WxRentPropertyContractVo();
} }
wxRentPropertyContractVo.updateTenantInfo(getTenantInfo()); wxRentPropertyContractVo.updateTenantInfo(getTenantInfo());
WxUserDataRule dataRule = this.getCurrentDataFloors();
if (null != dataRule) {
wxRentPropertyContractVo.setFloorForRule(dataRule.getFloorIds());
wxRentPropertyContractVo.setBusinessForRule(dataRule.getBussinessIds());
}
PageInfo<WxRentPropertyContractVo> page = wxRentPropertyContractService.listContractVo(wxRentPropertyContractVo, pageNum, pageSize); PageInfo<WxRentPropertyContractVo> page = wxRentPropertyContractService.listContractVo(wxRentPropertyContractVo, pageNum, pageSize);
Integer hasFlow = null; Integer hasFlow = null;
if (null != page && null != page.getList()) { if (null != page && null != page.getList()) {


+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java 파일 보기

@@ -223,5 +223,8 @@ public class WxPropertyContract extends TenantEntity {


@io.swagger.annotations.ApiModelProperty(value = "合同类型", name = "contractType") @io.swagger.annotations.ApiModelProperty(value = "合同类型", name = "contractType")
private Integer contractType; private Integer contractType;
@TableField(exist = false)
private List<Long> merchantIds;


} }

+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java 파일 보기

@@ -468,5 +468,8 @@ public class WxRentContract extends TenantEntity {
} }
return shopList; return shopList;
} }
@TableField(exist = false)
private List<Long> merchantIds;
} }



+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxRentPropertyContractVo.java 파일 보기

@@ -6,6 +6,7 @@ import lombok.EqualsAndHashCode;
import lombok.ToString; import lombok.ToString;


import java.util.Date; import java.util.Date;
import java.util.List;


/** /**
* @author gongbiao * @author gongbiao
@@ -86,5 +87,7 @@ public class WxRentPropertyContractVo extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "是否有工作流 1:有 0:无", name = "flowHas") @io.swagger.annotations.ApiModelProperty(value = "是否有工作流 1:有 0:无", name = "flowHas")
private Integer flowHas; private Integer flowHas;
private List<Long> merchantIds;
} }



+ 10
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java 파일 보기

@@ -86,16 +86,20 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
@Lazy @Lazy
@Autowired @Autowired
WxShopService wxShopService; WxShopService wxShopService;
@Lazy
@Autowired
WxMerchantService wxMerchantService;


@Override @Override
public PageInfo<WxPropertyContract> listAsPage(WxPropertyContract record, Integer pageIndex, Integer pageSize) { public PageInfo<WxPropertyContract> listAsPage(WxPropertyContract record, Integer pageIndex, Integer pageSize) {
//Object rentContractStatusInfo = getRentContractStatusInfo(record);
//PageHelper.startPage(pageIndex, pageSize);
//List<Map<String, Object>> rentContractData = wxPropertyContractMapper.queryPropertyContractData(record);
//Map<String, Object> result = new HashMap<>();
List<Long> mids = wxMerchantService.getFloorBuildMerchantIds(record, record.getFloorForRule() , null, null, 0, 0);
if (null == mids || mids.size() <= 0 ) {
record.setId(-1L);
} else {
record.setMerchantIds(mids);
}
PageInfo<WxPropertyContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxPropertyContractMapper.findList(record)); PageInfo<WxPropertyContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxPropertyContractMapper.findList(record));
//result.put("rentContractStatusInfo", rentContractStatusInfo);
//result.put("pageInfo", pageInfo);
return pageInfo; return pageInfo;
} }


+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java 파일 보기

@@ -1812,6 +1812,12 @@ public class WxRentContractServiceImpl implements WxRentContractService {


@Override @Override
public PageInfo<WxRentContract> getRentContractList(WxRentContract rentContract, Integer pageIndex, Integer pageSize) { public PageInfo<WxRentContract> getRentContractList(WxRentContract rentContract, Integer pageIndex, Integer pageSize) {
List<Long> mids = wxMerchantService.getFloorBuildMerchantIds(rentContract, rentContract.getFloorForRule() , null, null, 0, 0);
if (null == mids || mids.size() <= 0 ) {
rentContract.setId(-1L);
} else {
rentContract.setMerchantIds(mids);
}
//PageInfo<WxRentContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.getRentContractList(rentContract)); //PageInfo<WxRentContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.getRentContractList(rentContract));
PageInfo<WxRentContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.findList(rentContract)); PageInfo<WxRentContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.findList(rentContract));
return pageInfo; return pageInfo;


+ 12
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxRentPropertyContractServiceImpl.java 파일 보기

@@ -15,12 +15,14 @@ import com.iformall.enums.EnumRentShopType;
import com.iformall.mapper.WxPropertyContractMapper; import com.iformall.mapper.WxPropertyContractMapper;
import com.iformall.mapper.WxRentContractMapper; import com.iformall.mapper.WxRentContractMapper;
import com.iformall.service.WxFlowRecordService; import com.iformall.service.WxFlowRecordService;
import com.iformall.service.WxMerchantService;
import com.iformall.service.WxPropertyContractService; import com.iformall.service.WxPropertyContractService;
import com.iformall.service.WxRentContractService; import com.iformall.service.WxRentContractService;
import com.iformall.service.WxRentPropertyContractService; import com.iformall.service.WxRentPropertyContractService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


import java.util.ArrayList; import java.util.ArrayList;
@@ -49,9 +51,19 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract
@Autowired @Autowired
WxFlowRecordService wxFlowRecordService; WxFlowRecordService wxFlowRecordService;
@Lazy
@Autowired
WxMerchantService wxMerchantService;


@Override @Override
public PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo record, Integer pageIndex, Integer pageSize) { public PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo record, Integer pageIndex, Integer pageSize) {
List<Long> mids = wxMerchantService.getFloorBuildMerchantIds(record, record.getFloorForRule() , null, null, 0, 0);
if (null == mids || mids.size() <= 0 ) {
record.setId(-1L);
} else {
record.setMerchantIds(mids);
}
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.listContractVo(record)); return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.listContractVo(record));
} }




+ 4
- 19
mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml 파일 보기

@@ -109,25 +109,10 @@
<if test=" null != businessForRule and '' != businessForRule "> <if test=" null != businessForRule and '' != businessForRule ">
and business_id in (${businessForRule}) and business_id in (${businessForRule})
</if> </if>
<if test=" null != floorForRule and '' != floorForRule ">
and `id` in
<foreach collection="tempShop" index="idx" separator=" union all " open="(" close=")">
select id from wx_property_contract where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
and json_unquote(json_extract(json_extract(rent_info,'$[*].shopId'),concat('$[',#{idx},']'))) in(select
id from wx_shop where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
and floor in (${floorForRule}))
<if test=" null != merchantIds ">
and merchant_id in
<foreach collection="merchantIds" index="index" item="mItem" open="(" separator="," close=")">
#{mItem}
</foreach> </foreach>
</if> </if>


+ 9
- 50
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml 파일 보기

@@ -197,25 +197,11 @@
<if test=" null != businessForRule and '' != businessForRule "> <if test=" null != businessForRule and '' != businessForRule ">
and business_id in (${businessForRule}) and business_id in (${businessForRule})
</if> </if>
<if test="null != floorForRule and '' != floorForRule ">
and `id` in
<foreach collection="tempShop" index="idx" separator=" union all " open="(" close=")">
select id from wx_rent_contract where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
and json_unquote(json_extract(json_extract(rent_info,'$[*].shopId'),concat('$[',#{idx},']'))) in(select
id from wx_shop where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
and floor in (${floorForRule}))
<if test=" null != merchantIds ">
and merchant_id in
<foreach collection="merchantIds" index="index" item="mItem" open="(" separator="," close=")">
#{mItem}
</foreach> </foreach>
</if> </if>


@@ -432,39 +418,12 @@
<if test=" null != businessForRule and '' != businessForRule "> <if test=" null != businessForRule and '' != businessForRule ">
and rc.business_id in (${businessForRule}) and rc.business_id in (${businessForRule})
</if> </if>
<if test="null != floorForRule and '' != floorForRule ">
and rc.`id` in
<foreach collection="tempShop" index="idx" separator=" union all " open="(" close=")">
select id from wx_rent_contract where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
and json_unquote(json_extract(json_extract(rent_info,'$[*].shopId'),concat('$[',#{idx},']'))) in(select
id from wx_shop where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
and floor in (${floorForRule}))
<if test=" null != merchantIds ">
and rc.merchant_id in
<foreach collection="merchantIds" index="index" item="mItem" open="(" separator="," close=")">
#{mItem}
</foreach> </foreach>
</if> </if>
<!-- <if test="null != rentShopType and 2 == rentShopType and null != floorForRule and '' != floorForRule ">
and rc.shop_id in (select id from wx_shop where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
and floor in (${floorForRule}))
</if> -->
</where> </where>
<if test=" null != sortColumns">order by ${sortColumns}</if> <if test=" null != sortColumns">order by ${sortColumns}</if>
<if test=" null == sortColumns">order by rc.createtime desc,rc.id desc</if> <if test=" null == sortColumns">order by rc.createtime desc,rc.id desc</if>


불러오는 중...
취소
저장