企业初始化
This commit is contained in:
@@ -40,7 +40,7 @@ public class TokenValidateFilter implements Filter {
|
||||
|
||||
private static List<String> patternList =
|
||||
|
||||
Lists.newArrayList("/web/check/ok","/check/ok", "/partner/doc.html",
|
||||
Lists.newArrayList("/web/check/ok","/check/ok", "/partner/doc.html","/**/test/**",
|
||||
"/**/swagger*/**",
|
||||
"/**/webjars/**");
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.controller;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dto.login.FeiShuLoginDTO;
|
||||
import com.cool.store.dto.login.UserIdInfoDTO;
|
||||
import com.cool.store.enums.AppTypeEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
@@ -42,17 +43,13 @@ public class LoginController {
|
||||
String userId = "", corpId = "", appType = AppTypeEnum.FEI_SHU.getValue();
|
||||
try {
|
||||
String value = "code=" + code + "&appType=" + appType + "&appId=" + appId;
|
||||
JSONObject userInfo = isvHttpRequest.getUserIdByCode(value);
|
||||
UserIdInfoDTO userInfo = isvHttpRequest.getUserIdByCode(value);
|
||||
if(Objects.isNull(userInfo)){
|
||||
throw new ServiceException(ErrorCodeEnum.LOGIN_ERROR);
|
||||
}
|
||||
log.info("userInfo:{}", JSONObject.toJSONString(userInfo));
|
||||
userId = userInfo.getString("openId");
|
||||
corpId = userInfo.getString("corpId");
|
||||
String errorCode = userInfo.getString("error_code");
|
||||
if (StringUtils.isBlank(userId) && StringUtils.isNotBlank(errorCode)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LOGIN_ERROR);
|
||||
}
|
||||
userId = userInfo.getOpenId();
|
||||
corpId = userInfo.getCorpId();
|
||||
return loginService.feiShuLogin(userId, corpId, Boolean.TRUE, appType, StringUtils.EMPTY);
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.entity.EnterpriseConfigDO;
|
||||
import com.cool.store.service.EnterpriseConfigService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: TestController
|
||||
* @Description:
|
||||
* @date 2023-05-26 11:32
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("test/")
|
||||
public class TestController {
|
||||
|
||||
@Resource
|
||||
private EnterpriseConfigService enterpriseConfigService;
|
||||
|
||||
@GetMapping("/selectByEnterpriseId")
|
||||
public EnterpriseConfigDO selectByEnterpriseId(@RequestParam("enterpriseId") String enterpriseId){
|
||||
return enterpriseConfigService.selectByEnterpriseId(enterpriseId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,4 +34,10 @@ mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain = https://tstore-isv.coolcollege.cn
|
||||
get.user.id.by.code = /isv/v2/get_user_id_by_code
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=LTAI5t5ouXZuFgxJMbQea3b2
|
||||
rocketmq.secretKey=yuomDstRjSdihtN5zo8viDbWu8Z0ig
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq-internal.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
rocketmq.orderTopic=order_message
|
||||
|
||||
@@ -38,4 +38,10 @@ mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain = https://dstore-isv.coolcollege.cn
|
||||
get.user.id.by.code = /isv/v2/get_user_id_by_code
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=LTAI5t5ouXZuFgxJMbQea3b2
|
||||
rocketmq.secretKey=yuomDstRjSdihtN5zo8viDbWu8Z0ig
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq-internal.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
rocketmq.orderTopic=order_message
|
||||
@@ -34,4 +34,10 @@ mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain = https://hdstore-isv.coolcollege.cn
|
||||
get.user.id.by.code = /isv/v2/get_user_id_by_code
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=LTAI5t5ouXZuFgxJMbQea3b2
|
||||
rocketmq.secretKey=yuomDstRjSdihtN5zo8viDbWu8Z0ig
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX5N7rwl.cn-hangzhou.mq-internal.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
rocketmq.orderTopic=order_message
|
||||
@@ -41,4 +41,10 @@ mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain = https://tstore-isv.coolcollege.cn
|
||||
get.user.id.by.code = /isv/v2/get_user_id_by_code
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=LTAI5t5ouXZuFgxJMbQea3b2
|
||||
rocketmq.secretKey=yuomDstRjSdihtN5zo8viDbWu8Z0ig
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq-internal.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
rocketmq.orderTopic=order_message
|
||||
@@ -34,4 +34,10 @@ mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain = https://store-isv.coolcollege.cn
|
||||
get.user.id.by.code = /isv/v2/get_user_id_by_code
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=LTAI5t5ouXZuFgxJMbQea3b2
|
||||
rocketmq.secretKey=yuomDstRjSdihtN5zo8viDbWu8Z0ig
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX5N7rwl.cn-hangzhou.mq-internal.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
rocketmq.orderTopic=order_message
|
||||
@@ -34,4 +34,10 @@ mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain = https://store-isv.coolcollege.cn
|
||||
get.user.id.by.code = /isv/v2/get_user_id_by_code
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=LTAI5t5ouXZuFgxJMbQea3b2
|
||||
rocketmq.secretKey=yuomDstRjSdihtN5zo8viDbWu8Z0ig
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX5N7rwl.cn-hangzhou.mq-internal.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
rocketmq.orderTopic=order_message
|
||||
@@ -34,4 +34,10 @@ mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain = https://tstore-isv.coolcollege.cn
|
||||
get.user.id.by.code = /isv/v2/get_user_id_by_code
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=LTAI5t5ouXZuFgxJMbQea3b2
|
||||
rocketmq.secretKey=yuomDstRjSdihtN5zo8viDbWu8Z0ig
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq-internal.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
rocketmq.orderTopic=order_message
|
||||
Reference in New Issue
Block a user