small 2 лет назад
Родитель
Сommit
7c37c29316

+ 1 - 1
sckw-auth/src/main/java/com/sckw/auth/service/impl/AuthServiceImpl.java

@@ -115,7 +115,7 @@ public class AuthServiceImpl implements IAuthService {
                 afterProcessor(loginResVo);
                 afterProcessor(loginResVo);
                 return loginResVo;
                 return loginResVo;
             }
             }
-            entInfoResVo.setValid(entCheckTrackResDtoList.stream().anyMatch(item -> item.getStatus() == Global.YES));
+            entInfoResVo.setValid(entCheckTrackResDtoList.stream().anyMatch(item -> item.getStatus() == Global.NO));
         }
         }
 
 
         /*5、生成token,一些信息存redis*/
         /*5、生成token,一些信息存redis*/

+ 1 - 1
sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/LoginFilter.java

@@ -139,7 +139,7 @@ public class LoginFilter implements Filter {
 
 
         //企业资料审批状态校验
         //企业资料审批状态校验
         LoginEntInfo loginEntInfo = JSON.parseObject(enterpriseInfo, LoginEntInfo.class);
         LoginEntInfo loginEntInfo = JSON.parseObject(enterpriseInfo, LoginEntInfo.class);
-        if (loginEntInfo.getValid()) {
+        if (!loginEntInfo.getValid()) {
             LoginUserHolder.remove();
             LoginUserHolder.remove();
             throw new SystemException(HttpStatus.AUTHORITY_NO_CODE, HttpStatus.ACCESS_FIAL);
             throw new SystemException(HttpStatus.AUTHORITY_NO_CODE, HttpStatus.ACCESS_FIAL);
         }
         }

+ 1 - 1
sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/PasswordUtils.java

@@ -115,7 +115,7 @@ public class PasswordUtils {
     public static void main(String[] args) {
     public static void main(String[] args) {
 
 
         String password = PasswordUtils.entryptPassword(PasswordUtils.md5("18482106067"));
         String password = PasswordUtils.entryptPassword(PasswordUtils.md5("18482106067"));
-        String md5 = PasswordUtils.md5("123456");
+        String md5 = PasswordUtils.md5("18422222222");
         System.out.println(password);
         System.out.println(password);
         System.out.println(md5);
         System.out.println(md5);
         System.out.println(validatePassword(md5, password));
         System.out.println(validatePassword(md5, password));

+ 4 - 2
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsDeptService.java

@@ -45,17 +45,19 @@ public class KwsDeptService {
      * @return
      * @return
      */
      */
     public void add(KwsDept params) {
     public void add(KwsDept params) {
+        Long deptId = new IdWorker(1).nextId();
         if (StringUtils.isNotBlank(params.getParentId())) {
         if (StringUtils.isNotBlank(params.getParentId())) {
             KwsDept kwsDept = kwsDeptDao.selectByKey(params.getParentId());
             KwsDept kwsDept = kwsDeptDao.selectByKey(params.getParentId());
             if (kwsDept != null) {
             if (kwsDept != null) {
-                params.setParentIds(kwsDept.getParentIds() + Global.COMMA + params.getId());
+                params.setParentIds(kwsDept.getParentIds() + Global.COMMA + deptId);
                 params.setLevel(kwsDept.getLevel() != null ? kwsDept.getLevel() + 1 : 1);
                 params.setLevel(kwsDept.getLevel() != null ? kwsDept.getLevel() + 1 : 1);
             }
             }
         } else {
         } else {
             params.setParentId(Long.parseLong(Global.PID));
             params.setParentId(Long.parseLong(Global.PID));
-            params.setParentIds(Global.PID);
+            params.setParentIds(String.valueOf(deptId));
         }
         }
 
 
+        params.setId(deptId);
         if (kwsDeptDao.insert(params) <= 0) {
         if (kwsDeptDao.insert(params) <= 0) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
         }
         }

+ 1 - 1
sckw-modules/sckw-system/src/main/resources/mapper/KwsEntCertificateDao.xml

@@ -35,7 +35,7 @@
   </select>
   </select>
 
 
   <select id="findByEntType" resultType="com.sckw.system.model.KwsEntCertificate">
   <select id="findByEntType" resultType="com.sckw.system.model.KwsEntCertificate">
-    select a.* from kws_ent_certificate a where a.ent_id = #{id} and a.type = #{type} and a.del_flag = 0 and a.status = 0
+    select a.* from kws_ent_certificate a where a.ent_id = #{entId} and a.type = #{type} and a.del_flag = 0 and a.status = 0
   </select>
   </select>
 
 
   <insert id="insert" parameterType="com.sckw.system.model.KwsEntCertificate">
   <insert id="insert" parameterType="com.sckw.system.model.KwsEntCertificate">