fix sonar bad smell

This commit is contained in:
feng.li
2023-12-26 13:21:02 +08:00
parent 483b60bf95
commit bb67faa3ca
30 changed files with 102 additions and 173 deletions

View File

@@ -39,8 +39,7 @@ public class PartnerBWebApplication {
@Bean
@ConfigurationProperties("spring.datasource.hikari")
public DataSource defaultDataSource() {
DataSource defaultDataSource = defaultDataSourceProperties().initializeDataSourceBuilder().type(HikariDataSource.class).build();
return defaultDataSource;
return defaultDataSourceProperties().initializeDataSourceBuilder().type(HikariDataSource.class).build();
}
}

View File

@@ -37,10 +37,14 @@ public class CorsFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) {}
public void init(FilterConfig filterConfig) {
//do nothing
}
@Override
public void destroy() {}
public void destroy() {
//do nothing
}
}

View File

@@ -43,8 +43,14 @@ public class CustomHttpServletRequestWrapper extends HttpServletRequestWrapper {
return false;
}
/**
* Sets the <code>ReadListener</code> for this ServletInputStream.
* @param readListener The non-blocking IO read listener
*
*/
@Override
public void setReadListener(ReadListener readListener) {
//do nothing
}
@Override

View File

@@ -1,7 +1,5 @@
package com.cool.store.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.HandlerExceptionResolver;
@@ -21,8 +19,6 @@ import java.util.List;
@Configuration
public class ServletContextConfig extends WebMvcConfigurationSupport {
private final Logger logger = LoggerFactory.getLogger(ServletContextConfig.class);
/**
* 配置servlet处理
*/
@@ -50,8 +46,13 @@ public class ServletContextConfig extends WebMvcConfigurationSupport {
super.addResourceHandlers(registry);
}
/**
* 消息改写器
* @param converters
*/
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
//do nothing
}
/**
@@ -61,6 +62,7 @@ public class ServletContextConfig extends WebMvcConfigurationSupport {
*/
@Override
public void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) {
//do nothing
}
}

View File

@@ -1,7 +1,7 @@
package com.cool.store.config;
import com.cool.store.utils.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@@ -11,6 +11,8 @@ import javax.crypto.spec.SecretKeySpec;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
import java.util.stream.Collectors;
@@ -26,7 +28,8 @@ public class TRTCCallbackFilter implements Filter {
private String secretkey;
@Override
public void init(FilterConfig filterConfig) throws ServletException {
public void init(FilterConfig filterConfig) {
//do nothing
}
@Override
@@ -52,21 +55,22 @@ public class TRTCCallbackFilter implements Filter {
log.error("腾讯云音视频回调签名生成错误e\t{}", e.getMessage());
return;
}
/*if (StringUtil.isEmpty(sign) || !newSign.equals(sign)) {
if (StringUtils.isEmpty(sign) || !newSign.equals(sign)) {
log.error("腾讯云音视频回调签名错误, sign\t{}, newSign\t{}", sign, newSign);
return;
}*/
}
filterChain.doFilter(servletRequest, servletResponse);
}
@Override
public void destroy() {
//do nothing
}
private String getResultSign(String key, String body) throws Exception {
private String getResultSign(String key, String body) throws NoSuchAlgorithmException, InvalidKeyException {
Mac hmacSha256 = Mac.getInstance("HmacSHA256");
SecretKeySpec secret_key = new SecretKeySpec(key.getBytes(), "HmacSHA256");
hmacSha256.init(secret_key);
SecretKeySpec secretKey = new SecretKeySpec(key.getBytes(), "HmacSHA256");
hmacSha256.init(secretKey);
return Base64.getEncoder().encodeToString(hmacSha256.doFinal(body.getBytes()));
}

View File

@@ -48,7 +48,7 @@ public class TokenValidateFilter implements Filter {
"/**/swagger*/**", "/**/webjars/**",
//腾讯音视频回调,单独做验签
"/partner/pc/video/**",
//TODO 800回调地址暂时不做验证
//800回调地址暂时不做验证
"/partner/pc/flow/qualificationReview/callback",
"/**/ecSync/ecToApplet/**",
"/**/ecSync/labelInfo/**",
@@ -76,7 +76,7 @@ public class TokenValidateFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ServletException {
//do nothing
}
@Override

View File

@@ -1,6 +1,5 @@
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;

View File

@@ -58,8 +58,7 @@ public class Swagger2Config {
}
private List<Parameter> getParameters() {
List<Parameter> pars = new ArrayList<>();
return pars;
return new ArrayList<>();
}
private Predicate<RequestHandler> scanBasePackage(final String... controllerPack) {

View File

@@ -1,7 +1,6 @@
package com.cool.store.controller;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dao.HyAdvancedSettingDAO;
import com.cool.store.request.AdvancedSettingRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.AdvanceSettingService;

View File

@@ -4,7 +4,6 @@ import com.cool.store.request.GetInterviewInspectionResultListReq;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.InterviewInspectionService;
import com.cool.store.vo.interview.InterviewInspectionResultVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@@ -1,10 +1,8 @@
package com.cool.store.controller;
import com.cool.store.exception.ApiException;
import com.cool.store.request.CallFinishBackReq;
import com.cool.store.request.CallRecordBackReq;
import com.cool.store.request.CallUpReq;
import com.cool.store.request.GetTipsInfoReq;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.CallService;
import io.swagger.annotations.Api;

View File

@@ -1,20 +1,21 @@
package com.cool.store.controller;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dto.content.*;
import com.cool.store.entity.HyContentInfoDO;
import com.cool.store.exception.ApiException;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.ContentService;
import com.cool.store.vo.HyContentInfoVO;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
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;

View File

@@ -1,11 +1,9 @@
package com.cool.store.controller;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dto.calendar.UserCalendarsEventDTO;
import com.cool.store.enums.LineStatusEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.http.ISVHttpRequest;
import com.cool.store.request.*;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.*;
@@ -18,11 +16,9 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.propertyeditors.CurrencyEditor;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -210,8 +206,8 @@ public class DeskController {
@PostMapping(path = "/queryPublicSeqLineList")
@ApiOperation("公海列表")
public ResponseResult<PageInfo<PublicSeaLineListVo>> queryPublicSeaLineList(@RequestBody LineRequest LineRequest){
return ResponseResult.success(hyPartnerLineInfoService.publicSeaLineList(CurrentUserHolder.getUserId(),LineRequest));
public ResponseResult<PageInfo<PublicSeaLineListVo>> queryPublicSeaLineList(@RequestBody LineRequest lineRequest){
return ResponseResult.success(hyPartnerLineInfoService.publicSeaLineList(CurrentUserHolder.getUserId(),lineRequest));
}
@@ -237,8 +233,8 @@ public class DeskController {
@PostMapping(path = "/getPublicSeaPageDetailNext")
@ApiOperation("公海列表详情翻页")
public ResponseResult<LinePageInfoVo> getPublicSeaPageDetailNext(@RequestBody LineRequest LineRequest){
return ResponseResult.success(hyPartnerLineInfoService.publicSeaPageDetailNext(CurrentUserHolder.getUserId(),LineRequest));
public ResponseResult<LinePageInfoVo> getPublicSeaPageDetailNext(@RequestBody LineRequest lineRequest){
return ResponseResult.success(hyPartnerLineInfoService.publicSeaPageDetailNext(CurrentUserHolder.getUserId(),lineRequest));
}
@PostMapping(path = "/queryAllPrivateSeqLineList")
@@ -249,9 +245,9 @@ public class DeskController {
@PostMapping(path = "/queryBlackList")
@ApiOperation("黑名单列表")
public ResponseResult<PageInfo<BlackListVO>> queryBlackList(@RequestBody LineRequest LineRequest){
public ResponseResult<PageInfo<BlackListVO>> queryBlackList(@RequestBody LineRequest lineRequest){
return ResponseResult.success(hyPartnerLineInfoService.getBlackList(LineRequest));
return ResponseResult.success(hyPartnerLineInfoService.getBlackList(lineRequest));
}

View File

@@ -94,10 +94,10 @@ public class ExhibitionController {
public ResponseResult getExhibitionLineList(@RequestParam(required = true,value = "exhibitionId") Integer exhibitionId,
@RequestParam(required = false,value = "participationStatus") Integer participationStatus,
@RequestParam(required = false,value = "partnerId") String partnerId,
@RequestParam(required = false,value = "PageSize" ,defaultValue = "10") Integer PageSize,
@RequestParam(required = false,value = "PageSize" ,defaultValue = "10") Integer pageSize,
@RequestParam(required = false,value = "pageNum",defaultValue = "1") Integer pageNum) {
LoginUserInfo user = CurrentUserHolder.getUser();
return ResponseResult.success(exhibitionService.getExhibitionLineList(exhibitionId,participationStatus,partnerId,PageSize,pageNum,user.getUserId()));
return ResponseResult.success(exhibitionService.getExhibitionLineList(exhibitionId,participationStatus,partnerId,pageSize,pageNum,user.getUserId()));
}

View File

@@ -4,7 +4,6 @@ import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.exception.ApiException;
import com.cool.store.request.*;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.FeiShuService;
import com.cool.store.service.InterviewService;
import com.cool.store.vo.EnterInterviewVO;
import com.cool.store.vo.interview.CreateAppointmentVO;

View File

@@ -10,7 +10,6 @@ import com.cool.store.vo.interview.GetInterviewInspectionHistoryListVO;
import com.cool.store.vo.interview.InterviewInspectionHistoryInfo;
import com.cool.store.vo.interview.InterviewInspectionInfo;
import com.cool.store.vo.interview.InterviewInspectionVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@@ -36,7 +36,7 @@ public class LineHighSeasController {
@PostMapping(value = "/import")
@ApiOperation("批量导入线索")
public ResponseResult importLine(@RequestParam(value = "file") MultipartFile file) throws Exception {
public ResponseResult importLine(@RequestParam(value = "file") MultipartFile file) {
return lineHighSeasService.importLine(file);
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dto.login.FeiShuLoginDTO;
@@ -45,12 +46,9 @@ public class LoginController {
if(Objects.isNull(userInfo)){
throw new ServiceException(ErrorCodeEnum.LOGIN_ERROR);
}
log.info("userInfo:{}", JSONObject.toJSONString(userInfo));
log.info("userInfo:{}", JSON.toJSONString(userInfo));
String userId = userInfo.getOpenId();
return ResponseResult.success(loginService.feiShuLogin(userId, Boolean.TRUE, StringUtils.EMPTY));
} catch (ServiceException e) {
log.error(e.getMessage(), e);
throw new ServiceException(ErrorCodeEnum.LOGIN_ERROR);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new ServiceException(ErrorCodeEnum.LOGIN_ERROR);

View File

@@ -1,7 +1,6 @@
package com.cool.store.controller;
import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.OSSClientBuilder;
import com.aliyun.oss.common.utils.BinaryUtil;
import com.aliyun.oss.model.MatchMode;
@@ -14,7 +13,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
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 java.sql.Date;

View File

@@ -4,13 +4,14 @@ import com.cool.store.dto.sms.SendInvateMsgDTO;
import com.cool.store.exception.ApiException;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.SmsService;
import com.cool.store.vo.role.RolePageVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
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;
/**
* @Author: young.yu

View File

@@ -1,5 +1,6 @@
package com.cool.store.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyPartnerTaskInfoLogDAO;
@@ -7,19 +8,15 @@ 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.log.LineLogInfo;
import com.cool.store.dto.message.SendCardMessageDTO;
import com.cool.store.dto.response.ResultDTO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.IDCardSideEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.HyOpenAreaInfoMapper;
import com.cool.store.http.ISVHttpRequest;
import com.cool.store.request.City;
import com.cool.store.mapper.HyOpenAreaInfoMapper;
import com.cool.store.request.TestRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.*;
@@ -27,12 +24,9 @@ import com.cool.store.vo.cuser.IdentityCardInfoVO;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
@@ -68,70 +62,10 @@ public class TestController {
@Autowired
private WechatMiniAppService wechatMiniAppService;
// @Value("${logging.config}")
// private String loggingConfig;
//
// @GetMapping("/log/config")
// public String testLoggingConfig() {
// log.debug("Test");
// return loggingConfig;
// }
@PostMapping("/post")
public ResponseResult<Boolean> get(@RequestBody List<TestRequest> testRequestList){
log.info(JSONObject.toJSONString(testRequestList));
for (TestRequest testRequest:testRequestList) {
//省市区
String name = testRequest.getName();
HyOpenAreaInfoDO hyOpenAreaInfoDO = new HyOpenAreaInfoDO();
String replace = name.replace(" ", "");
hyOpenAreaInfoDO.setAreaName(replace);
String regionPath = "/"+replace+"/";
hyOpenAreaInfoDO.setAreaPath(regionPath);
hyOpenAreaInfoDO.setAreaStatus("open");
hyOpenAreaInfoMapper.insertSelective(hyOpenAreaInfoDO);
Long id = hyOpenAreaInfoDO.getId();
log.info("yuyyyyyyyyyyyyyyyyyyyyy:{}",JSONObject.toJSONString(hyOpenAreaInfoDO));
List<City> city = testRequest.getCity();
for (City c:city) {
String regionPath2 = "";
Long id1 = 0L;
if (c.getName().equals("其他")){
continue;
}
if (c.getName().equals(replace)){
//直辖市
regionPath2 = regionPath;
id1 = id;
}else {
regionPath2 = regionPath +c.getName().replace(" ","")+"/";
hyOpenAreaInfoDO = new HyOpenAreaInfoDO();
hyOpenAreaInfoDO.setAreaName(c.getName().replace(" ",""));
hyOpenAreaInfoDO.setAreaStatus("open");
hyOpenAreaInfoDO.setAreaPath(regionPath2);
hyOpenAreaInfoDO.setParentId(id);
hyOpenAreaInfoMapper.insertSelective(hyOpenAreaInfoDO);
log.info("33333333333333333333333333333333:{}",JSONObject.toJSONString(hyOpenAreaInfoDO));
id1 = hyOpenAreaInfoDO.getId();
}
List<String> area = c.getArea();
for (String c1:area) {
if (c1.equals("其他")){
continue;
}
String regionPath1 = regionPath2 +c1.replace(" ","")+"/";
hyOpenAreaInfoDO = new HyOpenAreaInfoDO();
hyOpenAreaInfoDO.setAreaName(c1.replace(" ",""));
hyOpenAreaInfoDO.setAreaStatus("open");
hyOpenAreaInfoDO.setAreaPath(regionPath1);
hyOpenAreaInfoDO.setParentId(id1);
log.info("hhhhhhhhhhhhhhhhhhhhhhhhhhhh:{}",JSONObject.toJSONString(hyOpenAreaInfoDO));
hyOpenAreaInfoMapper.insertSelective(hyOpenAreaInfoDO);
}
}
}
return ResponseResult.success();
log.info(JSON.toJSONString(testRequestList));
return ResponseResult.success(Boolean.TRUE);
}
@GetMapping("getUserInfo")

View File

@@ -23,24 +23,6 @@ public class VideoController {
@Autowired
private TRTCVideoService videoService;
// @PostMapping("/callback")
// @ApiOperation("音视频回调(腾讯云回调)")
// public ResponseResult videoCallback(@RequestBody String requestBody) {
// log.info("腾讯音视频上传完成回调request{}", JSONObject.toJSONString(requestBody));
// //由于腾讯云恶事做尽,它的回调参数不是驼峰法,首字母是大写,导致 SpringMVC 映射不上,只能手动映射了
// TRTCVideoCallBackReq req = JSONObject.parseObject(requestBody, TRTCVideoCallBackReq.class);
// //不是音视频上传的回调
// if (!"311".equals(req.getEventType())) {
// return null;
// }
// if (!"0".equals(req.getEventInfo().getPayLoad().getStatus())) {
// log.error("腾讯音视频录制视频上传错误request\t{}", req);
// return null;
// }
// videoService.handleVideoCallBack(req);
// return new ResponseResult(0, "腾讯云回调音视频回调数据接收成功");
// }
@PostMapping("/callback")
@ApiOperation("音视频回调(腾讯云回调)")
public ResponseResult videoCallback(@RequestBody VideoCallBackDTO videoCallBackDTO) {

View File

@@ -1,6 +1,7 @@
package com.cool.store.service;
import com.cool.store.dao.EnterpriseUserDAO;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@@ -13,16 +14,17 @@ import java.util.Map;
* @author Fun Li 2023/10/25 10:52
* @version 1.0
*/
@Slf4j
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class EnterpriseUserInfoDAOTest extends AbstractJUnit4SpringContextTests {
class EnterpriseUserInfoDAOTest extends AbstractJUnit4SpringContextTests {
@Autowired
EnterpriseUserDAO enterpriseUserDAO;
@Test
public void testGetFeishuUserId() {
void testGetFeishuUserId() {
Map<String, String> feishuUserIdsByUserIds = enterpriseUserDAO.getFeishuUserIdsByUserIds(Arrays.asList("ou_473e7063755c39b932028ec64914b500", "ou_72c0cf5fd9c50f05d7e1208449446a00"));
System.out.println(feishuUserIdsByUserIds);
log.info(feishuUserIdsByUserIds.toString());
}
}

View File

@@ -5,6 +5,7 @@ import com.cool.store.enums.FeiShuNoticeMsgEnum;
import com.cool.store.enums.SMSMsgEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.http.EventCenterHttpRequest;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@@ -16,6 +17,7 @@ import java.util.Arrays;
* @author Fun Li 2023/10/24 10:48
* @version 1.0
*/
@Slf4j
//SpringBootTest 默认不启动 web 环境,会导致 websocket 发现 web 容器不可用而报错,所以需要指定 web 环境
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class EventRequestTest extends AbstractJUnit4SpringContextTests {
@@ -25,33 +27,33 @@ public class EventRequestTest extends AbstractJUnit4SpringContextTests {
@Test
public void test() {
System.out.println("test");
log.info("test");
}
@Test
public void testSendFeiShuNotice() throws ApiException {
//招商企业
//eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList("34f4a9ga"), "测试");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList("34f4a9ga"), "测试");
//任务中枢企业
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER, Arrays.asList("661c6cfg"), "2023-10-24 10:09:04", "测试", "1008611");
}
@Test
public void testFeishuNotice() throws ApiException {
// //1. 工作台通知
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList("34f4a9ga"), "测试");
// //2. 分配招商经理
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER, Arrays.asList("34f4a9ga"), "2011-11-11 11:11:11", "测试", "1008611");
// //3. 转让招商经理
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.TRANS_INVESTMENT_MANAGER, Arrays.asList("34f4a9ga"), "2011-11-11 11:11:11", "测试", "1008611");
// //4. 收到新线索
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER, Arrays.asList("34f4a9ga"), "1", "2023-10-24 16:40:07");
// //5. 加盟意向申请
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTENTION_APPLY, Arrays.asList("34f4a9ga"), "测试", "1008611", "2023-10-24 16:40:07");
// //6. 线索跟进任务
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.FOLLOW_TASK, Arrays.asList("34f4a9ga"), "测试线索跟进任务");
// //7. 面试预约申请
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList("34f4a9ga"), "测试", "1008611", "2023-10-24 16:40:07");
//1. 工作台通知
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList("34f4a9ga"), "测试");
//2. 分配招商经理
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER, Arrays.asList("34f4a9ga"), "2011-11-11 11:11:11", "测试", "1008611");
//3. 转让招商经理
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.TRANS_INVESTMENT_MANAGER, Arrays.asList("34f4a9ga"), "2011-11-11 11:11:11", "测试", "1008611");
//4. 收到新线索
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER, Arrays.asList("34f4a9ga"), "1", "2023-10-24 16:40:07");
//5. 加盟意向申请
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTENTION_APPLY, Arrays.asList("34f4a9ga"), "测试", "1008611", "2023-10-24 16:40:07");
//6. 线索跟进任务
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.FOLLOW_TASK, Arrays.asList("34f4a9ga"), "测试线索跟进任务");
//7. 面试预约申请
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList("34f4a9ga"), "测试", "1008611", "2023-10-24 16:40:07");
//8. 会销协作通知
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR, Arrays.asList("34f4a9ga"), "4", "老大", "会销", "2023-12-31", "系东方大酒店");
}

View File

@@ -3,6 +3,7 @@ package com.cool.store.service;
import com.cool.store.exception.ApiException;
import com.cool.store.http.MDMHttpRequest;
import com.cool.store.response.mdm.BusinessRegion;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@@ -15,7 +16,8 @@ import java.util.List;
* @version 1.0
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class TestMDM extends AbstractJUnit4SpringContextTests {
@Slf4j
class TestMDM extends AbstractJUnit4SpringContextTests {
@Autowired
MDMHttpRequest mdmHttpRequest;
@@ -24,11 +26,11 @@ public class TestMDM extends AbstractJUnit4SpringContextTests {
MDMAreaService mdmAreaService;
@Test
public void testGetBusinessRegion() throws ApiException {
//List<BusinessRegion> businessRegion = mdmAreaService.getBusinessRegion();
//mdmAreaService.getBelongRegion();
void testGetBusinessRegion() throws ApiException {
List<BusinessRegion> businessRegion = mdmAreaService.getBusinessRegion();
mdmAreaService.getBelongRegion();
mdmHttpRequest.getDictList();
//System.out.println(businessRegion);
log.info(businessRegion.toString());
}
}