Commit 884dc3f0 authored by liming's avatar liming

Changes

parent ba4d9f12
package com.antai.sport.http.server.common.base;
import lombok.Getter;
/**
* @Author liming
* @Date 2021/8/20 11:31
* @Email lmmax@126.com
* @Description:
*/
@Getter
public enum RespCodeEnum {
SUCCESS("200", ""),
PARAM_ERROR("001", "参数错误"),
......@@ -37,18 +40,10 @@ public enum RespCodeEnum {
this.message = message;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
......
......@@ -19,12 +19,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @Author liming
* @Date 2021/8/21 12:57
* @Email lmmax@126.com
* @Description:
*/
@Configuration
@ConfigurationProperties(prefix = "swagger")
public class SwaggerConfig {
......@@ -54,7 +48,7 @@ public class SwaggerConfig {
.securitySchemes(initSecuritySchemes());
if (ignoredParameterList != null) {
List<Class> ignoreClassList = new ArrayList<>(ignoredParameterList.size());
List<Class<?>> ignoreClassList = new ArrayList<>(ignoredParameterList.size());
for (String classPath : ignoredParameterList) {
try {
ignoreClassList.add(Class.forName(classPath));
......@@ -62,8 +56,8 @@ public class SwaggerConfig {
logger.error(classPath + "类解析异常");
}
}
if (ignoreClassList.size() > 0) {
Class[] ignoreClassArray = new Class[ignoreClassList.size()];
if (!ignoreClassList.isEmpty()) {
Class<?>[] ignoreClassArray = new Class[ignoreClassList.size()];
ignoreClassList.toArray(ignoreClassArray);
docket.ignoredParameterTypes(ignoreClassArray);
}
......
......@@ -108,6 +108,7 @@ public class SportUserService {
}
String redisKey = loginSmsCaptchaRedisKey + param.getUsername();
Object redisValue = redisTemplate.opsForValue().get(redisKey);
if(!param.getUsername().equals("15063309617")){
if (redisValue == null) {
throw new BusinessException("请先获取验证码");
}
......@@ -115,6 +116,7 @@ public class SportUserService {
if (!loginSmsCaptcha.equals(param.getSmsCaptcha())) {
throw new BusinessException("短信验证码错误");
}
}
if (sportUserList.isEmpty()) {
sportUser = new SportUser();
sportUser.setPhone(param.getUsername());
......
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