Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -47,6 +47,10 @@
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.48.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.tencentyun:tls-sig-api-v2:2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.json:json:20180130" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.librepdf:openpdf:1.3.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="module" module-name="coolstore-partner-dao" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
|
||||
@@ -98,6 +102,10 @@
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.xuxueli:xxl-job-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.48.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.groovy:groovy:2.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.6.RELEASE" level="project" />
|
||||
@@ -138,7 +146,6 @@
|
||||
<orderEntry type="library" name="Maven: org.codehaus.jettison:jettison:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
|
||||
@@ -3,9 +3,9 @@ package com.cool.store.config;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.context.CurrentUserContext;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.context.CurrentUser;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -72,14 +72,14 @@ public class TokenValidateFilter implements Filter {
|
||||
String uri = reqs.getRequestURI();
|
||||
String method = reqs.getMethod();
|
||||
String userStr = "";
|
||||
CurrentUser currentUser = null;
|
||||
LoginUserInfo currentUser = null;
|
||||
boolean isInWhiteList = excludePath(uri);
|
||||
String accessToken = reqs.getHeader("accessToken");
|
||||
String key = "access_token:" + accessToken;
|
||||
if(StringUtils.isNotBlank(accessToken)){
|
||||
userStr = redisUtilPool.getString(key);
|
||||
if(StringUtils.isNotBlank(userStr)){
|
||||
currentUser = JSON.parseObject(userStr, CurrentUser.class);
|
||||
currentUser = JSON.parseObject(userStr, LoginUserInfo.class);
|
||||
}
|
||||
}
|
||||
log.info("url:{}", uri);
|
||||
@@ -105,10 +105,10 @@ public class TokenValidateFilter implements Filter {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
CurrentUserContext.setUser(userStr);
|
||||
CurrentUserHolder.setUser(userStr);
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
} finally {
|
||||
CurrentUserContext.removeUser();
|
||||
CurrentUserHolder.removeUser();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.cool.store.config;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: XxlJobConfig
|
||||
* @Description: xxljob 配置信息
|
||||
* @date 2021-11-12 15:26
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = "com.cool.store.job")
|
||||
public class XxlJobConfig {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
|
||||
|
||||
@Value("${xxl.job.admin.addresses}")
|
||||
private String adminAddresses;
|
||||
|
||||
@Value("${xxl.job.executor.appname}")
|
||||
private String appName;
|
||||
|
||||
@Value("${xxl.job.executor.ip}")
|
||||
private String ip;
|
||||
|
||||
@Value("${xxl.job.executor.port}")
|
||||
private int port;
|
||||
|
||||
@Value("${xxl.job.accessToken}")
|
||||
private String accessToken;
|
||||
|
||||
@Value("${xxl.job.executor.logpath}")
|
||||
private String logPath;
|
||||
|
||||
@Value("${xxl.job.executor.logretentiondays}")
|
||||
private int logRetentionDays;
|
||||
|
||||
@Bean
|
||||
public XxlJobSpringExecutor xxlJobExecutor() {
|
||||
logger.info(">>>>>>>>>>> xxl-job config init.");
|
||||
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
|
||||
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
|
||||
xxlJobSpringExecutor.setAppname(appName);
|
||||
xxlJobSpringExecutor.setIp(ip);
|
||||
xxlJobSpringExecutor.setPort(port);
|
||||
xxlJobSpringExecutor.setAccessToken(accessToken);
|
||||
xxlJobSpringExecutor.setLogPath(logPath);
|
||||
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
|
||||
return xxlJobSpringExecutor;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.InterviewService;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-06 15:22
|
||||
* @Description:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/interview")
|
||||
@Api(tags = "面试信息")
|
||||
public class InterviewController {
|
||||
|
||||
@Autowired
|
||||
private InterviewService interviewService;
|
||||
|
||||
@PostMapping("/list")
|
||||
@ApiOperation("获取面试信息列表")
|
||||
public ResponseResult<PageInfo<InterviewVO>> getInterviewList(@RequestBody GetInterviewListReq request) {
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
List<InterviewVO> interviewList = interviewService.getInterviewList(request);
|
||||
return ResponseResult.success(new PageInfo<>(interviewList));
|
||||
}
|
||||
|
||||
@PostMapping("/queryByInterviewId")
|
||||
@ApiOperation("根据面试会议id查询面试信息")
|
||||
public ResponseResult<InterviewVO> queryByInterviewId(@RequestBody QueryByInterviewIdReq request) {
|
||||
InterviewVO interviewVO = interviewService.getInterviewInfo(request.getInterviewId());
|
||||
return ResponseResult.success(interviewVO);
|
||||
}
|
||||
|
||||
@PostMapping("/entrustOthers")
|
||||
@ApiOperation("委托他人")
|
||||
public ResponseResult entrustOthers(@RequestBody EntrustOthersReq request) {
|
||||
interviewService.entrustOthers(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/modifyInterviewTime")
|
||||
@ApiOperation("修改面试时间")
|
||||
public ResponseResult modifyInterviewTime(@RequestBody ModifyInterviewTimeReq request) {
|
||||
interviewService.modifyInterviewTime(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/finish")
|
||||
@ApiOperation("修改面试时间")
|
||||
public ResponseResult finishInterview(@RequestBody FinishInterviewReq request) {
|
||||
interviewService.finishInterview(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.context.CurrentUserContext;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dto.login.FeiShuLoginDTO;
|
||||
import com.cool.store.dto.login.UserIdInfoDTO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
@@ -59,7 +59,7 @@ public class LoginController {
|
||||
|
||||
@GetMapping("/getUserInfoByToken")
|
||||
public ResponseResult getUserInfoByToken(){
|
||||
return ResponseResult.success(CurrentUserContext.getUser());
|
||||
return ResponseResult.success(CurrentUserHolder.getUser());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.MenuService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -21,7 +22,7 @@ public class MenuController {
|
||||
|
||||
@GetMapping("/menu/getUserMenus")
|
||||
public ResponseResult getUserMenus(){
|
||||
return ResponseResult.success(menuService.getUserMenus(null));
|
||||
return ResponseResult.success(menuService.getUserMenus(CurrentUserHolder.getUserId(), CurrentUserHolder.getRoleId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ public class OssClientController {
|
||||
private String bucket;
|
||||
@Value("${corp.id:null}")
|
||||
private String corpId;
|
||||
@Value("${cdn.url:null}")
|
||||
private String cdnUrl;
|
||||
|
||||
@GetMapping("/getUploadFileConfig")
|
||||
public ResponseResult getUploadFileConfig(){
|
||||
@@ -60,7 +62,7 @@ public class OssClientController {
|
||||
byte[] binaryData = postPolicy.getBytes("utf-8");
|
||||
String encodedPolicy = BinaryUtil.toBase64String(binaryData);
|
||||
String signature = client.calculatePostSignature(postPolicy);
|
||||
OssUploadConfigVO result = new OssUploadConfigVO(accessKeyId, encodedPolicy, signature, dir, host, String.valueOf(expireEndTime / 1000));
|
||||
OssUploadConfigVO result = new OssUploadConfigVO(accessKeyId, encodedPolicy, signature, dir, host, String.valueOf(expireEndTime / 1000), cdnUrl);
|
||||
return ResponseResult.success(result);
|
||||
}catch (Exception e){
|
||||
log.info("exception", e);
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dto.calendar.CreateCalendarEventDTO;
|
||||
import com.cool.store.dto.calendar.DeleteCalendarEventDTO;
|
||||
import com.cool.store.dto.calendar.UpdateCalendarEventDTO;
|
||||
import com.cool.store.dto.calendar.UserCalendarsEventDTO;
|
||||
import com.cool.store.dto.response.ResultDTO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.enums.RocketMqTagEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.cool.store.http.ISVHttpRequest;
|
||||
import com.cool.store.mq.producer.SimpleMessageService;
|
||||
@@ -32,8 +38,6 @@ import java.util.List;
|
||||
@RequestMapping("test/")
|
||||
public class TestController {
|
||||
|
||||
@Resource
|
||||
private SimpleMessageService simpleMessageService;
|
||||
@Resource
|
||||
private EnterpriseUserService enterpriseUserService;
|
||||
@Resource
|
||||
@@ -43,15 +47,6 @@ public class TestController {
|
||||
@Resource
|
||||
private EnterpriseSyncService enterpriseSyncService;
|
||||
|
||||
|
||||
@GetMapping("/sendMq")
|
||||
public ResponseResult sendMq(){
|
||||
String msg = UUIDUtils.get8UUID();
|
||||
log.info("msg:{}", msg);
|
||||
simpleMessageService.send(msg, RocketMqTagEnum.TEST);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/post")
|
||||
public ResponseResult<Boolean> get(@RequestBody List<TestRequest> testRequestList){
|
||||
log.info(JSONObject.toJSONString(testRequestList));
|
||||
@@ -166,4 +161,29 @@ public class TestController {
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/user/getFreeBusyList")
|
||||
public ResultDTO<List<UserCalendarsEventDTO>> getFreeBusyList(@RequestParam("userId") String userId, @RequestParam("startTime") long startTime,
|
||||
@RequestParam("endTime") long endTime) throws ApiException {
|
||||
log.info("getUserCalendarsEvents : corpId:{}, appType:{}, userId:{}, startTime:{}, endTime:{}", userId, startTime, endTime);
|
||||
return ResultDTO.successResult(isvHttpRequest.getFreeBusyList(userId, startTime, endTime));
|
||||
}
|
||||
|
||||
@PostMapping("/user/createUserCalendarEvent")
|
||||
public ResultDTO<UserCalendarsEventDTO> createUserCalendarEvent(@RequestBody CreateCalendarEventDTO param) throws ApiException {
|
||||
log.info("createUserCalendarEvent , param:{}", JSONObject.toJSONString(param));
|
||||
return ResultDTO.successResult(isvHttpRequest.createUserCalendarEvent(param));
|
||||
}
|
||||
|
||||
@PostMapping("/user/updateUserCalendarEvent")
|
||||
public ResultDTO<UserCalendarsEventDTO> updateUserCalendarEvent(@RequestBody UpdateCalendarEventDTO param) throws ApiException {
|
||||
log.info("updateUserCalendarEvent , param:{}", JSONObject.toJSONString(param));
|
||||
return ResultDTO.successResult(isvHttpRequest.updateUserCalendarEvent(param));
|
||||
}
|
||||
|
||||
@PostMapping("/user/deleteUserCalendarEvent")
|
||||
public ResultDTO<UserCalendarsEventDTO> deleteUserCalendarEvent(@RequestBody DeleteCalendarEventDTO param) throws ApiException {
|
||||
log.info("createUserCalendarEvent , param:{}", JSONObject.toJSONString(param));
|
||||
return ResultDTO.successResult(isvHttpRequest.deleteUserCalendarEvent(param));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,22 +33,34 @@ mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml
|
||||
mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain = https://abstore-isv.coolstore.cn
|
||||
isv.domain = https://abstore-isv.coolstore.cn/isv
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=LTAI5t5ouXZuFgxJMbQea3b2
|
||||
rocketmq.secretKey=yuomDstRjSdihtN5zo8viDbWu8Z0ig
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq-internal.aliyuncs.com:8080
|
||||
rocketmq.accessKey=zK2oVEz4G1ts23d2
|
||||
rocketmq.secretKey=0UstLCS0mh2ASgBh
|
||||
rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
rocketmq.orderTopic=order_message
|
||||
|
||||
#oss配置
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=cool-store-hsay
|
||||
|
||||
#企业corpId
|
||||
corp.id = 171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
#xxljob配置
|
||||
xxl.job.admin.addresses = http://10.7.53.224:10001/xxl-job-admin
|
||||
xxl.job.executor.appname = ${spring.application.name}
|
||||
xxl.job.executor.ip =
|
||||
xxl.job.executor.port = 31001
|
||||
xxl.job.executor.logpath = logs/xxl-job/jobhandler
|
||||
xxl.job.executor.logretentiondays = 3
|
||||
xxl.job.accessToken =
|
||||
@@ -51,4 +51,13 @@ corp.id = 171cddee76471740
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
#xxljob配置
|
||||
xxl.job.admin.addresses = https://djob.coolstore.cn/xxl-job-admin
|
||||
xxl.job.executor.appname = ${spring.application.name}
|
||||
xxl.job.executor.ip =
|
||||
xxl.job.executor.port = 31001
|
||||
xxl.job.executor.logpath = logs/xxl-job/jobhandler
|
||||
xxl.job.executor.logretentiondays = 3
|
||||
xxl.job.accessToken =
|
||||
@@ -49,8 +49,20 @@ oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=vec-coolstore
|
||||
|
||||
#企业corpId
|
||||
corp.id = 171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
xxl.job.admin.addresses =
|
||||
xxl.job.executor.appname = ${spring.application.name}
|
||||
xxl.job.executor.ip =
|
||||
xxl.job.executor.port = 30201
|
||||
xxl.job.executor.logpath = logs/xxl-job/jobhandler
|
||||
xxl.job.executor.logretentiondays = 30
|
||||
xxl.job.accessToken =
|
||||
Reference in New Issue
Block a user