Explorar o código

属性返回的优化

dongxin hai 1 ano
pai
achega
2b72056414

+ 0 - 2
commons/src/main/java/com/jzg/commons/entity/po/PtlAgreementUndwrtRulesAttrLink.java

@@ -52,6 +52,4 @@ public class PtlAgreementUndwrtRulesAttrLink extends BaseModel {
     @TableField(exist = false)
     private JSONArray dictLabal;
 
-    @TableField(exist = false)
-    private String attrGroup;
 }

+ 2 - 3
commons/src/main/java/com/jzg/commons/entity/vo/AgreementRulesVo.java

@@ -2,7 +2,6 @@ package com.jzg.commons.entity.vo;
 
 import com.jzg.commons.core.base.BaseModel;
 import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttr;
-import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttrLink;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
@@ -34,7 +33,7 @@ public class AgreementRulesVo extends BaseModel {
     @Schema(description = "费用列表")
     private List<PtlAgreementCostVo> costVoList;
 
-    @Schema(description = "选中的费用属性列表")
-    private List<PtlAgreementUndwrtRulesAttrLink> linkList;
+    @Schema(description = "选中的费用属性id列表")
+    private List<String> attrIdList;
 
 }

+ 2 - 2
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementUndwrtRulesServiceImpl.java

@@ -146,8 +146,8 @@ public class PtlAgreementUndwrtRulesServiceImpl extends ServiceImpl<PtlAgreement
         BeanUtils.copyProperties(rules, rulesVo);
         List<PtlAgreementUndwrtRulesAttrLink> linkList = agreementUndwrtRulesAttrLinkService.queryLinkList(ruleId);
 
-//        List<String> attrIdList = linkList.stream().map(PtlAgreementUndwrtRulesAttrLink::getAttrId).collect(Collectors.toList());
-        rulesVo.setLinkList(linkList);
+        List<String> attrIdList = linkList.stream().map(PtlAgreementUndwrtRulesAttrLink::getAttrId).collect(Collectors.toList());
+        rulesVo.setAttrIdList(attrIdList);
         // 获取费用因子属性
         List<PtlAgreementUndwrtRulesAttr> attrList = agreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
         Map<String, PtlAgreementUndwrtRulesAttr> attrMap = attrList.stream()

+ 1 - 1
tenant/organization/src/main/resources/mapper/PtlAgreementUndwrtRulesAttrLinkMapper.xml

@@ -24,7 +24,7 @@
         pl.attr_code,pl.min,pl.operator,
         pl.max,pl.create_time,
         pl.create_by,pl.update_time,pl.update_by,
-        pl.is_delete, pa.id as attrId,pa.attr_group as attrGroup
+        pl.is_delete, pa.id as attrId
     </sql>
     <select id="queryLinkList" resultType="com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttrLink">
         SELECT <include refid="Base_Column_List"/>