修改适配钉钉单点登录

This commit is contained in:
lvleigang 2024-09-20 15:50:29 +08:00
parent 61b0cdfaee
commit a778197694
4 changed files with 66 additions and 14 deletions

View File

@ -45,7 +45,7 @@ savefile:
tomcatpath: /Users/apple/Desktop/log/local tomcatpath: /Users/apple/Desktop/log/local
pluginpath: /Users/apple/Desktop/log/local pluginpath: /Users/apple/Desktop/log/local
zt: zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
cbs8: cbs8:
appId: 1P4AGrpz appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
@ -60,3 +60,5 @@ cbs8:
elec_path: /Users/xiangerlin/Downloads/ elec_path: /Users/xiangerlin/Downloads/
OA: OA:
data_source_code: yc_oa data_source_code: yc_oa
server:
port: 10086

View File

@ -85,7 +85,10 @@ public class LoginServiceImpl implements ILoginService {
return BaseResult.getFailureMessageEntity("请输入用户名或密码"); return BaseResult.getFailureMessageEntity("请输入用户名或密码");
} }
entity.setPassword(AESUtil.encrypt(entity.getLoginCode() + "-" + entity.getPassword())); entity.setPassword(AESUtil.encrypt(entity.getLoginCode() + "-" + entity.getPassword()));
SysUserEntity sysUserEntity = sysUserDao.queryOne(entity); SysUserEntity sysUserEntity = new SysUserEntity();
sysUserEntity.setLoginCode(entity.getLoginCode());
sysUserEntity.setPassword(entity.getPassword());
sysUserEntity = sysUserDao.queryOne(sysUserEntity);
if (sysUserEntity == null || sysUserEntity.getId() == null || "".equals(sysUserEntity.getId())) { if (sysUserEntity == null || sysUserEntity.getId() == null || "".equals(sysUserEntity.getId())) {
return BaseResult.getFailureMessageEntity("用户名或密码错误"); return BaseResult.getFailureMessageEntity("用户名或密码错误");
} }
@ -169,6 +172,11 @@ public class LoginServiceImpl implements ILoginService {
public JsonResultEntity appDoLogin(JSONObject jsonObject) { public JsonResultEntity appDoLogin(JSONObject jsonObject) {
//移动端类型 //移动端类型
JSONObject entity = getData("jsonStr", jsonObject, JSONObject.class); JSONObject entity = getData("jsonStr", jsonObject, JSONObject.class);
logger.error(entity.toString());
//boolean f = true;
//if(f){
// return BaseResult.getFailureMessageEntity("cuowu",entity);
//}
//DD,weChat //DD,weChat
String appType = entity.getString("appType"); String appType = entity.getString("appType");
String appId = entity.getString("appId"); String appId = entity.getString("appId");

View File

@ -0,0 +1,24 @@
package com.hzya.frame.webapp.web.corsconfig;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
* @version 1.0
* @content
* @date 2024-09-14 17:10
*/
@Configuration
public class CorsConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("GET", "POST", "PUT", "DELETE")
.allowedHeaders("*")
.allowCredentials(false);
}
}

40
pom.xml
View File

@ -7,17 +7,17 @@
<module>base-common</module> <module>base-common</module>
<module>base-webapp</module> <module>base-webapp</module>
<module>base-core</module> <module>base-core</module>
<!-- <module>fw-bip</module>--> <module>fw-bip</module>
<!-- <module>fw-cbs</module>--> <module>fw-cbs</module>
<!-- <module>fw-dd</module>--> <module>fw-dd</module>
<!-- <module>fw-grpU8</module>--> <module>fw-grpU8</module>
<!-- <module>fw-nc</module>--> <module>fw-nc</module>
<!-- <module>fw-ncc</module>--> <module>fw-ncc</module>
<!-- <module>fw-ningbobank</module>--> <module>fw-ningbobank</module>
<!-- <module>fw-oa</module>--> <module>fw-oa</module>
<!-- <module>fw-u8</module>--> <module>fw-u8</module>
<!-- <module>fw-u8c</module>--> <module>fw-u8c</module>
<!-- <module>fw-u9c</module>--> <module>fw-u9c</module>
</modules> </modules>
<groupId>com.hzya.frame</groupId> <groupId>com.hzya.frame</groupId>
<artifactId>kangarooDataCenterV3</artifactId> <artifactId>kangarooDataCenterV3</artifactId>
@ -464,6 +464,24 @@
<include>**/*.jar</include> <include>**/*.jar</include>
</includes> </includes>
</resource> </resource>
<resource>
<directory>${basedir}/../fw-bip/src/main/webapp/WEB-INF/lib</directory>
<targetPath>WEB-INF/lib/</targetPath>
<filtering>false</filtering>
<includes>
<!-- 匹配所有jar包 -->
<include>**/*.jar</include>
</includes>
</resource>
<resource>
<directory>${basedir}/../fw-ningbobank/src/main/webapp/WEB-INF/lib</directory>
<targetPath>WEB-INF/lib/</targetPath>
<filtering>false</filtering>
<includes>
<!-- 匹配所有jar包 -->
<include>**/*.jar</include>
</includes>
</resource>
</webResources> </webResources>
</configuration> </configuration>
</plugin> </plugin>