This commit is contained in:
zhangchenbiao
2023-05-31 16:47:04 +08:00
parent b00a91d060
commit 5070f52076
19 changed files with 319 additions and 46 deletions

View File

@@ -71,5 +71,24 @@
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.2" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.5" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun.openservices:ons-client:1.8.8.3.Final" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:ons20190214:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-util:0.2.9" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:endpoint-util:0.0.6" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea:1.2.7" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.7" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: org.jacoco:org.jacoco.agent:runtime:0.8.4" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-openapi:0.0.19" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:credentials-java:0.2.4" level="project" />
<orderEntry type="library" name="Maven: org.ini4j:ini4j:0.5.4" 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" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:openapiutil:0.1.9" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.65" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.65" level="project" />
</component>
</module>

View File

@@ -70,6 +70,18 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun.openservices</groupId>
<artifactId>ons-client</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>ons20190214</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>tea-openapi</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,198 @@
package com.cool.store.utils;
import com.aliyun.ons20190214.Client;
import com.aliyun.ons20190214.models.*;
import com.aliyun.teaopenapi.models.Config;
import com.cool.store.constants.CommonConstants;
import com.cool.store.enums.RocketMqGroupEnum;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author chenyupeng
* @since 2022/1/5
*/
@Slf4j
public class RocketMqUtil {
private static final String INSTANCE_ID = "MQ_INST_1947409023213164_BX3sLZnA";
/**
* 本地
*/
private static final String LOCAL_INSTANCE_ID = "MQ_INST_1255228665351616_BX3wfyPO";
private static final String INSTANCE_ID_ONLINE_HD_PRE = "MQ_INST_1947409023213164_BX5N7rwl";
private static final String ACCESS_KEY = "LTAI5t5ouXZuFgxJMbQea3b2";
private static final String ACCESS_SECRET = "yuomDstRjSdihtN5zo8viDbWu8Z0ig";
/**
* 使用AK&SK初始化账号Client
* @param accessKeyId
* @param accessKeySecret
* @return Client
* @throws Exception
*/
public static Client createClient(String accessKeyId, String accessKeySecret) throws Exception {
Config config = new Config()
// 您的AccessKey ID
.setAccessKeyId(accessKeyId)
// 您的AccessKey Secret
.setAccessKeySecret(accessKeySecret);
// 访问的域名
config.endpoint = "ons.cn-hangzhou.aliyuncs.com";
return new Client(config);
}
public static Client createLocalClient(String accessKeyId, String accessKeySecret) throws Exception {
Config config = new Config()
// 您的AccessKey ID
.setAccessKeyId(accessKeyId)
// 您的AccessKey Secret
.setAccessKeySecret(accessKeySecret);
// 访问的域名
config.endpoint = "ons.mq-internet-access.aliyuncs.com";
return new Client(config);
}
/**
* 新增测试、开发环境的group
* @author chenyupeng
* @date 2022/1/13
* @param profiles 环境后缀,逗号分隔 例如: dev,dev2
* @return void
*/
public static void initGroup(String profiles) throws Exception {
Client client = RocketMqUtil.createClient(ACCESS_KEY, ACCESS_SECRET);
List<String> profileList = Arrays.asList(profiles.split(CommonConstants.COMMA));
if(CollectionUtils.isEmpty(profileList)){
return;
}
OnsGroupListRequest onsGroupListRequest = new OnsGroupListRequest();
onsGroupListRequest.setInstanceId(INSTANCE_ID);
OnsGroupListResponse onsGroupListResponse = client.onsGroupList(onsGroupListRequest);
List<OnsGroupListResponseBody.OnsGroupListResponseBodyDataSubscribeInfoDo> subscribeInfoDo = onsGroupListResponse.getBody().getData().getSubscribeInfoDo();
Map<String, OnsGroupListResponseBody.OnsGroupListResponseBodyDataSubscribeInfoDo> collect = ListUtils.emptyIfNull(subscribeInfoDo).stream().
collect(Collectors.toMap(OnsGroupListResponseBody.OnsGroupListResponseBodyDataSubscribeInfoDo::getGroupId, data -> data, (a, b) -> a));
for (String profile : profileList) {
for (RocketMqGroupEnum groupEnum : RocketMqGroupEnum.values()) {
String groupId = groupEnum.getDefaultGroup() + "_" + profile;
//已经创建就继续
if(collect.get(groupId) != null){
continue;
}
OnsGroupCreateRequest onsGroupCreateRequest = new OnsGroupCreateRequest();
onsGroupCreateRequest.setGroupId(groupId);
onsGroupCreateRequest.setInstanceId(INSTANCE_ID);
// 复制代码运行请自行打印 API 的返回值
try {
client.onsGroupCreate(onsGroupCreateRequest);
}catch (Exception e){
log.error("initGroupAndTag fail",e);
}
Thread.sleep(1000);
}
}
}
public static void initLocalGroup(String profiles) throws Exception {
Client client = RocketMqUtil.createLocalClient("LTAI5tPWCTeCyngfYLqoSGWk", "jkzIXlvNF17ne5TPPEFP1sQhcfg4Je");
List<String> profileList = Arrays.asList(profiles.split(CommonConstants.COMMA));
if(CollectionUtils.isEmpty(profileList)){
return;
}
OnsGroupListRequest onsGroupListRequest = new OnsGroupListRequest();
onsGroupListRequest.setInstanceId(LOCAL_INSTANCE_ID);
OnsGroupListResponse onsGroupListResponse = client.onsGroupList(onsGroupListRequest);
List<OnsGroupListResponseBody.OnsGroupListResponseBodyDataSubscribeInfoDo> subscribeInfoDo = onsGroupListResponse.getBody().getData().getSubscribeInfoDo();
Map<String, OnsGroupListResponseBody.OnsGroupListResponseBodyDataSubscribeInfoDo> collect = ListUtils.emptyIfNull(subscribeInfoDo).stream().
collect(Collectors.toMap(OnsGroupListResponseBody.OnsGroupListResponseBodyDataSubscribeInfoDo::getGroupId, data -> data, (a, b) -> a));
for (String profile : profileList) {
for (RocketMqGroupEnum groupEnum : RocketMqGroupEnum.values()) {
String groupId = groupEnum.getDefaultGroup() + "_" + profile;
//已经创建就继续
if(collect.get(groupId) != null){
continue;
}
OnsGroupCreateRequest onsGroupCreateRequest = new OnsGroupCreateRequest();
onsGroupCreateRequest.setGroupId(groupId);
onsGroupCreateRequest.setInstanceId(LOCAL_INSTANCE_ID);
// 复制代码运行请自行打印 API 的返回值
try {
client.onsGroupCreate(onsGroupCreateRequest);
}catch (Exception e){
log.error("initGroupAndTag fail",e);
}
Thread.sleep(1000);
}
}
}
/**
* 新增线上、灰度、预发环境的group
* @author chenyupeng
* @date 2022/1/13
* @param profiles 环境后缀,逗号分隔 例如: online,hd,pre
* @return void
*/
public static void initOnlineAndHdAndPreGroup(String profiles) throws Exception {
Client client = RocketMqUtil.createClient(ACCESS_KEY, ACCESS_SECRET);
List<String> profileList = Arrays.asList(profiles.split(CommonConstants.COMMA));
if(CollectionUtils.isEmpty(profileList)){
return;
}
OnsGroupListRequest onsGroupListRequest = new OnsGroupListRequest();
onsGroupListRequest.setInstanceId(INSTANCE_ID_ONLINE_HD_PRE);
OnsGroupListResponse onsGroupListResponse = client.onsGroupList(onsGroupListRequest);
List<OnsGroupListResponseBody.OnsGroupListResponseBodyDataSubscribeInfoDo> subscribeInfoDo = onsGroupListResponse.getBody().getData().getSubscribeInfoDo();
Map<String, OnsGroupListResponseBody.OnsGroupListResponseBodyDataSubscribeInfoDo> collect = ListUtils.emptyIfNull(subscribeInfoDo).stream().
collect(Collectors.toMap(OnsGroupListResponseBody.OnsGroupListResponseBodyDataSubscribeInfoDo::getGroupId, data -> data, (a, b) -> a));
for (String profile : profileList) {
for (RocketMqGroupEnum groupEnum : RocketMqGroupEnum.values()) {
String groupId = groupEnum.getDefaultGroup() + "_" + profile;
//已经创建就继续
if(collect.get(groupId) != null){
continue;
}
OnsGroupCreateRequest onsGroupCreateRequest = new OnsGroupCreateRequest();
onsGroupCreateRequest.setGroupId(groupId);
onsGroupCreateRequest.setInstanceId(INSTANCE_ID_ONLINE_HD_PRE);
// 复制代码运行请自行打印 API 的返回值
try {
client.onsGroupCreate(onsGroupCreateRequest);
}catch (Exception e){
log.error("initGroupAndTag fail",e);
}
Thread.sleep(1000);
}
}
}
/**
* 删除测试、开发环境的group
* @author chenyupeng
* @date 2022/1/13
* @param groupId
* @return void
*/
public static void deleteGroupById(String groupId) throws Exception {
Client client = RocketMqUtil.createClient(ACCESS_KEY, ACCESS_SECRET);
OnsGroupDeleteRequest request = new OnsGroupDeleteRequest();
request.setGroupId(groupId);
request.setInstanceId(INSTANCE_ID);
client.onsGroupDelete(request);
}
}

View File

@@ -93,6 +93,25 @@
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.2" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.5" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun.openservices:ons-client:1.8.8.3.Final" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:ons20190214:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-util:0.2.9" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:endpoint-util:0.0.6" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea:1.2.7" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.7" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: org.jacoco:org.jacoco.agent:runtime:0.8.4" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-openapi:0.0.19" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:credentials-java:0.2.4" level="project" />
<orderEntry type="library" name="Maven: org.ini4j:ini4j:0.5.4" 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" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:openapiutil:0.1.9" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.65" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.65" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.18" level="project" />
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.6.1" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.20" level="project" />

View File

@@ -72,6 +72,25 @@
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.2" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.5" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun.openservices:ons-client:1.8.8.3.Final" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:ons20190214:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-util:0.2.9" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:endpoint-util:0.0.6" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea:1.2.7" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.7" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: org.jacoco:org.jacoco.agent:runtime:0.8.4" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-openapi:0.0.19" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:credentials-java:0.2.4" level="project" />
<orderEntry type="library" name="Maven: org.ini4j:ini4j:0.5.4" 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" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:openapiutil:0.1.9" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.65" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.65" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-starter:2.0.4" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.4" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.4" level="project" />

View File

@@ -60,6 +60,7 @@
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.4.6" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun.openservices:ons-client:1.8.8.3.Final" 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" />
@@ -93,7 +94,6 @@
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-ui:2.0.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
<orderEntry type="library" name="Maven: com.aliyun.openservices:ons-client:1.8.8.3.Final" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-openapi:0.0.19" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-util:0.2.12" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />

View File

@@ -33,10 +33,6 @@
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun.openservices</groupId>
<artifactId>ons-client</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>tea-openapi</artifactId>

View File

@@ -30,6 +30,7 @@
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.4.6" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun.openservices:ons-client:1.8.8.3.Final" 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" />
@@ -62,7 +63,6 @@
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-ui:2.0.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
<orderEntry type="library" name="Maven: com.aliyun.openservices:ons-client:1.8.8.3.Final" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-openapi:0.0.19" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-util:0.2.12" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />

View File

@@ -72,11 +72,11 @@ public class Swagger2Config {
private List<Parameter> getParameters() {
List<Parameter> pars = new ArrayList<>();
pars.add(new ParameterBuilder().name("access_token").description("令牌").required(true)
pars.add(new ParameterBuilder().name("accessToken").description("令牌").required(true)
.modelRef(new ModelRef("string"))
.defaultValue("{{access_token}}")
.defaultValue("{{accessToken}}")
.parameterType("query").build());
pars.add(new ParameterBuilder().name("enterprise-id").required(true)
pars.add(new ParameterBuilder().name("enterpriseId").required(true)
.modelRef(new ModelRef("string"))
.defaultValue("45f92210375346858b6b6694967f44de")
.parameterType("path").build());

View File

@@ -25,7 +25,7 @@ public class DeskController {
@GetMapping(path = "/interviewSchedule")
@ApiOperation("面试日程信息 面试信息有限 不做分页")
public ResponseResult<InterviewScheduleInfoVO> interviewSchedule(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<InterviewScheduleInfoVO> interviewSchedule(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestParam(value = "selectedData",required = false) Date selectedData){
return ResponseResult.success();
@@ -34,7 +34,7 @@ public class DeskController {
@PostMapping(path = "/queryStageCount")
@ApiOperation("招商经理视角====各阶段待处理待跟进数量")
public ResponseResult<StageCountVO> queryStageCount(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<StageCountVO> queryStageCount(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody StageCountRequest stageCountRequest){
return ResponseResult.success();
@@ -43,7 +43,7 @@ public class DeskController {
@PostMapping(path = "/queryStageList")
@ApiOperation("招商经理视角====各阶段待数据列表")
public ResponseResult<PageInfo<PartnerStageInfoVO>> queryStageList(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<PageInfo<PartnerStageInfoVO>> queryStageList(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody StageCountRequest stageCountRequest){
return ResponseResult.success();
@@ -55,7 +55,7 @@ public class DeskController {
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
})
public ResponseResult<PartnerLineDetailVO> getPartnerLineDetail(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<PartnerLineDetailVO> getPartnerLineDetail(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestParam(value = "lineId",required = false)Long lineId){
@@ -65,7 +65,7 @@ public class DeskController {
@GetMapping(path = "/lastMonthCloseLine")
@ApiOperation("最近30天结束的线索")
public ResponseResult<PageInfo<PartnerLineInfoVO>> lastMonthCloseLine(@PathVariable(value = "enterprise-id", required = false) String enterpriseId){
public ResponseResult<PageInfo<PartnerLineInfoVO>> lastMonthCloseLine(@PathVariable(value = "enterpriseId", required = false) String enterpriseId){
return ResponseResult.success();
@@ -74,7 +74,7 @@ public class DeskController {
@PostMapping(path = "/allocationInvestmentManager")
@ApiOperation("分配招商经理/转让招商经理")
public ResponseResult<PageInfo<PartnerStageInfoVO>> allocationInvestmentManager(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<PageInfo<PartnerStageInfoVO>> allocationInvestmentManager(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody AllocationInvestmentManagerRequest allocationInvestmentManagerRequest){
return ResponseResult.success();
@@ -84,7 +84,7 @@ public class DeskController {
@PostMapping(path = "/queryPublicSeqLineList")
@ApiOperation("公海列表")
public ResponseResult<PageInfo<PartnerStageInfoVO>> queryPublicSeaLineList(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<PageInfo<PartnerStageInfoVO>> queryPublicSeaLineList(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody LineRequest LineRequest){
return ResponseResult.success();
@@ -95,7 +95,7 @@ public class DeskController {
@PostMapping(path = "/queryPrivateSeaLineList")
@ApiOperation("私海列表")
public ResponseResult<PageInfo<PrivateSeaLineListVo>> queryPrivateSeqLineList(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<PageInfo<PrivateSeaLineListVo>> queryPrivateSeqLineList(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody PrivateSeaLineListRequest privateSeaLineListRequest){
return ResponseResult.success();
@@ -105,7 +105,7 @@ public class DeskController {
@PostMapping(path = "/queryBlackList")
@ApiOperation("黑名单列表")
public ResponseResult<PageInfo<PartnerStageInfoVO>> queryBlackList(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<PageInfo<PartnerStageInfoVO>> queryBlackList(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody LineRequest LineRequest){
return ResponseResult.success();
@@ -113,7 +113,7 @@ public class DeskController {
@PostMapping(path = "/removeBlackList")
public ResponseResult<Boolean> removeBlackList(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> removeBlackList(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody LineBlackListRequest lineBlackListRequest){
@@ -121,7 +121,7 @@ public class DeskController {
}
@PostMapping(path = "/joinBlackList")
public ResponseResult<Boolean> joinBlackList(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> joinBlackList(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody LineBlackListRequest lineBlackListRequest){
@@ -130,7 +130,7 @@ public class DeskController {
@PostMapping(path = "/closeFollow")
public ResponseResult<Boolean> closeFollow(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> closeFollow(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody CloseFollowRequest closeFollowRequest){
@@ -139,7 +139,7 @@ public class DeskController {
@PostMapping(path = "/changeIntentInfo")
@ApiOperation("员工端变更C端用户意向信息")
public ResponseResult<Boolean> changeIntentInfo(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> changeIntentInfo(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody BaseUserInfoRequest baseUserInfoRequest){
return ResponseResult.success();
@@ -148,7 +148,7 @@ public class DeskController {
@PostMapping(path = "/addTags")
@ApiOperation("添加标签接口")
public ResponseResult<Boolean> addTags(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> addTags(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody AddTagsRequest addTagsRequest){
return ResponseResult.success();

View File

@@ -21,7 +21,7 @@ import java.util.List;
* @date 2023-05-30 17:20
*/
@RestController
@RequestMapping({"/enterprises/{enterprise-id}/users"})
@RequestMapping({"/enterprises/{enterpriseId}/users"})
@Slf4j
public class EnterpriseUserController {
@@ -29,7 +29,7 @@ public class EnterpriseUserController {
public EnterpriseUserService enterpriseUserService;
@GetMapping(path = "/dept/userList")
public ResponseResult<PageInfo<EnterpriseUserPageVO>> getUserList(@PathVariable(value = "enterprise-id", required = true) String eid,
public ResponseResult<PageInfo<EnterpriseUserPageVO>> getUserList(@PathVariable(value = "enterpriseId", required = true) String eid,
@RequestParam(name = "user_name", required = false) String userName,
@RequestParam(name = "dept_id", required = false) String deptId,
@RequestParam(name = "role_id", required = false) Long roleId,

View File

@@ -43,8 +43,8 @@ mybatis.configuration.map-underscore-to-camel-case=true
isv.domain = https://abstore-isv.coolstore.cn
#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-vpc.cn-hangzhou.rmq.aliyuncs.com:8080
rocketmq.topic=simple_message
rocketmq.orderTopic=order_message

View File

@@ -30,6 +30,7 @@
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.4.6" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun.openservices:ons-client:1.8.8.3.Final" 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" />
@@ -62,7 +63,6 @@
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-ui:2.0.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
<orderEntry type="library" name="Maven: com.aliyun.openservices:ons-client:1.8.8.3.Final" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-openapi:0.0.19" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:tea-util:0.2.12" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />

View File

@@ -97,7 +97,7 @@ public class TokenValidateFilter implements Filter {
ResponseResult.fail(ErrorCodeEnum.ACCESS_TOKEN_INVALID)));
return;
}
log.info("url:{}, access_token:{}, userId:{}, username:{}, enterpriseId:{}", uri, accessToken, currentUser.getUserId(), currentUser.getName(), currentUser.getEnterpriseId());
log.info("url:{}, accessToken:{}, userId:{}, username:{}, enterpriseId:{}", uri, accessToken, currentUser.getUserId(), currentUser.getName(), currentUser.getEnterpriseId());
}
if(StringUtils.isBlank(userStr) && !isInWhiteList){
response.setStatus(HttpStatus.OK.value());

View File

@@ -72,11 +72,11 @@ public class Swagger2Config {
private List<Parameter> getParameters() {
List<Parameter> pars = new ArrayList<>();
pars.add(new ParameterBuilder().name("access_token").description("令牌").required(true)
pars.add(new ParameterBuilder().name("accessToken").description("令牌").required(true)
.modelRef(new ModelRef("string"))
.defaultValue("{{access_token}}")
.defaultValue("{{accessToken}}")
.parameterType("query").build());
pars.add(new ParameterBuilder().name("enterprise-id").required(true)
pars.add(new ParameterBuilder().name("enterpriseId").required(true)
.modelRef(new ModelRef("string"))
.defaultValue("45f92210375346858b6b6694967f44de")
.parameterType("path").build());

View File

@@ -23,7 +23,7 @@ import javax.validation.Valid;
@Api(tags = "微信小程序app接口")
@RestController
@RequestMapping({"/v1/partnerManage/{enterprise-id}/miniProgram" })
@RequestMapping({"/v1/partnerManage/{enterpriseId}/miniProgram" })
public class MiniProgramAppController {
@Resource

View File

@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
* @Version 1.0
*/
@RestController
@RequestMapping({"/v1/partnerManage/{enterprise-id}/openArea" })
@RequestMapping({"/v1/partnerManage/{enterpriseId}/openArea" })
@Slf4j
public class OpenAreaController {
@@ -31,7 +31,7 @@ public class OpenAreaController {
@ApiImplicitParam(name = "pageNumber", value = "页码", required = false),
@ApiImplicitParam(name = "pageSize", value = "分页大小", required = false)
})
public ResponseResult<PageInfo<OpenAreaVO>> getOpenAreaList(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<PageInfo<OpenAreaVO>> getOpenAreaList(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestParam(value = "keyOpenFlag",required = false)Boolean keyOpenFlag,
@RequestParam(value = "parentId",required = false)Long parentId,
@RequestParam(value = "type",required = false)String type,
@@ -44,7 +44,7 @@ public class OpenAreaController {
@GetMapping(path = "/getOpenProvince")
@ApiOperation("可申请加盟省份/可预约加盟省份")
public ResponseResult<OpenProvinceVO> getOpenProvince(@PathVariable(value = "enterprise-id", required = false) String enterpriseId){
public ResponseResult<OpenProvinceVO> getOpenProvince(@PathVariable(value = "enterpriseId", required = false) String enterpriseId){
return ResponseResult.success();
}

View File

@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
* @Version 1.0
*/
@RestController
@RequestMapping({"/v1/partnerManage/{enterprise-id}/partner" })
@RequestMapping({"/v1/partnerManage/{enterpriseId}/partner" })
@Slf4j
public class PartnerController {
@@ -28,7 +28,7 @@ public class PartnerController {
@PostMapping(path = "/applyBaseInfo")
@ApiOperation("提交基本信息")
public ResponseResult<Boolean> applyBaseInfo(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> applyBaseInfo(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody BaseUserInfoRequest baseUserInfoRequest){
return ResponseResult.success();
@@ -37,7 +37,7 @@ public class PartnerController {
@PostMapping(path = "/changeBaseInfo")
@ApiOperation("变更基本信息")
public ResponseResult<Boolean> changeBaseInfo(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> changeBaseInfo(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody BaseUserInfoRequest baseUserInfoRequest){
//前提 未提交加盟申请
@@ -48,7 +48,7 @@ public class PartnerController {
@GetMapping(path = "/getSubmitIntentionApplyFlag")
@ApiOperation("获取提交意向申请标识 true 已提交 false 未提交")
public ResponseResult<Boolean> getSubmitIntentionApplyFlag(@PathVariable(value = "enterprise-id", required = false) String enterpriseId){
public ResponseResult<Boolean> getSubmitIntentionApplyFlag(@PathVariable(value = "enterpriseId", required = false) String enterpriseId){
return ResponseResult.success();
@@ -60,7 +60,7 @@ public class PartnerController {
@ApiImplicitParams({
@ApiImplicitParam(name = "idCard", value = "身份证号码", required = false),
})
public ResponseResult<Boolean> getLineByIdCard(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> getLineByIdCard(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestParam(value = "idCard",required = false)String idCard){
@@ -74,7 +74,7 @@ public class PartnerController {
@ApiImplicitParam(name = "idCard", value = "身份证号码", required = false),
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
})
public ResponseResult<Boolean> changeBinding(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> changeBinding(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestParam(value = "idCard",required = false)String idCard,
@RequestParam(value = "lineId",required = false)Long lineId){
@@ -85,7 +85,7 @@ public class PartnerController {
@PostMapping(path = "/submitPartnerSummaryInfo")
@ApiOperation("提交加盟商汇总信息")
public ResponseResult<Boolean> submitPartnerSummaryInfo(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> submitPartnerSummaryInfo(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody PartnerSummaryInfoRequest partnerSummaryInfo){
//前提 未提交加盟申请
@@ -97,7 +97,7 @@ public class PartnerController {
@PostMapping(path = "/changePartnerSummaryInfo")
@ApiOperation("修改加盟商汇总信息 修改意向信息 修改店员信息 修改行业认知")
public ResponseResult<Boolean> changePartnerSummaryInfo(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<Boolean> changePartnerSummaryInfo(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestBody PartnerSummaryInfoRequest partnerSummaryInfo){
//前提 未提交加盟申请
@@ -112,7 +112,7 @@ public class PartnerController {
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
})
public ResponseResult<PartnerLineDetailVO> getPartnerLineDetail(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
public ResponseResult<PartnerLineDetailVO> getPartnerLineDetail(@PathVariable(value = "enterpriseId", required = false) String enterpriseId,
@RequestParam(value = "lineId",required = false)Long lineId){

10
pom.xml
View File

@@ -151,6 +151,16 @@
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>ons20190214</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>tea-openapi</artifactId>
<version>0.0.19</version>
</dependency>
</dependencies>
</dependencyManagement>