Commit 3af55e8d by 吴迪

【修改】修改个人中心bug

parent 7a5a4c30
...@@ -50,7 +50,7 @@ public class LogLoginController { ...@@ -50,7 +50,7 @@ public class LogLoginController {
if(!captcha){ if(!captcha){
return R.error("验证码不正确"); return R.error("验证码不正确");
} }
return R.ok().put("data",logLoginService.login(params,request,response)); return R.ok().put("data",logLoginService.loginNew(params,request,response));
} }
/** /**
...@@ -64,7 +64,6 @@ public class LogLoginController { ...@@ -64,7 +64,6 @@ public class LogLoginController {
return R.ok().put("page", page); return R.ok().put("page", page);
} }
/** /**
* 信息 * 信息
*/ */
......
package io.office.modules.manage.controller; package io.office.modules.manage.controller;
import java.lang.reflect.InvocationTargetException; import cn.hutool.json.JSONUtil;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
import io.office.modules.manage.dao.MemberDao; import io.office.modules.manage.dao.MemberDao;
import io.office.modules.manage.dao.TycpdmFirmDao; import io.office.modules.manage.dao.TycpdmFirmDao;
import io.office.modules.manage.entity.FirmEntity; import io.office.modules.manage.entity.FirmEntity;
import io.office.modules.manage.entity.MemberEntity; import io.office.modules.manage.entity.MemberEntity;
import io.office.modules.manage.entity.TycpdmFirmEntity;
import io.office.modules.manage.service.TycpdmFirmChangeService; import io.office.modules.manage.service.TycpdmFirmChangeService;
import io.office.modules.manage.service.TycpdmFirmService;
import io.office.modules.manage.utils.DESUtils; import io.office.modules.manage.utils.DESUtils;
import io.office.modules.manage.utils.MD5Util; import io.office.modules.manage.utils.MD5Util;
import io.office.modules.sys.controller.AbstractController; import io.office.modules.sys.controller.AbstractController;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.TycpdmFirmEntity;
import io.office.modules.manage.service.TycpdmFirmService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/** /**
...@@ -38,6 +37,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -38,6 +37,7 @@ import javax.servlet.http.HttpServletResponse;
* @email * @email
* @date 2021-12-11 15:15:19 * @date 2021-12-11 15:15:19
*/ */
@Slf4j
@RestController @RestController
@RequestMapping("/tycpdmfirm") @RequestMapping("/tycpdmfirm")
public class TycpdmFirmController extends AbstractController { public class TycpdmFirmController extends AbstractController {
...@@ -291,7 +291,9 @@ public class TycpdmFirmController extends AbstractController { ...@@ -291,7 +291,9 @@ public class TycpdmFirmController extends AbstractController {
memberEntity = memberDao.selectById(Long.valueOf(id + "")); memberEntity = memberDao.selectById(Long.valueOf(id + ""));
} }
String url = tycpdmFirmService.redirectGDSURL(memberEntity, params); String url = tycpdmFirmService.redirectGDSURL(memberEntity, params);
try { try {
response.sendRedirect(url);
return R.ok().put("data", url); return R.ok().put("data", url);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -322,6 +324,7 @@ public class TycpdmFirmController extends AbstractController { ...@@ -322,6 +324,7 @@ public class TycpdmFirmController extends AbstractController {
*/ */
@RequestMapping("/authApi/redirectBusinessHall") @RequestMapping("/authApi/redirectBusinessHall")
public R redirectBusinessHall(String id, String userType, HttpServletResponse response) { public R redirectBusinessHall(String id, String userType, HttpServletResponse response) {
//由于member表中没有手机用户的信息 通过memberDao获取 //由于member表中没有手机用户的信息 通过memberDao获取
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("id", id); params.put("id", id);
...@@ -330,16 +333,13 @@ public class TycpdmFirmController extends AbstractController { ...@@ -330,16 +333,13 @@ public class TycpdmFirmController extends AbstractController {
if (memberEntity==null){ if (memberEntity==null){
memberEntity=new MemberEntity(); memberEntity=new MemberEntity();
}*/ }*/
try {
MemberEntity memberEntity = getMemberUser();
String url = tycpdmFirmService.redirectBusinessHall(params, memberEntity);
//response.sendRedirect(url); MemberEntity memberEntity = getMemberUser();
return R.ok().put("data", url); log.info(JSONUtil.toJsonStr(memberEntity));
} catch (Exception e) {
e.printStackTrace(); String url = tycpdmFirmService.redirectBusinessHall(params, memberEntity);
return R.error("服务器繁忙!"); return R.ok().put("data", url);
}
} }
......
...@@ -35,7 +35,7 @@ public class UserFunctionBindingController extends AbstractController { ...@@ -35,7 +35,7 @@ public class UserFunctionBindingController extends AbstractController {
*/ */
@RequestMapping("/authApi/find") @RequestMapping("/authApi/find")
public R find(){ public R find(){
Integer id=getUserId().intValue(); Integer id=getMemberUserId().intValue();
if(id==null){ if(id==null){
return R.error("用户信息有误"); return R.error("用户信息有误");
} }
...@@ -48,7 +48,7 @@ public class UserFunctionBindingController extends AbstractController { ...@@ -48,7 +48,7 @@ public class UserFunctionBindingController extends AbstractController {
@RequestMapping("/authApi/update") @RequestMapping("/authApi/update")
// @RequiresPermissions("manage:userfunctionbinding:update") // @RequiresPermissions("manage:userfunctionbinding:update")
public R update(@RequestBody Integer[] functionids){ public R update(@RequestBody Integer[] functionids){
Integer id=getUserId().intValue(); Integer id=getMemberUserId().intValue();
if(id==null){ if(id==null){
return R.error("用户信息有误"); return R.error("用户信息有误");
} }
...@@ -64,7 +64,7 @@ public class UserFunctionBindingController extends AbstractController { ...@@ -64,7 +64,7 @@ public class UserFunctionBindingController extends AbstractController {
//遍历插入数据 //遍历插入数据
for (int functionid : functionids) { for (int functionid : functionids) {
UserFunctionBindingEntity ufb=new UserFunctionBindingEntity(); UserFunctionBindingEntity ufb=new UserFunctionBindingEntity();
ufb.setUserId(getUserId().intValue()); ufb.setUserId(getMemberUserId().intValue());
ufb.setFuncId(functionid); ufb.setFuncId(functionid);
userFunctionBindingService.save(ufb); userFunctionBindingService.save(ufb);
} }
......
...@@ -23,5 +23,15 @@ public interface LogLoginService extends IService<LogLoginEntity> { ...@@ -23,5 +23,15 @@ public interface LogLoginService extends IService<LogLoginEntity> {
PageUtils queryPage(Map<String, Object> params); PageUtils queryPage(Map<String, Object> params);
JSONObject login(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response); JSONObject login(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response);
/**
* 官网登录
* @param params
* @param request
* @param response
* @return
*/
JSONObject loginNew(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response);
} }
...@@ -51,10 +51,15 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> { ...@@ -51,10 +51,15 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> {
String redirectGDSURL(MemberEntity memberUser,Map<String, Object> params); String redirectGDSURL(MemberEntity memberUser,Map<String, Object> params);
String redirectGDSURLNew(Map<String, Object> params);
String redirectGDSGLN(MemberEntity memberUser); String redirectGDSGLN(MemberEntity memberUser);
String redirectBusinessHall(Map map,MemberEntity memberUser); String redirectBusinessHall(Map map,MemberEntity memberUser);
String redirectBusinessHallNew(Map map,MemberEntity memberUser,HttpServletResponse response);
String returnFileUrl(Map name); String returnFileUrl(Map name);
FirmEntity findFirmInfoXT(String carno); FirmEntity findFirmInfoXT(String carno);
......
...@@ -2,7 +2,7 @@ package io.office.modules.manage.utils; ...@@ -2,7 +2,7 @@ package io.office.modules.manage.utils;
import io.office.modules.manage.webservice.PartyDataLine; import io.office.modules.manage.webservice.PartyDataLine;
import io.office.modules.manage.webservice.WebServiceXmlTemplate; import io.office.modules.manage.webservice.WebServiceXmlTemplate;
import org.jdom.Document; import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
...@@ -16,16 +16,16 @@ import java.io.Reader; ...@@ -16,16 +16,16 @@ import java.io.Reader;
import java.io.StringReader; import java.io.StringReader;
/** /**
*
* 
 @description: * 
 @description:
* *
* @author wudi * @author wudi
* @date 10:37 2021/11/21 * @date 10:37 2021/11/21
*/ */
@Slf4j
public class GLNSearchUtils { public class GLNSearchUtils {
public static PartyDataLine getGLNResult(String cascade,String requestedKeyCode,String requestedKeyValue,String requestedLanguage) { public static PartyDataLine getGLNResult(String cascade, String requestedKeyCode, String requestedKeyValue, String requestedLanguage) {
String smsTemplateXml = WebServiceXmlTemplate.SEND_MESSAGE_TEMPLATE.replaceAll("\\$\\{cascade\\}", cascade).replaceAll("\\$\\{requestedKeyCode\\}", requestedKeyCode) String smsTemplateXml = WebServiceXmlTemplate.SEND_MESSAGE_TEMPLATE.replaceAll("\\$\\{cascade\\}", cascade).replaceAll("\\$\\{requestedKeyCode\\}", requestedKeyCode)
.replaceAll("\\$\\{requestedKeyValue\\}", requestedKeyValue).replaceAll("\\$\\{requestedLanguage\\}", requestedLanguage); .replaceAll("\\$\\{requestedKeyValue\\}", requestedKeyValue).replaceAll("\\$\\{requestedLanguage\\}", requestedLanguage);
String url = "http://webservice.anccnet.com:8080/gepir4/gepirv4.asmx"; String url = "http://webservice.anccnet.com:8080/gepir4/gepirv4.asmx";
...@@ -35,14 +35,14 @@ public class GLNSearchUtils { ...@@ -35,14 +35,14 @@ public class GLNSearchUtils {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "text/xml; charset=utf-8"); headers.set("Content-Type", "text/xml; charset=utf-8");
HttpEntity<String> entity = new HttpEntity<>(smsTemplateXml, headers); HttpEntity<String> entity = new HttpEntity<>(smsTemplateXml, headers);
System.out.println(smsTemplateXml); log.info(smsTemplateXml);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, entity, String.class); ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, entity, String.class);
if (responseEntity.getStatusCode().value() == 200) { if (responseEntity.getStatusCode().value() == 200) {
System.out.println(responseEntity.getBody()); log.info(responseEntity.getBody());
// 下面的是通过解析xml字符串的 // 下面的是通过解析xml字符串的
String returnObjs = responseEntity.getBody().substring(responseEntity.getBody().indexOf("<partyDataLine>"), responseEntity.getBody().indexOf("</gepirParty>")).replaceAll("<partyName />","");//注意 获取根节点的时候要查看返回的xml参数的形式是否为一个根节点 String returnObjs = responseEntity.getBody().substring(responseEntity.getBody().indexOf("<partyDataLine>"), responseEntity.getBody().indexOf("</gepirParty>")).replaceAll("<partyName />", "");//注意 获取根节点的时候要查看返回的xml参数的形式是否为一个根节点
System.out.println(returnObjs); log.info(returnObjs);
PartyDataLine xmlObject = null; PartyDataLine xmlObject = null;
Reader reader = null; Reader reader = null;
//利用JAXBContext将类转为一个实例 //利用JAXBContext将类转为一个实例
...@@ -66,7 +66,7 @@ public class GLNSearchUtils { ...@@ -66,7 +66,7 @@ public class GLNSearchUtils {
} }
public static PartyDataLine getGTINResult(String cascade,String requestedKeyCode,String requestedKeyValue,String requestedLanguage) { public static PartyDataLine getGTINResult(String cascade, String requestedKeyCode, String requestedKeyValue, String requestedLanguage) {
String smsTemplateXml = WebServiceXmlTemplate.SEND_MESSAGE_GTIN_TEMPLATE.replaceAll("\\$\\{cascade\\}", cascade).replaceAll("\\$\\{requestedKeyCode\\}", requestedKeyCode) String smsTemplateXml = WebServiceXmlTemplate.SEND_MESSAGE_GTIN_TEMPLATE.replaceAll("\\$\\{cascade\\}", cascade).replaceAll("\\$\\{requestedKeyCode\\}", requestedKeyCode)
.replaceAll("\\$\\{requestedKeyValue\\}", requestedKeyValue).replaceAll("\\$\\{requestedLanguage\\}", requestedLanguage); .replaceAll("\\$\\{requestedKeyValue\\}", requestedKeyValue).replaceAll("\\$\\{requestedLanguage\\}", requestedLanguage);
String url = "http://webservice.anccnet.com:8080/gepir4/gepirv4.asmx"; String url = "http://webservice.anccnet.com:8080/gepir4/gepirv4.asmx";
...@@ -76,14 +76,14 @@ public class GLNSearchUtils { ...@@ -76,14 +76,14 @@ public class GLNSearchUtils {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "text/xml; charset=utf-8"); headers.set("Content-Type", "text/xml; charset=utf-8");
HttpEntity<String> entity = new HttpEntity<>(smsTemplateXml, headers); HttpEntity<String> entity = new HttpEntity<>(smsTemplateXml, headers);
System.out.println(smsTemplateXml); log.info(smsTemplateXml);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, entity, String.class); ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, entity, String.class);
if (responseEntity.getStatusCode().value() == 200) { if (responseEntity.getStatusCode().value() == 200) {
System.out.println(responseEntity.getBody()); log.info(responseEntity.getBody());
// 下面的是通过解析xml字符串的 // 下面的是通过解析xml字符串的
String returnObjs = responseEntity.getBody().substring(responseEntity.getBody().indexOf("<partyDataLine>"), responseEntity.getBody().indexOf("</gepirParty>")).replaceAll("<partyName />","");//注意 获取根节点的时候要查看返回的xml参数的形式是否为一个根节点 String returnObjs = responseEntity.getBody().substring(responseEntity.getBody().indexOf("<partyDataLine>"), responseEntity.getBody().indexOf("</gepirParty>")).replaceAll("<partyName />", "");//注意 获取根节点的时候要查看返回的xml参数的形式是否为一个根节点
System.out.println(returnObjs); log.info(returnObjs);
PartyDataLine xmlObject = null; PartyDataLine xmlObject = null;
Reader reader = null; Reader reader = null;
//利用JAXBContext将类转为一个实例 //利用JAXBContext将类转为一个实例
......
...@@ -87,7 +87,7 @@ searchLimitSwitch: 0 ...@@ -87,7 +87,7 @@ searchLimitSwitch: 0
#是否开启每次查询次数限制 1 打开 0关闭 #是否开启每次查询次数限制 1 打开 0关闭
searchDayLimitSwitch: 0 searchDayLimitSwitch: 0
#查询次数限制上限 #查询次数限制上限
searchDayCountLimitSwitch: 10 searchDayCountLimitSwitch: 100
#域名 #域名
#域名 #域名
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>debug</level> <level>debug</level>
</filter> </filter>
<encoder> <encoder>
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> <Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<!-- 设置字符集 --> <!-- 设置字符集 -->
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
<file>${log.path}/debug.log</file> <file>${log.path}/debug.log</file>
<!--日志文档输出格式--> <!--日志文档输出格式-->
<encoder> <encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - [%file:%line] - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 设置字符集 --> <charset>UTF-8</charset> <!-- 设置字符集 -->
</encoder> </encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
...@@ -64,7 +65,7 @@ ...@@ -64,7 +65,7 @@
<file>${log.path}/info.log</file> <file>${log.path}/info.log</file>
<!--日志文档输出格式--> <!--日志文档输出格式-->
<encoder> <encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - [%file:%line] - %msg%n</pattern>
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
...@@ -91,7 +92,7 @@ ...@@ -91,7 +92,7 @@
<file>${log.path}/warn.log</file> <file>${log.path}/warn.log</file>
<!--日志文档输出格式--> <!--日志文档输出格式-->
<encoder> <encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - [%file:%line] - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 --> <charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder> </encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
...@@ -117,7 +118,7 @@ ...@@ -117,7 +118,7 @@
<file>${log.path}/error.log</file> <file>${log.path}/error.log</file>
<!--日志文档输出格式--> <!--日志文档输出格式-->
<encoder> <encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - [%file:%line] - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 --> <charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder> </encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
...@@ -143,7 +144,7 @@ ...@@ -143,7 +144,7 @@
<file>${log.path}/all.log</file> <file>${log.path}/all.log</file>
<!--日志文档输出格式--> <!--日志文档输出格式-->
<encoder> <encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - [%file:%line] - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 --> <charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder> </encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
...@@ -207,7 +208,7 @@ ...@@ -207,7 +208,7 @@
<appender-ref ref="ERROR_FILE" /> <appender-ref ref="ERROR_FILE" />
<appender-ref ref="ALL_FILE" /> <appender-ref ref="ALL_FILE" />
</root> </root>
<logger name="io.office.modules.manage.dao" level="debug"/> <!-- 开发环境, 指定某包日志为debug级 --> <logger name="io.office.modules" level="debug"/> <!-- 开发环境, 指定某包日志为debug级 -->
</springProfile> </springProfile>
<springProfile name="jenkins"> <springProfile name="jenkins">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment