姜永辉 před 2 roky
rodič
revize
7f0be88171

+ 1 - 9
src/main/java/com/dk/mdm/controller/core/DictionaryDataController.java

@@ -25,15 +25,7 @@ public class DictionaryDataController{
     @Autowired
     private DictionaryDataService dictionaryDataService;
 
-    /**
-    * @desc   : 通过ID查询
-    * @author : 常皓宁
-    * @date   : 2023/2/7 10:11
-    */
-    @PostMapping({"{id}"})
-    public ResponseResultVO selectById(@PathVariable Long id){
-        return dictionaryDataService.selectById(id);
-    }
+    
 
     /**
      * @desc   : 条件查询

+ 1 - 1
src/main/java/com/dk/mdm/controller/core/FactoryController.java

@@ -47,7 +47,7 @@ public class FactoryController{
      * @date : 2023/1/4 9:39
      */
     @PostMapping({"{id}"})
-    public ResponseResultVO selectById(@PathVariable Long id) {
+    public ResponseResultVO selectById(@PathVariable String id) {
         return factoryService.selectById(id);
     }
 

+ 1 - 1
src/main/java/com/dk/mdm/controller/core/JobController.java

@@ -49,7 +49,7 @@ public class JobController{
     * @date   : 2023/1/4 13:50
     */
     @PostMapping({"{id}"})
-    public ResponseResultVO selectById(@PathVariable Long id) {
+    public ResponseResultVO selectById(@PathVariable String id) {
         return jobService.selectById(id);
     }
 

+ 1 - 1
src/main/java/com/dk/mdm/controller/core/PostController.java

@@ -42,7 +42,7 @@ public class PostController{
      * @date : 2023/1/4 9:39
      */
     @PostMapping({"{id}"})
-    public ResponseResultVO selectById(@PathVariable Long id) {
+    public ResponseResultVO selectById(@PathVariable String id) {
         return postService.selectById(id);
     }
 

+ 3 - 3
src/main/java/com/dk/mdm/controller/core/StaffController.java

@@ -48,9 +48,9 @@ public class StaffController {
      * @author : 姜宁
      * @date : 2023/1/9 10:41
      */
-    @PostMapping({"{id}"})
-    public ResponseResultVO selectById(@PathVariable Long id) {
-        return staffService.selectById(id);
+    @PostMapping({"/{id}"})
+    public ResponseResultVO selectById(@PathVariable String id) {
+        return staffService.selectByStringId(id);
     }
 
 

+ 3 - 0
src/main/java/com/dk/mdm/mapper/core/StaffMapper.java

@@ -7,6 +7,7 @@ import com.dk.mdm.model.response.core.StaffResponse;
 import com.dk.mdm.model.vo.core.StaffVO;
 import org.springframework.stereotype.Repository;
 
+import java.io.Serializable;
 import java.util.List;
 import java.util.Map;
 
@@ -37,6 +38,8 @@ public interface StaffMapper extends BaseMapper<Staff>{
     */
     Long selectByCode(Staff staff);
 
+    StaffResponse selectByStringId(String staffId);
+
 
     /**
      * @desc   : 更新员工状态

+ 12 - 2
src/main/java/com/dk/mdm/mapper/core/StaffMapper.xml

@@ -7,8 +7,7 @@
     <sql id="Base_Column_List">
         t.staff_id, t.staff_code, t.staff_name,t.staff_phone, t.org_id, t.role_ids,  t.wx_user_id, t.remarks,
         t.flg_valid,t.flg_can_login,
-        t.cp_id, t.op_create_time, t.op_create_user_id, t.op_update_time, t.op_update_user_id, t.op_app_code,
-        t.op_timestamp, t.op_db_user
+        t.cp_id, t.op_create_time, t.op_create_user_id, t.op_update_time, t.op_update_user_id
     </sql>
 
     <!-- 通用查询映射结果 -->
@@ -42,6 +41,9 @@
     <!-- 通用条件列 -->
     <sql id="Condition">
         <where>
+            <if test="staffId != null">
+                AND t.staff_id = #{staffId}
+            </if>
             <if test="staffCode != null and staffCode != ''">
                 AND position (#{staffCode} in t.staff_code ) >0
             </if>
@@ -108,6 +110,14 @@
         <include refid="Condition"/>
     </select>
 
+    <!--员工-->
+    <select id="selectByStringId" resultType="com.dk.mdm.model.response.core.StaffResponse">
+        select <include refid="Base_Column_List"/>
+        from dkic_b.t_mst_staff t
+        where  t.staff_id = #{staffId,typeHandler=UuidTypeHandler}
+
+    </select>
+
     <!--员工编码是否重复-->
     <select id="selectByCode" resultType="Long">
         select count(1)

+ 1 - 1
src/main/java/com/dk/mdm/model/pojo/core/Staff.java

@@ -112,7 +112,7 @@ public class Staff extends PageInfo<Staff> implements Serializable {
      */
     @ApiModelProperty(value = "员工状态list")
     @TableField(typeHandler = UuidListTypeHandler.class)
-    private List<String> roleIds;
+    private  String roleIds;
 
 
     /**

+ 1 - 1
src/main/java/com/dk/mdm/model/query/core/StaffQuery.java

@@ -222,7 +222,7 @@ public class StaffQuery extends PageInfo<StaffQuery> implements Serializable {
      */
     @ApiModelProperty(value = "员工状态list")
     @TableField(typeHandler = UuidListTypeHandler.class)
-    private List<String> roleIds;
+    private String roleIds;
 
     /**
      * @desc   : 组织部门list

+ 1 - 1
src/main/java/com/dk/mdm/model/vo/core/StaffVO.java

@@ -102,7 +102,7 @@ public class StaffVO extends PageInfo<StaffVO> implements Serializable {
      */
     @ApiModelProperty(value = "员工状态list")
     @TableField(typeHandler = UuidListTypeHandler.class)
-    private List<String> roleIds;
+    private String roleIds;
 
     /**
      * 工厂ID

+ 4 - 0
src/main/java/com/dk/mdm/service/core/StaffService.java

@@ -66,6 +66,10 @@ public class StaffService extends BaseService<Staff> {
 				staffMapper.countByCond(staffQuery));
 	}
 
+	public ResponseResultVO<StaffResponse> selectByStringId(String id) {
+		return ResponseResultUtil.success(staffMapper.selectByStringId(id)) ;
+	}
+
 	/**
 	 * @desc   : 保存方法
 	 * @author : 姜宁