于继渤 2 سال پیش
والد
کامیت
7605ea973e

+ 0 - 120
src/main/java/com/dk/mdm/controller/core/RoleController.java

@@ -1,120 +0,0 @@
-package com.dk.mdm.controller.core;
-
-import com.dk.common.model.pojo.PageList;
-import com.dk.common.response.ResponseResultVO;
-import com.dk.mdm.model.pojo.core.Role;
-import com.dk.common.service.BaseService;
-import com.dk.mdm.model.query.core.RoleQuery;
-import com.dk.mdm.model.response.core.RoleResponse;
-import com.dk.mdm.model.vo.core.RoleVO;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import io.swagger.annotations.Api;
-import com.dk.mdm.service.core.RoleService;
-
-import java.util.Map;
-
-@Api(tags = "角色API接口")
-@RestController
-@RequestMapping("/core/role")
-public class RoleController {
-
-    public BaseService<Role> getService() {
-        return roleService;
-    }
-
-    @Autowired
-    private RoleService roleService;
-
-    /**
-     * @desc : 条件查询
-     * @author : 夏常明
-     * @date : 2023/1/4 9:39
-     */
-    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
-    @PostMapping({"list_by"})
-    public ResponseResultVO<PageList<RoleResponse>> selectByCond(@RequestBody RoleQuery roleQuery) {
-        return roleService.selectByCond(roleQuery);
-    }
-
-    /**
-     * @desc : 通过ID查询
-     * @author : 夏常明
-     * @date : 2023/1/4 9:39
-     */
-    @PostMapping({"{id}"})
-    public ResponseResultVO selectById(@PathVariable Long id) {
-        return roleService.selectById(id);
-    }
-
-    /**
-     * @desc : 新建角色
-     * @author : 夏常明
-     * @date : 2023/1/5 9:39
-     */
-    @ApiOperation(value = "新建角色", notes = "新建角色")
-    @PostMapping({"insert"})
-    public ResponseResultVO<?> insert(@RequestBody RoleVO roleVO) {
-        return roleService.insert(roleVO);
-    }
-
-    /**
-     * @desc : 编辑角色
-     * @author : 夏常明
-     * @date : 2023/1/4 9:39
-     */
-    @ApiOperation(value = "编辑角色 ", notes = "编辑角色")
-    @PostMapping({"update"})
-    public ResponseResultVO<Boolean> update(@RequestBody RoleVO roleVO) {
-        return roleService.update(roleVO);
-    }
-
-    /**
-     * @desc : 停用
-     * @author : 夏常明
-     * @date :  2023/1/4 9:39
-     */
-    @ApiOperation(value = "停用", notes = "停用")
-    @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable Long id) {
-        return roleService.updateRoleFlgValid(id, false);
-    }
-
-    /**
-     * @desc : 启用
-     * @author : 夏常明
-     * @date :  2023/1/4 9:39
-     */
-    @ApiOperation(value = "启用", notes = "启用")
-    @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable Long id) {
-        return roleService.updateRoleFlgValid(id, true);
-    }
-
-    /**
-     * @desc : 获取角色用户
-     * @author : 夏常明
-     * @date : 2023/1/10 13:53
-     */
-    @ApiOperation(
-            value = "获取角色用户",
-            notes = "获取角色用户"
-    )
-    @PostMapping("get_role_user")
-    public ResponseResultVO<PageList<Map<String, Object>>> getDefectType(@RequestBody Map<String, Object> param) {
-        return roleService.getRoleUser(param);
-    }
-
-    /**
-     * @desc : 编辑用户角色
-     * @author : 夏常明
-     * @date : 2023/1/5 9:39
-     */
-    @ApiOperation(value = "编辑用户角色", notes = "编辑用户角色")
-    @PostMapping({"update_user_role"})
-    public ResponseResultVO<?> updateUserRole(@RequestBody RoleVO roleVO) {
-        return roleService.updateUserRole(roleVO);
-    }
-
-}

+ 24 - 0
src/main/java/com/dk/mdm/controller/mst/RoleController.java

@@ -0,0 +1,24 @@
+package com.dk.mdm.controller.mst;
+
+import com.dk.mdm.model.pojo.mst.Role;
+import com.dk.common.controller.BaseController;
+import com.dk.common.service.BaseService;
+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.RoleService;
+
+@Api(tags = "角色API接口")
+@RestController
+@RequestMapping("/mst/role")
+public class RoleController{
+
+    public BaseService<Role> getService() {
+        return roleService;
+    }
+
+    @Autowired
+    private RoleService roleService;
+
+}

+ 0 - 22
src/main/java/com/dk/mdm/infrastructure/convert/core/RoleConvert.java

@@ -1,22 +0,0 @@
-package com.dk.mdm.infrastructure.convert.core;
-
-import com.dk.mdm.model.pojo.core.Role;
-import com.dk.mdm.model.vo.core.RoleVO;
-import org.mapstruct.Mapper;
-
-/**
- * @desc   : Role转换类
- * @author : 夏常明
- * @date   : 2023-01-05 17:09
- */
-@Mapper(componentModel = "spring")
-public interface RoleConvert {
-
-    /**
-     * @desc   : 转换vo为pojo
-     * @author : 夏常明
-     * @date   : 2023-01-05 19:37
-     */
-    Role convertToPo(RoleVO roleVO);
-
-}

+ 0 - 53
src/main/java/com/dk/mdm/mapper/core/RoleMapper.java

@@ -1,53 +0,0 @@
-package com.dk.mdm.mapper.core;
-
-import com.dk.mdm.model.pojo.core.Role;
-import com.dk.mdm.model.query.core.RoleQuery;
-import com.dk.common.mapper.BaseMapper;
-import com.dk.mdm.model.response.core.RoleResponse;
-import com.dk.mdm.model.vo.core.RoleVO;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-import java.util.Map;
-
-/**
-*  角色 Mapper
-*/
-@Repository
-public interface RoleMapper extends BaseMapper<Role>{
-    /**
-     * @desc   : 根据条件进行查询
-     * @author : 夏常明
-     * @date   : 2023/1/4 10:01
-     */
-    List<RoleResponse> selectByCond(RoleQuery roleQuery);
-
-    /**
-     * @desc   : 根据条件进行查询(数量)
-     * @author : 夏常明
-     * @date   : 2023/1/4 10:01
-     */
-    Long countByCond(RoleQuery roleQuery);
-
-/**
- * @desc   : 查询角色用户
- * @author : 夏常明
- * @date   : 2023/1/28 16:52
- */
-    List<Map<String, Object>> getRoleUser(Map param);
-
-    /**
-     * @desc   :
-     * @date   : 2023/5/23 11:14
-     * @author : 寇珊珊
-     */
-    Long getRoleUserCount(Map param);
-
-    /**
-     * @desc   : 查询角色用户个数
-     * @author : 夏常明
-     * @date   : 2023/1/28 19:49
-     */
-    int updateUserRole(RoleVO roleVO);
-}
-

+ 0 - 158
src/main/java/com/dk/mdm/mapper/core/RoleMapper.xml

@@ -1,158 +0,0 @@
-<?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.RoleMapper">
-
-    <!-- 通用设置 -->
-    <!-- 通用查询列 -->
-    <sql id="Base_Column_List">
-        role_id, role_name, display_no, remarks, flg_valid, fty_id, 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.Role">
-        <id column="role_id" property="roleId"/>
-                <result column="role_name" property="roleName"/>
-                <result column="display_no" property="displayNo"/>
-                <result column="remarks" property="remarks"/>
-                <result column="flg_valid" property="flgValid"/>
-                <result column="fty_id" property="ftyId"/>
-            <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="roleName != null and roleName != ''">
-                And position (#{roleName} in role_name)>0
-            </if>
-            <if test="displayNo != null">
-                AND display_no = #{displayNo}
-            </if>
-            <if test="remarks != null and remarks != ''">
-                AND remarks = #{remarks}
-            </if>
-            <if test="flgValid != null">
-                AND flg_valid = #{flgValid}
-            </if>
-            <if test="ftyId != null">
-                AND (fty_id = #{ftyId} or fty_id=0)
-            </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>
-            <if test="flgValidList != null and flgValidList.size()>0">
-                AND flg_valid =
-                any(#{flgValidList, typeHandler=BooleanListTypeHandler})
-            </if>
-        </where>
-    </sql>
-
-    <sql id="idsForeach">
-        <!-- 根据主键roleId批量操作 -->
-        WHERE role_id in
-        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
-            #{item}
-        </foreach>
-    </sql>
-
-    <!-- 查询表t_role,(条件查询+分页)列表 -->
-    <select id="selectByCond" resultMap="BaseResultMap">
-        SELECT
-        <include refid="Base_Column_List"/>
-        FROM core.t_role
-        <include refid="Condition"/>
-        ORDER BY  flg_valid DESC  , display_no
-        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
-            limit #{end} offset #{start}
-        </if>
-    </select>
-
-    <!-- 查询表t_role,(条件查询)个数 -->
-    <select id="countByCond" resultType="Long">
-        SELECT
-        count(1)
-        FROM core.t_role
-        <include refid="Condition"/>
-    </select>
-
-    <!-- 查询角色用户  -->
-    <select id="getRoleUser" resultType="java.util.Map">
-        select
-        u.user_id as "userId"
-        ,u.user_code as  "userCode"
-        ,u.user_name as "userName"
-        ,sys.f_code_name(u.user_code,u.user_name) AS "userCodeName"
-        ,u.remarks
-        ,org.level_name AS "orgLevelName"
-       <!-- ,u.role_ids  as "roleIds"-->
-        FROM core.t_user as u
-        left join core.t_organization org
-          on u.org_id = org.org_id
-        where u.fty_id = #{ftyId}
-            and u.flg_valid
-        <if test="roleId != null and roleId != ''">
-            and   #{roleId} = any(u.role_ids)
-        </if>
-        ORDER BY u.flg_valid DESC,u.user_code
-        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
-            limit #{end} offset #{start}
-        </if>
-    </select>
-
-    <!-- 查询角色用户个数  -->
-    <select id="getRoleUserCount" resultType="Long">
-        select
-        count(1)
-        FROM core.t_user as u
-        where u.fty_id = #{ftyId}
-            and u.flg_valid
-        <if test="roleId != null and roleId != ''">
-            and   #{roleId} = any(u.role_ids)
-        </if>
-    </select>
-
-    <!-- 更新用户角色   -->
-    <update id="updateUserRole">
-        update core.t_user set role_ids=(
-          case when 'save' = #{type}
-            then (case when #{userRoleId} = any(role_ids)    then role_ids else  array_append(role_ids, #{userRoleId}::integer)  end)
-            else  (case when #{userRoleId} = any(role_ids)    then array_remove(role_ids, #{userRoleId}::integer) else   role_ids end)
-            end)
-        <where>
-            <if test="userId!=null">
-               and user_id =#{userId}
-            </if>
-            <if test="userIdList!=null and userIdList.size()>0">
-                and user_id= any(#{userIdList,typeHandler=BigIntListTypeHandler})
-            </if>
-        </where>
-    </update>
-
-</mapper>

+ 14 - 0
src/main/java/com/dk/mdm/mapper/mst/RoleMapper.java

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.Role;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  角色 Mapper
+*/
+@Repository
+public interface RoleMapper extends BaseMapper<Role>{
+	
+}
+

+ 171 - 0
src/main/java/com/dk/mdm/mapper/mst/RoleMapper.xml

@@ -0,0 +1,171 @@
+<?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.RoleMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        role_id, role_name, display_no, remarks, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user, sys_code, flg_nolimit_fun, flg_nolimit_pvw, flg_nolimit_sen
+    </sql>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.Role">
+        <id column="role_id" property="roleId"/>
+                <result column="role_name" property="roleName"/>
+                <result column="display_no" property="displayNo"/>
+                <result column="remarks" property="remarks"/>
+                <result column="flg_valid" property="flgValid"/>
+                <result column="cp_id" property="cpId"/>
+            <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"/>
+                <result column="sys_code" property="sysCode"/>
+                <result column="flg_nolimit_fun" property="flgNolimitFun"/>
+                <result column="flg_nolimit_pvw" property="flgNolimitPvw"/>
+                <result column="flg_nolimit_sen" property="flgNolimitSen"/>
+    </resultMap>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="roleName != null and roleName != ''">
+                AND role_name = #{roleName}
+            </if>
+            <if test="displayNo != null">
+                AND display_no = #{displayNo}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </if>
+            <if test="flgValid != null">
+                AND flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND cp_id = #{cpId}
+            </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>
+            <if test="sysCode != null and sysCode != ''">
+                AND sys_code = #{sysCode}
+            </if>
+            <if test="flgNolimitFun != null">
+                AND flg_nolimit_fun = #{flgNolimitFun}
+            </if>
+            <if test="flgNolimitPvw != null">
+                AND flg_nolimit_pvw = #{flgNolimitPvw}
+            </if>
+            <if test="flgNolimitSen != null">
+                AND flg_nolimit_sen = #{flgNolimitSen}
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键roleId批量操作 -->
+        WHERE role_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mst_role,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_role
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_role,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM t_mst_role
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mst_role的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_role
+        WHERE role_id = #{roleId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mst_role的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_role
+        WHERE role_id = #{roleId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mst_role的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_role
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into t_mst_role
+        (
+        <trim suffixOverrides=",">
+            role_name,
+            display_no,
+            remarks,
+            cp_id,
+            op_app_code,
+            sys_code,
+            flg_nolimit_fun,
+            flg_nolimit_pvw,
+            flg_nolimit_sen,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.roleName},
+                #{item.displayNo},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+                #{item.sysCode},
+                #{item.flgNolimitFun},
+                #{item.flgNolimitPvw},
+                #{item.flgNolimitSen},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 39 - 14
src/main/java/com/dk/mdm/model/pojo/core/Role.java → src/main/java/com/dk/mdm/model/pojo/mst/Role.java

@@ -1,11 +1,11 @@
-package com.dk.mdm.model.pojo.core;
+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.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.*;
 import com.dk.common.model.pojo.PageInfo;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
@@ -15,7 +15,9 @@ 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;
 
 /**
@@ -27,8 +29,8 @@ import java.time.LocalDateTime;
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 @ExportTitle("角色")
-@TableName(value = "t_role", autoResultMap = true,schema="core")
-@ApiModel(value="实体类:角色", description="表名:t_role")
+@TableName(value = "t_mst_role", autoResultMap = true)
+@ApiModel(value="实体类:角色", description="表名:t_mst_role")
 public class Role extends PageInfo<Role> implements Serializable {
 
     /*
@@ -40,7 +42,8 @@ public class Role extends PageInfo<Role> implements Serializable {
      */
     @TableId(value = "role_id", type = IdType.AUTO)
     @ApiModelProperty(value = "角色ID")
-    private Integer roleId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String roleId;
 
 
     /**
@@ -52,10 +55,10 @@ public class Role extends PageInfo<Role> implements Serializable {
 
 
     /**
-     * 显示顺序
+     * 显示顺序 (【1 ~ 46655】)
      */
-    @Excel(name = "显示顺序")
-    @ApiModelProperty(value = "显示顺序")
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
     private Integer displayNo;
 
 
@@ -76,11 +79,11 @@ public class Role extends PageInfo<Role> implements Serializable {
 
 
     /**
-     * 工厂ID
+     * 企业ID
      */
-    @Excel(name = "工厂ID")
-    @ApiModelProperty(value = "工厂ID")
-    private Integer ftyId;
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
 
 
     /**
@@ -98,7 +101,8 @@ public class Role extends PageInfo<Role> implements Serializable {
      */
     @Excel(name = "创建用户 (触发器自动处理)")
     @ApiModelProperty(value = "创建用户 (触发器自动处理)")
-    private Long opCreateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
 
 
     /**
@@ -116,7 +120,8 @@ public class Role extends PageInfo<Role> implements Serializable {
      */
     @Excel(name = "修改用户 (触发器自动处理)")
     @ApiModelProperty(value = "修改用户 (触发器自动处理)")
-    private Long opUpdateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
 
 
     /**
@@ -145,6 +150,26 @@ public class Role extends PageInfo<Role> implements Serializable {
     private String opDbUser;
 
 
+    /**
+     * 系统代码
+     */
+    @Excel(name = "系统代码")
+    @ApiModelProperty(value = "系统代码")
+    private String sysCode;
+
+
+    @ApiModelProperty(value = "")
+    private Boolean flgNolimitFun;
+
+
+    @ApiModelProperty(value = "")
+    private Boolean flgNolimitPvw;
+
+
+    @ApiModelProperty(value = "")
+    private Boolean flgNolimitSen;
+
+
     /*
      * 相关属性
      * @TableField(exist = false)

+ 0 - 159
src/main/java/com/dk/mdm/service/core/RoleService.java

@@ -1,159 +0,0 @@
-package com.dk.mdm.service.core;
-
-import com.dk.common.infrastructure.annotaiton.Pagination;
-import com.dk.common.mapper.BaseMapper;
-import com.dk.common.model.pojo.PageList;
-import com.dk.common.response.ResponseCodeEnum;
-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.RoleConvert;
-import com.dk.mdm.mapper.core.RoleMapper;
-import com.dk.mdm.mapper.core.RoleRightMapper;
-import com.dk.mdm.model.pojo.core.Role;
-import com.dk.mdm.model.query.core.RoleQuery;
-import com.dk.mdm.model.response.core.RoleResponse;
-import com.dk.mdm.model.vo.core.RoleVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Map;
-
-@Service
-@Transactional
-public class RoleService extends BaseService<Role> {
-
-	@Override
-	public BaseMapper<Role> getRepository() {
-		return roleMapper;
-	}
-
-	@Autowired
-	private RoleMapper roleMapper;
-
-	@Autowired
-	private RoleConvert roleConvert;
-
-	@Autowired
-	private RoleRightMapper roleRightMapper;
-
-	/**
-	 * @desc : 重写主键
-	 * @author : 夏常明
-	 * @date : 2023/1/5 20:29
-	 */
-	@Override
-	public String getPrimaryKey() {
-		return "role_id";
-	}
-
-	/**
-	 * @desc : 条件查询
-	 * @author : 夏常明
-	 * @date : 2023/1/5 9:27
-	 */
-	@Pagination
-	public ResponseResultVO<PageList<RoleResponse>> selectByCond(RoleQuery roleQuery) {
-		return super.mergeListWithCount(roleQuery, roleMapper.selectByCond(roleQuery), roleMapper.countByCond(roleQuery));
-	}
-
-	/**
-	 * @desc   : 保存方法
-	 * @author : 夏常明
-	 * @date   : 2023/1/4 9:27
-	 */
-	@Transactional(
-			rollbackFor = {Exception.class}
-	)
-	public ResponseResultVO<?> insert(RoleVO roleVO) {
-		// 转化实体
-		Role role = roleConvert.convertToPo(roleVO);
-		return super.insert(role);
-	}
-
-	/**
-	 * @desc   : 编辑方法
-	 * @author : 夏常明
-	 * @date   : 2023/1/5 9:27
-	 */
-	@Transactional(
-			rollbackFor = {Exception.class}
-	)
-	public ResponseResultVO<Boolean> update(RoleVO roleVO) {
-		// 转化实体
-		Role role = roleConvert.convertToPo(roleVO);
-		return super.update(role);
-	}
-
-	/**
-	 * @desc   : 查询角色用户
-	 * @author : 夏常明
-	 * @date   : 2023/1/28 16:54
-	 */
-	public ResponseResultVO<PageList<Map<String, Object>>> getRoleUser(Map<String, Object> param) {
-		this.getLimit(param);
-		// 获取系统基础数据
-		return super.mergeListWithCount(param, roleMapper.getRoleUser(param),
-				roleMapper.getRoleUserCount(param));
-	}
-
-	/**
-	 * @desc   : 设置分页参数
-	 * @date   : 2023/5/23 11:13
-	 * @author : 寇珊珊
-	 */
-	private Map<String, Object> getLimit(Map<String, Object> param) {
-		if (param.get("limit") != null) {
-			param.put("currentPage", 1);
-			param.put("pageSize", param.get("limit"));
-		}
-		param.put("start", ((int) param.get("currentPage") - 1) * (int) param.get("pageSize"));
-		param.put("end", param.get("pageSize"));
-		return param;
-	}
-
-	/**
-	 * @desc   : 更新用户角色
-	 * @author : 夏常明
-	 * @date   : 2023/1/28 19:52
-	 */
-	@Transactional(
-			rollbackFor = {Exception.class}
-	)
-	public ResponseResultVO<?> updateUserRole(RoleVO roleVO) {
-		long result = roleMapper.updateUserRole(roleVO);
-		if(result>0)
-		{
-			return ResponseResultUtil.success(roleVO) ;
-		}
-		else
-		{
-			return  ResponseResultUtil.error(ResponseCodeEnum.INSERT_FAIL);
-		}
-	}
-
-	/**
-	 * @desc   : 启用/停用
-	 * @author : 姜宁
-	 * @date   : 2023/3/13 14:01
-	 */
-	@Transactional(
-			rollbackFor = {Exception.class}
-	)
-	public ResponseResultVO<Boolean> updateRoleFlgValid(Long id, boolean flgValid) {
-		ResponseResultVO<Boolean> res;
-
-		// 启用
-		if (flgValid){
-			res = this.enable(id);
-		}
-		// 停用
-		else{
-			res = this.disable(id);
-		}
-		// 更新用户权限
-		roleRightMapper.userFunByRole(Integer.parseInt(id.toString()));
-		return res;
-	}
-}

+ 23 - 0
src/main/java/com/dk/mdm/service/mst/RoleService.java

@@ -0,0 +1,23 @@
+package com.dk.mdm.service.mst;
+
+import com.dk.mdm.model.pojo.mst.Role;
+import com.dk.mdm.mapper.mst.RoleMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class RoleService extends BaseService<Role> {
+
+	@Override
+	public BaseMapper<Role> getRepository() {
+		return roleMapper;
+	}
+
+	@Autowired
+	private RoleMapper roleMapper;
+
+}