Commit 6df91cd5 by kenzo

add test env

parent 0b3a270f
package com.cnooc.expert.controller.auth;
import com.alibaba.fastjson.JSON;
import com.cnooc.expert.auth.service.SysCaptchaService;
import com.cnooc.expert.common.constant.TokenConstants;
import com.cnooc.expert.common.response.ApiResult;
import com.cnooc.expert.auth.service.LoginService;
import com.cnooc.expert.common.utils.JwtUtils;
import com.cnooc.expert.common.utils.KafkaProducerUtil;
import com.cnooc.expert.controller.auth.model.request.VerifyRequest;
import com.cnooc.expert.controller.auth.model.response.SlideCaptchaVO;
import com.cnooc.expert.external.expert.model.response.ExpertInfoResp;
import com.cnooc.expert.system.entity.pojo.ZhuanJiaUser;
import com.cnooc.expert.service.auth.LoginService;
import com.cnooc.expert.service.auth.SysCaptchaService;
import com.cnooc.expert.system.entity.vo.LoginVO;
import com.cnooc.expert.system.entity.vo.SysCaptchaVO;
import com.cnooc.expert.system.entity.vo.VerifyCodeVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
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 javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Slf4j
@RestController
......@@ -105,6 +98,7 @@ public class LoginController {
/**
* 手机号验证码/身份证号密码 登录功能
*
* @param loginVO 登录表单
* @return Result<String> 统一返回操作码及信息
*/
......@@ -113,8 +107,10 @@ public class LoginController {
// 校验loginType 不为空
return ApiResult.successWithResult(loginService.login(loginVO));
}
/**
* 获取验证码
*
* @param vo 手机号等信息
* @return Result<Integer> 统一返回操作结果及验证码
*/
......@@ -124,12 +120,15 @@ public class LoginController {
log.info("获取验证码的手机号: {}", vo.getPhoneNumber());
return ApiResult.successWithResult(loginService.sendPhoneCode(vo));
}
@PostMapping("/verifyCode")
public ApiResult<String> verifyCode(@RequestBody VerifyCodeVO codeVO) {
return ApiResult.successWithResult(loginService.verifyCode(codeVO));
}
/**
* 账号修改
*
* @param loginVO
* @return
*/
......@@ -156,7 +155,7 @@ public class LoginController {
response.put("backgroundImage", captchaVO.getBackgroundImage());
response.put("slideImage", captchaVO.getSlideImage());
response.put("token", captchaVO.getToken());
response.put("startY",String.valueOf(captchaVO.getStartY()));
response.put("startY", String.valueOf(captchaVO.getStartY()));
return ApiResult.successWithResult(response);
}
......@@ -164,7 +163,7 @@ public class LoginController {
public ApiResult<Map<String, Object>> verifySlideCaptcha(
@RequestBody VerifyRequest request) {
Map<String, Object> result = new HashMap<>();
boolean flag = sysCaptchaService.validateSlide(request.getToken(),request.getMoveX());
boolean flag = sysCaptchaService.validateSlide(request.getToken(), request.getMoveX());
String msg = "验证成功";
if (!flag) {
msg = "验证失败";
......
......@@ -66,7 +66,7 @@ import com.cnooc.expert.external.expert.model.response.ViolationExpertPageApiRes
import com.cnooc.expert.external.expert.model.response.XiangMuInfoByChouQuNumGetApiResp;
import com.cnooc.expert.external.expert.model.response.ZhuanJiaInfoGetByBusinessIdApiResp;
import com.cnooc.expert.external.expert.model.response.ZhuanJiaPingBiaoXiangMuRenWuPageApiResp;
import com.cnooc.expert.service.ExpertService;
import com.cnooc.expert.service.expert.ExpertService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
......@@ -66,14 +66,11 @@ import com.cnooc.expert.controller.expert.model.response.ZhuanJiaShenQingJiLuPag
import com.cnooc.expert.external.expert.model.request.ApproveNodeGetApiReq;
import com.cnooc.expert.external.expert.model.request.ExamPaperSubmitApiReq;
import com.cnooc.expert.external.expert.model.request.TainLessonProgressUpdateApiReq;
import com.cnooc.expert.external.expert.model.response.ApproveNodeGetApiResp;
import com.cnooc.expert.external.expert.model.response.CommonFuJianListApiResp;
import com.cnooc.expert.external.expert.model.response.FirstCategoryExpertApplyApiResp;
import com.cnooc.expert.external.expert.model.response.GeRenXiuJiaZhuXiaoTimeUpdateApiResp;
import com.cnooc.expert.external.expert.model.response.TainLessonProgressUpdateApiResp;
import com.cnooc.expert.external.expert.model.response.TrainCourseLessonGetApiResp;
import com.cnooc.expert.external.expert.model.response.TrainExamPageApiResp;
import com.cnooc.expert.service.ExpertMockService;
import com.cnooc.expert.service.expert.ExpertMockService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
......@@ -5,7 +5,7 @@ import com.cnooc.expert.controller.common.AbstractBaseController;
import com.cnooc.expert.controller.file.model.request.DownloadInfoReq;
import com.cnooc.expert.external.file.model.response.DownLoadInfoApiResp;
import com.cnooc.expert.service.FileService;
import com.cnooc.expert.service.file.FileService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
......@@ -4,7 +4,7 @@ import com.cnooc.expert.common.response.ApiResult;
import com.cnooc.expert.controller.common.AbstractBaseController;
import com.cnooc.expert.controller.file.model.request.DownloadInfoReq;
import com.cnooc.expert.external.file.model.response.DownLoadInfoApiResp;
import com.cnooc.expert.service.FileMockService;
import com.cnooc.expert.service.file.FileMockService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
......@@ -8,9 +8,8 @@ import com.cnooc.expert.controller.portal.model.request.AgentPageReq;
import com.cnooc.expert.controller.portal.model.request.MessagePageReq;
import com.cnooc.expert.controller.portal.model.response.AgentNumResp;
import com.cnooc.expert.controller.portal.model.response.MessageNumResp;
import com.cnooc.expert.service.PortalService;
import com.cnooc.expert.service.portal.PortalService;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
......@@ -8,8 +8,7 @@ import com.cnooc.expert.controller.portal.model.request.AgentPageReq;
import com.cnooc.expert.controller.portal.model.request.MessagePageReq;
import com.cnooc.expert.controller.portal.model.response.AgentNumResp;
import com.cnooc.expert.controller.portal.model.response.MessageNumResp;
import com.cnooc.expert.service.PortalMockService;
import com.cnooc.expert.service.PortalService;
import com.cnooc.expert.service.portal.PortalMockService;
import com.fasterxml.jackson.core.JsonProcessingException;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
......
......@@ -5,7 +5,7 @@ import com.cnooc.expert.controller.common.AbstractBaseController;
import com.cnooc.expert.controller.subject.model.request.CompanyPageReq;
import com.cnooc.expert.external.common.model.response.ApiBasePageResp;
import com.cnooc.expert.external.subject.model.response.PlatformCompanyPageApiResp;
import com.cnooc.expert.service.SubjectService;
import com.cnooc.expert.service.subject.SubjectService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
......@@ -5,8 +5,7 @@ import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.common.AbstractBaseController;
import com.cnooc.expert.controller.subject.model.request.CompanyPageReq;
import com.cnooc.expert.controller.subject.model.response.CompanyPageResp;
import com.cnooc.expert.service.SubjectMockService;
import com.cnooc.expert.service.SubjectService;
import com.cnooc.expert.service.subject.SubjectMockService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
......@@ -15,7 +15,7 @@ import com.cnooc.expert.external.workflow.model.response.InstCalculateApiResp;
import com.cnooc.expert.external.workflow.model.response.InstStartApiResp;
import com.cnooc.expert.external.workflow.model.response.ProcDefPageApiResp;
import com.cnooc.expert.external.workflow.model.response.ReceiveSettingByConditionFindApiResp;
import com.cnooc.expert.service.WorkflowService;
import com.cnooc.expert.service.workflow.WorkflowService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
......@@ -15,9 +15,7 @@ import com.cnooc.expert.external.workflow.model.request.ApprovePathSettingSaveOr
import com.cnooc.expert.external.workflow.model.request.InstCalculateApiReq;
import com.cnooc.expert.external.workflow.model.request.InstRevokeApiReq;
import com.cnooc.expert.external.workflow.model.request.InstStartApiReq;
import com.cnooc.expert.external.workflow.model.response.ApprovePathSettingByConditionGetApiResp;
import com.cnooc.expert.external.workflow.model.response.ReceiveSettingByConditionFindApiResp;
import com.cnooc.expert.service.WorkflowMockService;
import com.cnooc.expert.service.workflow.WorkflowMockService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
package com.cnooc.expert.auth.service;
package com.cnooc.expert.service.auth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.concurrent.TimeUnit;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.concurrent.TimeUnit;
@Service
public class AccountLockService {
......
package com.cnooc.expert.auth.service;
package com.cnooc.expert.service.auth;
import com.cnooc.expert.system.entity.pojo.ZhuanJiaUser;
import com.cnooc.expert.system.entity.vo.LoginVO;
......
package com.cnooc.expert.auth.service;
package com.cnooc.expert.service.auth;
import com.cnooc.expert.system.entity.pojo.SlideImageResult;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Service;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.geom.RoundRectangle2D;
......
package com.cnooc.expert.auth.service;
package com.cnooc.expert.service.auth;
public interface SmsService {
......
package com.cnooc.expert.auth.service;
package com.cnooc.expert.service.auth;
import com.cnooc.expert.controller.auth.model.response.SlideCaptchaVO;
import com.cnooc.expert.system.entity.vo.SysCaptchaVO;
......
package com.cnooc.expert.auth.service;
package com.cnooc.expert.service.auth;
public class Test {
}
package com.cnooc.expert.auth.service.impl;
package com.cnooc.expert.service.auth.impl;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.IdcardUtil;
import com.cnooc.expert.auth.service.AccountLockService;
import com.cnooc.expert.common.constant.TokenConstants;
import com.cnooc.expert.common.exception.BusinessException;
import com.cnooc.expert.common.exception.GlobalErrorCodeConstants;
......@@ -13,17 +12,18 @@ import com.cnooc.expert.common.utils.ValidUtils;
import com.cnooc.expert.external.expert.auth.service.LoginServicesClient;
import com.cnooc.expert.external.expert.model.response.ExpertInfoAppResp;
import com.cnooc.expert.external.expert.model.response.ExpertInfoResp;
import com.cnooc.expert.service.auth.AccountLockService;
import com.cnooc.expert.service.auth.LoginService;
import com.cnooc.expert.service.auth.SmsService;
import com.cnooc.expert.service.auth.SysCaptchaService;
import com.cnooc.expert.system.entity.pojo.ZhuanJiaUser;
import com.cnooc.expert.system.entity.vo.LoginVO;
import com.cnooc.expert.system.entity.vo.VerifyCodeVO;
import com.cnooc.expert.auth.service.LoginService;
import com.cnooc.expert.auth.service.SmsService;
import com.cnooc.expert.auth.service.SysCaptchaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
......
package com.cnooc.expert.auth.service.impl;
package com.cnooc.expert.service.auth.impl;
import cn.hutool.core.util.RandomUtil;
import com.cnooc.expert.common.constant.TokenConstants;
import com.cnooc.expert.common.utils.JsonUtils;
import com.cnooc.expert.common.utils.SmsHttpUtil;
import com.cnooc.expert.common.utils.SmsUtil;
import com.cnooc.expert.service.auth.SmsService;
import com.cnooc.expert.system.entity.vo.SmsConfig;
import com.cnooc.expert.auth.service.SmsService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.util.concurrent.TimeUnit;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
@Service
@AllArgsConstructor
......
package com.cnooc.expert.auth.service.impl;
package com.cnooc.expert.service.auth.impl;
import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.cnooc.expert.common.cache.RedisKeys;
import com.cnooc.expert.auth.service.*;
import com.cnooc.expert.controller.auth.model.response.SlideCaptchaVO;
import com.cnooc.expert.service.auth.SlideCaptchaService;
import com.cnooc.expert.service.auth.SysCaptchaService;
import com.cnooc.expert.system.entity.pojo.CaptchaData;
import com.cnooc.expert.system.entity.pojo.SlideImageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import com.cnooc.expert.system.entity.vo.SysCaptchaVO;
import com.wf.captcha.SpecCaptcha;
import com.wf.captcha.base.Captcha;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.util.concurrent.TimeUnit;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.expert;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.expert.model.request.CommonFuJianListReq;
......@@ -73,7 +73,6 @@ import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.expert;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.expert.model.request.CommonFuJianListReq;
......@@ -11,7 +11,6 @@ import com.cnooc.expert.controller.expert.model.request.ExpertInfoUpdateApiReq;
import com.cnooc.expert.controller.expert.model.request.FirstCategoryExpertApplyReq;
import com.cnooc.expert.controller.expert.model.request.GeRenXiuJiaApplyReq;
import com.cnooc.expert.controller.expert.model.request.GeRenXiuJiaPageReq;
import com.cnooc.expert.controller.expert.model.request.GeRenXiuJiaZhuXiaoTimeUpdateReq;
import com.cnooc.expert.controller.expert.model.request.PingBiaoXiangMuByOwnerPageReq;
import com.cnooc.expert.controller.expert.model.request.PingBiaoXiangMuInfoGetByChouQuMaReq;
import com.cnooc.expert.controller.expert.model.request.QingJiaJinJiApplyReq;
......@@ -90,6 +89,7 @@ import com.cnooc.expert.external.expert.model.response.XiangMuInfoByChouQuNumGet
import com.cnooc.expert.external.expert.model.response.ZhuanJiaInfoGetByBusinessIdApiResp;
import com.cnooc.expert.external.expert.model.response.ZhuanJiaPingBiaoXiangMuRenWuPageApiResp;
import com.cnooc.expert.external.expert.service.ExpertServiceClient;
import com.cnooc.expert.service.UserInfoUtils;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.file;
import com.cnooc.expert.external.file.model.response.DownLoadInfoApiResp;
import com.google.common.collect.Lists;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.file;
import com.cnooc.expert.external.common.model.response.ApiBaseResult;
import com.cnooc.expert.external.file.model.response.DownLoadInfoApiResp;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.portal;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.portal.model.request.AgentNumReq;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.portal;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.portal.model.request.AgentNumReq;
......@@ -9,19 +9,7 @@ import com.cnooc.expert.controller.portal.model.response.AgentNumResp;
import com.cnooc.expert.controller.portal.model.response.AgentPageResp;
import com.cnooc.expert.controller.portal.model.response.MessageNumResp;
import com.cnooc.expert.controller.portal.model.response.MessagePageResp;
import com.cnooc.expert.external.common.model.response.ApiBasePageResp;
import com.cnooc.expert.external.common.model.response.ApiBaseResult;
import com.cnooc.expert.external.portal.model.request.AgentNumGetApiReq;
import com.cnooc.expert.external.portal.model.request.AgentNumPageApiReq;
import com.cnooc.expert.external.portal.model.request.MessageNumGetApiReq;
import com.cnooc.expert.external.portal.model.request.MessageNumPageApiReq;
import com.cnooc.expert.external.portal.model.response.AgentNumGetApiResp;
import com.cnooc.expert.external.portal.model.response.AgentNumPageApiResp;
import com.cnooc.expert.external.portal.model.response.MessageNumGetApiResp;
import com.cnooc.expert.external.portal.model.response.MessageNumPageApiResp;
import com.cnooc.expert.external.portal.service.PortalServiceClient;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.subject;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.subject.model.request.CompanyPageReq;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.subject;
import com.cnooc.expert.controller.subject.model.request.CompanyPageReq;
import com.cnooc.expert.external.common.model.response.ApiBasePageResp;
......@@ -6,6 +6,7 @@ import com.cnooc.expert.external.common.model.response.ApiBaseResult;
import com.cnooc.expert.external.subject.model.request.PlatformCompanyPageApiReq;
import com.cnooc.expert.external.subject.model.response.PlatformCompanyPageApiResp;
import com.cnooc.expert.external.subject.service.SubjectServiceClient;
import com.cnooc.expert.service.UserInfoUtils;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.workflow;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.workflow.model.request.ApprovePathSettingByConditionGetReq;
......
package com.cnooc.expert.service;
package com.cnooc.expert.service.workflow;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.workflow.model.request.ApprovePathSettingByConditionGetReq;
import com.cnooc.expert.controller.workflow.model.request.ApprovePathSettingPageReq;
import com.cnooc.expert.controller.workflow.model.response.ApprovePathSettingPageResp;
import com.cnooc.expert.external.common.model.request.ProcDefPageApiReq;
import com.cnooc.expert.external.common.model.response.ApiBaseResult;
import com.cnooc.expert.external.common.model.response.ApiPagination;
......@@ -18,7 +17,6 @@ import com.cnooc.expert.external.workflow.model.response.InstStartApiResp;
import com.cnooc.expert.external.workflow.model.response.ProcDefPageApiResp;
import com.cnooc.expert.external.workflow.model.response.ReceiveSettingByConditionFindApiResp;
import com.cnooc.expert.external.workflow.service.WorkflowServiceClient;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
......
......@@ -3,7 +3,7 @@ spring:
redis:
cluster:
nodes:
- redis-lx4jynhqql55-svc.redis-lx4jynhqql55:6379
- redis-zkyhpe1bd033-svc.redis-zkyhpe1bd033:6379
max-redirects: 3
lettuce:
cluster:
......
# important-dev.properties
aks.config.security.mode=local
aks.config.security.prefix=AKSSEC(
aks.config.security.suffix=)AKSSEC
# Demo
#spring.redis.password=AKSSEC(RjZaaDu+5E6BMnDAm5ZG+A==)AKSSEC
\ No newline at end of file
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