changhaoning 1 год назад
Родитель
Сommit
6b2e56f03f

+ 19 - 9
src/main/java/com/dk/mdm/mapper/mst/ActivityItemMapper.xml

@@ -5,7 +5,7 @@
     <!-- 通用设置 -->
     <!-- 通用查询列 -->
     <sql id="Base_Column_List">
-        item_id, activity_id, activity_item_describe, activity_item_name, std_price, sale_price, valid_long, extra_long, flg_valid, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
+        item_id, activity_id, activity_item_describe, activity_item_name, std_price, web_Price, valid_long, extra_long, flg_valid, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
     </sql>
 
     <!-- 通用查询映射结果 -->
@@ -15,7 +15,8 @@
                 <result column="activity_item_describe" property="activityItemDescribe"/>
                 <result column="activity_item_name" property="activityItemName"/>
                 <result column="std_price" property="stdPrice"/>
-                <result column="sale_price" property="salePrice"/>
+                <result column="web_price" property="webPrice"/>
+                <result column="wx_price" property="wxPrice"/>
                 <result column="valid_long" property="validLong"/>
                 <result column="extra_long" property="extraLong"/>
                 <result column="flg_valid" property="flgValid"/>
@@ -43,8 +44,11 @@
             <if test="stdPrice != null">
                 AND std_price = #{stdPrice}
             </if>
-            <if test="salePrice != null">
-                AND sale_price = #{salePrice}
+            <if test="webPrice != null">
+                AND web_Price = #{webPrice}
+            </if>
+            <if test="wxPrice != null">
+                AND wx_Price = #{wxPrice}
             </if>
             <if test="validLong != null">
                 AND valid_long = #{validLong}
@@ -86,6 +90,8 @@
         tmai.activity_item_describe,
         tmai.activity_item_name,
         tmai.std_price,
+        tmai.web_price,
+        tmai.wx_price,
         tmai.valid_long,
         tmai.extra_long,
         tmai.flg_valid,
@@ -105,7 +111,8 @@
         <result column="activity_item_describe" property="activityItemDescribe"/>
         <result column="activity_item_name" property="activityItemName"/>
         <result column="std_price" property="stdPrice"/>
-        <result column="sale_price" property="salePrice"/>
+        <result column="web_Price" property="webPrice"/>
+        <result column="wx_price" property="wxPrice"/>
         <result column="valid_long" property="validLong"/>
         <result column="extra_long" property="extraLong"/>
         <result column="flg_valid" property="flgValid"/>
@@ -130,8 +137,11 @@
             <if test="stdPrice != null">
                 AND tmai.std_price = #{stdPrice}
             </if>
-            <if test="salePrice != null">
-                AND tmai.sale_price = #{salePrice}
+            <if test="webPrice != null">
+                AND tmai.web_Price = #{webPrice}
+            </if>
+            <if test="wxPrice != null">
+                AND tmai.wx_Price = #{wxPrice}
             </if>
             <if test="validLong != null">
                 AND tmai.valid_long = #{validLong}
@@ -226,7 +236,7 @@
             activity_id,
             activity_item_describe,
             std_price,
-            sale_price,
+            web_Price,
             valid_long,
             extra_long,
             op_app_code,
@@ -239,7 +249,7 @@
                 #{item.activityId}::uuid,
                 #{item.activityItemDescribe},
                 #{item.stdPrice},
-                #{item.salePrice},
+                #{item.webPrice},
                 #{item.validLong},
                 #{item.extraLong},
                 #{item.opAppCode},

+ 30 - 2
src/main/java/com/dk/mdm/mapper/mst/ActivityMapper.xml

@@ -5,7 +5,7 @@
     <!-- 通用设置 -->
     <!-- 通用查询列 -->
     <sql id="Base_Column_List">
-        activity_id, activity_name, activity_describe, activity_type, activity_status, begin_date, end_date, flg_banner, annex_paths, activity_url, grade_code, fun_id, app_code, cp_ids, display_no, flg_valid, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
+        activity_id, activity_name, activity_describe, activity_type, activity_status, begin_date, end_date, flg_banner, annex_paths, activity_url, grade_code, fun_id, app_code, cp_ids, display_no, flg_valid, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user,fun_ids,
     </sql>
 
     <!-- 通用查询映射结果 -->
@@ -33,6 +33,7 @@
                 <result column="op_app_code" property="opAppCode"/>
             <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
                 <result column="op_db_user" property="opDbUser"/>
+                <result column="fun_ids" property="funIds" typeHandler="UuidListTypeHandler"/>
     </resultMap>
 
     <!-- 通用条件列 -->
@@ -131,7 +132,8 @@
         tma.op_update_user_id,
         tma.op_app_code,
         tma.op_timestamp,
-        tma.op_db_user
+        tma.op_db_user,
+        tma.fun_ids
     </sql>
 
     <!-- 通用查询映射结果 -->
@@ -160,6 +162,7 @@
         <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
         <result column="op_db_user" property="opDbUser"/>
         <result column="cp_name" property="cpName"/>
+        <result column="fun_ids" property="funIds" typeHandler="UuidListTypeHandler"/>
     </resultMap>
 
     <!-- 通用条件列 -->
@@ -248,9 +251,21 @@
         <include refid="Base_Column_List_list"/>
         , sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "activityTypeName"
         , sys.f_get_name_i18n(tdk2.kind_name_i18n, #{i18n}) as "activityStatusName"
+        , tg.grade_name as "gradeName"
+        ,case when
+        tma.fun_ids is not null
+        then
+        (select string_agg( tf.fun_name,' | ')
+        from sys.t_function as tf
+        where tf.fun_uuid = any( tma.fun_ids)
+        )
+        else tf.fun_name
+        end as "funName"
         FROM dkic_a.t_mst_activity as tma
         left JOIN sys.t_data_kind as tdk1 on tma.activity_type = tdk1.kind_code
         left JOIN sys.t_data_kind as tdk2 on tma.activity_status = tdk2.kind_code
+        left JOIN sys.t_grade as tg on tma.grade_code = tg.grade_code
+        left JOIN sys.t_function as tf on tma.fun_id = tf.fun_uuid
         <include refid="Condition_list"/>
         order by tma.display_no
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
@@ -273,7 +288,20 @@
         ,(SELECT  COALESCE(array_to_string(array_agg(cp_name), ','),'')
         FROM dkic_a.t_a_company
         WHERE cp_id = ANY (tma.cp_ids)) AS cp_name
+        ,case when
+        tma.fun_ids is not null
+        then
+        (select string_agg( tf.fun_name,' | ')
+        from sys.t_function as tf
+        where tf.fun_uuid = any( tma.fun_ids)
+        )
+        else tf.fun_name
+        end as "funName"
         FROM dkic_a.t_mst_activity as tma
+        left JOIN sys.t_data_kind as tdk1 on tma.activity_type = tdk1.kind_code
+        left JOIN sys.t_data_kind as tdk2 on tma.activity_status = tdk2.kind_code
+        left JOIN sys.t_grade as tg on tma.grade_code = tg.grade_code
+        left JOIN sys.t_function as tf on tma.fun_id = tf.fun_uuid
         WHERE activity_id = #{activityId}::uuid
     </select>
 

+ 2 - 3
src/main/java/com/dk/mdm/mapper/mst/CpTradeMapper.xml

@@ -185,9 +185,7 @@
     <select id="selectByCond" resultMap="BaseResultMap_list">
         SELECT
         <include refid="Base_Column_List_list"/>
-        ,case when tct.buy_grade_code = 'STD'
-                then '标准版' else '专业版'
-                end as buy_grade_code
+        , tg.grade_name as "gradeName"
         ,cp.cp_name
         , sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "tradeTypeName"
         , sys.f_get_name_i18n(tdk2.kind_name_i18n, #{i18n}) as "tradeStatusName"
@@ -196,6 +194,7 @@
         on tct.cp_id = cp.cp_id
         left JOIN sys.t_data_kind as tdk1 on tct.trade_type = tdk1.kind_code
         left JOIN sys.t_data_kind as tdk2 on tct.trade_status = tdk2.kind_code
+        left JOIN sys.t_grade as tg on tct.buy_grade_code = tg.grade_code
         <include refid="Condition_list"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}

+ 8 - 0
src/main/java/com/dk/mdm/model/pojo/mst/Activity.java

@@ -236,6 +236,14 @@ public class Activity extends PageInfo<Activity> implements Serializable {
     @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
     private String opDbUser;
 
+    /**
+     * 功能包
+     */
+    @Excel(name = "功能包")
+    @ApiModelProperty(value = "功能包")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private List<String> funIds;
+
 
     /*
      * 相关属性

+ 14 - 7
src/main/java/com/dk/mdm/model/pojo/mst/ActivityItem.java

@@ -72,19 +72,26 @@ public class ActivityItem extends PageInfo<ActivityItem> implements Serializable
 
 
     /**
-     * 标准价
+     * 打包价格
      */
-    @Excel(name = "标准价")
-    @ApiModelProperty(value = "标准价")
+    @Excel(name = "打包价格")
+    @ApiModelProperty(value = "打包价格")
     private BigDecimal stdPrice;
 
 
     /**
-     * 销售价
+     * PC端价格
      */
-    @Excel(name = "销售价")
-    @ApiModelProperty(value = "销售价")
-    private BigDecimal salePrice;
+    @Excel(name = "PC端价格")
+    @ApiModelProperty(value = "PC端价格")
+    private BigDecimal webPrice;
+
+    /**
+     * 手机端价格
+     */
+    @Excel(name = "手机端价格")
+    @ApiModelProperty(value = "手机端价格")
+    private BigDecimal wxPrice;
 
 
     /**

+ 14 - 7
src/main/java/com/dk/mdm/model/query/mst/ActivityItemQuery.java

@@ -72,19 +72,26 @@ public class ActivityItemQuery extends PageInfo<ActivityItemQuery> implements Se
 
 
     /**
-     * 标准价
+     * 打包价格
      */
-    @Excel(name = "标准价")
-    @ApiModelProperty(value = "标准价")
+    @Excel(name = "打包价格")
+    @ApiModelProperty(value = "打包价格")
     private BigDecimal stdPrice;
 
 
     /**
-     * 销售价
+     * PC端价格
      */
-    @Excel(name = "销售价")
-    @ApiModelProperty(value = "销售价")
-    private BigDecimal salePrice;
+    @Excel(name = "PC端价格")
+    @ApiModelProperty(value = "PC端价格")
+    private BigDecimal webPrice;
+
+    /**
+     * 手机端价格
+     */
+    @Excel(name = "手机端价格")
+    @ApiModelProperty(value = "手机端价格")
+    private BigDecimal wxPrice;
 
 
     /**

+ 8 - 0
src/main/java/com/dk/mdm/model/query/mst/ActivityQuery.java

@@ -235,6 +235,14 @@ public class ActivityQuery extends PageInfo<ActivityQuery> implements Serializab
     @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
     private String opDbUser;
 
+    /**
+     * 功能包
+     */
+    @Excel(name = "功能包")
+    @ApiModelProperty(value = "功能包")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private List<String> funIds;
+
 
     /*
      * 相关属性

+ 14 - 7
src/main/java/com/dk/mdm/model/response/mst/ActivityItemResponse.java

@@ -72,19 +72,26 @@ public class ActivityItemResponse extends PageInfo<ActivityItemResponse> impleme
 
 
     /**
-     * 标准价
+     * 打包价格
      */
-    @Excel(name = "标准价")
-    @ApiModelProperty(value = "标准价")
+    @Excel(name = "打包价格")
+    @ApiModelProperty(value = "打包价格")
     private BigDecimal stdPrice;
 
 
     /**
-     * 销售价
+     * PC端价格
      */
-    @Excel(name = "销售价")
-    @ApiModelProperty(value = "销售价")
-    private BigDecimal salePrice;
+    @Excel(name = "PC端价格")
+    @ApiModelProperty(value = "PC端价格")
+    private BigDecimal webPrice;
+
+    /**
+     * 手机端价格
+     */
+    @Excel(name = "手机端价格")
+    @ApiModelProperty(value = "手机端价格")
+    private BigDecimal wxPrice;
 
 
     /**

+ 16 - 0
src/main/java/com/dk/mdm/model/response/mst/ActivityResponse.java

@@ -246,6 +246,22 @@ public class ActivityResponse extends PageInfo<ActivityResponse> implements Seri
     @TableField(typeHandler = UuidTypeHandler.class)
     private String cpName;
 
+    /**
+     * 功能包
+     */
+    @Excel(name = "功能包")
+    @ApiModelProperty(value = "功能包")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private List<String> funIds;
+
+    private String gradeName;
+
+    /**
+     * 功能名称
+     */
+    @Excel(name = "功能名称")
+    @ApiModelProperty(value = "功能名称")
+    private String funName;
 
 
     /*

+ 2 - 0
src/main/java/com/dk/mdm/model/response/mst/CpTradeResponse.java

@@ -181,6 +181,8 @@ public class CpTradeResponse extends PageInfo<CpTradeResponse> implements Serial
 
     private String tradeStatusName;
 
+    private String gradeName;
+
     /*
      * 相关属性
      * @TableField(exist = false)

+ 14 - 7
src/main/java/com/dk/mdm/model/vo/mst/ActivityItemVO.java

@@ -72,19 +72,26 @@ public class ActivityItemVO extends PageInfo<ActivityItemVO> implements Serializ
 
 
     /**
-     * 标准价
+     * 打包价格
      */
-    @Excel(name = "标准价")
-    @ApiModelProperty(value = "标准价")
+    @Excel(name = "打包价格")
+    @ApiModelProperty(value = "打包价格")
     private BigDecimal stdPrice;
 
 
     /**
-     * 销售价
+     * PC端价格
      */
-    @Excel(name = "销售价")
-    @ApiModelProperty(value = "销售价")
-    private BigDecimal salePrice;
+    @Excel(name = "PC端价格")
+    @ApiModelProperty(value = "PC端价格")
+    private BigDecimal webPrice;
+
+    /**
+     * 手机端价格
+     */
+    @Excel(name = "手机端价格")
+    @ApiModelProperty(value = "手机端价格")
+    private BigDecimal wxPrice;
 
 
     /**

+ 8 - 0
src/main/java/com/dk/mdm/model/vo/mst/ActivityVO.java

@@ -239,6 +239,14 @@ public class ActivityVO extends PageInfo<ActivityVO> implements Serializable {
 
     private List<ActivityItem> itemList;
 
+    /**
+     * 功能包
+     */
+    @Excel(name = "功能包")
+    @ApiModelProperty(value = "功能包")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private List<String> funIds;
+
 
     /*
      * 相关属性