lyhzzz 1 개월 전
부모
커밋
1bac346f84
2개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 0
      pom.xml
  2. 7 1
      src/main/java/com/fdkankan/fusion/service/impl/TmUserServiceImpl.java

+ 6 - 0
pom.xml

@@ -20,6 +20,12 @@
 
         <dependency>
             <groupId>com.fdkankan</groupId>
+            <artifactId>4dkankan-utils-sign</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fdkankan</groupId>
             <artifactId>4dkankan-utils-redis</artifactId>
             <version>3.0.0-SNAPSHOT</version>
         </dependency>

+ 7 - 1
src/main/java/com/fdkankan/fusion/service/impl/TmUserServiceImpl.java

@@ -25,6 +25,7 @@ import com.fdkankan.fusion.response.UserAddRequest;
 import com.fdkankan.fusion.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.redis.util.RedisUtil;
+import com.fdkankan.sign.AesUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -128,7 +129,12 @@ public class TmUserServiceImpl extends ServiceImpl<ITmUserMapper, TmUser> implem
         if(tmDepartment == null){
             throw new BusinessException(ResultCode.NOT_DEPT);
         }
-        FdkkLoginRequest request = new FdkkLoginRequest(param.getUserName(),param.getPassword(),param.getPassword());
+        FdkkLoginRequest request = null;
+        try {
+            request = new FdkkLoginRequest(param.getUserName(), AesUtil.encrypt(param.getPassword()),AesUtil.encrypt(param.getPassword()));
+        } catch (Exception e) {
+            throw new BusinessException(ResultCode.PASSWORD_ERROR);
+        }
         FdkkResponse fdkkResponse = fdKKClient.fdkkRegister(request);
         if(fdkkResponse.getCode() == 0 ){
             this.addNewUser(param,role);