From a778197694ddc210c2a16fae51b32b730b4edb65 Mon Sep 17 00:00:00 2001 From: lvleigang <957075182@qq.com> Date: Fri, 20 Sep 2024 15:50:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=82=E9=85=8D=E9=92=89?= =?UTF-8?q?=E9=92=89=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-llg.yml | 6 ++- .../sysnew/login/impl/LoginServiceImpl.java | 10 ++++- .../webapp/web/corsconfig/CorsConfig.java | 24 +++++++++++ pom.xml | 40 ++++++++++++++----- 4 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 base-webapp/src/main/java/com/hzya/frame/webapp/web/corsconfig/CorsConfig.java diff --git a/base-buildpackage/src/main/resources/application-llg.yml b/base-buildpackage/src/main/resources/application-llg.yml index 5953ca0d..d3a1ebfd 100644 --- a/base-buildpackage/src/main/resources/application-llg.yml +++ b/base-buildpackage/src/main/resources/application-llg.yml @@ -45,7 +45,7 @@ savefile: tomcatpath: /Users/apple/Desktop/log/local pluginpath: /Users/apple/Desktop/log/local zt: - url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface + url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface cbs8: appId: 1P4AGrpz appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a @@ -59,4 +59,6 @@ cbs8: #电子回单下载临时存放位置 elec_path: /Users/xiangerlin/Downloads/ OA: - data_source_code: yc_oa \ No newline at end of file + data_source_code: yc_oa +server: + port: 10086 \ No newline at end of file diff --git a/base-service/src/main/java/com/hzya/frame/sysnew/login/impl/LoginServiceImpl.java b/base-service/src/main/java/com/hzya/frame/sysnew/login/impl/LoginServiceImpl.java index 80a7fc3a..d5883b07 100644 --- a/base-service/src/main/java/com/hzya/frame/sysnew/login/impl/LoginServiceImpl.java +++ b/base-service/src/main/java/com/hzya/frame/sysnew/login/impl/LoginServiceImpl.java @@ -85,7 +85,10 @@ public class LoginServiceImpl implements ILoginService { return BaseResult.getFailureMessageEntity("请输入用户名或密码"); } 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())) { return BaseResult.getFailureMessageEntity("用户名或密码错误"); } @@ -169,6 +172,11 @@ public class LoginServiceImpl implements ILoginService { public JsonResultEntity appDoLogin(JSONObject jsonObject) { //移动端类型 JSONObject entity = getData("jsonStr", jsonObject, JSONObject.class); + logger.error(entity.toString()); + //boolean f = true; + //if(f){ + // return BaseResult.getFailureMessageEntity("cuowu",entity); + //} //DD,weChat String appType = entity.getString("appType"); String appId = entity.getString("appId"); diff --git a/base-webapp/src/main/java/com/hzya/frame/webapp/web/corsconfig/CorsConfig.java b/base-webapp/src/main/java/com/hzya/frame/webapp/web/corsconfig/CorsConfig.java new file mode 100644 index 00000000..45ea4e9f --- /dev/null +++ b/base-webapp/src/main/java/com/hzya/frame/webapp/web/corsconfig/CorsConfig.java @@ -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); + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index fc53bd54..1e7fa67d 100644 --- a/pom.xml +++ b/pom.xml @@ -7,17 +7,17 @@ base-common base-webapp base-core - - - - - - - - - - - + fw-bip + fw-cbs + fw-dd + fw-grpU8 + fw-nc + fw-ncc + fw-ningbobank + fw-oa + fw-u8 + fw-u8c + fw-u9c com.hzya.frame kangarooDataCenterV3 @@ -464,6 +464,24 @@ **/*.jar + + ${basedir}/../fw-bip/src/main/webapp/WEB-INF/lib + WEB-INF/lib/ + false + + + **/*.jar + + + + ${basedir}/../fw-ningbobank/src/main/webapp/WEB-INF/lib + WEB-INF/lib/ + false + + + **/*.jar + +