瀏覽代碼

人员管理扩展

luowei 2 年之前
父節點
當前提交
dc8e3da0e7
共有 17 個文件被更改,包括 1035 次插入145 次删除
  1. 3 29
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysDept.java
  2. 180 0
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysUserInformation.java
  3. 13 1
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysDeptController.java
  4. 21 8
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysUserController.java
  5. 100 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysUserInformationController.java
  6. 1 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysRoleMapper.java
  7. 65 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysUserInformationMapper.java
  8. 1 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysUserRoleMapper.java
  9. 1 1
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysDeptService.java
  10. 7 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysRoleService.java
  11. 73 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysUserInformationService.java
  12. 42 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysDeptServiceImpl.java
  13. 69 102
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysRoleServiceImpl.java
  14. 165 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysUserInformationServiceImpl.java
  15. 11 2
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysRoleMapper.xml
  16. 280 0
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserInformationMapper.xml
  17. 3 2
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserRoleMapper.xml

+ 3 - 29
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysDept.java

@@ -1,5 +1,6 @@
 package com.xunmei.system.api.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.xunmei.common.core.web.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -50,10 +51,9 @@ public class SysDept extends BaseEntity
     /** 删除标志(0代表存在 2代表删除) */
     private String delFlag;
 
-    /** 父部门名称 */
-    private String parentName;
     
     /** 子部门 */
+    @TableField(exist = false)
     private List<SysDept> children = new ArrayList<SysDept>();
 
     public Long getDeptId()
@@ -162,15 +162,7 @@ public class SysDept extends BaseEntity
         this.delFlag = delFlag;
     }
 
-    public String getParentName()
-    {
-        return parentName;
-    }
 
-    public void setParentName(String parentName)
-    {
-        this.parentName = parentName;
-    }
 
     public List<SysDept> getChildren()
     {
@@ -182,23 +174,5 @@ public class SysDept extends BaseEntity
         this.children = children;
     }
 
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("deptId", getDeptId())
-            .append("parentId", getParentId())
-            .append("ancestors", getAncestors())
-            .append("deptName", getDeptName())
-            .append("orderNum", getOrderNum())
-            .append("leader", getLeader())
-            .append("phone", getPhone())
-            .append("email", getEmail())
-            .append("status", getStatus())
-            .append("delFlag", getDelFlag())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
+
 }

+ 180 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysUserInformation.java

@@ -0,0 +1,180 @@
+package com.xunmei.system.api.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.xunmei.common.core.web.domain.BaseEntity;
+
+/**
+ * 【请填写功能名称】对象 sys_user_information
+ *
+ * @author xunmei
+ * @date 2023-08-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("sys_user_information")
+@ApiModel(value = "SysUserInformation对象" , description = "【请填写功能名称】")
+public class SysUserInformation extends BaseEntity
+        {
+private static final long serialVersionUID=1L;
+
+    /** $column.columnComment */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    /** 用户ID */
+            @ApiModelProperty(value = "用户ID")
+    private Long userId;
+
+    /** 所属部门ID */
+            @ApiModelProperty(value = "所属部门ID")
+    private Long deptId;
+
+    /** 职务ID */
+            @ApiModelProperty(value = "职务")
+    private String duties;
+
+    /** 用工形式 */
+            @ApiModelProperty(value = "用工形式")
+    private String workType;
+
+    /** 是否专职0是1否 */
+            @ApiModelProperty(value = "是否专职0是1否")
+    private String isFullTime;
+
+    /** 最高学历 */
+            @ApiModelProperty(value = "最高学历")
+    private String highestEducation;
+
+    /** 学历取得形式 */
+            @ApiModelProperty(value = "学历取得形式")
+    private String educationType;
+
+    /** 是否持证上岗 */
+            @ApiModelProperty(value = "是否持证上岗")
+    private String certificateWork;
+
+    /** 初级以上相关专业技术职业资格 */
+            @ApiModelProperty(value = "初级以上相关专业技术职业资格")
+    private String professionalQualifications;
+
+    /** 持证上岗未通过原因 */
+            @ApiModelProperty(value = "持证上岗未通过原因")
+    private String certificateFailReason;
+
+    /** 参加工作时间 */
+            @JsonFormat(pattern = "yyyy-MM-dd")
+            @ApiModelProperty(value = "参加工作时间")
+    private Date workTime;
+
+    /** 入职现在公司的时间 */
+            @JsonFormat(pattern = "yyyy-MM-dd")
+            @ApiModelProperty(value = "入职现在公司的时间")
+    private Date entryTime;
+
+    /** 出生时间 */
+            @JsonFormat(pattern = "yyyy-MM-dd")
+            @ApiModelProperty(value = "出生时间")
+    private Date bornTime;
+
+    /** 分管领导名字 */
+            @ApiModelProperty(value = "分管领导名字")
+    private String responsibilitiesLeaderName;
+
+    /** 分管领导职务 */
+            @ApiModelProperty(value = "分管领导职务")
+    private String responsibilitiesLeaderDuties;
+
+    /** 资格证 */
+            @ApiModelProperty(value = "资格证")
+    private String qualificationCertificateUrl;
+
+    /** $column.columnComment */
+    private String delFlag;
+
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
+@Override
+public String toString(){
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+
+
+                .append("id" ,getId())
+
+
+                .append("userId" ,getUserId())
+
+
+                .append("deptId" ,getDeptId())
+
+
+                .append("duties" ,getDuties())
+
+
+                .append("workType" ,getWorkType())
+
+
+                .append("isFullTime" ,getIsFullTime())
+
+
+                .append("highestEducation" ,getHighestEducation())
+
+
+                .append("educationType" ,getEducationType())
+
+
+                .append("certificateWork" ,getCertificateWork())
+
+
+                .append("professionalQualifications" ,getProfessionalQualifications())
+
+
+                .append("certificateFailReason" ,getCertificateFailReason())
+
+
+                .append("workTime" ,getWorkTime())
+
+
+                .append("entryTime" ,getEntryTime())
+
+
+                .append("bornTime" ,getBornTime())
+
+
+                .append("responsibilitiesLeaderName" ,getResponsibilitiesLeaderName())
+
+
+                .append("responsibilitiesLeaderDuties" ,getResponsibilitiesLeaderDuties())
+
+
+                .append("qualificationCertificateUrl" ,getQualificationCertificateUrl())
+
+
+                .append("createBy" ,getCreateBy())
+
+
+                .append("createTime" ,getCreateTime())
+
+
+                .append("updateBy" ,getUpdateBy())
+
+
+                .append("updateTime" ,getUpdateTime())
+
+
+                .append("delFlag" ,getDelFlag())
+        .toString();
+        }
+        }

+ 13 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysDeptController.java

@@ -9,6 +9,7 @@ import com.xunmei.common.log.annotation.Log;
 import com.xunmei.common.log.enums.BusinessType;
 import com.xunmei.common.security.annotation.RequiresPermissions;
 import com.xunmei.common.security.utils.SecurityUtils;
+import com.xunmei.system.api.domain.SysDept;
 import com.xunmei.system.api.domain.SysOrg;
 import com.xunmei.system.api.domain.SysUser;
 import com.xunmei.system.service.ISysDeptService;
@@ -137,10 +138,21 @@ public class SysDeptController extends BaseController
     }
 
     /**
-     * 获取部门树列表
+     * 获取部门树列表(机构)
      */
     @GetMapping("/deptTree")
     public AjaxResult deptTree(SysOrg dept) {
         return success(deptService.selectDeptTreeList(dept));
     }
+
+    /**
+     *
+     * @param dept
+     * @return
+     * 获取部门树(真部门)
+     */
+    @GetMapping("/sysDeptTree")
+    public AjaxResult sysDeptTree(SysDept dept) {
+        return success(deptService.selectDeptTreeList(dept));
+    }
 }

+ 21 - 8
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysUserController.java

@@ -12,10 +12,7 @@ import com.xunmei.common.security.annotation.InnerAuth;
 import com.xunmei.common.security.annotation.RequiresPermissions;
 import com.xunmei.common.security.utils.SaltHelper;
 import com.xunmei.common.security.utils.SecurityUtils;
-import com.xunmei.system.api.domain.SysDept;
-import com.xunmei.system.api.domain.SysOrg;
-import com.xunmei.system.api.domain.SysRole;
-import com.xunmei.system.api.domain.SysUser;
+import com.xunmei.system.api.domain.*;
 import com.xunmei.system.api.model.LoginUser;
 import com.xunmei.system.domain.SysUserRole;
 import com.xunmei.system.service.*;
@@ -60,7 +57,8 @@ public class SysUserController extends BaseController {
     private ISysConfigService configService;
     @Autowired
     private ISysUserRoleService sysUserRoleService;
-
+@Autowired
+private ISysUserInformationService sysUserInformationService;
     /**
      * 获取用户列表
      */
@@ -144,16 +142,33 @@ public class SysUserController extends BaseController {
         ajax.put("roles", roles);
         ajax.put("posts", null);
         if (StringUtils.isNotNull(userId)) {
+            SysUserInformation informationByUserId = sysUserInformationService.getInformationByUserId(userId);
+           if (null==informationByUserId){
+               informationByUserId=new SysUserInformation();
+           }
             SysUser sysUser = userService.selectUserById(userId);
             List<SysUserRole> userRoles = sysUserRoleService.list(new QueryWrapper<SysUserRole>().eq("user_id", userId));
             sysUser.setRoles(roles);
+          String sex="男";
+          String status="禁用";
+          if (null!=sysUser){
+           if ( sysUser.getGender().equals("1")) {
+                  sex="女";
+              }
+           if (sysUser.getIsLock().equals("0")){
+               status="启用";
+           }
+          }
             ajax.put(AjaxResult.DATA_TAG, sysUser);
+            ajax.put("information",informationByUserId);
             ajax.put("postIds", null);
             ajax.put("roleIds", userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList()));
+            ajax.put("roleName",roleService.getRoleName(userId));
+            ajax.put("sex",sex);
+            ajax.put("status",status);
         }
         return ajax;
     }
-
     /**
      * 新增用户
      */
@@ -297,6 +312,4 @@ public class SysUserController extends BaseController {
         userService.insertUserAuth(userId, roleIds);
         return success();
     }
-
-
 }

+ 100 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysUserInformationController.java

@@ -0,0 +1,100 @@
+package com.xunmei.system.controller;
+
+import com.xunmei.system.api.domain.SysUserInformation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.xunmei.common.log.annotation.Log;
+import com.xunmei.common.log.enums.BusinessType;
+import com.xunmei.common.security.annotation.RequiresPermissions;
+import com.xunmei.system.service.ISysUserInformationService;
+import com.xunmei.common.core.web.controller.BaseController;
+import com.xunmei.common.core.web.domain.AjaxResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import com.xunmei.common.core.web.page.TableDataInfo;
+
+/**
+ * 【请填写功能名称】Controller
+ *
+ * @author xunmei
+ * @date 2023-08-18
+ */
+@Api(tags = {"SysUserInformation" })
+@RestController
+@RequestMapping("/information")
+public class SysUserInformationController extends BaseController {
+    @Autowired
+    private ISysUserInformationService sysUserInformationService;
+
+/**
+ * 查询【请填写功能名称】列表
+ */
+@ApiOperation(value = "查询SysUserInformation列表")
+@RequiresPermissions("system:information:list")
+@GetMapping("/list")
+    public TableDataInfo list(SysUserInformation sysUserInformation) {
+
+        return sysUserInformationService.selectPage( sysUserInformation);
+    }
+
+                                                
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @ApiOperation(value = "获取SysUserInformation详细信息")
+    @RequiresPermissions("system:information:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(sysUserInformationService.selectSysUserInformationById(id));
+    }
+    @RequiresPermissions("system:information:query")
+    @GetMapping(value = {"/getInformationByUserId", "/{userId}"})
+    public AjaxResult getInformationByUserId(@PathVariable(value = "userId", required = false) Long userId) {
+     return success(sysUserInformationService.getInformationByUserId(userId));
+    }
+    @RequiresPermissions("system:information:edit")
+    @Log(title = "人员管理扩展", businessType = BusinessType.UPDATE)
+    @PutMapping("/extendUser")
+    public AjaxResult extendUser(@RequestBody SysUserInformation sysUserInformation) {
+        return toAjax(sysUserInformationService.extendUser(sysUserInformation))  ;
+    }
+    /**
+     * 新增【请填写功能名称】
+     */
+    @ApiOperation(value = "新增SysUserInformation")
+    @RequiresPermissions("system:information:add")
+    @Log(title = "【请填写功能名称】" , businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SysUserInformation sysUserInformation) {
+        return toAjax(sysUserInformationService.insertSysUserInformation(sysUserInformation));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @ApiOperation(value = "修改SysUserInformation")
+    @RequiresPermissions("system:information:edit")
+    @Log(title = "【请填写功能名称】" , businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SysUserInformation sysUserInformation) {
+        return toAjax(sysUserInformationService.updateSysUserInformation(sysUserInformation));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @ApiOperation(value = "删除SysUserInformation")
+    @RequiresPermissions("system:information:remove")
+    @Log(title = "【请填写功能名称】" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(sysUserInformationService.deleteSysUserInformationByIds(ids));
+    }
+}

+ 1 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysRoleMapper.java

@@ -13,6 +13,7 @@ import java.util.List;
  */
 public interface SysRoleMapper extends BaseMapper<SysRole>
 {
+    public String getRoleNameByUserId(Long userId);
     /**
      * 根据条件分页查询角色数据
      * 

+ 65 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysUserInformationMapper.java

@@ -0,0 +1,65 @@
+package com.xunmei.system.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xunmei.system.api.domain.SysUserInformation;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ *
+ * @author xunmei
+ * @date 2023-08-18
+ */
+@Mapper
+public interface SysUserInformationMapper extends BaseMapper<SysUserInformation> {
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public SysUserInformation selectSysUserInformationById(Long id);
+public SysUserInformation  getInformationByUserId(Long userId);
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param sysUserInformation 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<SysUserInformation> selectSysUserInformationList(SysUserInformation sysUserInformation);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param sysUserInformation 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertSysUserInformation(SysUserInformation sysUserInformation);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param sysUserInformation 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateSysUserInformation(SysUserInformation sysUserInformation);
+
+    /**
+     * 删除【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteSysUserInformationById(Long id);
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysUserInformationByIds(Long[] ids);
+}

+ 1 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysUserRoleMapper.java

@@ -14,6 +14,7 @@ import java.util.List;
  */
 public interface SysUserRoleMapper extends BaseMapper<SysUserRole>
 {
+
     /**
      * 通过用户ID删除用户和角色关联
      * 

+ 1 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysDeptService.java

@@ -33,7 +33,7 @@ public interface ISysDeptService extends IService<SysDept>
      * @return 部门树信息集合
      */
     public List<SysOrg> selectDeptTreeList(SysOrg dept);
-
+public List<SysDept>selectDeptTreeList(SysDept dept);
     /**
      * 构建前端所需要树结构
      * 

+ 7 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysRoleService.java

@@ -174,4 +174,11 @@ public interface ISysRoleService extends IService<SysRole>
      * @return 结果
      */
     public int insertAuthUsers(Long roleId, Long[] userIds);
+
+    /**
+     * 根据用户获取角色名
+     * @param userId
+     * @return
+     */
+    public String getRoleName(Long userId);
 }

+ 73 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysUserInformationService.java

@@ -0,0 +1,73 @@
+package com.xunmei.system.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.system.api.domain.SysUserInformation;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service接口
+ *
+ * @author xunmei
+ * @date 2023-08-18
+ */
+public interface ISysUserInformationService extends IService<SysUserInformation> {
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public SysUserInformation selectSysUserInformationById(Long id);
+public SysUserInformation getInformationByUserId(Long id);
+public int extendUser(SysUserInformation sysUserInformation);
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param sysUserInformation 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<SysUserInformation> selectSysUserInformationList(SysUserInformation sysUserInformation);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param sysUserInformation 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertSysUserInformation(SysUserInformation sysUserInformation);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param sysUserInformation 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateSysUserInformation(SysUserInformation sysUserInformation);
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的【请填写功能名称】主键集合
+     * @return 结果
+     */
+    public int deleteSysUserInformationByIds(Long[] ids);
+
+    /**
+     * 删除【请填写功能名称】信息
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteSysUserInformationById(Long id);
+
+    /**
+     * 查询【请填写功能名称】分页数据
+     *
+     * @param sysUserInformation 查询条件对象
+     * @return Page
+     */
+    public TableDataInfo selectPage(SysUserInformation sysUserInformation);
+}

+ 42 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysDeptServiceImpl.java

@@ -71,6 +71,12 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
         return recursionMethod(depts);
     }
 
+    @Override
+    public List<SysDept> selectDeptTreeList(SysDept dept) {
+        List<SysDept> sysDepts = deptMapper.selectList(new QueryWrapper<>(dept));
+        return  recursionDept(sysDepts);
+    }
+
 
     /**
      * 递归方法转换成树形结构
@@ -91,6 +97,42 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
     }
 
     /**
+     * dept递归方法转换成树形结构
+     *
+     * @param treeList
+     * @return
+     */
+    public static List<SysDept> recursionDept(List<SysDept> treeList) {
+        List<SysDept> trees = new ArrayList<>();
+        for (SysDept tree : treeList) {
+            // 找出父节点
+            if (-1 == tree.getParentId()) {
+                // 调用递归方法填充子节点列表
+                trees.add(findChildren(tree, treeList));
+            }
+        }
+        return trees;
+    }
+    /**
+     * dept递归方法
+     *
+     * @param tree     父节点对象
+     * @param treeList 所有的List
+     * @return
+     */
+    public static SysDept findChildren(SysDept tree, List<SysDept> treeList) {
+        for (SysDept node : treeList) {
+            if (tree.getDeptId().equals(node.getParentId())) {
+                if (tree.getChildren() == null) {
+                    tree.setChildren(new ArrayList<>());
+                }
+                // 递归 调用自身
+                tree.getChildren().add(findChildren(node, treeList));
+            }
+        }
+        return tree;
+    }
+    /**
      * 递归方法
      *
      * @param tree     父节点对象

+ 69 - 102
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysRoleServiceImpl.java

@@ -26,12 +26,11 @@ import java.util.*;
 
 /**
  * 角色 业务层处理
- * 
+ *
  * @author xunmei
  */
 @Service
-public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService
-{
+public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService {
     @Autowired
     private SysRoleMapper roleMapper;
 
@@ -46,23 +45,21 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 根据条件分页查询角色数据
-     * 
+     *
      * @param role 角色信息
      * @return 角色数据集合信息
      */
     @Override
     @DataScope(deptAlias = "d")
-    public TableDataInfo selectRoleList(SysRole role)
-    {
+    public TableDataInfo selectRoleList(SysRole role) {
         Page<SysRole> page;
-        if (role.getPageNum()!=null&&role.getPageSize()!=null)
-        {
+        if (role.getPageNum() != null && role.getPageSize() != null) {
             page = new Page<>(role.getPageNum(), role.getPageSize());
-        }else{
+        } else {
             page = new Page<>();
         }
         role.setDelFlag(0);
-        page = roleMapper.selectPage( page,new QueryWrapper<>(role));
+        page = roleMapper.selectPage(page, new QueryWrapper<>(role));
         TableDataInfo tableDataInfo = new TableDataInfo();
         tableDataInfo.setMsg("操作成功");
         tableDataInfo.setCode(200);
@@ -73,19 +70,16 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 根据用户ID查询角色
-     * 
+     *
      * @param userId 用户ID
      * @return 角色列表
      */
     @Override
-    public List<SysRole> selectRolesByUserId(Long userId)
-    {
+    public List<SysRole> selectRolesByUserId(Long userId) {
         List<SysRole> userRoles = roleMapper.selectRolePermissionByUserId(userId);
         List<SysRole> roles = selectRoleAll();
-        for (SysRole role : roles)
-        {
-            for (SysRole userRole : userRoles)
-            {
+        for (SysRole role : roles) {
+            for (SysRole userRole : userRoles) {
 //                if (role.getId().longValue() == userRole.getId().longValue())
 //                {
 //                    role.s(true);
@@ -98,19 +92,16 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 根据用户ID查询权限
-     * 
+     *
      * @param userId 用户ID
      * @return 权限列表
      */
     @Override
-    public Set<String> selectRolePermissionByUserId(Long userId)
-    {
+    public Set<String> selectRolePermissionByUserId(Long userId) {
         List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId);
         Set<String> permsSet = new HashSet<>();
-        for (SysRole perm : perms)
-        {
-            if (StringUtils.isNotNull(perm))
-            {
+        for (SysRole perm : perms) {
+            if (StringUtils.isNotNull(perm)) {
                 permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(",")));
             }
         }
@@ -119,52 +110,47 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 查询所有角色
-     * 
+     *
      * @return 角色列表
      */
     @Override
-    public List<SysRole> selectRoleAll()
-    {
+    public List<SysRole> selectRoleAll() {
         return roleMapper.selectList(new QueryWrapper<>());
     }
 
     /**
      * 根据用户ID获取角色选择框列表
-     * 
+     *
      * @param userId 用户ID
      * @return 选中角色ID列表
      */
     @Override
-    public List<Long> selectRoleListByUserId(Long userId)
-    {
+    public List<Long> selectRoleListByUserId(Long userId) {
         return roleMapper.selectRoleListByUserId(userId);
     }
 
     /**
      * 通过角色ID查询角色
-     * 
+     *
      * @param roleId 角色ID
      * @return 角色对象信息
      */
     @Override
-    public SysRole selectRoleById(Long roleId)
-    {
+    public SysRole selectRoleById(Long roleId) {
         return roleMapper.selectRoleById(roleId);
     }
 
     /**
      * 校验角色名称是否唯一
-     * 
+     *
      * @param role 角色信息
      * @return 结果
      */
     @Override
-    public boolean checkRoleNameUnique(SysRole role)
-    {
+    public boolean checkRoleNameUnique(SysRole role) {
         Long roleId = StringUtils.isNull(role.getId()) ? -1L : role.getId();
         SysRole info = roleMapper.checkRoleNameUnique(role.getRoleName());
-        if (StringUtils.isNotNull(info) && info.getId().longValue() != roleId.longValue())
-        {
+        if (StringUtils.isNotNull(info) && info.getId().longValue() != roleId.longValue()) {
             return UserConstants.NOT_UNIQUE;
         }
         return UserConstants.UNIQUE;
@@ -172,17 +158,15 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 校验角色权限是否唯一
-     * 
+     *
      * @param role 角色信息
      * @return 结果
      */
     @Override
-    public boolean checkRoleKeyUnique(SysRole role)
-    {
+    public boolean checkRoleKeyUnique(SysRole role) {
         Long roleId = StringUtils.isNull(role.getId()) ? -1L : role.getId();
         SysRole info = roleMapper.checkRoleKeyUnique(role.getRoleKey());
-        if (StringUtils.isNotNull(info) && info.getId().longValue() != roleId.longValue())
-        {
+        if (StringUtils.isNotNull(info) && info.getId().longValue() != roleId.longValue()) {
             return UserConstants.NOT_UNIQUE;
         }
         return UserConstants.UNIQUE;
@@ -190,33 +174,28 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 校验角色是否允许操作
-     * 
+     *
      * @param role 角色信息
      */
     @Override
-    public void checkRoleAllowed(SysRole role)
-    {
-        if (false)
-        {
+    public void checkRoleAllowed(SysRole role) {
+        if (false) {
             throw new ServiceException("不允许操作超级管理员角色");
         }
     }
 
     /**
      * 校验角色是否有数据权限
-     * 
+     *
      * @param roleId 角色id
      */
     @Override
-    public void checkRoleDataScope(Long roleId)
-    {
-        if (!SysUser.isAdmin(SecurityUtils.getUserId()))
-        {
+    public void checkRoleDataScope(Long roleId) {
+        if (!SysUser.isAdmin(SecurityUtils.getUserId())) {
             SysRole role = new SysRole();
             role.setId(roleId);
             List<SysRole> roles = roleMapper.selectList(new QueryWrapper<>(role));
-            if (StringUtils.isEmpty(roles))
-            {
+            if (StringUtils.isEmpty(roles)) {
                 throw new ServiceException("没有权限访问角色数据!");
             }
         }
@@ -224,26 +203,24 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 通过角色ID查询角色使用数量
-     * 
+     *
      * @param roleId 角色ID
      * @return 结果
      */
     @Override
-    public int countUserRoleByRoleId(Long roleId)
-    {
+    public int countUserRoleByRoleId(Long roleId) {
         return userRoleMapper.countUserRoleByRoleId(roleId);
     }
 
     /**
      * 新增保存角色信息
-     * 
+     *
      * @param role 角色信息
      * @return 结果
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int insertRole(SysRole role)
-    {
+    public int insertRole(SysRole role) {
         // 新增角色信息
         role.setDelFlag(0);
         roleMapper.insertRole(role);
@@ -252,14 +229,13 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 修改保存角色信息
-     * 
+     *
      * @param role 角色信息
      * @return 结果
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int updateRole(SysRole role)
-    {
+    public int updateRole(SysRole role) {
         // 修改角色信息
         roleMapper.updateRole(role);
         // 删除角色与菜单关联
@@ -269,26 +245,24 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 修改角色状态
-     * 
+     *
      * @param role 角色信息
      * @return 结果
      */
     @Override
-    public int updateRoleStatus(SysRole role)
-    {
+    public int updateRoleStatus(SysRole role) {
         return roleMapper.updateRole(role);
     }
 
     /**
      * 修改数据权限信息
-     * 
+     *
      * @param role 角色信息
      * @return 结果
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int authDataScope(SysRole role)
-    {
+    public int authDataScope(SysRole role) {
         // 修改角色信息
         roleMapper.updateRole(role);
         // 删除角色与部门关联
@@ -299,23 +273,20 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 新增角色菜单信息
-     * 
+     *
      * @param role 角色对象
      */
-    public int insertRoleMenu(SysRole role)
-    {
+    public int insertRoleMenu(SysRole role) {
         int rows = 1;
         // 新增用户与角色管理
         List<SysRoleMenu> list = new ArrayList<SysRoleMenu>();
-        for (Long menuId : role.getMenuIds())
-        {
+        for (Long menuId : role.getMenuIds()) {
             SysRoleMenu rm = new SysRoleMenu();
             rm.setRoleId(role.getId());
             rm.setMenuId(menuId);
             list.add(rm);
         }
-        if (list.size() > 0)
-        {
+        if (list.size() > 0) {
             rows = roleMenuMapper.batchRoleMenu(list);
         }
         return rows;
@@ -326,8 +297,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
      *
      * @param role 角色对象
      */
-    public int insertRoleDept(SysRole role)
-    {
+    public int insertRoleDept(SysRole role) {
         int rows = 1;
 //        // 新增角色与部门(数据权限)管理
 //        List<SysRoleDept> list = new ArrayList<SysRoleDept>();
@@ -347,14 +317,13 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 通过角色ID删除角色
-     * 
+     *
      * @param roleId 角色ID
      * @return 结果
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int deleteRoleById(Long roleId)
-    {
+    public int deleteRoleById(Long roleId) {
         // 删除角色与菜单关联
         roleMenuMapper.deleteRoleMenuByRoleId(roleId);
         // 删除角色与部门关联
@@ -364,21 +333,18 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 批量删除角色信息
-     * 
+     *
      * @param roleIds 需要删除的角色ID
      * @return 结果
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int deleteRoleByIds(Long[] roleIds)
-    {
-        for (Long roleId : roleIds)
-        {
+    public int deleteRoleByIds(Long[] roleIds) {
+        for (Long roleId : roleIds) {
             checkRoleAllowed(new SysRole());
             checkRoleDataScope(roleId);
             SysRole role = selectRoleById(roleId);
-            if (countUserRoleByRoleId(roleId) > 0)
-            {
+            if (countUserRoleByRoleId(roleId) > 0) {
                 throw new ServiceException(String.format("%1$s已分配,不能删除", role.getRoleName()));
             }
         }
@@ -391,43 +357,39 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     /**
      * 取消授权用户角色
-     * 
+     *
      * @param userRole 用户和角色关联信息
      * @return 结果
      */
     @Override
-    public int deleteAuthUser(SysUserRole userRole)
-    {
+    public int deleteAuthUser(SysUserRole userRole) {
         return userRoleMapper.deleteUserRoleInfo(userRole);
     }
 
     /**
      * 批量取消授权用户角色
-     * 
-     * @param roleId 角色ID
+     *
+     * @param roleId  角色ID
      * @param userIds 需要取消授权的用户数据ID
      * @return 结果
      */
     @Override
-    public int deleteAuthUsers(Long roleId, Long[] userIds)
-    {
+    public int deleteAuthUsers(Long roleId, Long[] userIds) {
         return userRoleMapper.deleteUserRoleInfos(roleId, userIds);
     }
 
     /**
      * 批量选择授权用户角色
-     * 
-     * @param roleId 角色ID
+     *
+     * @param roleId  角色ID
      * @param userIds 需要授权的用户数据ID
      * @return 结果
      */
     @Override
-    public int insertAuthUsers(Long roleId, Long[] userIds)
-    {
+    public int insertAuthUsers(Long roleId, Long[] userIds) {
         // 新增用户与角色管理
         List<SysUserRole> list = new ArrayList<SysUserRole>();
-        for (Long userId : userIds)
-        {
+        for (Long userId : userIds) {
             SysUserRole ur = new SysUserRole();
             ur.setUserId(userId);
             ur.setRoleId(roleId);
@@ -435,4 +397,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
         }
         return userRoleMapper.batchUserRole(list);
     }
+
+    @Override
+    public String getRoleName(Long userId) {
+        return roleMapper.getRoleNameByUserId(userId);
+    }
 }

+ 165 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysUserInformationServiceImpl.java

@@ -0,0 +1,165 @@
+package com.xunmei.system.service.impl;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xunmei.common.core.utils.DateUtils;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.common.security.utils.SecurityUtils;
+import com.xunmei.system.api.domain.SysUserInformation;
+import com.xunmei.system.api.model.LoginUser;
+import com.xunmei.system.mapper.SysUserInformationMapper;
+import com.xunmei.system.service.ISysOrgService;
+import com.xunmei.system.service.ISysUserInformationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ *
+ * @author xunmei
+ * @date 2023-08-18
+ */
+@Service
+public class SysUserInformationServiceImpl extends ServiceImpl<SysUserInformationMapper, SysUserInformation> implements ISysUserInformationService {
+    @Autowired
+    private SysUserInformationMapper sysUserInformationMapper;
+    @Autowired
+    private ISysOrgService orgService;
+
+    @Override
+    public TableDataInfo selectPage(SysUserInformation sysUserInformation) {
+
+
+        //未删除
+        sysUserInformation.setDelFlag("0");
+        Page<SysUserInformation> page;
+        //分页
+        if (sysUserInformation.getPageNum() != null && sysUserInformation.getPageSize() != null) {
+            page = new Page<>(sysUserInformation.getPageNum(), sysUserInformation.getPageSize());
+        } else {
+            page = new Page<>();
+        }
+        //查询条件
+        QueryWrapper<SysUserInformation> query = new QueryWrapper<>(sysUserInformation);
+        //下穿
+/*        if (sysUserInformation.getCheckSub()){
+            List<Long> ids = orgService.selectCheckSubOrgIdList(sysUserInformation.getOrgId());
+            //清空前端传递的org_id
+            sysUserInformation.setOrgId(null);
+            //添加in条件
+            query.in("org_id",ids);
+        }*/
+        //时间范围查询
+        if (sysUserInformation.getParams().get("beginTime") != null && sysUserInformation.getParams().get("endTime") != null) {
+            query.between("create_time", sysUserInformation.getParams().get("beginTime"), sysUserInformation.getParams().get("endTime"));
+        }
+        //获取数据
+        page = sysUserInformationMapper.selectPage(page, query);
+        //抓换为TableDataInfo适配前端
+        TableDataInfo tableDataInfo = new TableDataInfo();
+        tableDataInfo.setMsg("操作成功");
+        tableDataInfo.setCode(200);
+        tableDataInfo.setTotal(page.getTotal());
+        tableDataInfo.setRows(page.getRecords());
+        return tableDataInfo;
+
+
+    }
+
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public SysUserInformation selectSysUserInformationById(Long id) {
+        return sysUserInformationMapper.selectById(id);
+    }
+
+    @Override
+    public SysUserInformation getInformationByUserId(Long id) {
+        return sysUserInformationMapper.getInformationByUserId(id);
+    }
+
+    @Override
+    public int extendUser(SysUserInformation sysUserInformation) {
+        SysUserInformation informationByUserId = sysUserInformationMapper.getInformationByUserId(sysUserInformation.getUserId());
+        int i = 0;
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        if (null != informationByUserId) {
+            sysUserInformation.setUpdateTime(DateUtils.getNowDate());
+            sysUserInformation.setUpdateBy(loginUser.getUsername());
+            i = sysUserInformationMapper.updateSysUserInformation(sysUserInformation);
+        } else {
+            sysUserInformation.setCreateTime(DateUtils.getNowDate());
+            sysUserInformation.setUpdateBy(loginUser.getUsername());
+            i = sysUserInformationMapper.insert(sysUserInformation);
+        }
+
+        return i;
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param sysUserInformation 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<SysUserInformation> selectSysUserInformationList(SysUserInformation sysUserInformation) {
+        return sysUserInformationMapper.selectList(new QueryWrapper<>(sysUserInformation));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param sysUserInformation 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertSysUserInformation(SysUserInformation sysUserInformation) {
+        sysUserInformation.setCreateTime(DateUtils.getNowDate());
+        return sysUserInformationMapper.insert(sysUserInformation);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param sysUserInformation 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateSysUserInformation(SysUserInformation sysUserInformation) {
+        sysUserInformation.setUpdateTime(DateUtils.getNowDate());
+        return sysUserInformationMapper.updateById(sysUserInformation);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysUserInformationByIds(Long[] ids) {
+        return sysUserInformationMapper.deleteBatchIds(Arrays.asList((ids)));
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysUserInformationById(Long id) {
+        return sysUserInformationMapper.deleteById(id);
+    }
+}

+ 11 - 2
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -92,8 +92,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<include refid="selectRoleVo"/>
 		 where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
 	</select>
-	
- 	<insert id="insertRole" parameterType="com.xunmei.system.api.domain.SysRole" useGeneratedKeys="true" keyProperty="id">
+	<select id="getRoleNameByUserId" resultType="java.lang.String">
+		SELECT
+			GROUP_CONCAT( sr.role_name ) as roleName
+		FROM
+			sys_role sr
+				LEFT JOIN sys_user_role sur ON sur.role_id = sr.id
+		WHERE
+			sur.user_id =  #{userId}
+	</select>
+
+	<insert id="insertRole" parameterType="com.xunmei.system.api.domain.SysRole" useGeneratedKeys="true" keyProperty="id">
  		insert into sys_role(
  			<if test="id != null and id != 0">id,</if>
  			<if test="roleName != null and roleName != ''">role_name,</if>

+ 280 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserInformationMapper.xml

@@ -0,0 +1,280 @@
+<?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.xunmei.system.mapper.SysUserInformationMapper">
+
+    <resultMap type="com.xunmei.system.api.domain.SysUserInformation" id="SysUserInformationResult">
+                <result property="id" column="id"/>
+                <result property="userId" column="user_id"/>
+                <result property="deptId" column="dept_id"/>
+                <result property="duties" column="duties"/>
+                <result property="workType" column="work_type"/>
+                <result property="isFullTime" column="is_full_time"/>
+                <result property="highestEducation" column="highest_education"/>
+                <result property="educationType" column="education_type"/>
+                <result property="certificateWork" column="certificate_work"/>
+                <result property="professionalQualifications" column="professional_qualifications"/>
+                <result property="certificateFailReason" column="certificate_fail_reason"/>
+                <result property="workTime" column="work_time"/>
+                <result property="entryTime" column="entry_time"/>
+                <result property="bornTime" column="born_time"/>
+                <result property="responsibilitiesLeaderName" column="responsibilities_leader_name"/>
+                <result property="responsibilitiesLeaderDuties" column="responsibilities_leader_duties"/>
+                <result property="qualificationCertificateUrl" column="qualification_certificate_url"/>
+                <result property="createBy" column="create_by"/>
+                <result property="createTime" column="create_time"/>
+                <result property="updateBy" column="update_by"/>
+                <result property="updateTime" column="update_time"/>
+                <result property="delFlag" column="del_flag"/>
+    </resultMap>
+
+    <sql id="selectSysUserInformationVo">
+        select id, user_id, dept_id, duties, work_type, is_full_time, highest_education, education_type, certificate_work, professional_qualifications, certificate_fail_reason, work_time, entry_time, born_time, responsibilities_leader_name, responsibilities_leader_duties, qualification_certificate_url, create_by, create_time, update_by, update_time, del_flag
+        from sys_user_information
+    </sql>
+
+    <select id="selectSysUserInformationList" parameterType="com.xunmei.system.api.domain.SysUserInformation"
+            resultMap="SysUserInformationResult">
+        <include refid="selectSysUserInformationVo"/>
+        <where>
+                        <if test="userId != null ">
+                            and user_id = #{userId}
+                        </if>
+                        <if test="deptId != null ">
+                            and dept_id = #{deptId}
+                        </if>
+                        <if test="duties != null ">
+                            and duties = #{duties}
+                        </if>
+                        <if test="workType != null  and workType != ''">
+                            and work_type = #{workType}
+                        </if>
+                        <if test="isFullTime != null  and isFullTime != ''">
+                            and is_full_time = #{isFullTime}
+                        </if>
+                        <if test="highestEducation != null  and highestEducation != ''">
+                            and highest_education = #{highestEducation}
+                        </if>
+                        <if test="educationType != null  and educationType != ''">
+                            and education_type = #{educationType}
+                        </if>
+                        <if test="certificateWork != null  and certificateWork != ''">
+                            and certificate_work = #{certificateWork}
+                        </if>
+                        <if test="professionalQualifications != null  and professionalQualifications != ''">
+                            and professional_qualifications = #{professionalQualifications}
+                        </if>
+                        <if test="certificateFailReason != null  and certificateFailReason != ''">
+                            and certificate_fail_reason = #{certificateFailReason}
+                        </if>
+                        <if test="workTime != null ">
+                            and work_time = #{workTime}
+                        </if>
+                        <if test="entryTime != null ">
+                            and entry_time = #{entryTime}
+                        </if>
+                        <if test="bornTime != null ">
+                            and born_time = #{bornTime}
+                        </if>
+                        <if test="responsibilitiesLeaderName != null  and responsibilitiesLeaderName != ''">
+                            and responsibilities_leader_name like concat('%', #{responsibilitiesLeaderName}, '%')
+                        </if>
+                        <if test="responsibilitiesLeaderDuties != null  and responsibilitiesLeaderDuties != ''">
+                            and responsibilities_leader_duties = #{responsibilitiesLeaderDuties}
+                        </if>
+                        <if test="qualificationCertificateUrl != null  and qualificationCertificateUrl != ''">
+                            and qualification_certificate_url = #{qualificationCertificateUrl}
+                        </if>
+        </where>
+    </select>
+
+    <select id="selectSysUserInformationById" parameterType="Long"
+            resultMap="SysUserInformationResult">
+            <include refid="selectSysUserInformationVo"/>
+            where id = #{id}
+    </select>
+    <select id="getInformationByUserId" resultType="com.xunmei.system.api.domain.SysUserInformation">
+        <include refid="selectSysUserInformationVo"/>
+        WHERE
+            user_id=#{userId}
+    </select>
+
+    <insert id="insertSysUserInformation" parameterType="com.xunmei.system.api.domain.SysUserInformation">
+        insert into sys_user_information
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                    <if test="id != null">id,
+                    </if>
+                    <if test="userId != null">user_id,
+                    </if>
+                    <if test="deptId != null">dept_id,
+                    </if>
+                    <if test="duties != null">duties,
+                    </if>
+                    <if test="workType != null">work_type,
+                    </if>
+                    <if test="isFullTime != null">is_full_time,
+                    </if>
+                    <if test="highestEducation != null">highest_education,
+                    </if>
+                    <if test="educationType != null">education_type,
+                    </if>
+                    <if test="certificateWork != null">certificate_work,
+                    </if>
+                    <if test="professionalQualifications != null">professional_qualifications,
+                    </if>
+                    <if test="certificateFailReason != null">certificate_fail_reason,
+                    </if>
+                    <if test="workTime != null">work_time,
+                    </if>
+                    <if test="entryTime != null">entry_time,
+                    </if>
+                    <if test="bornTime != null">born_time,
+                    </if>
+                    <if test="responsibilitiesLeaderName != null">responsibilities_leader_name,
+                    </if>
+                    <if test="responsibilitiesLeaderDuties != null">responsibilities_leader_duties,
+                    </if>
+                    <if test="qualificationCertificateUrl != null">qualification_certificate_url,
+                    </if>
+                    <if test="createBy != null">create_by,
+                    </if>
+                    <if test="createTime != null">create_time,
+                    </if>
+                    <if test="updateBy != null">update_by,
+                    </if>
+                    <if test="updateTime != null">update_time,
+                    </if>
+                    <if test="delFlag != null">del_flag,
+                    </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                    <if test="id != null">#{id},
+                    </if>
+                    <if test="userId != null">#{userId},
+                    </if>
+                    <if test="deptId != null">#{deptId},
+                    </if>
+                    <if test="duties != null">#{duties},
+                    </if>
+                    <if test="workType != null">#{workType},
+                    </if>
+                    <if test="isFullTime != null">#{isFullTime},
+                    </if>
+                    <if test="highestEducation != null">#{highestEducation},
+                    </if>
+                    <if test="educationType != null">#{educationType},
+                    </if>
+                    <if test="certificateWork != null">#{certificateWork},
+                    </if>
+                    <if test="professionalQualifications != null">#{professionalQualifications},
+                    </if>
+                    <if test="certificateFailReason != null">#{certificateFailReason},
+                    </if>
+                    <if test="workTime != null">#{workTime},
+                    </if>
+                    <if test="entryTime != null">#{entryTime},
+                    </if>
+                    <if test="bornTime != null">#{bornTime},
+                    </if>
+                    <if test="responsibilitiesLeaderName != null">#{responsibilitiesLeaderName},
+                    </if>
+                    <if test="responsibilitiesLeaderDuties != null">#{responsibilitiesLeaderDuties},
+                    </if>
+                    <if test="qualificationCertificateUrl != null">#{qualificationCertificateUrl},
+                    </if>
+                    <if test="createBy != null">#{createBy},
+                    </if>
+                    <if test="createTime != null">#{createTime},
+                    </if>
+                    <if test="updateBy != null">#{updateBy},
+                    </if>
+                    <if test="updateTime != null">#{updateTime},
+                    </if>
+                    <if test="delFlag != null">#{delFlag},
+                    </if>
+        </trim>
+    </insert>
+
+    <update id="updateSysUserInformation" parameterType="com.xunmei.system.api.domain.SysUserInformation">
+        update sys_user_information
+        <trim prefix="SET" suffixOverrides=",">
+                    <if test="userId != null">user_id =
+                        #{userId},
+                    </if>
+                    <if test="deptId != null">dept_id =
+                        #{deptId},
+                    </if>
+                    <if test="duties != null">duties =
+                        #{duties},
+                    </if>
+                    <if test="workType != null">work_type =
+                        #{workType},
+                    </if>
+                    <if test="isFullTime != null">is_full_time =
+                        #{isFullTime},
+                    </if>
+                    <if test="highestEducation != null">highest_education =
+                        #{highestEducation},
+                    </if>
+                    <if test="educationType != null">education_type =
+                        #{educationType},
+                    </if>
+                    <if test="certificateWork != null">certificate_work =
+                        #{certificateWork},
+                    </if>
+                    <if test="professionalQualifications != null">professional_qualifications =
+                        #{professionalQualifications},
+                    </if>
+                    <if test="certificateFailReason != null">certificate_fail_reason =
+                        #{certificateFailReason},
+                    </if>
+                    <if test="workTime != null">work_time =
+                        #{workTime},
+                    </if>
+                    <if test="entryTime != null">entry_time =
+                        #{entryTime},
+                    </if>
+                    <if test="bornTime != null">born_time =
+                        #{bornTime},
+                    </if>
+                    <if test="responsibilitiesLeaderName != null">responsibilities_leader_name =
+                        #{responsibilitiesLeaderName},
+                    </if>
+                    <if test="responsibilitiesLeaderDuties != null">responsibilities_leader_duties =
+                        #{responsibilitiesLeaderDuties},
+                    </if>
+                    <if test="qualificationCertificateUrl != null">qualification_certificate_url =
+                        #{qualificationCertificateUrl},
+                    </if>
+                    <if test="createBy != null">create_by =
+                        #{createBy},
+                    </if>
+                    <if test="createTime != null">create_time =
+                        #{createTime},
+                    </if>
+                    <if test="updateBy != null">update_by =
+                        #{updateBy},
+                    </if>
+                    <if test="updateTime != null">update_time =
+                        #{updateTime},
+                    </if>
+                    <if test="delFlag != null">del_flag =
+                        #{delFlag},
+                    </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysUserInformationById" parameterType="Long">
+        delete
+        from sys_user_information where id = #{id}
+    </delete>
+
+    <delete id="deleteSysUserInformationByIds" parameterType="String">
+        delete from sys_user_information where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 3 - 2
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserRoleMapper.xml

@@ -16,8 +16,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<select id="countUserRoleByRoleId" resultType="Integer">
 	    select count(1) from sys_user_role where role_id=#{roleId}  
 	</select>
-	
-	<delete id="deleteUserRole" parameterType="Long">
+
+
+    <delete id="deleteUserRole" parameterType="Long">
  		delete from sys_user_role where user_id in
  		<foreach collection="array" item="userId" open="(" separator="," close=")">
  			#{userId}