Explorar el Código

公司的业务

姜永辉 hace 2 años
padre
commit
c0cc9758b3

+ 0 - 59
src/main/java/com/dk/mdm/controller/core/SettingValueController.java

@@ -1,59 +0,0 @@
-package com.dk.mdm.controller.core;
-
-import com.dk.common.response.ResponseResultVO;
-import com.dk.mdm.model.pojo.core.SettingValue;
-import com.dk.common.service.BaseService;
-import com.dk.mdm.model.vo.core.SettingValueVO;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import com.dk.mdm.service.core.SettingValueService;
-
-import java.util.List;
-import java.util.Map;
-
-@Api(tags = "系统参数API接口")
-@RestController
-@RequestMapping("/core/settingValue")
-public class SettingValueController{
-
-    public BaseService<SettingValue> getService() {
-        return settingValueService;
-    }
-
-    @Autowired
-    private SettingValueService settingValueService;
-
-    /**
-     * @desc   : 查询系统参数
-     * @author : 夏常明
-     * @date   : 2023/1/29 17:07
-     */
-    @ApiOperation(
-            value = "查询系统参数",
-            notes = "查询系统参数"
-    )
-    @PostMapping("get_setting_value")
-    public ResponseResultVO<List<Map<String, Object>>> getSettingValue(@RequestBody Map<String, Object> param) {
-        return settingValueService.getSettingValue(param);
-    }
-
-    /**
-     * @desc   : 批量修改系统参数值
-     * @author : 夏常明
-     * @date   : 2023/1/30 14:01
-     */
-    @ApiOperation(
-            value = "批量修改系统参数值",
-            notes = "批量修改系统参数值"
-    )
-    @PostMapping("update_setting_values")
-    public ResponseResultVO<?> updateSettingValues(@RequestBody List<SettingValueVO>  param) {
-        return settingValueService.updateSettingValues(param);
-    }
-
-}

+ 55 - 0
src/main/java/com/dk/mdm/controller/mst/SettingValueController.java

@@ -0,0 +1,55 @@
+package com.dk.mdm.controller.mst;
+
+import com.dk.common.response.ResponseResultVO;
+import com.dk.mdm.model.pojo.mst.SettingValue;
+import com.dk.common.service.BaseService;
+import com.dk.mdm.model.vo.mst.SettingValueVO;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.mst.SettingValueService;
+
+import java.util.Map;
+
+@Api(tags = "系统参数API接口")
+@RestController
+@RequestMapping("/mst/setting_value")
+public class SettingValueController {
+
+    public BaseService<SettingValue> getService() {
+        return settingValueService;
+    }
+
+    @Autowired
+    private SettingValueService settingValueService;
+
+    /**
+     * @desc : 获取系统参数
+     * @author : 姜永辉
+     * @date : 2024/2/26 10:36
+     */
+    @ApiOperation(
+            value = "获取系统参数",
+            notes = "获取系统参数"
+    )
+    @PostMapping("get_setting_value")
+    public ResponseResultVO<Map<String, Object>> getSettingValue(@RequestBody Map<String, Object> param) {
+        return settingValueService.getSettingValue(param);
+    }
+
+
+    /**
+     * @desc : 批量修改系统参数
+     * @author : 姜永辉
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation(value = "批量修改敏感信息", notes = "批量修改敏感信息")
+    @PostMapping({"update_batch"})
+    public ResponseResultVO<?> updateBatch(@RequestBody SettingValueVO vo) {
+        return settingValueService.updateBatch(vo);
+    }
+}

+ 44 - 44
src/main/java/com/dk/mdm/mapper/core/SettingValueMapper.java

@@ -1,44 +1,44 @@
-package com.dk.mdm.mapper.core;
-
-import com.dk.common.mapper.BaseMapper;
-import com.dk.mdm.model.pojo.core.SettingValue;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-import java.util.Map;
-
-/**
-*  系统参数 Mapper
-*/
-@Repository
-public interface SettingValueMapper extends BaseMapper<SettingValue>{
-    /**
-     * @desc   : 查询系统参数
-     * @author : 夏常明
-     * @date   : 2023/1/29 17:02
-     */
-    List<Map<String, Object>> getSettingValue(Map param);
-
-    /**
-     * @desc   : 修改系统参数值
-     * @author : 夏常明
-     * @date   : 2023/1/30 13:27
-     */
-    int updateSettingValues(SettingValue settingValue);
-
-    /**
-     * @desc   : 系统参数值是否重复
-     * @author : 姜宁
-     * @date   : 2023/4/14 9:20
-     */
-    Long selectByCode(SettingValue settingValue);
-
-    /**
-     * @desc   : 通过主键查询
-     * @author : 洪旭东
-     * @date   : 2023-09-04 14:28
-     */
-    Map<String, Object> selectById(@Param("ftyId") Integer ftyId, @Param("settingCode") String settingCode);
-}
-
+//package com.dk.mdm.mapper.core;
+//
+//import com.dk.common.mapper.BaseMapper;
+//import com.dk.mdm.model.pojo.core.SettingValue;
+//import org.apache.ibatis.annotations.Param;
+//import org.springframework.stereotype.Repository;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+///**
+//*  系统参数 Mapper
+//*/
+//@Repository
+//public interface SettingValueMapper extends BaseMapper<SettingValue>{
+//    /**
+//     * @desc   : 查询系统参数
+//     * @author : 夏常明
+//     * @date   : 2023/1/29 17:02
+//     */
+//    List<Map<String, Object>> getSettingValue(Map param);
+//
+//    /**
+//     * @desc   : 修改系统参数值
+//     * @author : 夏常明
+//     * @date   : 2023/1/30 13:27
+//     */
+//    int updateSettingValues(SettingValue settingValue);
+//
+//    /**
+//     * @desc   : 系统参数值是否重复
+//     * @author : 姜宁
+//     * @date   : 2023/4/14 9:20
+//     */
+//    Long selectByCode(SettingValue settingValue);
+//
+//    /**
+//     * @desc   : 通过主键查询
+//     * @author : 洪旭东
+//     * @date   : 2023-09-04 14:28
+//     */
+//    Map<String, Object> selectById(@Param("ftyId") Integer ftyId, @Param("settingCode") String settingCode);
+//}
+//

+ 134 - 134
src/main/java/com/dk/mdm/mapper/core/SettingValueMapper.xml

@@ -1,145 +1,145 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.dk.mdm.mapper.core.SettingValueMapper">
+<!--<?xml version="1.0" encoding="UTF-8"?>-->
+<!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">-->
+<!--<mapper namespace="com.dk.mdm.mapper.core.SettingValueMapper">-->
 
-    <!-- 通用设置 -->
-    <!-- 通用查询列 -->
-    <sql id="Base_Column_List">
-        fty_id, setting_code, setting_value, remarks, 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>
+<!--    &lt;!&ndash; 通用设置 &ndash;&gt;-->
+<!--    &lt;!&ndash; 通用查询列 &ndash;&gt;-->
+<!--    <sql id="Base_Column_List">-->
+<!--        fty_id, setting_code, setting_value, remarks, 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>-->
 
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.core.SettingValue">
-        <id column="fty_id" property="ftyId"/>
-                <result column="setting_code" property="settingCode"/>
-                <result column="setting_value" property="settingValue"/>
-                <result column="remarks" property="remarks"/>
-                <result column="flg_valid" property="flgValid"/>
-            <result column="op_create_time" property="opCreateTime"
-                    typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>
-                <result column="op_create_user_id" property="opCreateUserId"/>
-            <result column="op_update_time" property="opUpdateTime"
-                    typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>
-                <result column="op_update_user_id" property="opUpdateUserId"/>
-                <result column="op_app_code" property="opAppCode"/>
-            <result column="op_timestamp" property="opTimestamp"
-                    typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>
-                <result column="op_db_user" property="opDbUser"/>
-    </resultMap>
+<!--    &lt;!&ndash; 通用查询映射结果 &ndash;&gt;-->
+<!--    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.core.SettingValue">-->
+<!--        <id column="fty_id" property="ftyId"/>-->
+<!--                <result column="setting_code" property="settingCode"/>-->
+<!--                <result column="setting_value" property="settingValue"/>-->
+<!--                <result column="remarks" property="remarks"/>-->
+<!--                <result column="flg_valid" property="flgValid"/>-->
+<!--            <result column="op_create_time" property="opCreateTime"-->
+<!--                    typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>-->
+<!--                <result column="op_create_user_id" property="opCreateUserId"/>-->
+<!--            <result column="op_update_time" property="opUpdateTime"-->
+<!--                    typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>-->
+<!--                <result column="op_update_user_id" property="opUpdateUserId"/>-->
+<!--                <result column="op_app_code" property="opAppCode"/>-->
+<!--            <result column="op_timestamp" property="opTimestamp"-->
+<!--                    typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>-->
+<!--                <result column="op_db_user" property="opDbUser"/>-->
+<!--    </resultMap>-->
 
-    <!-- 通用条件列 -->
-    <sql id="Condition">
-        <where>
-            <if test="settingCode != null and settingCode != ''">
-                AND setting_code = #{settingCode}
-            </if>
-            <if test="settingValue != null and settingValue != ''">
-                AND setting_value = #{settingValue}
-            </if>
-            <if test="remarks != null and remarks != ''">
-                AND remarks = #{remarks}
-            </if>
-            <if test="flgValid != null">
-                AND flg_valid = #{flgValid}
-            </if>
-            <if test="opCreateTime != null">
-                AND op_create_time = #{opCreateTime}
-            </if>
-            <if test="opCreateUserId != null">
-                AND op_create_user_id = #{opCreateUserId}
-            </if>
-            <if test="opUpdateTime != null">
-                AND op_update_time = #{opUpdateTime}
-            </if>
-            <if test="opUpdateUserId != null">
-                AND op_update_user_id = #{opUpdateUserId}
-            </if>
-            <if test="opAppCode != null and opAppCode != ''">
-                AND op_app_code = #{opAppCode}
-            </if>
-            <if test="opTimestamp != null">
-                AND op_timestamp = #{opTimestamp}
-            </if>
-            <if test="opDbUser != null and opDbUser != ''">
-                AND op_db_user = #{opDbUser}
-            </if>
-        </where>
-    </sql>
+<!--    &lt;!&ndash; 通用条件列 &ndash;&gt;-->
+<!--    <sql id="Condition">-->
+<!--        <where>-->
+<!--            <if test="settingCode != null and settingCode != ''">-->
+<!--                AND setting_code = #{settingCode}-->
+<!--            </if>-->
+<!--            <if test="settingValue != null and settingValue != ''">-->
+<!--                AND setting_value = #{settingValue}-->
+<!--            </if>-->
+<!--            <if test="remarks != null and remarks != ''">-->
+<!--                AND remarks = #{remarks}-->
+<!--            </if>-->
+<!--            <if test="flgValid != null">-->
+<!--                AND flg_valid = #{flgValid}-->
+<!--            </if>-->
+<!--            <if test="opCreateTime != null">-->
+<!--                AND op_create_time = #{opCreateTime}-->
+<!--            </if>-->
+<!--            <if test="opCreateUserId != null">-->
+<!--                AND op_create_user_id = #{opCreateUserId}-->
+<!--            </if>-->
+<!--            <if test="opUpdateTime != null">-->
+<!--                AND op_update_time = #{opUpdateTime}-->
+<!--            </if>-->
+<!--            <if test="opUpdateUserId != null">-->
+<!--                AND op_update_user_id = #{opUpdateUserId}-->
+<!--            </if>-->
+<!--            <if test="opAppCode != null and opAppCode != ''">-->
+<!--                AND op_app_code = #{opAppCode}-->
+<!--            </if>-->
+<!--            <if test="opTimestamp != null">-->
+<!--                AND op_timestamp = #{opTimestamp}-->
+<!--            </if>-->
+<!--            <if test="opDbUser != null and opDbUser != ''">-->
+<!--                AND op_db_user = #{opDbUser}-->
+<!--            </if>-->
+<!--        </where>-->
+<!--    </sql>-->
 
-    <sql id="idsForeach">
-        <!-- 根据主键ftyId批量操作 -->
-        WHERE fty_id in
-        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
-            #{item}
-        </foreach>
-    </sql>
+<!--    <sql id="idsForeach">-->
+<!--        &lt;!&ndash; 根据主键ftyId批量操作 &ndash;&gt;-->
+<!--        WHERE fty_id in-->
+<!--        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">-->
+<!--            #{item}-->
+<!--        </foreach>-->
+<!--    </sql>-->
 
-    <!-- 查询表core.t_setting_value,(条件查询+分页)列表 -->
-    <select id="selectByCond" resultMap="BaseResultMap">
-        SELECT
-        <include refid="Base_Column_List"/>
-        FROM core.t_setting_value
-        <include refid="Condition"/>
-        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
-            limit #{end} offset #{start}
-        </if>
-    </select>
+<!--    &lt;!&ndash; 查询表core.t_setting_value,(条件查询+分页)列表 &ndash;&gt;-->
+<!--    <select id="selectByCond" resultMap="BaseResultMap">-->
+<!--        SELECT-->
+<!--        <include refid="Base_Column_List"/>-->
+<!--        FROM core.t_setting_value-->
+<!--        <include refid="Condition"/>-->
+<!--        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">-->
+<!--            limit #{end} offset #{start}-->
+<!--        </if>-->
+<!--    </select>-->
 
-    <!-- 查询表core.t_setting_value,(条件查询)个数 -->
-    <select id="countByCond" resultType="Long">
-        SELECT
-        count(1)
-        FROM core.t_setting_value
-        <include refid="Condition"/>
-    </select>
+<!--    &lt;!&ndash; 查询表core.t_setting_value,(条件查询)个数 &ndash;&gt;-->
+<!--    <select id="countByCond" resultType="Long">-->
+<!--        SELECT-->
+<!--        count(1)-->
+<!--        FROM core.t_setting_value-->
+<!--        <include refid="Condition"/>-->
+<!--    </select>-->
 
-    <!-- 根据系统参数类别查询参数信息  -->
-    <select id="getSettingValue" resultType="java.util.Map">
-        <include refid="select"/>
-        <if test="settingKind != null and settingKind != ''">
-            AND item.setting_kind = #{settingKind}
-        </if>
-        order by kind.kind_code,item.display_no
-    </select>
+<!--    &lt;!&ndash; 根据系统参数类别查询参数信息  &ndash;&gt;-->
+<!--    <select id="getSettingValue" resultType="java.util.Map">-->
+<!--        <include refid="select"/>-->
+<!--        <if test="settingKind != null and settingKind != ''">-->
+<!--            AND item.setting_kind = #{settingKind}-->
+<!--        </if>-->
+<!--        order by kind.kind_code,item.display_no-->
+<!--    </select>-->
 
-    <sql id="select">
-        select
-            sys.f_get_name_i18n_lang(kind.kind_name_i18n,#{i18n}) as "classCode",
-            sys.f_get_name_i18n_lang(item.setting_name_i18n,#{i18n})  as "settingName",
-            item.def_value as "settingDefault",
-            item.flg_modifiable as "flgModifiable",
-            item.display_no as "displayNo",
-            item.value_kind as "valueKind",
-            item.value_format as "valueFormat",
-            sys.f_get_name_i18n_lang(item.description_i18n,#{i18n}) as "settingDescription",
-            case when setting.setting_value is not null then setting.setting_value else item.def_value end "settingValue",
-            --setting.setting_value as "settingValue",
-            item.setting_code as "settingCode"
-        from sys.t_setting_kind as kind
-                 inner join sys.t_setting_item as item
-                            on kind.kind_code = item.setting_kind
-                 left join core.t_setting_value as setting
-                           on item.setting_code = setting.setting_code and setting.fty_id=#{ftyId}
-        where kind.flg_valid and item.flg_valid
-    </sql>
+<!--    <sql id="select">-->
+<!--        select-->
+<!--            sys.f_get_name_i18n_lang(kind.kind_name_i18n,#{i18n}) as "classCode",-->
+<!--            sys.f_get_name_i18n_lang(item.setting_name_i18n,#{i18n})  as "settingName",-->
+<!--            item.def_value as "settingDefault",-->
+<!--            item.flg_modifiable as "flgModifiable",-->
+<!--            item.display_no as "displayNo",-->
+<!--            item.value_kind as "valueKind",-->
+<!--            item.value_format as "valueFormat",-->
+<!--            sys.f_get_name_i18n_lang(item.description_i18n,#{i18n}) as "settingDescription",-->
+<!--            case when setting.setting_value is not null then setting.setting_value else item.def_value end "settingValue",-->
+<!--            &#45;&#45;setting.setting_value as "settingValue",-->
+<!--            item.setting_code as "settingCode"-->
+<!--        from sys.t_setting_kind as kind-->
+<!--                 inner join sys.t_setting_item as item-->
+<!--                            on kind.kind_code = item.setting_kind-->
+<!--                 left join core.t_setting_value as setting-->
+<!--                           on item.setting_code = setting.setting_code and setting.fty_id=#{ftyId}-->
+<!--        where kind.flg_valid and item.flg_valid-->
+<!--    </sql>-->
 
-    <!-- 修改系统参数参数值-->
-    <update id="updateSettingValues" >
-            UPDATE core.t_setting_value
-            set setting_value=#{settingValue}
-            where fty_id=#{ftyId}  and setting_code = #{settingCode}
-    </update>
+<!--    &lt;!&ndash; 修改系统参数参数值&ndash;&gt;-->
+<!--    <update id="updateSettingValues" >-->
+<!--            UPDATE core.t_setting_value-->
+<!--            set setting_value=#{settingValue}-->
+<!--            where fty_id=#{ftyId}  and setting_code = #{settingCode}-->
+<!--    </update>-->
 
-    <!--组织部门编码是否重复-->
-    <select id="selectByCode" resultType="Long">
-        select count(1)
-         from core.t_setting_value
-        where setting_code = #{settingCode} and fty_id = #{ftyId}
-          and flg_valid
-    </select>
+<!--    &lt;!&ndash;组织部门编码是否重复&ndash;&gt;-->
+<!--    <select id="selectByCode" resultType="Long">-->
+<!--        select count(1)-->
+<!--         from core.t_setting_value-->
+<!--        where setting_code = #{settingCode} and fty_id = #{ftyId}-->
+<!--          and flg_valid-->
+<!--    </select>-->
 
-    <select id="selectById" resultType="java.util.Map">
-        <include refid="select"/>
-        AND item.setting_code = #{settingCode}
-    </select>
-</mapper>
+<!--    <select id="selectById" resultType="java.util.Map">-->
+<!--        <include refid="select"/>-->
+<!--        AND item.setting_code = #{settingCode}-->
+<!--    </select>-->
+<!--</mapper>-->

+ 21 - 0
src/main/java/com/dk/mdm/mapper/mst/SettingValueMapper.java

@@ -0,0 +1,21 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.RoleSensitive;
+import com.dk.mdm.model.pojo.mst.SettingValue;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+*  系统参数 Mapper
+*/
+@Repository
+public interface SettingValueMapper extends BaseMapper<SettingValue>{
+
+    List<Map<String, Object>> getSettingValue(Map param);
+
+    int deleteSettingValueId(SettingValue settingValue);
+}
+

+ 184 - 0
src/main/java/com/dk/mdm/mapper/mst/SettingValueMapper.xml

@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dk.mdm.mapper.mst.SettingValueMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        cp_id, setting_code, setting_value, remarks, 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>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.SettingValue">
+        <id column="cp_id" property="cpId"/>
+                <result column="setting_code" property="settingCode"/>
+                <result column="setting_value" property="settingValue"/>
+                <result column="remarks" property="remarks"/>
+                <result column="flg_valid" property="flgValid"/>
+            <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
+            <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_update_user_id" property="opUpdateUserId" typeHandler="UuidTypeHandler"/>
+                <result column="op_app_code" property="opAppCode"/>
+            <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
+                <result column="op_db_user" property="opDbUser"/>
+    </resultMap>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="settingCode != null and settingCode != ''">
+                AND setting_code = #{settingCode}
+            </if>
+            <if test="settingValue != null and settingValue != ''">
+                AND setting_value = #{settingValue}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </if>
+            <if test="flgValid != null">
+                AND flg_valid = #{flgValid}
+            </if>
+            <if test="opCreateTime != null">
+                AND op_create_time = #{opCreateTime}
+            </if>
+            <if test="opCreateUserId != null and opCreateUserId != ''">
+                AND op_create_user_id = #{opCreateUserId}
+            </if>
+            <if test="opUpdateTime != null">
+                AND op_update_time = #{opUpdateTime}
+            </if>
+            <if test="opUpdateUserId != null and opUpdateUserId != ''">
+                AND op_update_user_id = #{opUpdateUserId}
+            </if>
+            <if test="opAppCode != null and opAppCode != ''">
+                AND op_app_code = #{opAppCode}
+            </if>
+            <if test="opTimestamp != null">
+                AND op_timestamp = #{opTimestamp}
+            </if>
+            <if test="opDbUser != null and opDbUser != ''">
+                AND op_db_user = #{opDbUser}
+            </if>
+        </where>
+    </sql>
+
+
+    <!-- 获取角色敏感信息权限 -->
+    <select id="getSettingValue" resultType="java.util.Map">
+        SELECT
+            T.*
+        FROM
+            (
+                SELECT
+                    tsk.kind_code AS "itemCode",
+                    tsk.kind_name AS "itemName",
+                    tsk.kind_code AS "settingCode",
+                    NULL AS "parentCode",
+                    NULL AS "valueKind",
+                    NULL AS "defValue",
+                    NULL AS "settingValue",
+                    tsk.display_no AS "displayNo",
+                    TRUE AS "checked"
+                FROM
+                    sys.t_setting_kind tsk UNION all
+                SELECT
+                    tsi.setting_code AS "itemCode",
+                    tsi.setting_name AS "itemName",
+                    tsi.setting_kind AS "settingCode",
+                    tsi.setting_kind AS "parentCode",
+                    tsi.value_kind AS "valueKind",
+                    tsi.def_value AS "defValue",
+                    tmsv.setting_value AS "settingValue",
+                    tsi.display_no AS "displayNo",
+                    CASE
+
+                        WHEN tmsv.setting_value IS NULL THEN
+                            FALSE ELSE TRUE
+                        END AS "checked"
+                FROM
+                    sys.t_setting_item tsi
+                        LEFT JOIN sys.t_setting_kind tsk ON tsi.setting_kind = tsk.kind_code
+                        LEFT JOIN dkic_b.t_mst_setting_value tmsv ON tsi.setting_code = tmsv.setting_code
+                        AND tmsv.cp_id = #{ cpId }
+                WHERE
+                    tsi.flg_valid
+            ) T
+        ORDER BY
+            t."settingCode" desc ,
+            t."displayNo"
+    </select>
+
+    <delete id="deleteSettingValueId" >
+        DELETE FROM dkic_b.t_mst_setting_value tmrs WHERE tmrs.cp_id = #{cpId};
+    </delete>
+
+    <sql id="idsForeach">
+        <!-- 根据主键cpId批量操作 -->
+        WHERE cp_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mst_setting_value,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_setting_value tmsv
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_setting_value,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM dkic_b.t_mst_setting_value tmsv
+        <include refid="Condition"/>
+    </select>
+
+
+    <!-- 根据主键锁定表t_mst_setting_value的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_setting_value tmsv
+        WHERE cp_id = #{cpId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mst_setting_value的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_setting_value
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into dkic_b.t_mst_setting_value
+        (
+        <trim suffixOverrides=",">
+            setting_code,
+            setting_value,
+            remarks,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.settingCode},
+                #{item.settingValue},
+                #{item.remarks},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 157 - 0
src/main/java/com/dk/mdm/model/pojo/mst/SettingValue.java

@@ -0,0 +1,157 @@
+package com.dk.mdm.model.pojo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import java.io.Serializable;
+
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.*;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.List;
+import java.time.LocalDateTime;
+
+/**
+ *  系统参数
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("系统参数")
+@TableName(value = "t_mst_setting_value",schema =  "dkic_b",  autoResultMap = true)
+@ApiModel(value="实体类:系统参数", description="表名:t_mst_setting_value")
+public class SettingValue extends PageInfo<SettingValue> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 企业ID
+     */
+    @TableId(value = "cp_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 参数代码
+     */
+    @Excel(name = "参数代码")
+    @ApiModelProperty(value = "参数代码")
+    private String settingCode;
+
+
+    /**
+     * 参数值
+     */
+    @Excel(name = "参数值")
+    @ApiModelProperty(value = "参数值")
+    private String settingValue;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 163 - 0
src/main/java/com/dk/mdm/model/vo/mst/SettingValueVO.java

@@ -0,0 +1,163 @@
+package com.dk.mdm.model.vo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.dk.mdm.model.pojo.mst.RoleSensitive;
+import com.dk.mdm.model.pojo.mst.SettingValue;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ *  系统参数
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("系统参数")
+@TableName(value = "t_mst_setting_value", autoResultMap = true)
+@ApiModel(value="实体类:系统参数", description="表名:t_mst_setting_value")
+public class SettingValueVO extends PageInfo<SettingValueVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 企业ID
+     */
+    @TableId(value = "cp_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 参数代码
+     */
+    @Excel(name = "参数代码")
+    @ApiModelProperty(value = "参数代码")
+    private String settingCode;
+
+
+    /**
+     * 参数值
+     */
+    @Excel(name = "参数值")
+    @ApiModelProperty(value = "参数值")
+    private String settingValue;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    private List<SettingValue> settingValueList;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+}

+ 74 - 74
src/main/java/com/dk/mdm/service/core/SettingValueService.java

@@ -1,74 +1,74 @@
-package com.dk.mdm.service.core;
-
-import com.dk.common.mapper.BaseMapper;
-import com.dk.common.response.ResponseResultUtil;
-import com.dk.common.response.ResponseResultVO;
-import com.dk.common.service.BaseService;
-import com.dk.mdm.infrastructure.convert.core.SettingValueConvert;
-import com.dk.mdm.mapper.core.SettingValueMapper;
-import com.dk.mdm.model.pojo.core.SettingValue;
-import com.dk.mdm.model.vo.core.SettingValueVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Map;
-
-@Service
-@Transactional
-public class SettingValueService extends BaseService<SettingValue> {
-
-    @Override
-    public BaseMapper<SettingValue> getRepository() {
-        return settingValueMapper;
-    }
-
-    @Autowired
-    private SettingValueMapper settingValueMapper;
-
-    @Autowired
-    private SettingValueConvert settingValueConvert;
-
-    /**
-     * @desc : 查询系统参数
-     * @author : 夏常明
-     * @date : 2023/1/29 17:04
-     */
-    public ResponseResultVO<List<Map<String, Object>>> getSettingValue(Map<String, Object> param) {
-        List<Map<String, Object>> list = settingValueMapper.getSettingValue(param);
-        return ResponseResultUtil.success(list);
-    }
-
-    /**
-     * @desc : 批量更新系统参数值
-     * @author : 夏常明
-     * @date : 2023/1/30 13:50
-     */
-    @Transactional(
-            rollbackFor = {Exception.class}
-    )
-    public ResponseResultVO<?> updateSettingValues(List<SettingValueVO> param) {
-        //循环
-        for (SettingValueVO settingValueVO :
-                param) {
-            //获取SettingCode查询条件
-            SettingValueVO setting = new SettingValueVO().setSettingCode(settingValueVO.getSettingCode()).setFtyId(settingValueVO.getFtyId());
-            // 转化实体 校验参数只传主键
-            SettingValue settingValueCount = settingValueConvert.convertToPo(setting);
-            // 转化实体 数据操作
-            SettingValue settingValue = settingValueConvert.convertToPo(settingValueVO);
-            //是否存在
-            long count = settingValueMapper.selectByCode(settingValueCount);
-            //编辑
-            if (count > 0) {
-               settingValueMapper.updateSettingValues(settingValue);
-            } else //新建
-            {
-                super.insert(settingValue);
-            }
-        }
-        return ResponseResultUtil.success(param);
-    }
-
-}
+//package com.dk.mdm.service.core;
+//
+//import com.dk.common.mapper.BaseMapper;
+//import com.dk.common.response.ResponseResultUtil;
+//import com.dk.common.response.ResponseResultVO;
+//import com.dk.common.service.BaseService;
+//import com.dk.mdm.infrastructure.convert.core.SettingValueConvert;
+//import com.dk.mdm.mapper.core.SettingValueMapper;
+//import com.dk.mdm.model.pojo.core.SettingValue;
+//import com.dk.mdm.model.vo.core.SettingValueVO;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//@Service
+//@Transactional
+//public class SettingValueService extends BaseService<SettingValue> {
+//
+//    @Override
+//    public BaseMapper<SettingValue> getRepository() {
+//        return settingValueMapper;
+//    }
+//
+//    @Autowired
+//    private SettingValueMapper settingValueMapper;
+//
+//    @Autowired
+//    private SettingValueConvert settingValueConvert;
+//
+//    /**
+//     * @desc : 查询系统参数
+//     * @author : 夏常明
+//     * @date : 2023/1/29 17:04
+//     */
+//    public ResponseResultVO<List<Map<String, Object>>> getSettingValue(Map<String, Object> param) {
+//        List<Map<String, Object>> list = settingValueMapper.getSettingValue(param);
+//        return ResponseResultUtil.success(list);
+//    }
+//
+//    /**
+//     * @desc : 批量更新系统参数值
+//     * @author : 夏常明
+//     * @date : 2023/1/30 13:50
+//     */
+//    @Transactional(
+//            rollbackFor = {Exception.class}
+//    )
+//    public ResponseResultVO<?> updateSettingValues(List<SettingValueVO> param) {
+//        //循环
+//        for (SettingValueVO settingValueVO :
+//                param) {
+//            //获取SettingCode查询条件
+//            SettingValueVO setting = new SettingValueVO().setSettingCode(settingValueVO.getSettingCode()).setFtyId(settingValueVO.getFtyId());
+//            // 转化实体 校验参数只传主键
+//            SettingValue settingValueCount = settingValueConvert.convertToPo(setting);
+//            // 转化实体 数据操作
+//            SettingValue settingValue = settingValueConvert.convertToPo(settingValueVO);
+//            //是否存在
+//            long count = settingValueMapper.selectByCode(settingValueCount);
+//            //编辑
+//            if (count > 0) {
+//               settingValueMapper.updateSettingValues(settingValue);
+//            } else //新建
+//            {
+//                super.insert(settingValue);
+//            }
+//        }
+//        return ResponseResultUtil.success(param);
+//    }
+//
+//}

+ 83 - 0
src/main/java/com/dk/mdm/service/mst/SettingValueService.java

@@ -0,0 +1,83 @@
+package com.dk.mdm.service.mst;
+
+import com.dk.common.response.ResponseResultUtil;
+import com.dk.common.response.ResponseResultVO;
+import com.dk.mdm.model.pojo.mst.RoleSensitive;
+import com.dk.mdm.model.pojo.mst.SettingValue;
+import com.dk.mdm.mapper.mst.SettingValueMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.vo.mst.RoleVo;
+import com.dk.mdm.model.vo.mst.SettingValueVO;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+@Transactional
+public class SettingValueService extends BaseService<SettingValue> {
+
+    @Override
+    public BaseMapper<SettingValue> getRepository() {
+        return settingValueMapper;
+    }
+
+    @Autowired
+    private SettingValueMapper settingValueMapper;
+
+    /**
+     * @desc : 获取系统参数
+     * @author : 姜永辉
+     * @date : 2024/2/26 10:36
+     */
+    public ResponseResultVO<Map<String, Object>> getSettingValue(Map<String, Object> param) {
+        // 获取系统基础数据
+        List<Map<String, Object>> list = settingValueMapper.getSettingValue(param);
+        Map<String, Object> objectObjectHashMap = new HashMap<>();
+        objectObjectHashMap.put("list", list);
+        return ResponseResultUtil.success(objectObjectHashMap);
+    }
+
+
+    /**
+     * @desc : 删除系统参数
+     * @author : 姜永辉
+     * @date : 2023/1/5 9:39
+     */
+    public ResponseResultVO<Boolean> deleteSettingValueId(Integer id) {
+        SettingValue settingValue = new SettingValue();
+        settingValue.setCpId(id);
+        return ResponseResultUtil.success(settingValueMapper.deleteSettingValueId(settingValue) > 0);
+    }
+
+    /**
+     * @desc : 批量修改系统参数
+     * @author : 姜永辉
+     * @date : 2023/1/5 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<Boolean> updateBatch(SettingValueVO vo) {
+        if (vo.getSettingValueList() != null) {
+            //删除历史功能权限
+            deleteSettingValueId(vo.getCpId());
+        }
+        if (vo.getSettingValueList() != null && vo.getSettingValueList().size() > 0) {
+            //新建角色敏感信息权限
+            for (SettingValue settingValue : vo.getSettingValueList()) {
+                settingValue.setSettingValue(vo.getSettingValue());
+                settingValue.setCpId(vo.getCpId());
+            }
+            //批量新建
+            settingValueMapper.insertBatch(vo.getSettingValueList());
+        }
+
+        return ResponseResultUtil.success();
+    }
+
+}