Browse Source

属性支持 域概念

java110 4 years ago
parent
commit
4b0ab1ff2d

+ 7 - 1
java110-bean/src/main/java/com/java110/dto/attrSpec/AttrSpecDto.java

@@ -26,7 +26,7 @@ public class AttrSpecDto extends PageDto implements Serializable {
     private String required;
     private String tableName;
     private String listShow;
-
+    private String domain;
 
     private Date createTime;
 
@@ -123,5 +123,11 @@ public class AttrSpecDto extends PageDto implements Serializable {
     }
 
 
+    public String getDomain() {
+        return domain;
+    }
 
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
 }

+ 57 - 31
java110-bean/src/main/java/com/java110/po/attrSpec/AttrSpecPo.java

@@ -1,81 +1,107 @@
 package com.java110.po.attrSpec;
 
 import java.io.Serializable;
-import java.util.Date;
 
 public class AttrSpecPo implements Serializable {
 
     private String specType;
-private String specName;
-private String specHoldplace;
-private String specValueType;
-private String specCd;
-private String statusCd = "0";
-private String specShow;
-private String required;
-private String tableName;
-private String listShow;
-public String getSpecType() {
+    private String specName;
+    private String specHoldplace;
+    private String specValueType;
+    private String specCd;
+    private String statusCd = "0";
+    private String specShow;
+    private String required;
+    private String tableName;
+    private String listShow;
+    private String domain;
+
+
+    public String getSpecType() {
         return specType;
     }
-public void setSpecType(String specType) {
+
+    public void setSpecType(String specType) {
         this.specType = specType;
     }
-public String getSpecName() {
+
+    public String getSpecName() {
         return specName;
     }
-public void setSpecName(String specName) {
+
+    public void setSpecName(String specName) {
         this.specName = specName;
     }
-public String getSpecHoldplace() {
+
+    public String getSpecHoldplace() {
         return specHoldplace;
     }
-public void setSpecHoldplace(String specHoldplace) {
+
+    public void setSpecHoldplace(String specHoldplace) {
         this.specHoldplace = specHoldplace;
     }
-public String getSpecValueType() {
+
+    public String getSpecValueType() {
         return specValueType;
     }
-public void setSpecValueType(String specValueType) {
+
+    public void setSpecValueType(String specValueType) {
         this.specValueType = specValueType;
     }
-public String getSpecCd() {
+
+    public String getSpecCd() {
         return specCd;
     }
-public void setSpecCd(String specCd) {
+
+    public void setSpecCd(String specCd) {
         this.specCd = specCd;
     }
-public String getStatusCd() {
+
+    public String getStatusCd() {
         return statusCd;
     }
-public void setStatusCd(String statusCd) {
+
+    public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
-public String getSpecShow() {
+
+    public String getSpecShow() {
         return specShow;
     }
-public void setSpecShow(String specShow) {
+
+    public void setSpecShow(String specShow) {
         this.specShow = specShow;
     }
-public String getRequired() {
+
+    public String getRequired() {
         return required;
     }
-public void setRequired(String required) {
+
+    public void setRequired(String required) {
         this.required = required;
     }
-public String getTableName() {
+
+    public String getTableName() {
         return tableName;
     }
-public void setTableName(String tableName) {
+
+    public void setTableName(String tableName) {
         this.tableName = tableName;
     }
-public String getListShow() {
+
+    public String getListShow() {
         return listShow;
     }
-public void setListShow(String listShow) {
+
+    public void setListShow(String listShow) {
         this.listShow = listShow;
     }
 
+    public String getDomain() {
+        return domain;
+    }
 
-
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
 }

+ 120 - 113
java110-db/src/main/resources/mapper/common/AttrSpecServiceDaoImplMapper.xml

@@ -5,138 +5,145 @@
 <mapper namespace="attrSpecServiceDaoImpl">
 
 
-
-
-
     <!-- 保存属性规格表信息 add by wuxw 2018-07-03 -->
     <insert id="saveAttrSpecInfo" parameterType="Map">
         insert into attr_spec(
-spec_type,spec_name,spec_holdplace,spec_value_type,spec_cd,spec_show,required,table_name,list_show
-) values (
-#{specType},#{specName},#{specHoldplace},#{specValueType},#{specCd},#{specShow},#{required},#{tableName},#{listShow}
-)
+        spec_type,spec_name,spec_holdplace,spec_value_type,spec_cd,spec_show,required,table_name,list_show,domain
+        ) values (
+        #{specType},#{specName},#{specHoldplace},#{specValueType},#{specCd},#{specShow},#{required},#{tableName},#{listShow},#{domain}
+        )
     </insert>
 
 
-
     <!-- 查询属性规格表信息 add by wuxw 2018-07-03 -->
     <select id="getAttrSpecInfo" parameterType="Map" resultType="Map">
-        select  t.spec_type,t.spec_type specType,t.spec_name,t.spec_name specName,t.spec_holdplace,t.spec_holdplace specHoldplace,t.spec_value_type,t.spec_value_type specValueType,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd statusCd,t.spec_show,t.spec_show specShow,t.required,t.table_name,t.table_name tableName,t.list_show,t.list_show listShow 
-from attr_spec t 
-where 1 =1 
-<if test="specType !=null and specType != ''">
-   and t.spec_type= #{specType}
-</if> 
-<if test="specName !=null and specName != ''">
-   and t.spec_name= #{specName}
-</if> 
-<if test="specHoldplace !=null and specHoldplace != ''">
-   and t.spec_holdplace= #{specHoldplace}
-</if> 
-<if test="specValueType !=null and specValueType != ''">
-   and t.spec_value_type= #{specValueType}
-</if> 
-<if test="specCd !=null and specCd != ''">
-   and t.spec_cd= #{specCd}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="specShow !=null and specShow != ''">
-   and t.spec_show= #{specShow}
-</if> 
-<if test="required !=null and required != ''">
-   and t.required= #{required}
-</if> 
-<if test="tableName !=null and tableName != ''">
-   and t.table_name= #{tableName}
-</if> 
-<if test="listShow !=null and listShow != ''">
-   and t.list_show= #{listShow}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.spec_type,t.spec_type specType,t.spec_name,t.spec_name specName,t.spec_holdplace,t.spec_holdplace
+        specHoldplace,t.spec_value_type,t.spec_value_type specValueType,t.spec_cd,t.spec_cd
+        specCd,t.status_cd,t.status_cd statusCd,t.spec_show,t.spec_show specShow,t.required,t.table_name,t.table_name
+        tableName,t.list_show,t.list_show listShow,t.domain
+        from attr_spec t
+        where 1 =1
+        <if test="specType !=null and specType != ''">
+            and t.spec_type= #{specType}
+        </if>
+        <if test="specName !=null and specName != ''">
+            and t.spec_name= #{specName}
+        </if>
+        <if test="specHoldplace !=null and specHoldplace != ''">
+            and t.spec_holdplace= #{specHoldplace}
+        </if>
+        <if test="specValueType !=null and specValueType != ''">
+            and t.spec_value_type= #{specValueType}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="specShow !=null and specShow != ''">
+            and t.spec_show= #{specShow}
+        </if>
+        <if test="required !=null and required != ''">
+            and t.required= #{required}
+        </if>
+        <if test="tableName !=null and tableName != ''">
+            and t.table_name= #{tableName}
+        </if>
+        <if test="listShow !=null and listShow != ''">
+            and t.list_show= #{listShow}
+        </if>
+        <if test="domain !=null and domain != ''">
+            and t.domain= #{domain}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改属性规格表信息 add by wuxw 2018-07-03 -->
     <update id="updateAttrSpecInfo" parameterType="Map">
-        update  attr_spec t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="specType !=null and specType != ''">
-, t.spec_type= #{specType}
-</if> 
-<if test="specName !=null and specName != ''">
-, t.spec_name= #{specName}
-</if> 
-<if test="specHoldplace !=null and specHoldplace != ''">
-, t.spec_holdplace= #{specHoldplace}
-</if> 
-<if test="specValueType !=null and specValueType != ''">
-, t.spec_value_type= #{specValueType}
-</if> 
-<if test="specShow !=null and specShow != ''">
-, t.spec_show= #{specShow}
-</if> 
-<if test="required !=null and required != ''">
-, t.required= #{required}
-</if> 
-<if test="tableName !=null and tableName != ''">
-, t.table_name= #{tableName}
-</if> 
-<if test="listShow !=null and listShow != ''">
-, t.list_show= #{listShow}
-</if> 
- where 1=1 <if test="specCd !=null and specCd != ''">
-and t.spec_cd= #{specCd}
-</if> 
+        update attr_spec t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="specType !=null and specType != ''">
+            , t.spec_type= #{specType}
+        </if>
+        <if test="specName !=null and specName != ''">
+            , t.spec_name= #{specName}
+        </if>
+        <if test="specHoldplace !=null and specHoldplace != ''">
+            , t.spec_holdplace= #{specHoldplace}
+        </if>
+        <if test="specValueType !=null and specValueType != ''">
+            , t.spec_value_type= #{specValueType}
+        </if>
+        <if test="specShow !=null and specShow != ''">
+            , t.spec_show= #{specShow}
+        </if>
+        <if test="required !=null and required != ''">
+            , t.required= #{required}
+        </if>
+        <if test="tableName !=null and tableName != ''">
+            , t.table_name= #{tableName}
+        </if>
+        <if test="listShow !=null and listShow != ''">
+            , t.list_show= #{listShow}
+        </if>
+        <if test="domain !=null and domain != ''">
+            , t.domain= #{domain}
+        </if>
+        where 1=1
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
 
     </update>
 
     <!-- 查询属性规格表数量 add by wuxw 2018-07-03 -->
-     <select id="queryAttrSpecsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from attr_spec t 
-where 1 =1 
-<if test="specType !=null and specType != ''">
-   and t.spec_type= #{specType}
-</if> 
-<if test="specName !=null and specName != ''">
-   and t.spec_name= #{specName}
-</if> 
-<if test="specHoldplace !=null and specHoldplace != ''">
-   and t.spec_holdplace= #{specHoldplace}
-</if> 
-<if test="specValueType !=null and specValueType != ''">
-   and t.spec_value_type= #{specValueType}
-</if> 
-<if test="specCd !=null and specCd != ''">
-   and t.spec_cd= #{specCd}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="specShow !=null and specShow != ''">
-   and t.spec_show= #{specShow}
-</if> 
-<if test="required !=null and required != ''">
-   and t.required= #{required}
-</if> 
-<if test="tableName !=null and tableName != ''">
-   and t.table_name= #{tableName}
-</if> 
-<if test="listShow !=null and listShow != ''">
-   and t.list_show= #{listShow}
-</if> 
+    <select id="queryAttrSpecsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from attr_spec t
+        where 1 =1
+        <if test="specType !=null and specType != ''">
+            and t.spec_type= #{specType}
+        </if>
+        <if test="specName !=null and specName != ''">
+            and t.spec_name= #{specName}
+        </if>
+        <if test="specHoldplace !=null and specHoldplace != ''">
+            and t.spec_holdplace= #{specHoldplace}
+        </if>
+        <if test="specValueType !=null and specValueType != ''">
+            and t.spec_value_type= #{specValueType}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="specShow !=null and specShow != ''">
+            and t.spec_show= #{specShow}
+        </if>
+        <if test="required !=null and required != ''">
+            and t.required= #{required}
+        </if>
+        <if test="tableName !=null and tableName != ''">
+            and t.table_name= #{tableName}
+        </if>
+        <if test="listShow !=null and listShow != ''">
+            and t.list_show= #{listShow}
+        </if>
+        <if test="domain !=null and domain != ''">
+            and t.domain= #{domain}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 2 - 0
service-common/src/main/java/com/java110/common/api/AttrSpecApi.java

@@ -115,6 +115,7 @@ public class AttrSpecApi {
     public ResponseEntity<String> queryAttrSpec(@RequestParam(value = "tableName", required = false) String tableName,
                                                 @RequestParam(value = "specCd", required = false) String specCd,
                                                 @RequestParam(value = "specName", required = false) String specName,
+                                                @RequestParam(value = "domain", required = false) String domain,
                                                 @RequestParam(value = "page", required = false) int page,
                                                 @RequestParam(value = "row", required = false) int row
 
@@ -125,6 +126,7 @@ public class AttrSpecApi {
         attrSpecDto.setRow(row);
         attrSpecDto.setSpecCd(specCd);
         attrSpecDto.setSpecName(specName);
+        attrSpecDto.setDomain(domain);
         return getAttrSpecBMOImpl.get(attrSpecDto);
     }
 }