|
|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.zdxt.auth.project.system.dept.service; |
|
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.zdxt.auth.common.constant.UserConstants; |
|
|
|
@ -30,6 +31,7 @@ import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
import java.security.MessageDigest; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
@ -229,7 +231,7 @@ public class DeptServiceImpl implements IDeptService |
|
|
|
public boolean checkDeptExistUser(String deptId) |
|
|
|
{ |
|
|
|
int result = deptMapper.checkDeptExistUser(deptId); |
|
|
|
return result > 0 ? true : false; |
|
|
|
return result > 0; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -261,6 +263,8 @@ public class DeptServiceImpl implements IDeptService |
|
|
|
} |
|
|
|
dept.setCreateBy(ShiroUtils.getLoginName()); |
|
|
|
dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); |
|
|
|
//默认部门ID
|
|
|
|
dept.setDeptId(IdUtil.simpleUUID()); |
|
|
|
return deptMapper.insertDept(dept); |
|
|
|
} |
|
|
|
|
|
|
|
@ -552,7 +556,7 @@ public class DeptServiceImpl implements IDeptService |
|
|
|
String encodeStr = ""; |
|
|
|
try { |
|
|
|
messageDigest = MessageDigest.getInstance("SHA-256"); |
|
|
|
messageDigest.update(str.getBytes("UTF-8")); |
|
|
|
messageDigest.update(str.getBytes(StandardCharsets.UTF_8)); |
|
|
|
encodeStr = byte2Hex(messageDigest.digest()); |
|
|
|
} catch (Exception e) { |
|
|
|
throw e; |
|
|
|
|