style: 应用 Spotless 代码格式化
- 对所有 Java 源文件应用统一的代码格式化 - 统一缩进为 4 个空格 - 清理尾随空白字符和文件末尾换行 - 优化导入语句组织 - 总计格式化 654 个 Java 文件 有问题可以回滚或者找我聊
This commit is contained in:
@@ -97,8 +97,10 @@ mvn spring-boot:run
|
|||||||
项目集成了 Spotless 和 Checkstyle 插件:
|
项目集成了 Spotless 和 Checkstyle 插件:
|
||||||
|
|
||||||
#### Spotless (代码格式化)
|
#### Spotless (代码格式化)
|
||||||
- 使用 Google Java Format 自动格式化代码
|
- 基于空格的缩进 (4个空格)
|
||||||
- 支持 Java、XML、JSON、YAML 等文件格式
|
- 自动清理尾随空白字符
|
||||||
|
- 文件末尾添加换行符
|
||||||
|
- 基本的导入组织
|
||||||
|
|
||||||
常用命令:
|
常用命令:
|
||||||
```bash
|
```bash
|
||||||
@@ -110,8 +112,9 @@ mvn spotless:apply
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### Checkstyle (代码规范检查)
|
#### Checkstyle (代码规范检查)
|
||||||
- 使用 Google Java 编码规范
|
- 使用 Sun Java 编码规范 (比 Google 规范更宽松)
|
||||||
- 在编译时自动检查代码规范
|
- 在编译时自动检查代码规范
|
||||||
|
- 与 Java 11 和 Lombok 兼容
|
||||||
|
|
||||||
常用命令:
|
常用命令:
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -12,6 +12,5 @@ import java.lang.annotation.*;
|
|||||||
@Documented
|
@Documented
|
||||||
public @interface ClerkUserLogin {
|
public @interface ClerkUserLogin {
|
||||||
|
|
||||||
|
|
||||||
boolean manage() default false;
|
boolean manage() default false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,16 +8,15 @@ import com.starry.admin.modules.weichat.service.WxTokenService;
|
|||||||
import com.starry.common.constant.Constants;
|
import com.starry.common.constant.Constants;
|
||||||
import com.starry.common.constant.HttpStatus;
|
import com.starry.common.constant.HttpStatus;
|
||||||
import com.starry.common.utils.StringUtils;
|
import com.starry.common.utils.StringUtils;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
import org.aspectj.lang.annotation.Before;
|
import org.aspectj.lang.annotation.Before;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 限流处理
|
* 限流处理
|
||||||
*
|
*
|
||||||
@@ -28,7 +27,6 @@ import java.util.Objects;
|
|||||||
@Component
|
@Component
|
||||||
public class ClerkUserLoginAspect {
|
public class ClerkUserLoginAspect {
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private PlayClerkUserInfoServiceImpl clerkUserInfoService;
|
private PlayClerkUserInfoServiceImpl clerkUserInfoService;
|
||||||
|
|
||||||
@@ -37,7 +35,6 @@ public class ClerkUserLoginAspect {
|
|||||||
@Resource
|
@Resource
|
||||||
private HttpServletRequest request;
|
private HttpServletRequest request;
|
||||||
|
|
||||||
|
|
||||||
@Before("@annotation(clerkUserLogin)")
|
@Before("@annotation(clerkUserLogin)")
|
||||||
public void doBefore(JoinPoint point, ClerkUserLogin clerkUserLogin) {
|
public void doBefore(JoinPoint point, ClerkUserLogin clerkUserLogin) {
|
||||||
String userToken = request.getHeader(Constants.CLERK_USER_LOGIN_TOKEN);
|
String userToken = request.getHeader(Constants.CLERK_USER_LOGIN_TOKEN);
|
||||||
|
|||||||
@@ -12,6 +12,5 @@ import java.lang.annotation.*;
|
|||||||
@Documented
|
@Documented
|
||||||
public @interface CustomUserLogin {
|
public @interface CustomUserLogin {
|
||||||
|
|
||||||
|
|
||||||
boolean manage() default false;
|
boolean manage() default false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,16 +8,15 @@ import com.starry.admin.modules.weichat.service.WxTokenService;
|
|||||||
import com.starry.common.constant.Constants;
|
import com.starry.common.constant.Constants;
|
||||||
import com.starry.common.constant.HttpStatus;
|
import com.starry.common.constant.HttpStatus;
|
||||||
import com.starry.common.utils.StringUtils;
|
import com.starry.common.utils.StringUtils;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
import org.aspectj.lang.annotation.Before;
|
import org.aspectj.lang.annotation.Before;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 限流处理
|
* 限流处理
|
||||||
*
|
*
|
||||||
@@ -36,7 +35,6 @@ public class CustomUserLoginAspect {
|
|||||||
@Resource
|
@Resource
|
||||||
private HttpServletRequest request;
|
private HttpServletRequest request;
|
||||||
|
|
||||||
|
|
||||||
@Before("@annotation(customUserLogin)")
|
@Before("@annotation(customUserLogin)")
|
||||||
public void doBefore(JoinPoint point, CustomUserLogin customUserLogin) {
|
public void doBefore(JoinPoint point, CustomUserLogin customUserLogin) {
|
||||||
String userToken = request.getHeader(Constants.CUSTOM_USER_LOGIN_TOKEN);
|
String userToken = request.getHeader(Constants.CUSTOM_USER_LOGIN_TOKEN);
|
||||||
|
|||||||
@@ -10,14 +10,13 @@ import com.starry.common.annotation.DataScope;
|
|||||||
import com.starry.common.context.CustomSecurityContextHolder;
|
import com.starry.common.context.CustomSecurityContextHolder;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
import com.starry.common.utils.StringUtils;
|
import com.starry.common.utils.StringUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
import org.aspectj.lang.annotation.Before;
|
import org.aspectj.lang.annotation.Before;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据过滤处理
|
* 数据过滤处理
|
||||||
*
|
*
|
||||||
@@ -59,13 +58,19 @@ public class DataScopeAspect {
|
|||||||
/**
|
/**
|
||||||
* 数据范围过滤
|
* 数据范围过滤
|
||||||
*
|
*
|
||||||
* @param joinPoint 切点
|
* @param joinPoint
|
||||||
* @param user 用户
|
* 切点
|
||||||
* @param deptAlias 部门别名
|
* @param user
|
||||||
* @param userAlias 用户别名
|
* 用户
|
||||||
* @param permission 权限字符
|
* @param deptAlias
|
||||||
|
* 部门别名
|
||||||
|
* @param userAlias
|
||||||
|
* 用户别名
|
||||||
|
* @param permission
|
||||||
|
* 权限字符
|
||||||
*/
|
*/
|
||||||
public static void dataScopeFilter(JoinPoint joinPoint, SysUserEntity user, String deptAlias, String userAlias, String permission) {
|
public static void dataScopeFilter(JoinPoint joinPoint, SysUserEntity user, String deptAlias, String userAlias,
|
||||||
|
String permission) {
|
||||||
StringBuilder sqlString = new StringBuilder();
|
StringBuilder sqlString = new StringBuilder();
|
||||||
List<String> conditions = new ArrayList<>();
|
List<String> conditions = new ArrayList<>();
|
||||||
for (SysRoleEntity role : user.getRoles()) {
|
for (SysRoleEntity role : user.getRoles()) {
|
||||||
@@ -126,7 +131,8 @@ public class DataScopeAspect {
|
|||||||
SysUserEntity currentUser = loginUser.getUser();
|
SysUserEntity currentUser = loginUser.getUser();
|
||||||
// 如果是超级管理员,则不过滤数据
|
// 如果是超级管理员,则不过滤数据
|
||||||
if (StringUtils.isNotNull(currentUser) && SysUserEntity.isAdmin(currentUser)) {
|
if (StringUtils.isNotNull(currentUser) && SysUserEntity.isAdmin(currentUser)) {
|
||||||
String permission = StringUtils.defaultIfEmpty(controllerDataScope.permission(), CustomSecurityContextHolder.getPermission());
|
String permission = StringUtils.defaultIfEmpty(controllerDataScope.permission(),
|
||||||
|
CustomSecurityContextHolder.getPermission());
|
||||||
dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(),
|
dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(),
|
||||||
controllerDataScope.userAlias(), permission);
|
controllerDataScope.userAlias(), permission);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ import com.starry.admin.utils.SecurityUtils;
|
|||||||
import com.starry.common.annotation.Log;
|
import com.starry.common.annotation.Log;
|
||||||
import com.starry.common.utils.ServletUtils;
|
import com.starry.common.utils.ServletUtils;
|
||||||
import com.starry.common.utils.StringUtils;
|
import com.starry.common.utils.StringUtils;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.annotation.AfterReturning;
|
import org.aspectj.lang.annotation.AfterReturning;
|
||||||
@@ -19,13 +25,6 @@ import org.springframework.validation.BindingResult;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.HandlerMapping;
|
import org.springframework.web.servlet.HandlerMapping;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
*/
|
*/
|
||||||
@@ -40,7 +39,8 @@ public class LogAspect {
|
|||||||
/**
|
/**
|
||||||
* 处理完请求后执行
|
* 处理完请求后执行
|
||||||
*
|
*
|
||||||
* @param joinPoint 切点
|
* @param joinPoint
|
||||||
|
* 切点
|
||||||
*/
|
*/
|
||||||
@AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult")
|
@AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult")
|
||||||
public void doAfterReturn(JoinPoint joinPoint, Log controllerLog, Object jsonResult) {
|
public void doAfterReturn(JoinPoint joinPoint, Log controllerLog, Object jsonResult) {
|
||||||
@@ -88,10 +88,13 @@ public class LogAspect {
|
|||||||
/**
|
/**
|
||||||
* 获取注解中对方法的描述信息 用于Controller层注解
|
* 获取注解中对方法的描述信息 用于Controller层注解
|
||||||
*
|
*
|
||||||
* @param log 日志
|
* @param log
|
||||||
* @param operLog 操作日志
|
* 日志
|
||||||
|
* @param operLog
|
||||||
|
* 操作日志
|
||||||
*/
|
*/
|
||||||
public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperationLogEntity operLog, Object jsonResult) {
|
public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperationLogEntity operLog,
|
||||||
|
Object jsonResult) {
|
||||||
// 设置操作业务类型
|
// 设置操作业务类型
|
||||||
operLog.setBusinessType(log.businessType().ordinal());
|
operLog.setBusinessType(log.businessType().ordinal());
|
||||||
// 设置标题
|
// 设置标题
|
||||||
@@ -110,7 +113,8 @@ public class LogAspect {
|
|||||||
/**
|
/**
|
||||||
* 获取请求的参数,放到log中
|
* 获取请求的参数,放到log中
|
||||||
*
|
*
|
||||||
* @param operLog 操作日志
|
* @param operLog
|
||||||
|
* 操作日志
|
||||||
*/
|
*/
|
||||||
private void setRequestValue(JoinPoint joinPoint, SysOperationLogEntity operLog) {
|
private void setRequestValue(JoinPoint joinPoint, SysOperationLogEntity operLog) {
|
||||||
String requsetMethod = operLog.getRequestMethod();
|
String requsetMethod = operLog.getRequestMethod();
|
||||||
@@ -118,7 +122,8 @@ public class LogAspect {
|
|||||||
String params = argsArrayToString(joinPoint.getArgs());
|
String params = argsArrayToString(joinPoint.getArgs());
|
||||||
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
|
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
|
||||||
} else {
|
} else {
|
||||||
Map<?, ?> paramsMap = (Map<?, ?>) ServletUtils.getRequest().getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
|
Map<?, ?> paramsMap = (Map<?, ?>) ServletUtils.getRequest()
|
||||||
|
.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
|
||||||
operLog.setOperParam(StringUtils.substring(paramsMap.toString(), 0, 2000));
|
operLog.setOperParam(StringUtils.substring(paramsMap.toString(), 0, 2000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,7 +148,8 @@ public class LogAspect {
|
|||||||
/**
|
/**
|
||||||
* 判断是否需要过滤的对象。
|
* 判断是否需要过滤的对象。
|
||||||
*
|
*
|
||||||
* @param object 对象信息。
|
* @param object
|
||||||
|
* 对象信息。
|
||||||
* @return 如果是需要过滤的对象,则返回true;否则返回false。
|
* @return 如果是需要过滤的对象,则返回true;否则返回false。
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@@ -163,6 +169,7 @@ public class LogAspect {
|
|||||||
return entry.getValue() instanceof MultipartFile;
|
return entry.getValue() instanceof MultipartFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return object instanceof MultipartFile || object instanceof HttpServletRequest || object instanceof HttpServletResponse || object instanceof BindingResult;
|
return object instanceof MultipartFile || object instanceof HttpServletRequest
|
||||||
|
|| object instanceof HttpServletResponse || object instanceof BindingResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,21 +18,19 @@ import com.starry.common.utils.ip.IpUtils;
|
|||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
import io.jsonwebtoken.Jwts;
|
import io.jsonwebtoken.Jwts;
|
||||||
import io.jsonwebtoken.SignatureAlgorithm;
|
import io.jsonwebtoken.SignatureAlgorithm;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin token 组件
|
||||||
* token 组件
|
|
||||||
* @since 2021/9/6
|
* @since 2021/9/6
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -55,7 +53,6 @@ public class JwtToken {
|
|||||||
@Resource
|
@Resource
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从token中获取登录用户名
|
* 从token中获取登录用户名
|
||||||
*/
|
*/
|
||||||
@@ -91,7 +88,8 @@ public class JwtToken {
|
|||||||
/**
|
/**
|
||||||
* 创建令牌
|
* 创建令牌
|
||||||
*
|
*
|
||||||
* @param jwtUser 用户信息
|
* @param jwtUser
|
||||||
|
* 用户信息
|
||||||
* @return 令牌
|
* @return 令牌
|
||||||
*/
|
*/
|
||||||
public String createToken(JwtUser jwtUser) {
|
public String createToken(JwtUser jwtUser) {
|
||||||
@@ -108,7 +106,8 @@ public class JwtToken {
|
|||||||
/**
|
/**
|
||||||
* 从数据声明生成令牌
|
* 从数据声明生成令牌
|
||||||
*
|
*
|
||||||
* @param claims 数据声明
|
* @param claims
|
||||||
|
* 数据声明
|
||||||
* @return 令牌
|
* @return 令牌
|
||||||
*/
|
*/
|
||||||
private String createToken(Map<String, Object> claims) {
|
private String createToken(Map<String, Object> claims) {
|
||||||
@@ -140,7 +139,8 @@ public class JwtToken {
|
|||||||
/**
|
/**
|
||||||
* 从令牌中获取数据声明
|
* 从令牌中获取数据声明
|
||||||
*
|
*
|
||||||
* @param token 令牌
|
* @param token
|
||||||
|
* 令牌
|
||||||
* @return 数据声明
|
* @return 数据声明
|
||||||
*/
|
*/
|
||||||
private Claims getClaimsFromToken(String token) {
|
private Claims getClaimsFromToken(String token) {
|
||||||
@@ -156,7 +156,8 @@ public class JwtToken {
|
|||||||
/**
|
/**
|
||||||
* 设置用户代理信息
|
* 设置用户代理信息
|
||||||
*
|
*
|
||||||
* @param jwtUser 登录信息
|
* @param jwtUser
|
||||||
|
* 登录信息
|
||||||
*/
|
*/
|
||||||
public void setUserAgent(JwtUser jwtUser) {
|
public void setUserAgent(JwtUser jwtUser) {
|
||||||
UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent"));
|
UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent"));
|
||||||
@@ -274,7 +275,8 @@ public class JwtToken {
|
|||||||
/**
|
/**
|
||||||
* 设置用户代理信息
|
* 设置用户代理信息
|
||||||
*
|
*
|
||||||
* @param loginUser 登录信息
|
* @param loginUser
|
||||||
|
* 登录信息
|
||||||
*/
|
*/
|
||||||
public void setUserAgent(LoginUser loginUser) {
|
public void setUserAgent(LoginUser loginUser) {
|
||||||
UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent"));
|
UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent"));
|
||||||
@@ -288,7 +290,8 @@ public class JwtToken {
|
|||||||
/**
|
/**
|
||||||
* 刷新令牌有效期
|
* 刷新令牌有效期
|
||||||
*
|
*
|
||||||
* @param loginUser 登录信息
|
* @param loginUser
|
||||||
|
* 登录信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String refreshToken(LoginUser loginUser) {
|
public String refreshToken(LoginUser loginUser) {
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
package com.starry.admin.common.component;
|
package com.starry.admin.common.component;
|
||||||
|
|
||||||
|
|
||||||
import com.starry.admin.common.domain.LoginUser;
|
import com.starry.admin.common.domain.LoginUser;
|
||||||
import com.starry.admin.modules.system.module.entity.SysRoleEntity;
|
import com.starry.admin.modules.system.module.entity.SysRoleEntity;
|
||||||
import com.starry.admin.utils.SecurityUtils;
|
import com.starry.admin.utils.SecurityUtils;
|
||||||
|
import java.util.Set;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义权限实现,ss取自SpringSecurity首字母
|
* 自定义权限实现,ss取自SpringSecurity首字母
|
||||||
*
|
*
|
||||||
@@ -34,7 +32,8 @@ public class PermissionService {
|
|||||||
/**
|
/**
|
||||||
* 验证用户是否具备某权限
|
* 验证用户是否具备某权限
|
||||||
*
|
*
|
||||||
* @param permission 权限字符串
|
* @param permission
|
||||||
|
* 权限字符串
|
||||||
* @return 用户是否具备某权限
|
* @return 用户是否具备某权限
|
||||||
*/
|
*/
|
||||||
public boolean hasPermission(String permission) {
|
public boolean hasPermission(String permission) {
|
||||||
@@ -51,7 +50,8 @@ public class PermissionService {
|
|||||||
/**
|
/**
|
||||||
* 验证用户是否不具备某权限,与 hasPermission逻辑相反
|
* 验证用户是否不具备某权限,与 hasPermission逻辑相反
|
||||||
*
|
*
|
||||||
* @param permission 权限字符串
|
* @param permission
|
||||||
|
* 权限字符串
|
||||||
* @return 用户是否不具备某权限
|
* @return 用户是否不具备某权限
|
||||||
*/
|
*/
|
||||||
public boolean lacksPermission(String permission) {
|
public boolean lacksPermission(String permission) {
|
||||||
@@ -61,7 +61,8 @@ public class PermissionService {
|
|||||||
/**
|
/**
|
||||||
* 验证用户是否具有以下任意一个权限
|
* 验证用户是否具有以下任意一个权限
|
||||||
*
|
*
|
||||||
* @param permissions 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表
|
* @param permissions
|
||||||
|
* 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表
|
||||||
* @return 用户是否具有以下任意一个权限
|
* @return 用户是否具有以下任意一个权限
|
||||||
*/
|
*/
|
||||||
public boolean hasAnyPermission(String permissions) {
|
public boolean hasAnyPermission(String permissions) {
|
||||||
@@ -84,7 +85,8 @@ public class PermissionService {
|
|||||||
/**
|
/**
|
||||||
* 判断用户是否拥有某个角色
|
* 判断用户是否拥有某个角色
|
||||||
*
|
*
|
||||||
* @param role 角色字符串
|
* @param role
|
||||||
|
* 角色字符串
|
||||||
* @return 用户是否具备某角色
|
* @return 用户是否具备某角色
|
||||||
*/
|
*/
|
||||||
public boolean hasRole(String role) {
|
public boolean hasRole(String role) {
|
||||||
@@ -107,7 +109,8 @@ public class PermissionService {
|
|||||||
/**
|
/**
|
||||||
* 验证用户是否不具备某角色,与 isRole逻辑相反。
|
* 验证用户是否不具备某角色,与 isRole逻辑相反。
|
||||||
*
|
*
|
||||||
* @param role 角色名称
|
* @param role
|
||||||
|
* 角色名称
|
||||||
* @return 用户是否不具备某角色
|
* @return 用户是否不具备某角色
|
||||||
*/
|
*/
|
||||||
public boolean lacksRole(String role) {
|
public boolean lacksRole(String role) {
|
||||||
@@ -117,7 +120,8 @@ public class PermissionService {
|
|||||||
/**
|
/**
|
||||||
* 验证用户是否具有以下任意一个角色
|
* 验证用户是否具有以下任意一个角色
|
||||||
*
|
*
|
||||||
* @param roles 以 ROLE_NAMES_DELIMITER 为分隔符的角色列表
|
* @param roles
|
||||||
|
* 以 ROLE_NAMES_DELIMITER 为分隔符的角色列表
|
||||||
* @return 用户是否具有以下任意一个角色
|
* @return 用户是否具有以下任意一个角色
|
||||||
*/
|
*/
|
||||||
public boolean hasAnyRoles(String roles) {
|
public boolean hasAnyRoles(String roles) {
|
||||||
@@ -139,8 +143,10 @@ public class PermissionService {
|
|||||||
/**
|
/**
|
||||||
* 判断是否包含权限
|
* 判断是否包含权限
|
||||||
*
|
*
|
||||||
* @param permissions 权限列表
|
* @param permissions
|
||||||
* @param permission 权限字符串
|
* 权限列表
|
||||||
|
* @param permission
|
||||||
|
* 权限字符串
|
||||||
* @return 用户是否具备某权限
|
* @return 用户是否具备某权限
|
||||||
*/
|
*/
|
||||||
private boolean hasPermissions(Set<String> permissions, String permission) {
|
private boolean hasPermissions(Set<String> permissions, String permission) {
|
||||||
|
|||||||
@@ -3,21 +3,20 @@ package com.starry.admin.common.conf;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.TypeReference;
|
import com.alibaba.fastjson2.TypeReference;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.ibatis.type.BaseTypeHandler;
|
|
||||||
import org.apache.ibatis.type.JdbcType;
|
|
||||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
|
||||||
import org.apache.ibatis.type.MappedTypes;
|
|
||||||
|
|
||||||
import java.sql.CallableStatement;
|
import java.sql.CallableStatement;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据库数据-String 和 List 自动转换
|
* 数据库数据-String 和 List 自动转换
|
||||||
*
|
*
|
||||||
* @author admin
|
* @author admin
|
||||||
*/
|
*/
|
||||||
@@ -26,7 +25,8 @@ import java.util.List;
|
|||||||
@MappedTypes({List.class})
|
@MappedTypes({List.class})
|
||||||
public abstract class AbstractListTypeHandler<T> extends BaseTypeHandler<List<T>> {
|
public abstract class AbstractListTypeHandler<T> extends BaseTypeHandler<List<T>> {
|
||||||
@Override
|
@Override
|
||||||
public void setNonNullParameter(PreparedStatement ps, int i, List<T> parameter, JdbcType jdbcType) throws SQLException {
|
public void setNonNullParameter(PreparedStatement ps, int i, List<T> parameter, JdbcType jdbcType)
|
||||||
|
throws SQLException {
|
||||||
String content = StrUtil.isEmptyIfStr(parameter) ? null : JSON.toJSONString(parameter);
|
String content = StrUtil.isEmptyIfStr(parameter) ? null : JSON.toJSONString(parameter);
|
||||||
ps.setString(i, content);
|
ps.setString(i, content);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
package com.starry.admin.common.conf;
|
package com.starry.admin.common.conf;
|
||||||
|
|
||||||
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
|
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
|
||||||
|
import javax.sql.DataSource;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class DataSourceConfig {
|
public class DataSourceConfig {
|
||||||
|
|
||||||
@@ -17,4 +16,4 @@ public class DataSourceConfig {
|
|||||||
return DruidDataSourceBuilder.create().build();
|
return DruidDataSourceBuilder.create().build();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.starry.admin.common.conf;
|
package com.starry.admin.common.conf;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.TypeReference;
|
import com.alibaba.fastjson2.TypeReference;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13,4 +12,4 @@ public class StringTypeHandler extends AbstractListTypeHandler<String> {
|
|||||||
return new TypeReference<List<String>>() {
|
return new TypeReference<List<String>>() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package com.starry.admin.common.domain;
|
package com.starry.admin.common.domain;
|
||||||
|
|
||||||
import com.starry.admin.modules.system.module.entity.SysUserEntity;
|
import com.starry.admin.modules.system.module.entity.SysUserEntity;
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ package com.starry.admin.common.domain;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.starry.admin.modules.system.module.entity.SysDeptEntity;
|
import com.starry.admin.modules.system.module.entity.SysDeptEntity;
|
||||||
import com.starry.admin.modules.system.module.entity.SysMenuEntity;
|
import com.starry.admin.modules.system.module.entity.SysMenuEntity;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Treeselect树结构实体类
|
* @author Treeselect树结构实体类
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ public class ServiceException extends RuntimeException {
|
|||||||
this.code = code;
|
this.code = code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ServiceException setDetailMessage(String detailMessage) {
|
public ServiceException setDetailMessage(String detailMessage) {
|
||||||
this.detailMessage = detailMessage;
|
this.detailMessage = detailMessage;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.starry.admin.common.exception.handler;
|
package com.starry.admin.common.exception.handler;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.exc.MismatchedInputException;
|
import com.fasterxml.jackson.databind.exc.MismatchedInputException;
|
||||||
import com.starry.admin.common.exception.CustomException;
|
import com.starry.admin.common.exception.CustomException;
|
||||||
import com.starry.admin.common.exception.ServiceException;
|
import com.starry.admin.common.exception.ServiceException;
|
||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import com.starry.common.utils.StringUtils;
|
import com.starry.common.utils.StringUtils;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.http.converter.HttpMessageNotReadableException;
|
import org.springframework.http.converter.HttpMessageNotReadableException;
|
||||||
@@ -17,8 +17,6 @@ import org.springframework.web.bind.MissingServletRequestParameterException;
|
|||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 全局异常处理
|
* @author 全局异常处理
|
||||||
* @since 2023/3/9
|
* @since 2023/3/9
|
||||||
@@ -27,7 +25,6 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
public class GlobalExceptionHandler {
|
public class GlobalExceptionHandler {
|
||||||
private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
|
private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 业务异常
|
* 业务异常
|
||||||
*/
|
*/
|
||||||
@@ -62,7 +59,6 @@ public class GlobalExceptionHandler {
|
|||||||
return R.error("系统出现内部错误,请联系管理员");
|
return R.error("系统出现内部错误,请联系管理员");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求方法异常
|
* 请求方法异常
|
||||||
*/
|
*/
|
||||||
@@ -74,7 +70,8 @@ public class GlobalExceptionHandler {
|
|||||||
/**
|
/**
|
||||||
* 请求参数异常
|
* 请求参数异常
|
||||||
*
|
*
|
||||||
* @param e HttpRequestMethodNotSupportedException
|
* @param e
|
||||||
|
* HttpRequestMethodNotSupportedException
|
||||||
*/
|
*/
|
||||||
@ExceptionHandler(MethodArgumentNotValidException.class)
|
@ExceptionHandler(MethodArgumentNotValidException.class)
|
||||||
public R methodArgumentNotValidException(MethodArgumentNotValidException e) {
|
public R methodArgumentNotValidException(MethodArgumentNotValidException e) {
|
||||||
@@ -101,11 +98,11 @@ public class GlobalExceptionHandler {
|
|||||||
return R.error("请求参数格式异常");
|
return R.error("请求参数格式异常");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义异常
|
* 自定义异常
|
||||||
*
|
*
|
||||||
* @param e CustomException
|
* @param e
|
||||||
|
* CustomException
|
||||||
*/
|
*/
|
||||||
@ExceptionHandler(CustomException.class)
|
@ExceptionHandler(CustomException.class)
|
||||||
public R customException(CustomException e) {
|
public R customException(CustomException e) {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInt
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
||||||
import com.starry.admin.common.mybatis.handler.MyTenantLineHandler;
|
import com.starry.admin.common.mybatis.handler.MyTenantLineHandler;
|
||||||
|
import javax.sql.DataSource;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
@@ -15,9 +16,6 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,26 +5,23 @@ import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
|||||||
import com.starry.admin.modules.weichat.service.WxTokenService;
|
import com.starry.admin.modules.weichat.service.WxTokenService;
|
||||||
import com.starry.admin.utils.SecurityUtils;
|
import com.starry.admin.utils.SecurityUtils;
|
||||||
import com.starry.common.constant.Constants;
|
import com.starry.common.constant.Constants;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.ibatis.reflection.MetaObject;
|
import org.apache.ibatis.reflection.MetaObject;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin 字段默认值处理类
|
||||||
* 字段默认值处理类
|
|
||||||
* @since 2021/9/1
|
* @since 2021/9/1
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class MyMetaObjectHandler implements MetaObjectHandler {
|
public class MyMetaObjectHandler implements MetaObjectHandler {
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private HttpServletRequest request;
|
private HttpServletRequest request;
|
||||||
|
|
||||||
@@ -58,7 +55,7 @@ public class MyMetaObjectHandler implements MetaObjectHandler {
|
|||||||
|
|
||||||
LocalDateTime localDateTime = LocalDateTime.now();
|
LocalDateTime localDateTime = LocalDateTime.now();
|
||||||
return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
|
return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
|
||||||
// return Date.from(localDateTime.toInstant(ZoneOffset.ofHours(8)));
|
// return Date.from(localDateTime.toInstant(ZoneOffset.ofHours(8)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOperatorId() {
|
public String getOperatorId() {
|
||||||
|
|||||||
@@ -3,16 +3,14 @@ package com.starry.admin.common.mybatis.handler;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
||||||
import com.starry.admin.utils.SecurityUtils;
|
import com.starry.admin.utils.SecurityUtils;
|
||||||
import com.starry.common.utils.StringUtils;
|
import com.starry.common.utils.StringUtils;
|
||||||
|
import java.util.Arrays;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.sf.jsqlparser.expression.Expression;
|
import net.sf.jsqlparser.expression.Expression;
|
||||||
import net.sf.jsqlparser.expression.StringValue;
|
import net.sf.jsqlparser.expression.StringValue;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin 多租户处理器
|
||||||
* 多租户处理器
|
|
||||||
* @since 2023/3/7
|
* @since 2023/3/7
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -22,7 +20,8 @@ public class MyTenantLineHandler implements TenantLineHandler {
|
|||||||
/**
|
/**
|
||||||
* 排除过滤的表
|
* 排除过滤的表
|
||||||
*/
|
*/
|
||||||
private static final String[] TABLE_FILTER = {"sys_login_log", "sys_menu", "sys_tenant_package", "sys_tenant", "sys_dict", "sys_dict_data", "sys_administrative_area_dict_info"};
|
private static final String[] TABLE_FILTER = {"sys_login_log", "sys_menu", "sys_tenant_package", "sys_tenant",
|
||||||
|
"sys_dict", "sys_dict_data", "sys_administrative_area_dict_info"};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排除过滤的表前缀
|
* 排除过滤的表前缀
|
||||||
@@ -33,9 +32,9 @@ public class MyTenantLineHandler implements TenantLineHandler {
|
|||||||
public Expression getTenantId() {
|
public Expression getTenantId() {
|
||||||
// 取出当前请求的服务商ID,通过解析器注入到SQL中。
|
// 取出当前请求的服务商ID,通过解析器注入到SQL中。
|
||||||
String tenantId = SecurityUtils.getTenantId();
|
String tenantId = SecurityUtils.getTenantId();
|
||||||
// if (!StrUtil.isBlankIfStr(tenantId)) {
|
// if (!StrUtil.isBlankIfStr(tenantId)) {
|
||||||
// throw new CustomException("租户信息获取异常");
|
// throw new CustomException("租户信息获取异常");
|
||||||
// }
|
// }
|
||||||
return new StringValue(tenantId);
|
return new StringValue(tenantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,17 +3,15 @@ package com.starry.admin.common.oss.controller;
|
|||||||
import com.starry.admin.common.oss.service.IOssFileService;
|
import com.starry.admin.common.oss.service.IOssFileService;
|
||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin cos存储前端控制器
|
||||||
* cos存储前端控制器
|
|
||||||
* @since 2022/11/13 17:51
|
* @since 2022/11/13 17:51
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -24,7 +22,6 @@ public class CosController {
|
|||||||
@Resource
|
@Resource
|
||||||
IOssFileService ossFileService;
|
IOssFileService ossFileService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "照片上传")
|
@ApiOperation(value = "照片上传")
|
||||||
@PostMapping("/upload/image")
|
@PostMapping("/upload/image")
|
||||||
public R uploadImage(MultipartFile file) throws Exception {
|
public R uploadImage(MultipartFile file) throws Exception {
|
||||||
|
|||||||
@@ -7,9 +7,12 @@ public interface IOssFileService {
|
|||||||
/**
|
/**
|
||||||
* 文件上传只阿里云OSS
|
* 文件上传只阿里云OSS
|
||||||
*
|
*
|
||||||
* @param inputStream 文件流
|
* @param inputStream
|
||||||
* @param module 文件保存模块地址
|
* 文件流
|
||||||
* @param originalFilename 原始文件名
|
* @param module
|
||||||
|
* 文件保存模块地址
|
||||||
|
* @param originalFilename
|
||||||
|
* 原始文件名
|
||||||
* @return String
|
* @return String
|
||||||
* @author admin
|
* @author admin
|
||||||
* @since 2024/4/11 10:24
|
* @since 2024/4/11 10:24
|
||||||
@@ -19,7 +22,8 @@ public interface IOssFileService {
|
|||||||
/**
|
/**
|
||||||
* 删除文件
|
* 删除文件
|
||||||
*
|
*
|
||||||
* @param url 文件地址
|
* @param url
|
||||||
|
* 文件地址
|
||||||
*/
|
*/
|
||||||
void remove(String url);
|
void remove(String url);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.common.oss.service.impl;
|
package com.starry.admin.common.oss.service.impl;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.io.FileTypeUtil;
|
import cn.hutool.core.io.FileTypeUtil;
|
||||||
import com.aliyun.oss.ClientException;
|
import com.aliyun.oss.ClientException;
|
||||||
@@ -13,13 +12,12 @@ import com.starry.admin.common.exception.CustomException;
|
|||||||
import com.starry.admin.common.oss.OssProperties;
|
import com.starry.admin.common.oss.OssProperties;
|
||||||
import com.starry.admin.common.oss.service.IOssFileService;
|
import com.starry.admin.common.oss.service.IOssFileService;
|
||||||
import com.starry.common.utils.IdUtils;
|
import com.starry.common.utils.IdUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
@@ -28,7 +26,6 @@ import java.io.InputStream;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class OssFileServiceImpl implements IOssFileService {
|
public class OssFileServiceImpl implements IOssFileService {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String upload(InputStream inputStream, String module, String filename) {
|
public String upload(InputStream inputStream, String module, String filename) {
|
||||||
|
|
||||||
@@ -41,7 +38,8 @@ public class OssFileServiceImpl implements IOssFileService {
|
|||||||
throw new CustomException("文件上传到OSS失败");
|
throw new CustomException("文件上传到OSS失败");
|
||||||
}
|
}
|
||||||
// 创建OSSClient实例。
|
// 创建OSSClient实例。
|
||||||
OSS ossClient = new OSSClientBuilder().build(OssProperties.ENDPOINT, OssProperties.KEY_ID, OssProperties.KEY_SECRET);
|
OSS ossClient = new OSSClientBuilder().build(OssProperties.ENDPOINT, OssProperties.KEY_ID,
|
||||||
|
OssProperties.KEY_SECRET);
|
||||||
log.info("OSSClient实例创建成功");
|
log.info("OSSClient实例创建成功");
|
||||||
try {
|
try {
|
||||||
// 判断oss实例是否存在:如果不存在则创建,如果存在则获取
|
// 判断oss实例是否存在:如果不存在则创建,如果存在则获取
|
||||||
@@ -57,12 +55,12 @@ public class OssFileServiceImpl implements IOssFileService {
|
|||||||
String folder = new DateTime().toString("yyyy/MM/dd");
|
String folder = new DateTime().toString("yyyy/MM/dd");
|
||||||
// 文件名:uuid.扩展名
|
// 文件名:uuid.扩展名
|
||||||
|
|
||||||
|
|
||||||
filename = IdUtils.getUuid() + "." + fileType;
|
filename = IdUtils.getUuid() + "." + fileType;
|
||||||
// 文件根路径
|
// 文件根路径
|
||||||
String key = module + "/" + folder + "/" + filename;
|
String key = module + "/" + folder + "/" + filename;
|
||||||
// 创建PutObjectRequest对象。
|
// 创建PutObjectRequest对象。
|
||||||
PutObjectRequest putObjectRequest = new PutObjectRequest(OssProperties.BUCKET_NAME, key, bufferedInputStream);
|
PutObjectRequest putObjectRequest = new PutObjectRequest(OssProperties.BUCKET_NAME, key,
|
||||||
|
bufferedInputStream);
|
||||||
// 创建PutObject请求。
|
// 创建PutObject请求。
|
||||||
ossClient.putObject(putObjectRequest);
|
ossClient.putObject(putObjectRequest);
|
||||||
log.info("oss文件上传成功");
|
log.info("oss文件上传成功");
|
||||||
@@ -89,7 +87,8 @@ public class OssFileServiceImpl implements IOssFileService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(String url) {
|
public void remove(String url) {
|
||||||
OSS ossClient = new OSSClientBuilder().build(OssProperties.ENDPOINT, OssProperties.KEY_ID, OssProperties.KEY_SECRET);
|
OSS ossClient = new OSSClientBuilder().build(OssProperties.ENDPOINT, OssProperties.KEY_ID,
|
||||||
|
OssProperties.KEY_SECRET);
|
||||||
log.info("OSSClient实例创建成功");
|
log.info("OSSClient实例创建成功");
|
||||||
try {
|
try {
|
||||||
String endpoint = OssProperties.ENDPOINT.substring(OssProperties.ENDPOINT.lastIndexOf("//") + 2);
|
String endpoint = OssProperties.ENDPOINT.substring(OssProperties.ENDPOINT.lastIndexOf("//") + 2);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.common.security.config;
|
package com.starry.admin.common.security.config;
|
||||||
|
|
||||||
|
|
||||||
import com.starry.admin.common.security.entity.JwtUser;
|
import com.starry.admin.common.security.entity.JwtUser;
|
||||||
import com.starry.admin.common.security.filter.JwtAuthenticationTokenFilter;
|
import com.starry.admin.common.security.filter.JwtAuthenticationTokenFilter;
|
||||||
import com.starry.admin.common.security.handler.CustomAccessDeniedHandler;
|
import com.starry.admin.common.security.handler.CustomAccessDeniedHandler;
|
||||||
@@ -9,6 +8,8 @@ import com.starry.admin.common.security.handler.CustomLogoutSuccessHandler;
|
|||||||
import com.starry.admin.modules.system.module.entity.SysUserEntity;
|
import com.starry.admin.modules.system.module.entity.SysUserEntity;
|
||||||
import com.starry.admin.modules.system.service.SysMenuService;
|
import com.starry.admin.modules.system.service.SysMenuService;
|
||||||
import com.starry.admin.modules.system.service.SysUserService;
|
import com.starry.admin.modules.system.service.SysUserService;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.http.HttpMethod;
|
import org.springframework.http.HttpMethod;
|
||||||
@@ -27,9 +28,6 @@ import org.springframework.web.cors.CorsConfiguration;
|
|||||||
import org.springframework.web.cors.CorsConfigurationSource;
|
import org.springframework.web.cors.CorsConfigurationSource;
|
||||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
*/
|
*/
|
||||||
@@ -49,14 +47,15 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
@Resource
|
@Resource
|
||||||
private CustomLogoutSuccessHandler customLogoutSuccessHandler;
|
private CustomLogoutSuccessHandler customLogoutSuccessHandler;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity httpSecurity) throws Exception {
|
protected void configure(HttpSecurity httpSecurity) throws Exception {
|
||||||
httpSecurity.csrf().disable()// 由于使用的是JWT,我们这里不需要csrf
|
httpSecurity.csrf().disable()// 由于使用的是JWT,我们这里不需要csrf
|
||||||
.sessionManagement()// 基于token,所以不需要session
|
.sessionManagement()// 基于token,所以不需要session
|
||||||
.sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().authorizeRequests()
|
.sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().authorizeRequests()
|
||||||
// 允许对于网站静态资源的无授权访问
|
// 允许对于网站静态资源的无授权访问
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/favicon.ico", "/**/*.html", "/**/*.css", "/**/*.js", "/swagger-resources/**", "/v2/api-docs/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/favicon.ico", "/**/*.html", "/**/*.css", "/**/*.js",
|
||||||
|
"/swagger-resources/**", "/v2/api-docs/**")
|
||||||
|
.permitAll()
|
||||||
// 对登录注册要允许匿名访问
|
// 对登录注册要允许匿名访问
|
||||||
.antMatchers("/login", "/captcha/get-captcha", "/wx/**").permitAll()
|
.antMatchers("/login", "/captcha/get-captcha", "/wx/**").permitAll()
|
||||||
// 允许健康检查接口匿名访问
|
// 允许健康检查接口匿名访问
|
||||||
@@ -71,10 +70,11 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
// 添加JWT filter
|
// 添加JWT filter
|
||||||
httpSecurity.addFilterBefore(jwtAuthenticationTokenFilter(), UsernamePasswordAuthenticationFilter.class);
|
httpSecurity.addFilterBefore(jwtAuthenticationTokenFilter(), UsernamePasswordAuthenticationFilter.class);
|
||||||
// 添加自定义未授权和未登录结果返回
|
// 添加自定义未授权和未登录结果返回
|
||||||
httpSecurity.exceptionHandling().accessDeniedHandler(customAccessDeniedHandler).authenticationEntryPoint(customAuthenticationEntryPoint);
|
httpSecurity.exceptionHandling().accessDeniedHandler(customAccessDeniedHandler)
|
||||||
|
.authenticationEntryPoint(customAuthenticationEntryPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CorsConfigurationSource corsConfigurationSource(){
|
private CorsConfigurationSource corsConfigurationSource() {
|
||||||
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||||
corsConfiguration.setAllowCredentials(true);
|
corsConfiguration.setAllowCredentials(true);
|
||||||
corsConfiguration.addAllowedHeader("*"); // 这个得加上,一些复杂的请求方式会带有header,不加上跨域会失效。
|
corsConfiguration.addAllowedHeader("*"); // 这个得加上,一些复杂的请求方式会带有header,不加上跨域会失效。
|
||||||
@@ -82,7 +82,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
corsConfiguration.addExposedHeader("*");
|
corsConfiguration.addExposedHeader("*");
|
||||||
corsConfiguration.addAllowedOriginPattern("*");
|
corsConfiguration.addAllowedOriginPattern("*");
|
||||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||||
source.registerCorsConfiguration("/**",corsConfiguration);
|
source.registerCorsConfiguration("/**", corsConfiguration);
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.starry.admin.common.security.entity;
|
package com.starry.admin.common.security.entity;
|
||||||
|
|
||||||
import com.starry.admin.modules.system.module.entity.SysUserEntity;
|
import com.starry.admin.modules.system.module.entity.SysUserEntity;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
@@ -61,7 +60,6 @@ public class JwtUser implements UserDetails {
|
|||||||
*/
|
*/
|
||||||
private Set<String> permissions;
|
private Set<String> permissions;
|
||||||
|
|
||||||
|
|
||||||
public JwtUser(SysUserEntity user, Set<String> permissions) {
|
public JwtUser(SysUserEntity user, Set<String> permissions) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
this.permissions = permissions;
|
this.permissions = permissions;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.common.security.filter;
|
package com.starry.admin.common.security.filter;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
@@ -20,6 +19,17 @@ import com.starry.common.constant.Constants;
|
|||||||
import com.starry.common.redis.RedisCache;
|
import com.starry.common.redis.RedisCache;
|
||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import com.starry.common.result.ResultCodeEnum;
|
import com.starry.common.result.ResultCodeEnum;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.FilterChain;
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||||
@@ -28,21 +38,8 @@ import org.springframework.security.web.authentication.WebAuthenticationDetailsS
|
|||||||
import org.springframework.web.filter.OncePerRequestFilter;
|
import org.springframework.web.filter.OncePerRequestFilter;
|
||||||
import org.springframework.web.servlet.HandlerExceptionResolver;
|
import org.springframework.web.servlet.HandlerExceptionResolver;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.FilterChain;
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin JWT登录授权过滤器
|
||||||
* JWT登录授权过滤器
|
|
||||||
* @since 2021/9/6
|
* @since 2021/9/6
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -72,100 +69,112 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
|||||||
@Resource
|
@Resource
|
||||||
private SysUserService userService;
|
private SysUserService userService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不需要登录的的路径
|
* 不需要登录的的路径
|
||||||
*/
|
*/
|
||||||
Set<String> noLoginPathRequired = new HashSet<>(Arrays.asList("/wx/common/area/tree", "/wx/common/file/upload", "/wx/common/audio/upload", "/wx/oauth2/getConfigAddress", "/wx/clerk/user/queryByPage", "wx/clerk/user/queryGiftById", "/wx/clerk/user/queryPriceById", "/wx/clerk/user/queryTrendsById", "wx/clerk/user/queryEvaluateById"));
|
Set<String> noLoginPathRequired = new HashSet<>(Arrays.asList("/wx/common/area/tree", "/wx/common/file/upload",
|
||||||
|
"/wx/common/audio/upload", "/wx/oauth2/getConfigAddress", "/wx/clerk/user/queryByPage",
|
||||||
|
"wx/clerk/user/queryGiftById", "/wx/clerk/user/queryPriceById", "/wx/clerk/user/queryTrendsById",
|
||||||
|
"wx/clerk/user/queryEvaluateById"));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doFilterInternal(@NotNull HttpServletRequest httpServletRequest, @NotNull HttpServletResponse httpServletResponse, @NotNull FilterChain filterChain) throws ServletException, IOException {
|
protected void doFilterInternal(@NotNull HttpServletRequest httpServletRequest,
|
||||||
|
@NotNull HttpServletResponse httpServletResponse, @NotNull FilterChain filterChain)
|
||||||
|
throws ServletException, IOException {
|
||||||
log.info("url = {}", httpServletRequest.getRequestURI());
|
log.info("url = {}", httpServletRequest.getRequestURI());
|
||||||
|
|
||||||
//微信支付回调接口,不需要验证
|
// 微信支付回调接口,不需要验证
|
||||||
if ("/wx/pay/jsCallback".equals(httpServletRequest.getServletPath())) {
|
if ("/wx/pay/jsCallback".equals(httpServletRequest.getServletPath())) {
|
||||||
log.info("微信支付回调,不需要验证");
|
log.info("微信支付回调,不需要验证");
|
||||||
filterChain.doFilter(httpServletRequest, httpServletResponse);
|
filterChain.doFilter(httpServletRequest, httpServletResponse);
|
||||||
} else {// 微信公众号的请求,必须存在tenantkey,否则抛出异常
|
} else {// 微信公众号的请求,必须存在tenantkey,否则抛出异常
|
||||||
if (httpServletRequest.getServletPath().startsWith("/wx/")) {
|
if (httpServletRequest.getServletPath().startsWith("/wx/")) {
|
||||||
|
|
||||||
String tenantKey = httpServletRequest.getHeader("tenantkey");
|
String tenantKey = httpServletRequest.getHeader("tenantkey");
|
||||||
if (StrUtil.isBlank(tenantKey)) {
|
if (StrUtil.isBlank(tenantKey)) {
|
||||||
resolver.resolveException(httpServletRequest, httpServletResponse, null, new CustomException("tenantkey不能为空"));
|
resolver.resolveException(httpServletRequest, httpServletResponse, null,
|
||||||
return;
|
new CustomException("tenantkey不能为空"));
|
||||||
}
|
|
||||||
if (noLoginPathRequired.contains(httpServletRequest.getServletPath())) {
|
|
||||||
//非必须登录的请求,验证租户信息是否正常
|
|
||||||
String tenantId;
|
|
||||||
try {
|
|
||||||
tenantId = getTenantId(null, null, tenantKey);
|
|
||||||
} catch (Exception e) {
|
|
||||||
httpServletResponse.setCharacterEncoding("UTF-8");
|
|
||||||
httpServletResponse.setContentType("application/json");
|
|
||||||
httpServletResponse.getWriter().println(JSONUtil.parse(R.error(ResultCodeEnum.UNAUTHORIZED.getCode(), ResultCodeEnum.UNAUTHORIZED.getMessage())));
|
|
||||||
httpServletResponse.getWriter().flush();
|
|
||||||
return;
|
|
||||||
//返回401‘
|
|
||||||
//
|
|
||||||
// return;
|
|
||||||
// throw new RuntimeException("token验证失败,需要重新登录");
|
|
||||||
}
|
|
||||||
if (!checkTenantId(tenantId)) {
|
|
||||||
//返回500
|
|
||||||
resolver.resolveException(httpServletRequest, httpServletResponse, null, new CustomException("租户信息异常"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SecurityUtils.setTenantId(tenantId);
|
if (noLoginPathRequired.contains(httpServletRequest.getServletPath())) {
|
||||||
|
// 非必须登录的请求,验证租户信息是否正常
|
||||||
|
String tenantId;
|
||||||
|
try {
|
||||||
|
tenantId = getTenantId(null, null, tenantKey);
|
||||||
|
} catch (Exception e) {
|
||||||
|
httpServletResponse.setCharacterEncoding("UTF-8");
|
||||||
|
httpServletResponse.setContentType("application/json");
|
||||||
|
httpServletResponse.getWriter()
|
||||||
|
.println(JSONUtil.parse(R.error(ResultCodeEnum.UNAUTHORIZED.getCode(),
|
||||||
|
ResultCodeEnum.UNAUTHORIZED.getMessage())));
|
||||||
|
httpServletResponse.getWriter().flush();
|
||||||
|
return;
|
||||||
|
// 返回401‘
|
||||||
|
//
|
||||||
|
// return;
|
||||||
|
// throw new RuntimeException("token验证失败,需要重新登录");
|
||||||
|
}
|
||||||
|
if (!checkTenantId(tenantId)) {
|
||||||
|
// 返回500
|
||||||
|
resolver.resolveException(httpServletRequest, httpServletResponse, null,
|
||||||
|
new CustomException("租户信息异常"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SecurityUtils.setTenantId(tenantId);
|
||||||
|
} else {
|
||||||
|
String clerkToken = httpServletRequest.getHeader(Constants.CLERK_USER_LOGIN_TOKEN);
|
||||||
|
String customToken = httpServletRequest.getHeader(Constants.CUSTOM_USER_LOGIN_TOKEN);
|
||||||
|
String tenantId;
|
||||||
|
try {
|
||||||
|
tenantId = getTenantId(clerkToken, customToken, tenantKey);
|
||||||
|
} catch (Exception e) {
|
||||||
|
httpServletResponse.setCharacterEncoding("UTF-8");
|
||||||
|
httpServletResponse.setContentType("application/json");
|
||||||
|
httpServletResponse.getWriter()
|
||||||
|
.println(JSONUtil.parse(R.error(ResultCodeEnum.UNAUTHORIZED.getCode(),
|
||||||
|
ResultCodeEnum.UNAUTHORIZED.getMessage())));
|
||||||
|
httpServletResponse.getWriter().flush();
|
||||||
|
// 返回401
|
||||||
|
return;
|
||||||
|
// throw new CustomException("token验证失败,需要重新登录");
|
||||||
|
}
|
||||||
|
if (!checkTenantId(tenantId)) {
|
||||||
|
// 返回500
|
||||||
|
resolver.resolveException(httpServletRequest, httpServletResponse, null,
|
||||||
|
new CustomException("租户信息异常"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SecurityUtils.setTenantId(tenantId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
String clerkToken = httpServletRequest.getHeader(Constants.CLERK_USER_LOGIN_TOKEN);
|
// 管理端的请求
|
||||||
String customToken = httpServletRequest.getHeader(Constants.CUSTOM_USER_LOGIN_TOKEN);
|
LoginUser jwtUser = jwtToken.getNewLoginUser(httpServletRequest);
|
||||||
String tenantId;
|
if (null != jwtUser && null == SecurityContextHolder.getContext().getAuthentication()) {
|
||||||
try {
|
jwtToken.verifyToken(jwtUser);
|
||||||
tenantId = getTenantId(clerkToken, customToken, tenantKey);
|
userService.selectUserById(jwtUser.getUserId());
|
||||||
} catch (Exception e) {
|
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
|
||||||
httpServletResponse.setCharacterEncoding("UTF-8");
|
jwtUser, null, jwtUser.getAuthorities());
|
||||||
httpServletResponse.setContentType("application/json");
|
authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(httpServletRequest));
|
||||||
httpServletResponse.getWriter().println(JSONUtil.parse(R.error(ResultCodeEnum.UNAUTHORIZED.getCode(), ResultCodeEnum.UNAUTHORIZED.getMessage())));
|
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||||
httpServletResponse.getWriter().flush();
|
|
||||||
//返回401
|
|
||||||
return;
|
|
||||||
// throw new CustomException("token验证失败,需要重新登录");
|
|
||||||
}
|
}
|
||||||
if (!checkTenantId(tenantId)) {
|
|
||||||
//返回500
|
|
||||||
resolver.resolveException(httpServletRequest, httpServletResponse, null, new CustomException("租户信息异常"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
SecurityUtils.setTenantId(tenantId);
|
|
||||||
}
|
}
|
||||||
} else {
|
filterChain.doFilter(httpServletRequest, httpServletResponse);
|
||||||
// 管理端的请求
|
|
||||||
LoginUser jwtUser = jwtToken.getNewLoginUser(httpServletRequest);
|
|
||||||
if (null != jwtUser && null == SecurityContextHolder.getContext().getAuthentication()) {
|
|
||||||
jwtToken.verifyToken(jwtUser);
|
|
||||||
userService.selectUserById(jwtUser.getUserId());
|
|
||||||
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(jwtUser, null, jwtUser.getAuthorities());
|
|
||||||
authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(httpServletRequest));
|
|
||||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
filterChain.doFilter(httpServletRequest, httpServletResponse);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信公众号端访问时,获取当前用户租户ID
|
* 微信公众号端访问时,获取当前用户租户ID 如果用户(陪聊或客户)已登录,从token中获取租户ID 如果用户未登录,从tenantKey中获取租户ID
|
||||||
* 如果用户(陪聊或客户)已登录,从token中获取租户ID
|
|
||||||
* 如果用户未登录,从tenantKey中获取租户ID
|
|
||||||
*
|
*
|
||||||
* @param clerkToken 陪聊登录Key
|
* @param clerkToken
|
||||||
* @param customToken 客户登录key
|
* 陪聊登录Key
|
||||||
* @param tenantKey 租户标识
|
* @param customToken
|
||||||
|
* 客户登录key
|
||||||
|
* @param tenantKey
|
||||||
|
* 租户标识
|
||||||
*/
|
*/
|
||||||
public String getTenantId(String clerkToken, String customToken, String tenantKey) {
|
public String getTenantId(String clerkToken, String customToken, String tenantKey) {
|
||||||
String tenantId = "";
|
String tenantId = "";
|
||||||
//如果用户(陪聊或客户)已登录,从token中获取租户ID
|
// 如果用户(陪聊或客户)已登录,从token中获取租户ID
|
||||||
if (StrUtil.isNotBlank(clerkToken) || StrUtil.isNotBlank(customToken)) {
|
if (StrUtil.isNotBlank(clerkToken) || StrUtil.isNotBlank(customToken)) {
|
||||||
String userId = tokenService.getWxUserIdByToken(StrUtil.isNotBlank(clerkToken) ? clerkToken : customToken);
|
String userId = tokenService.getWxUserIdByToken(StrUtil.isNotBlank(clerkToken) ? clerkToken : customToken);
|
||||||
String redisKey = "TENANT_INFO:" + userId;
|
String redisKey = "TENANT_INFO:" + userId;
|
||||||
@@ -198,7 +207,8 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
|||||||
/**
|
/**
|
||||||
* 校验租户是否正常
|
* 校验租户是否正常
|
||||||
*
|
*
|
||||||
* @param tenantId 租户ID
|
* @param tenantId
|
||||||
|
* 租户ID
|
||||||
* @return true:租户正常,false:租户不正常
|
* @return true:租户正常,false:租户不正常
|
||||||
*/
|
*/
|
||||||
public boolean checkTenantId(String tenantId) {
|
public boolean checkTenantId(String tenantId) {
|
||||||
@@ -212,12 +222,12 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
|||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//判断租户是否过期
|
// 判断租户是否过期
|
||||||
if (DateUtil.compare(entity.getTenantTime(), new Date()) < 0) {
|
if (DateUtil.compare(entity.getTenantTime(), new Date()) < 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//...
|
// ...
|
||||||
//校验通过
|
// 校验通过
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,28 +3,28 @@ package com.starry.admin.common.security.handler;
|
|||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import com.starry.common.result.ResultCodeEnum;
|
import com.starry.common.result.ResultCodeEnum;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.security.access.AccessDeniedException;
|
import org.springframework.security.access.AccessDeniedException;
|
||||||
import org.springframework.security.web.access.AccessDeniedHandler;
|
import org.springframework.security.web.access.AccessDeniedHandler;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin 当访问接口没有权限时,自定义的返回结果
|
||||||
* 当访问接口没有权限时,自定义的返回结果
|
|
||||||
* @since 2021/9/6
|
* @since 2021/9/6
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class CustomAccessDeniedHandler implements AccessDeniedHandler {
|
public class CustomAccessDeniedHandler implements AccessDeniedHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AccessDeniedException e) throws IOException, ServletException {
|
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse,
|
||||||
|
AccessDeniedException e) throws IOException, ServletException {
|
||||||
httpServletResponse.setCharacterEncoding("UTF-8");
|
httpServletResponse.setCharacterEncoding("UTF-8");
|
||||||
httpServletResponse.setContentType("application/json");
|
httpServletResponse.setContentType("application/json");
|
||||||
httpServletResponse.getWriter().println(JSONUtil.parse(R.error(ResultCodeEnum.FORBIDDEN.getCode(), ResultCodeEnum.FORBIDDEN.getMessage())));
|
httpServletResponse.getWriter().println(
|
||||||
|
JSONUtil.parse(R.error(ResultCodeEnum.FORBIDDEN.getCode(), ResultCodeEnum.FORBIDDEN.getMessage())));
|
||||||
httpServletResponse.getWriter().flush();
|
httpServletResponse.getWriter().flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,27 +3,27 @@ package com.starry.admin.common.security.handler;
|
|||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import com.starry.common.result.ResultCodeEnum;
|
import com.starry.common.result.ResultCodeEnum;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.security.core.AuthenticationException;
|
import org.springframework.security.core.AuthenticationException;
|
||||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin 当未登录或者token失效访问接口时,自定义的返回结果
|
||||||
* 当未登录或者token失效访问接口时,自定义的返回结果
|
|
||||||
* @since 2021/9/6
|
* @since 2021/9/6
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class CustomAuthenticationEntryPoint implements AuthenticationEntryPoint {
|
public class CustomAuthenticationEntryPoint implements AuthenticationEntryPoint {
|
||||||
@Override
|
@Override
|
||||||
public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
|
public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse,
|
||||||
|
AuthenticationException e) throws IOException, ServletException {
|
||||||
httpServletResponse.setCharacterEncoding("UTF-8");
|
httpServletResponse.setCharacterEncoding("UTF-8");
|
||||||
httpServletResponse.setContentType("application/json");
|
httpServletResponse.setContentType("application/json");
|
||||||
httpServletResponse.getWriter().println(JSONUtil.parse(R.error(ResultCodeEnum.UNAUTHORIZED.getCode(), ResultCodeEnum.UNAUTHORIZED.getMessage())));
|
httpServletResponse.getWriter().println(JSONUtil
|
||||||
|
.parse(R.error(ResultCodeEnum.UNAUTHORIZED.getCode(), ResultCodeEnum.UNAUTHORIZED.getMessage())));
|
||||||
httpServletResponse.getWriter().flush();
|
httpServletResponse.getWriter().flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,17 +8,15 @@ import com.starry.admin.manager.factory.AsyncFactory;
|
|||||||
import com.starry.common.constant.Constants;
|
import com.starry.common.constant.Constants;
|
||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import com.starry.common.utils.ServletUtils;
|
import com.starry.common.utils.ServletUtils;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
|
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin 自定义退出处理类 返回成功
|
||||||
* 自定义退出处理类 返回成功
|
|
||||||
* @since 2022/7/8
|
* @since 2022/7/8
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@@ -28,7 +26,8 @@ public class CustomLogoutSuccessHandler implements LogoutSuccessHandler {
|
|||||||
private JwtToken jwtToken;
|
private JwtToken jwtToken;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLogoutSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) {
|
public void onLogoutSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse,
|
||||||
|
Authentication authentication) {
|
||||||
JwtUser jwtUser = jwtToken.getLoginUser(httpServletRequest);
|
JwtUser jwtUser = jwtToken.getLoginUser(httpServletRequest);
|
||||||
if (null != jwtUser) {
|
if (null != jwtUser) {
|
||||||
// 删除用户缓存记录
|
// 删除用户缓存记录
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.starry.admin.modules.clerk.module.entity.ClerkPkEnum;
|
import com.starry.admin.modules.clerk.module.entity.ClerkPkEnum;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkPkEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkPkEntity;
|
||||||
import com.starry.admin.modules.clerk.service.IPlayClerkPkService;
|
import com.starry.admin.modules.clerk.service.IPlayClerkPkService;
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: huchuansai
|
* @Author: huchuansai
|
||||||
* @Date: 2024/8/2 4:31 PM
|
* @Date: 2024/8/2 4:31 PM
|
||||||
@@ -24,11 +23,13 @@ public class ClerkPkJob {
|
|||||||
@Scheduled(fixedRate = 60000)
|
@Scheduled(fixedRate = 60000)
|
||||||
public void pkJobStatus() {
|
public void pkJobStatus() {
|
||||||
// 更新状态将待开始的状态改为进行中
|
// 更新状态将待开始的状态改为进行中
|
||||||
playClerkPkService.update(Wrappers.lambdaUpdate(PlayClerkPkEntity.class).eq(PlayClerkPkEntity::getStatus, ClerkPkEnum.TO_BE_STARTED.name())
|
playClerkPkService.update(Wrappers.lambdaUpdate(PlayClerkPkEntity.class)
|
||||||
|
.eq(PlayClerkPkEntity::getStatus, ClerkPkEnum.TO_BE_STARTED.name())
|
||||||
.le(PlayClerkPkEntity::getPkBeginTime, new Date())
|
.le(PlayClerkPkEntity::getPkBeginTime, new Date())
|
||||||
.set(PlayClerkPkEntity::getStatus, ClerkPkEnum.IN_PROGRESS.name()));
|
.set(PlayClerkPkEntity::getStatus, ClerkPkEnum.IN_PROGRESS.name()));
|
||||||
|
|
||||||
playClerkPkService.update(Wrappers.lambdaUpdate(PlayClerkPkEntity.class).eq(PlayClerkPkEntity::getStatus, ClerkPkEnum.IN_PROGRESS.name())
|
playClerkPkService.update(Wrappers.lambdaUpdate(PlayClerkPkEntity.class)
|
||||||
|
.eq(PlayClerkPkEntity::getStatus, ClerkPkEnum.IN_PROGRESS.name())
|
||||||
.le(PlayClerkPkEntity::getPkEndTime, new Date())
|
.le(PlayClerkPkEntity::getPkEndTime, new Date())
|
||||||
.set(PlayClerkPkEntity::getStatus, ClerkPkEnum.FINISHED.name()));
|
.set(PlayClerkPkEntity::getStatus, ClerkPkEnum.FINISHED.name()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,14 +12,13 @@ import com.starry.admin.modules.system.module.entity.SysTenantEntity;
|
|||||||
import com.starry.admin.modules.system.service.ISysTenantService;
|
import com.starry.admin.modules.system.service.ISysTenantService;
|
||||||
import com.starry.admin.utils.SecurityUtils;
|
import com.starry.admin.utils.SecurityUtils;
|
||||||
import com.starry.common.utils.IdUtils;
|
import com.starry.common.utils.IdUtils;
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单工资结算
|
* 订单工资结算
|
||||||
@@ -39,7 +38,6 @@ public class ClerkWagesSettlementTask {
|
|||||||
@Resource
|
@Resource
|
||||||
private IPlayOrderInfoService playOrderInfoService;
|
private IPlayOrderInfoService playOrderInfoService;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlayClerkWagesInfoService playClerkWagesInfoService;
|
private IPlayClerkWagesInfoService playClerkWagesInfoService;
|
||||||
|
|
||||||
@@ -47,10 +45,9 @@ public class ClerkWagesSettlementTask {
|
|||||||
private IPlayClerkWagesDetailsInfoService playClerkWagesDetailsInfoService;
|
private IPlayClerkWagesDetailsInfoService playClerkWagesDetailsInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每分钟查询未结算订单
|
* 每分钟查询未结算订单 如果订单完成时间超过24小时,可进行结算,生成工资
|
||||||
* 如果订单完成时间超过24小时,可进行结算,生成工资
|
|
||||||
*/
|
*/
|
||||||
// @Scheduled(cron = "0 0/1 * * * ?")
|
// @Scheduled(cron = "0 0/1 * * * ?")
|
||||||
public void dailyRanking() {
|
public void dailyRanking() {
|
||||||
// 1、查询所有的租户信息
|
// 1、查询所有的租户信息
|
||||||
List<SysTenantEntity> tenantEntities = sysTenantService.listAll();
|
List<SysTenantEntity> tenantEntities = sysTenantService.listAll();
|
||||||
@@ -64,11 +61,11 @@ public class ClerkWagesSettlementTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 活动24小时前完成的订单,对订单进行结算
|
* 活动24小时前完成的订单,对订单进行结算
|
||||||
*
|
*
|
||||||
* @param clerkId 店员ID
|
* @param clerkId
|
||||||
|
* 店员ID
|
||||||
*/
|
*/
|
||||||
public void updateClerkWagesInfo(String clerkId) {
|
public void updateClerkWagesInfo(String clerkId) {
|
||||||
// 获得24小时前完成,并且未结算的订单
|
// 获得24小时前完成,并且未结算的订单
|
||||||
@@ -80,12 +77,11 @@ public class ClerkWagesSettlementTask {
|
|||||||
updateClerkWagesInfo(clerkId, entity == null ? IdUtils.getUuid() : entity.getId(), orderInfoEntities);
|
updateClerkWagesInfo(clerkId, entity == null ? IdUtils.getUuid() : entity.getId(), orderInfoEntities);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新最新一次工资统计信息
|
* 更新最新一次工资统计信息 更新订单记录
|
||||||
* 更新订单记录
|
|
||||||
*
|
*
|
||||||
* @param orderInfoEntities 订单列表
|
* @param orderInfoEntities
|
||||||
|
* 订单列表
|
||||||
*/
|
*/
|
||||||
public void updateClerkWagesInfo(String clerkId, String wagesId, List<PlayOrderInfoEntity> orderInfoEntities) {
|
public void updateClerkWagesInfo(String clerkId, String wagesId, List<PlayOrderInfoEntity> orderInfoEntities) {
|
||||||
// 修改订单状态并且新增订单结算详情
|
// 修改订单状态并且新增订单结算详情
|
||||||
@@ -95,7 +91,8 @@ public class ClerkWagesSettlementTask {
|
|||||||
orderInfo.setOrderSettlementTime(LocalDateTime.now());
|
orderInfo.setOrderSettlementTime(LocalDateTime.now());
|
||||||
playOrderInfoService.update(orderInfo);
|
playOrderInfoService.update(orderInfo);
|
||||||
|
|
||||||
PlayClerkWagesDetailsInfoEntity wagesDetailsInfo = playClerkWagesDetailsInfoService.selectByOrderId(orderInfo.getId());
|
PlayClerkWagesDetailsInfoEntity wagesDetailsInfo = playClerkWagesDetailsInfoService
|
||||||
|
.selectByOrderId(orderInfo.getId());
|
||||||
if (wagesDetailsInfo == null) {
|
if (wagesDetailsInfo == null) {
|
||||||
wagesDetailsInfo = new PlayClerkWagesDetailsInfoEntity();
|
wagesDetailsInfo = new PlayClerkWagesDetailsInfoEntity();
|
||||||
wagesDetailsInfo.setId(IdUtils.getUuid());
|
wagesDetailsInfo.setId(IdUtils.getUuid());
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import com.starry.admin.modules.system.module.entity.SysTenantEntity;
|
|||||||
import com.starry.admin.modules.system.service.ISysTenantService;
|
import com.starry.admin.modules.system.service.ISysTenantService;
|
||||||
import com.starry.admin.utils.SecurityUtils;
|
import com.starry.admin.utils.SecurityUtils;
|
||||||
import com.starry.common.utils.IdUtils;
|
import com.starry.common.utils.IdUtils;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@@ -24,6 +20,9 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单排名结算信息
|
* 订单排名结算信息
|
||||||
@@ -49,8 +48,7 @@ public class OrderRankingSettlementTask {
|
|||||||
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当日订单结算,查询前一日的订单信息,生成订单排名数据
|
* 当日订单结算,查询前一日的订单信息,生成订单排名数据 每天凌晨0点5分0秒时触发执行
|
||||||
* 每天凌晨0点5分0秒时触发执行
|
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 5 0 * * ?")
|
@Scheduled(cron = "0 5 0 * * ?")
|
||||||
public void dailyRanking() {
|
public void dailyRanking() {
|
||||||
@@ -61,8 +59,7 @@ public class OrderRankingSettlementTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每周订单结算,周一凌晨30分执行,查询上一周的订单,然后生成订单排行数据
|
* 每周订单结算,周一凌晨30分执行,查询上一周的订单,然后生成订单排行数据 每周一凌晨0点30分0秒时触发执行
|
||||||
* 每周一凌晨0点30分0秒时触发执行
|
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 30 0 ? * MON")
|
@Scheduled(cron = "0 30 0 ? * MON")
|
||||||
public void weeklyRankingSettlement() {
|
public void weeklyRankingSettlement() {
|
||||||
@@ -73,14 +70,14 @@ public class OrderRankingSettlementTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产排行信息
|
* 生产排行信息 1、查询所有的租户信息 2、查询每个租户的用户,以及他们在对应时间段的订单 3、根据订单生产排行信息
|
||||||
* 1、查询所有的租户信息
|
|
||||||
* 2、查询每个租户的用户,以及他们在对应时间段的订单
|
|
||||||
* 3、根据订单生产排行信息
|
|
||||||
*
|
*
|
||||||
* @param startTime 接单开始时间
|
* @param startTime
|
||||||
* @param endTime 接单截至时间
|
* 接单开始时间
|
||||||
* @param weeklyRanking weeklyRanking 日排名还是周排名(0:每日排名;1:每周排名)
|
* @param endTime
|
||||||
|
* 接单截至时间
|
||||||
|
* @param weeklyRanking
|
||||||
|
* weeklyRanking 日排名还是周排名(0:每日排名;1:每周排名)
|
||||||
* @author admin
|
* @author admin
|
||||||
* @since 2024/6/12 15:21
|
* @since 2024/6/12 15:21
|
||||||
**/
|
**/
|
||||||
@@ -98,7 +95,8 @@ public class OrderRankingSettlementTask {
|
|||||||
// 生成每个人的订单排行信息
|
// 生成每个人的订单排行信息
|
||||||
for (PlayClerkUserInfoEntity clerkUserInfo : clerkUserReturnVos) {
|
for (PlayClerkUserInfoEntity clerkUserInfo : clerkUserReturnVos) {
|
||||||
// 生成订单排行数据
|
// 生成订单排行数据
|
||||||
clerkRankingInfoEntities.add(getClerkRanking(clerkUserInfo.getId(), startTime, endTime, weeklyRanking, newSerialNumber));
|
clerkRankingInfoEntities.add(
|
||||||
|
getClerkRanking(clerkUserInfo.getId(), startTime, endTime, weeklyRanking, newSerialNumber));
|
||||||
}
|
}
|
||||||
// 更新排行名次
|
// 更新排行名次
|
||||||
clerkRankingInfoEntities.sort((p1, p2) -> p2.getOrderNumber() - p1.getOrderNumber());
|
clerkRankingInfoEntities.sort((p1, p2) -> p2.getOrderNumber() - p1.getOrderNumber());
|
||||||
@@ -106,7 +104,8 @@ public class OrderRankingSettlementTask {
|
|||||||
PlayClerkRankingInfoEntity item = clerkRankingInfoEntities.get(i);
|
PlayClerkRankingInfoEntity item = clerkRankingInfoEntities.get(i);
|
||||||
item.setRankingIndex(i + 1);
|
item.setRankingIndex(i + 1);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
item.setPreviousMoney(clerkRankingInfoEntities.get(i - 1).getOrderMoney().subtract(item.getOrderMoney()));
|
item.setPreviousMoney(
|
||||||
|
clerkRankingInfoEntities.get(i - 1).getOrderMoney().subtract(item.getOrderMoney()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 排名数据生成后,将以往排名状态标记为历史排名
|
// 排名数据生成后,将以往排名状态标记为历史排名
|
||||||
@@ -119,16 +118,22 @@ public class OrderRankingSettlementTask {
|
|||||||
/**
|
/**
|
||||||
* 生产当前排行信息
|
* 生产当前排行信息
|
||||||
*
|
*
|
||||||
* @param clerkId 店员ID
|
* @param clerkId
|
||||||
* @param startTime 排行开始统计日期 yyyy-mm-dd 00:00:00
|
* 店员ID
|
||||||
* @param endTime 排行结束统计日期 yyyy-mm-dd 23:59:59
|
* @param startTime
|
||||||
* @param weeklyRanking 日排名还是周排名(0:每日排名;1:每周排名)
|
* 排行开始统计日期 yyyy-mm-dd 00:00:00
|
||||||
* @param serialNumber 查询当前租户、当前排行、的最后一次统计编号
|
* @param endTime
|
||||||
|
* 排行结束统计日期 yyyy-mm-dd 23:59:59
|
||||||
|
* @param weeklyRanking
|
||||||
|
* 日排名还是周排名(0:每日排名;1:每周排名)
|
||||||
|
* @param serialNumber
|
||||||
|
* 查询当前租户、当前排行、的最后一次统计编号
|
||||||
* @author admin
|
* @author admin
|
||||||
* @since 2024/6/7 11:43
|
* @since 2024/6/7 11:43
|
||||||
**/
|
**/
|
||||||
public PlayClerkRankingInfoEntity getClerkRanking(String clerkId, String startTime, String endTime, String weeklyRanking, Integer serialNumber) {
|
public PlayClerkRankingInfoEntity getClerkRanking(String clerkId, String startTime, String endTime,
|
||||||
List<PlayOrderInfoEntity> orderInfoEntities = orderInfoService.listByTime(clerkId, startTime, endTime,null);
|
String weeklyRanking, Integer serialNumber) {
|
||||||
|
List<PlayOrderInfoEntity> orderInfoEntities = orderInfoService.listByTime(clerkId, startTime, endTime, null);
|
||||||
int orderNumber = orderInfoEntities.size();
|
int orderNumber = orderInfoEntities.size();
|
||||||
BigDecimal orderMoney = BigDecimal.ZERO;
|
BigDecimal orderMoney = BigDecimal.ZERO;
|
||||||
Integer orderContinueNumber = 0;
|
Integer orderContinueNumber = 0;
|
||||||
@@ -146,8 +151,13 @@ public class OrderRankingSettlementTask {
|
|||||||
ordersExpiredNumber++;
|
ordersExpiredNumber++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BigDecimal orderContinueProportion = orderNumber == 0 ? BigDecimal.ZERO : new BigDecimal(ordersExpiredNumber).divide(new BigDecimal(orderNumber), 4, RoundingMode.HALF_UP).add(new BigDecimal(100));
|
BigDecimal orderContinueProportion = orderNumber == 0
|
||||||
BigDecimal averageUnitPrice = customIds.isEmpty() ? BigDecimal.ZERO : orderMoney.divide(new BigDecimal(customIds.size()), 4, RoundingMode.HALF_UP);
|
? BigDecimal.ZERO
|
||||||
|
: new BigDecimal(ordersExpiredNumber).divide(new BigDecimal(orderNumber), 4, RoundingMode.HALF_UP)
|
||||||
|
.add(new BigDecimal(100));
|
||||||
|
BigDecimal averageUnitPrice = customIds.isEmpty()
|
||||||
|
? BigDecimal.ZERO
|
||||||
|
: orderMoney.divide(new BigDecimal(customIds.size()), 4, RoundingMode.HALF_UP);
|
||||||
PlayClerkRankingInfoEntity rankingInfo = new PlayClerkRankingInfoEntity();
|
PlayClerkRankingInfoEntity rankingInfo = new PlayClerkRankingInfoEntity();
|
||||||
rankingInfo.setId(IdUtils.getUuid());
|
rankingInfo.setId(IdUtils.getUuid());
|
||||||
rankingInfo.setClerkId(clerkId);
|
rankingInfo.setClerkId(clerkId);
|
||||||
@@ -174,5 +184,4 @@ public class OrderRankingSettlementTask {
|
|||||||
return rankingInfo;
|
return rankingInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,14 @@ package com.starry.admin.common.task;
|
|||||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||||
import com.starry.admin.modules.order.service.IPlayOrderInfoService;
|
import com.starry.admin.modules.order.service.IPlayOrderInfoService;
|
||||||
import com.starry.admin.utils.SecurityUtils;
|
import com.starry.admin.utils.SecurityUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 超时未接单的订单退款处理任务
|
* 超时未接单的订单退款处理任务
|
||||||
*
|
*
|
||||||
@@ -26,7 +25,6 @@ public class OverdueOrderHandlerTask {
|
|||||||
|
|
||||||
private static final int MAX_TIME = 24 * 60 * 40;
|
private static final int MAX_TIME = 24 * 60 * 40;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private StringRedisTemplate stringRedisTemplate;
|
private StringRedisTemplate stringRedisTemplate;
|
||||||
|
|
||||||
@@ -76,7 +74,7 @@ public class OverdueOrderHandlerTask {
|
|||||||
if ("0".equals(orderInfo.getOrderStatus())) {
|
if ("0".equals(orderInfo.getOrderStatus())) {
|
||||||
try {
|
try {
|
||||||
playOrderInfoService.updateStateTo4("2", "admin", orderInfo.getId(), "订单长时间未接单", new ArrayList<>());
|
playOrderInfoService.updateStateTo4("2", "admin", orderInfo.getId(), "订单长时间未接单", new ArrayList<>());
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
log.error("订单退款失败", e);
|
log.error("订单退款失败", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
package com.starry.admin.manager;
|
package com.starry.admin.manager;
|
||||||
|
|
||||||
|
|
||||||
import com.starry.common.utils.SpringUtils;
|
import com.starry.common.utils.SpringUtils;
|
||||||
import com.starry.common.utils.ThreadsUtils;
|
import com.starry.common.utils.ThreadsUtils;
|
||||||
|
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin 异步任务管理器
|
||||||
* 异步任务管理器
|
|
||||||
* @since 2022/7/25
|
* @since 2022/7/25
|
||||||
*/
|
*/
|
||||||
public class AsyncManager {
|
public class AsyncManager {
|
||||||
@@ -38,7 +35,8 @@ public class AsyncManager {
|
|||||||
/**
|
/**
|
||||||
* 执行任务
|
* 执行任务
|
||||||
*
|
*
|
||||||
* @param task 任务
|
* @param task
|
||||||
|
* 任务
|
||||||
*/
|
*/
|
||||||
public void execute(TimerTask task) {
|
public void execute(TimerTask task) {
|
||||||
executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS);
|
executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS);
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.starry.admin.manager;
|
package com.starry.admin.manager;
|
||||||
|
|
||||||
|
import javax.annotation.PreDestroy;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.PreDestroy;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确保应用退出时能关闭后台线程
|
* 确保应用退出时能关闭后台线程
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -9,10 +9,9 @@ import com.starry.common.constant.Constants;
|
|||||||
import com.starry.common.utils.ServletUtils;
|
import com.starry.common.utils.ServletUtils;
|
||||||
import com.starry.common.utils.SpringUtils;
|
import com.starry.common.utils.SpringUtils;
|
||||||
import com.starry.common.utils.ip.AddressUtils;
|
import com.starry.common.utils.ip.AddressUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
@@ -23,13 +22,18 @@ public class AsyncFactory {
|
|||||||
/**
|
/**
|
||||||
* 记录登录信息
|
* 记录登录信息
|
||||||
*
|
*
|
||||||
* @param username 用户名
|
* @param username
|
||||||
* @param status 状态
|
* 用户名
|
||||||
* @param message 消息
|
* @param status
|
||||||
* @param args 列表
|
* 状态
|
||||||
|
* @param message
|
||||||
|
* 消息
|
||||||
|
* @param args
|
||||||
|
* 列表
|
||||||
* @return 任务task
|
* @return 任务task
|
||||||
*/
|
*/
|
||||||
public static TimerTask recordLoginLog(final String username, final String status, final String message, final Object... args) {
|
public static TimerTask recordLoginLog(final String username, final String status, final String message,
|
||||||
|
final Object... args) {
|
||||||
// 客户端操作系统、浏览器等信息
|
// 客户端操作系统、浏览器等信息
|
||||||
final UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent"));
|
final UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent"));
|
||||||
// 请求的IP地址
|
// 请求的IP地址
|
||||||
@@ -64,4 +68,3 @@ public class AsyncFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,18 +13,16 @@ import com.starry.common.result.R;
|
|||||||
import com.starry.common.utils.ConvertUtil;
|
import com.starry.common.utils.ConvertUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员头像框Controller
|
* 店员头像框Controller
|
||||||
*
|
*
|
||||||
@@ -38,17 +36,15 @@ public class PlayAvatarFrameInfoController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IPlayAvatarFrameInfoService playAvatarFrameInfoService;
|
private IPlayAvatarFrameInfoService playAvatarFrameInfoService;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IOssFileService ossFileService;
|
private IOssFileService ossFileService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "分页查询头像框", notes = "分页查询店员头像框信息列表")
|
@ApiOperation(value = "分页查询头像框", notes = "分页查询店员头像框信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayAvatarFrameInfoEntity.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayAvatarFrameInfoEntity.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@PostMapping("/listByPage")
|
@PostMapping("/listByPage")
|
||||||
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayAvatarFrameInfoQueryVo vo) {
|
public R listByPage(
|
||||||
|
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayAvatarFrameInfoQueryVo vo) {
|
||||||
return R.ok(playAvatarFrameInfoService.selectByPage(vo));
|
return R.ok(playAvatarFrameInfoService.selectByPage(vo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,37 +53,32 @@ public class PlayAvatarFrameInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询所有头像框", notes = "获取所有店员头像框信息列表")
|
@ApiOperation(value = "查询所有头像框", notes = "获取所有店员头像框信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayAvatarFrameInfoEntity.class, responseContainer = "List")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayAvatarFrameInfoEntity.class, responseContainer = "List")})
|
||||||
})
|
|
||||||
@GetMapping("/listAll")
|
@GetMapping("/listAll")
|
||||||
public R listAll() {
|
public R listAll() {
|
||||||
return R.ok(playAvatarFrameInfoService.selectAll());
|
return R.ok(playAvatarFrameInfoService.selectAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "上传头像框图片", notes = "上传店员头像框图片文件")
|
@ApiOperation(value = "上传头像框图片", notes = "上传店员头像框图片文件")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = String.class, responseContainer = "R")})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = String.class, responseContainer = "R")
|
|
||||||
})
|
|
||||||
@PostMapping("/uploadFile")
|
@PostMapping("/uploadFile")
|
||||||
public R uploadFile(@ApiParam(value = "图片文件", required = true) @RequestParam("file") MultipartFile file) throws IOException {
|
public R uploadFile(@ApiParam(value = "图片文件", required = true) @RequestParam("file") MultipartFile file)
|
||||||
String fileAddress = ossFileService.upload(file.getInputStream(), SecurityUtils.getTenantId(), file.getOriginalFilename());
|
throws IOException {
|
||||||
|
String fileAddress = ossFileService.upload(file.getInputStream(), SecurityUtils.getTenantId(),
|
||||||
|
file.getOriginalFilename());
|
||||||
return R.ok(fileAddress);
|
return R.ok(fileAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增店员头像框
|
* 新增店员头像框
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新增头像框", notes = "创建新的店员头像框信息")
|
@ApiOperation(value = "新增头像框", notes = "创建新的店员头像框信息")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员头像框", businessType = BusinessType.INSERT)
|
@Log(title = "店员头像框", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public R create(@ApiParam(value = "头像框信息", required = true) @Validated @RequestBody PlayAvatarFrameInfoAddVo vo) {
|
public R create(@ApiParam(value = "头像框信息", required = true) @Validated @RequestBody PlayAvatarFrameInfoAddVo vo) {
|
||||||
boolean success = playAvatarFrameInfoService.create(ConvertUtil.entityToVo(vo, PlayAvatarFrameInfoEntity.class));
|
boolean success = playAvatarFrameInfoService
|
||||||
|
.create(ConvertUtil.entityToVo(vo, PlayAvatarFrameInfoEntity.class));
|
||||||
if (success) {
|
if (success) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@@ -99,13 +90,11 @@ public class PlayAvatarFrameInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改头像框", notes = "根据ID修改店员头像框信息")
|
@ApiOperation(value = "修改头像框", notes = "根据ID修改店员头像框信息")
|
||||||
@ApiImplicitParam(name = "id", value = "头像框ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "头像框ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员头像框", businessType = BusinessType.UPDATE)
|
@Log(title = "店员头像框", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update/{id}")
|
@PostMapping(value = "/update/{id}")
|
||||||
public R update(@PathVariable String id, @ApiParam(value = "头像框信息", required = true) @RequestBody PlayAvatarFrameInfoEntity playAvatarFrameInfo) {
|
public R update(@PathVariable String id,
|
||||||
|
@ApiParam(value = "头像框信息", required = true) @RequestBody PlayAvatarFrameInfoEntity playAvatarFrameInfo) {
|
||||||
playAvatarFrameInfo.setId(id);
|
playAvatarFrameInfo.setId(id);
|
||||||
boolean success = playAvatarFrameInfoService.update(playAvatarFrameInfo);
|
boolean success = playAvatarFrameInfoService.update(playAvatarFrameInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -119,9 +108,7 @@ public class PlayAvatarFrameInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除头像框", notes = "根据ID批量删除店员头像框信息")
|
@ApiOperation(value = "删除头像框", notes = "根据ID批量删除店员头像框信息")
|
||||||
@ApiImplicitParam(name = "ids", value = "头像框ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "头像框ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
|
||||||
})
|
|
||||||
@Log(title = "店员头像框", businessType = BusinessType.DELETE)
|
@Log(title = "店员头像框", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
@@ -132,13 +119,11 @@ public class PlayAvatarFrameInfoController {
|
|||||||
* 新增店员头像框
|
* 新增店员头像框
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "赠送头像框", notes = "赠送头像框给指定店员")
|
@ApiOperation(value = "赠送头像框", notes = "赠送头像框给指定店员")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
@Log(title = "赠送店员头像框", businessType = BusinessType.INSERT)
|
@Log(title = "赠送店员头像框", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/sendAvatarFrame")
|
@PostMapping("/sendAvatarFrame")
|
||||||
public R sendAvatarFrame(@ApiParam(value = "赠送信息", required = true) @Validated @RequestBody PlayAvatarFrameSendVo vo) {
|
public R sendAvatarFrame(
|
||||||
|
@ApiParam(value = "赠送信息", required = true) @Validated @RequestBody PlayAvatarFrameSendVo vo) {
|
||||||
return R.error("添加失败");
|
return R.error("添加失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,16 +13,14 @@ import com.starry.common.result.R;
|
|||||||
import com.starry.common.utils.ConvertUtil;
|
import com.starry.common.utils.ConvertUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员动态信息Controller
|
* 店员动态信息Controller
|
||||||
*
|
*
|
||||||
@@ -38,30 +36,24 @@ public class PlayClerkArticleInfoController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IPlayCustomArticleInfoService playCustomArticleInfoService;
|
private IPlayCustomArticleInfoService playCustomArticleInfoService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询店员动态信息列表
|
* 查询店员动态信息列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "分页查询动态列表", notes = "分页查询店员动态信息列表")
|
@ApiOperation(value = "分页查询动态列表", notes = "分页查询店员动态信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleReturnVo.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleReturnVo.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@PostMapping("/listByPage")
|
@PostMapping("/listByPage")
|
||||||
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkArticleQueryVo vo) {
|
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkArticleQueryVo vo) {
|
||||||
IPage<PlayClerkArticleReturnVo> list = playClerkArticleInfoService.selectByPage(vo,false);
|
IPage<PlayClerkArticleReturnVo> list = playClerkArticleInfoService.selectByPage(vo, false);
|
||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改店员动态信息
|
* 修改店员动态信息
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改动态审核状态", notes = "更新店员动态审核状态,通过或拒绝")
|
@ApiOperation(value = "修改动态审核状态", notes = "更新店员动态审核状态,通过或拒绝")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
// @PreAuthorize("@customSs.hasPermission('clerk:article:update')")
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:article:update')")
|
|
||||||
@Log(title = "店员动态信息", businessType = BusinessType.UPDATE)
|
@Log(title = "店员动态信息", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update")
|
@PostMapping(value = "/update")
|
||||||
public R update(@ApiParam(value = "审核状态信息", required = true) @RequestBody PlayClerkArticleReviewStateEditVo vo) {
|
public R update(@ApiParam(value = "审核状态信息", required = true) @RequestBody PlayClerkArticleReviewStateEditVo vo) {
|
||||||
@@ -78,10 +70,8 @@ public class PlayClerkArticleInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除动态", notes = "根据ID批量删除店员动态信息")
|
@ApiOperation(value = "删除动态", notes = "根据ID批量删除店员动态信息")
|
||||||
@ApiImplicitParam(name = "ids", value = "动态ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "动态ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
||||||
@ApiResponse(code = 200, message = "操作成功")
|
// @PreAuthorize("@customSs.hasPermission('clerk:article:delete')")
|
||||||
})
|
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:article:delete')")
|
|
||||||
@Log(title = "店员动态信息", businessType = BusinessType.DELETE)
|
@Log(title = "店员动态信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
|
|||||||
@@ -8,15 +8,13 @@ import com.starry.common.enums.BusinessType;
|
|||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员分类Controller
|
* 店员分类Controller
|
||||||
@@ -36,25 +34,23 @@ public class PlayClerkClassificationInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询所有分类", notes = "获取所有店员分类信息列表")
|
@ApiOperation(value = "查询所有分类", notes = "获取所有店员分类信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class, responseContainer = "List")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class, responseContainer = "List")})
|
||||||
})
|
|
||||||
@GetMapping("/listAll")
|
@GetMapping("/listAll")
|
||||||
public R listAll() {
|
public R listAll() {
|
||||||
List<PlayClerkClassificationInfoEntity> list = playClerkClassificationInfoService.selectAll();
|
List<PlayClerkClassificationInfoEntity> list = playClerkClassificationInfoService.selectAll();
|
||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询店员分类列表
|
* 查询店员分类列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "分页查询分类", notes = "分页查询店员分类信息列表")
|
@ApiOperation(value = "分页查询分类", notes = "分页查询店员分类信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R list(@ApiParam(value = "查询条件") PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
public R list(@ApiParam(value = "查询条件") PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||||
IPage<PlayClerkClassificationInfoEntity> list = playClerkClassificationInfoService.selectPlayClerkClassificationInfoByPage(playClerkClassificationInfo);
|
IPage<PlayClerkClassificationInfoEntity> list = playClerkClassificationInfoService
|
||||||
|
.selectPlayClerkClassificationInfoByPage(playClerkClassificationInfo);
|
||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,9 +59,7 @@ public class PlayClerkClassificationInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取分类详情", notes = "根据ID获取店员分类详细信息")
|
@ApiOperation(value = "获取分类详情", notes = "根据ID获取店员分类详细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class)
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public R getInfo(@PathVariable("id") String id) {
|
public R getInfo(@PathVariable("id") String id) {
|
||||||
return R.ok(playClerkClassificationInfoService.selectPlayClerkClassificationInfoById(id));
|
return R.ok(playClerkClassificationInfoService.selectPlayClerkClassificationInfoById(id));
|
||||||
@@ -75,13 +69,11 @@ public class PlayClerkClassificationInfoController {
|
|||||||
* 新增店员分类
|
* 新增店员分类
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新增分类", notes = "创建新的店员分类信息")
|
@ApiOperation(value = "新增分类", notes = "创建新的店员分类信息")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员分类", businessType = BusinessType.INSERT)
|
@Log(title = "店员分类", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public R create(@ApiParam(value = "分类信息", required = true) @RequestBody PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
public R create(
|
||||||
|
@ApiParam(value = "分类信息", required = true) @RequestBody PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||||
boolean success = playClerkClassificationInfoService.create(playClerkClassificationInfo);
|
boolean success = playClerkClassificationInfoService.create(playClerkClassificationInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@@ -94,13 +86,11 @@ public class PlayClerkClassificationInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改分类", notes = "根据ID修改店员分类信息")
|
@ApiOperation(value = "修改分类", notes = "根据ID修改店员分类信息")
|
||||||
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员分类", businessType = BusinessType.UPDATE)
|
@Log(title = "店员分类", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update/{id}")
|
@PostMapping(value = "/update/{id}")
|
||||||
public R update(@PathVariable String id, @ApiParam(value = "分类信息", required = true) @RequestBody PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
public R update(@PathVariable String id,
|
||||||
|
@ApiParam(value = "分类信息", required = true) @RequestBody PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||||
playClerkClassificationInfo.setId(id);
|
playClerkClassificationInfo.setId(id);
|
||||||
boolean success = playClerkClassificationInfoService.update(playClerkClassificationInfo);
|
boolean success = playClerkClassificationInfoService.update(playClerkClassificationInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -114,9 +104,7 @@ public class PlayClerkClassificationInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除分类", notes = "根据ID批量删除店员分类信息")
|
@ApiOperation(value = "删除分类", notes = "根据ID批量删除店员分类信息")
|
||||||
@ApiImplicitParam(name = "ids", value = "分类ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "分类ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
|
||||||
})
|
|
||||||
@Log(title = "店员分类", businessType = BusinessType.DELETE)
|
@Log(title = "店员分类", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
|
|||||||
@@ -10,15 +10,13 @@ import com.starry.common.result.R;
|
|||||||
import com.starry.common.utils.ConvertUtil;
|
import com.starry.common.utils.ConvertUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 陪聊服务项目Controller
|
* 陪聊服务项目Controller
|
||||||
@@ -38,25 +36,23 @@ public class PlayClerkCommodityController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询所有服务项目", notes = "获取所有陪聊服务项目列表")
|
@ApiOperation(value = "查询所有服务项目", notes = "获取所有陪聊服务项目列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityQueryVo.class, responseContainer = "List")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityQueryVo.class, responseContainer = "List")})
|
||||||
})
|
|
||||||
@GetMapping("/listAllCommodity")
|
@GetMapping("/listAllCommodity")
|
||||||
public R listAllCommodity() {
|
public R listAllCommodity() {
|
||||||
List<PlayClerkCommodityEntity> list = playClerkCommodityService.selectAll();
|
List<PlayClerkCommodityEntity> list = playClerkCommodityService.selectAll();
|
||||||
return R.ok(ConvertUtil.entityToVoList(list, PlayClerkCommodityQueryVo.class));
|
return R.ok(ConvertUtil.entityToVoList(list, PlayClerkCommodityQueryVo.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询陪聊服务项目列表
|
* 查询陪聊服务项目列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "分页查询服务项目", notes = "分页查询陪聊服务项目列表")
|
@ApiOperation(value = "分页查询服务项目", notes = "分页查询陪聊服务项目列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityEntity.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityEntity.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R list(@ApiParam(value = "查询条件") PlayClerkCommodityEntity playClerkCommodity) {
|
public R list(@ApiParam(value = "查询条件") PlayClerkCommodityEntity playClerkCommodity) {
|
||||||
IPage<PlayClerkCommodityEntity> list = playClerkCommodityService.selectPlayClerkCommodityByPage(playClerkCommodity);
|
IPage<PlayClerkCommodityEntity> list = playClerkCommodityService
|
||||||
|
.selectPlayClerkCommodityByPage(playClerkCommodity);
|
||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,9 +61,7 @@ public class PlayClerkCommodityController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取服务项目详情", notes = "根据ID获取陪聊服务项目详细信息")
|
@ApiOperation(value = "获取服务项目详情", notes = "根据ID获取陪聊服务项目详细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "服务项目ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "服务项目ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityEntity.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityEntity.class)
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public R getInfo(@PathVariable("id") String id) {
|
public R getInfo(@PathVariable("id") String id) {
|
||||||
return R.ok(playClerkCommodityService.selectPlayClerkCommodityById(id));
|
return R.ok(playClerkCommodityService.selectPlayClerkCommodityById(id));
|
||||||
@@ -77,13 +71,11 @@ public class PlayClerkCommodityController {
|
|||||||
* 新增陪聊服务项目
|
* 新增陪聊服务项目
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新增服务项目", notes = "创建新的陪聊服务项目")
|
@ApiOperation(value = "新增服务项目", notes = "创建新的陪聊服务项目")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
@Log(title = "陪聊服务项目", businessType = BusinessType.INSERT)
|
@Log(title = "陪聊服务项目", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public R create(@ApiParam(value = "服务项目信息", required = true) @RequestBody PlayClerkCommodityEntity playClerkCommodity) {
|
public R create(
|
||||||
|
@ApiParam(value = "服务项目信息", required = true) @RequestBody PlayClerkCommodityEntity playClerkCommodity) {
|
||||||
boolean success = playClerkCommodityService.create(playClerkCommodity);
|
boolean success = playClerkCommodityService.create(playClerkCommodity);
|
||||||
if (success) {
|
if (success) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@@ -91,19 +83,16 @@ public class PlayClerkCommodityController {
|
|||||||
return R.error("添加失败");
|
return R.error("添加失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改陪聊服务项目
|
* 修改陪聊服务项目
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改服务项目", notes = "根据ID修改陪聊服务项目信息")
|
@ApiOperation(value = "修改服务项目", notes = "根据ID修改陪聊服务项目信息")
|
||||||
@ApiImplicitParam(name = "id", value = "服务项目ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "服务项目ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@Log(title = "陪聊服务项目", businessType = BusinessType.UPDATE)
|
@Log(title = "陪聊服务项目", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update/{id}")
|
@PostMapping(value = "/update/{id}")
|
||||||
public R update(@PathVariable String id, @ApiParam(value = "服务项目信息", required = true) @RequestBody PlayClerkCommodityEntity playClerkCommodity) {
|
public R update(@PathVariable String id,
|
||||||
|
@ApiParam(value = "服务项目信息", required = true) @RequestBody PlayClerkCommodityEntity playClerkCommodity) {
|
||||||
playClerkCommodity.setId(id);
|
playClerkCommodity.setId(id);
|
||||||
boolean success = playClerkCommodityService.update(playClerkCommodity);
|
boolean success = playClerkCommodityService.update(playClerkCommodity);
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -117,9 +106,7 @@ public class PlayClerkCommodityController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除服务项目", notes = "根据ID批量删除陪聊服务项目")
|
@ApiOperation(value = "删除服务项目", notes = "根据ID批量删除陪聊服务项目")
|
||||||
@ApiImplicitParam(name = "ids", value = "服务项目ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "服务项目ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
|
||||||
})
|
|
||||||
@Log(title = "陪聊服务项目", businessType = BusinessType.DELETE)
|
@Log(title = "陪聊服务项目", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
|
|||||||
@@ -10,16 +10,14 @@ import com.starry.common.enums.BusinessType;
|
|||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员资料审核Controller
|
* 店员资料审核Controller
|
||||||
*
|
*
|
||||||
@@ -34,14 +32,12 @@ public class PlayClerkDataReviewInfoController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IPlayClerkDataReviewInfoService playClerkDataReviewInfoService;
|
private IPlayClerkDataReviewInfoService playClerkDataReviewInfoService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询店员资料审核列表
|
* 查询店员资料审核列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询资料审核列表", notes = "分页查询店员资料审核列表")
|
@ApiOperation(value = "查询资料审核列表", notes = "分页查询店员资料审核列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkDataReviewReturnVo.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkDataReviewReturnVo.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@PostMapping("/listByPage")
|
@PostMapping("/listByPage")
|
||||||
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkDataReviewQueryVo vo) {
|
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkDataReviewQueryVo vo) {
|
||||||
IPage<PlayClerkDataReviewReturnVo> list = playClerkDataReviewInfoService.selectByPage(vo);
|
IPage<PlayClerkDataReviewReturnVo> list = playClerkDataReviewInfoService.selectByPage(vo);
|
||||||
@@ -52,13 +48,12 @@ public class PlayClerkDataReviewInfoController {
|
|||||||
* 修改店员资料审核
|
* 修改店员资料审核
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改资料审核状态", notes = "更新店员资料审核状态,通过或拒绝")
|
@ApiOperation(value = "修改资料审核状态", notes = "更新店员资料审核状态,通过或拒绝")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
||||||
@ApiResponse(code = 200, message = "操作成功")
|
// @PreAuthorize("@customSs.hasPermission('clerk:dataReview:update')")
|
||||||
})
|
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:dataReview:update')")
|
|
||||||
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update")
|
@PostMapping(value = "/update")
|
||||||
public R update(@ApiParam(value = "审核状态信息", required = true) @Validated @RequestBody PlayClerkDataReviewStateEditVo vo) {
|
public R update(
|
||||||
|
@ApiParam(value = "审核状态信息", required = true) @Validated @RequestBody PlayClerkDataReviewStateEditVo vo) {
|
||||||
playClerkDataReviewInfoService.updateDataReviewState(vo);
|
playClerkDataReviewInfoService.updateDataReviewState(vo);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@@ -68,10 +63,8 @@ public class PlayClerkDataReviewInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除资料审核记录", notes = "根据ID批量删除店员资料审核记录")
|
@ApiOperation(value = "删除资料审核记录", notes = "根据ID批量删除店员资料审核记录")
|
||||||
@ApiImplicitParam(name = "ids", value = "审核记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "审核记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
// @PreAuthorize("@customSs.hasPermission('clerk:dataReview:delete')")
|
||||||
})
|
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:dataReview:delete')")
|
|
||||||
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
|
|||||||
@@ -11,16 +11,14 @@ import com.starry.common.result.R;
|
|||||||
import com.starry.common.utils.ConvertUtil;
|
import com.starry.common.utils.ConvertUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员等级Controller
|
* 店员等级Controller
|
||||||
*
|
*
|
||||||
@@ -39,8 +37,7 @@ public class PlayClerkLevelInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询所有等级", notes = "获取所有店员等级信息列表")
|
@ApiOperation(value = "查询所有等级", notes = "获取所有店员等级信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoEntity.class, responseContainer = "List")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoEntity.class, responseContainer = "List")})
|
||||||
})
|
|
||||||
@GetMapping("/listAll")
|
@GetMapping("/listAll")
|
||||||
public R listAll() {
|
public R listAll() {
|
||||||
return R.ok(playClerkLevelInfoService.selectAll());
|
return R.ok(playClerkLevelInfoService.selectAll());
|
||||||
@@ -51,9 +48,7 @@ public class PlayClerkLevelInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取等级详情", notes = "根据ID获取店员等级详细信息")
|
@ApiOperation(value = "获取等级详情", notes = "根据ID获取店员等级详细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "等级ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "等级ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoEntity.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoEntity.class)
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public R getInfo(@PathVariable("id") String id) {
|
public R getInfo(@PathVariable("id") String id) {
|
||||||
return R.ok(playClerkLevelInfoService.selectPlayClerkLevelInfoById(id));
|
return R.ok(playClerkLevelInfoService.selectPlayClerkLevelInfoById(id));
|
||||||
@@ -63,10 +58,7 @@ public class PlayClerkLevelInfoController {
|
|||||||
* 新增店员等级
|
* 新增店员等级
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新增等级", notes = "创建新的店员等级信息")
|
@ApiOperation(value = "新增等级", notes = "创建新的店员等级信息")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员等级", businessType = BusinessType.INSERT)
|
@Log(title = "店员等级", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public R create(@ApiParam(value = "等级信息", required = true) @RequestBody PlayClerkLevelAddVo vo) {
|
public R create(@ApiParam(value = "等级信息", required = true) @RequestBody PlayClerkLevelAddVo vo) {
|
||||||
@@ -84,10 +76,7 @@ public class PlayClerkLevelInfoController {
|
|||||||
* 修改店员等级
|
* 修改店员等级
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改等级", notes = "修改店员等级信息")
|
@ApiOperation(value = "修改等级", notes = "修改店员等级信息")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员等级", businessType = BusinessType.UPDATE)
|
@Log(title = "店员等级", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update")
|
@PostMapping(value = "/update")
|
||||||
public R update(@ApiParam(value = "等级信息", required = true) @Validated @RequestBody PlayClerkLevelEditVo vo) {
|
public R update(@ApiParam(value = "等级信息", required = true) @Validated @RequestBody PlayClerkLevelEditVo vo) {
|
||||||
@@ -103,10 +92,7 @@ public class PlayClerkLevelInfoController {
|
|||||||
* 删除店员等级
|
* 删除店员等级
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除最高等级", notes = "删除系统中最高的店员等级")
|
@ApiOperation(value = "删除最高等级", notes = "删除系统中最高的店员等级")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "最后一级,不允许删除")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "最后一级,不允许删除")
|
|
||||||
})
|
|
||||||
@Log(title = "店员等级", businessType = BusinessType.DELETE)
|
@Log(title = "店员等级", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("delMaxLevel")
|
@DeleteMapping("delMaxLevel")
|
||||||
public R remove() {
|
public R remove() {
|
||||||
|
|||||||
@@ -12,9 +12,8 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员pkController
|
* 店员pkController
|
||||||
@@ -34,8 +33,7 @@ public class PlayClerkPkController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "分页查询PK列表", notes = "分页查询店员PK信息列表")
|
@ApiOperation(value = "分页查询PK列表", notes = "分页查询店员PK信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkPkEntity.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkPkEntity.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R list(@ApiParam(value = "查询条件") PlayClerkPkEntity playClerkPk) {
|
public R list(@ApiParam(value = "查询条件") PlayClerkPkEntity playClerkPk) {
|
||||||
IPage<PlayClerkPkEntity> list = playClerkPkService.selectPlayClerkPkByPage(playClerkPk);
|
IPage<PlayClerkPkEntity> list = playClerkPkService.selectPlayClerkPkByPage(playClerkPk);
|
||||||
@@ -47,9 +45,7 @@ public class PlayClerkPkController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取PK详情", notes = "根据ID获取店员PK详细信息")
|
@ApiOperation(value = "获取PK详情", notes = "根据ID获取店员PK详细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "PK记录ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "PK记录ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkPkEntity.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkPkEntity.class)
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public R getInfo(@PathVariable("id") String id) {
|
public R getInfo(@PathVariable("id") String id) {
|
||||||
return R.ok(playClerkPkService.selectPlayClerkPkById(id));
|
return R.ok(playClerkPkService.selectPlayClerkPkById(id));
|
||||||
@@ -59,10 +55,7 @@ public class PlayClerkPkController {
|
|||||||
* 新增店员pk
|
* 新增店员pk
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新增PK记录", notes = "创建新的店员PK信息")
|
@ApiOperation(value = "新增PK记录", notes = "创建新的店员PK信息")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员pk", businessType = BusinessType.INSERT)
|
@Log(title = "店员pk", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public R create(@ApiParam(value = "PK信息", required = true) @RequestBody PlayClerkPkEntity playClerkPk) {
|
public R create(@ApiParam(value = "PK信息", required = true) @RequestBody PlayClerkPkEntity playClerkPk) {
|
||||||
@@ -78,13 +71,11 @@ public class PlayClerkPkController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改PK记录", notes = "根据ID修改店员PK信息")
|
@ApiOperation(value = "修改PK记录", notes = "根据ID修改店员PK信息")
|
||||||
@ApiImplicitParam(name = "id", value = "PK记录ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "PK记录ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员pk", businessType = BusinessType.UPDATE)
|
@Log(title = "店员pk", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update/{id}")
|
@PostMapping(value = "/update/{id}")
|
||||||
public R update(@PathVariable String id, @ApiParam(value = "PK信息", required = true) @RequestBody PlayClerkPkEntity playClerkPk) {
|
public R update(@PathVariable String id,
|
||||||
|
@ApiParam(value = "PK信息", required = true) @RequestBody PlayClerkPkEntity playClerkPk) {
|
||||||
playClerkPk.setId(id);
|
playClerkPk.setId(id);
|
||||||
boolean success = playClerkPkService.update(playClerkPk);
|
boolean success = playClerkPkService.update(playClerkPk);
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -98,9 +89,7 @@ public class PlayClerkPkController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除PK记录", notes = "根据ID批量删除店员PK信息")
|
@ApiOperation(value = "删除PK记录", notes = "根据ID批量删除店员PK信息")
|
||||||
@ApiImplicitParam(name = "ids", value = "PK记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "PK记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
|
||||||
})
|
|
||||||
@Log(title = "店员pk", businessType = BusinessType.DELETE)
|
@Log(title = "店员pk", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
|
|||||||
@@ -10,16 +10,14 @@ import com.starry.common.enums.BusinessType;
|
|||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员排行Controller
|
* 店员排行Controller
|
||||||
*
|
*
|
||||||
@@ -38,8 +36,7 @@ public class PlayClerkRankingInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询排行列表", notes = "分页查询店员排行信息列表")
|
@ApiOperation(value = "查询排行列表", notes = "分页查询店员排行信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = IPlayClerkRankingInfoReturnVo.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = IPlayClerkRankingInfoReturnVo.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@PostMapping("/listByPage")
|
@PostMapping("/listByPage")
|
||||||
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody IPlayClerkRankingInfoQueryVo vo) {
|
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody IPlayClerkRankingInfoQueryVo vo) {
|
||||||
IPage<IPlayClerkRankingInfoReturnVo> list = playClerkRankingInfoService.selectByPage(vo);
|
IPage<IPlayClerkRankingInfoReturnVo> list = playClerkRankingInfoService.selectByPage(vo);
|
||||||
@@ -51,9 +48,7 @@ public class PlayClerkRankingInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取排行详情", notes = "根据ID获取店员排行详细信息")
|
@ApiOperation(value = "获取排行详情", notes = "根据ID获取店员排行详细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "排行ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "排行ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkRankingInfoEntity.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkRankingInfoEntity.class)
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public R getInfo(@PathVariable("id") String id) {
|
public R getInfo(@PathVariable("id") String id) {
|
||||||
return R.ok(playClerkRankingInfoService.selectPlayClerkRankingInfoById(id));
|
return R.ok(playClerkRankingInfoService.selectPlayClerkRankingInfoById(id));
|
||||||
@@ -63,14 +58,12 @@ public class PlayClerkRankingInfoController {
|
|||||||
* 新增店员排行
|
* 新增店员排行
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新增排行", notes = "创建新的店员排行记录")
|
@ApiOperation(value = "新增排行", notes = "创建新的店员排行记录")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
// @PreAuthorize("@customSs.hasPermission('clerk:ranking:add')")
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:ranking:add')")
|
|
||||||
@Log(title = "店员排行", businessType = BusinessType.INSERT)
|
@Log(title = "店员排行", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public R create(@ApiParam(value = "排行信息", required = true) @RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
public R create(
|
||||||
|
@ApiParam(value = "排行信息", required = true) @RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||||
boolean success = playClerkRankingInfoService.create(playClerkRankingInfo);
|
boolean success = playClerkRankingInfoService.create(playClerkRankingInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@@ -83,14 +76,12 @@ public class PlayClerkRankingInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改排行", notes = "根据ID修改店员排行信息")
|
@ApiOperation(value = "修改排行", notes = "根据ID修改店员排行信息")
|
||||||
@ApiImplicitParam(name = "id", value = "排行ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "排行ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
// @PreAuthorize("@customSs.hasPermission('clerk:ranking:update')")
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:ranking:update')")
|
|
||||||
@Log(title = "店员排行", businessType = BusinessType.UPDATE)
|
@Log(title = "店员排行", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update/{id}")
|
@PostMapping(value = "/update/{id}")
|
||||||
public R update(@PathVariable String id, @ApiParam(value = "排行信息", required = true) @RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
public R update(@PathVariable String id,
|
||||||
|
@ApiParam(value = "排行信息", required = true) @RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||||
playClerkRankingInfo.setId(id);
|
playClerkRankingInfo.setId(id);
|
||||||
boolean success = playClerkRankingInfoService.update(playClerkRankingInfo);
|
boolean success = playClerkRankingInfoService.update(playClerkRankingInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -104,10 +95,8 @@ public class PlayClerkRankingInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除排行", notes = "根据ID批量删除店员排行信息")
|
@ApiOperation(value = "删除排行", notes = "根据ID批量删除店员排行信息")
|
||||||
@ApiImplicitParam(name = "ids", value = "排行ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "排行ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
// @PreAuthorize("@customSs.hasPermission('clerk:ranking:delete')")
|
||||||
})
|
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:ranking:delete')")
|
|
||||||
@Log(title = "店员排行", businessType = BusinessType.DELETE)
|
@Log(title = "店员排行", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
|
|||||||
@@ -10,16 +10,14 @@ import com.starry.common.result.R;
|
|||||||
import com.starry.common.utils.ConvertUtil;
|
import com.starry.common.utils.ConvertUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员分类信息Controller
|
* 店员分类信息Controller
|
||||||
*
|
*
|
||||||
@@ -38,8 +36,7 @@ public class PlayClerkTypeInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询所有分类", notes = "获取所有店员分类信息列表")
|
@ApiOperation(value = "查询所有分类", notes = "获取所有店员分类信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "List")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "List")})
|
||||||
})
|
|
||||||
@GetMapping("/listByAll")
|
@GetMapping("/listByAll")
|
||||||
public R listByAll() {
|
public R listByAll() {
|
||||||
return R.ok(playClerkTypeInfoService.selectByAll());
|
return R.ok(playClerkTypeInfoService.selectByAll());
|
||||||
@@ -47,24 +44,19 @@ public class PlayClerkTypeInfoController {
|
|||||||
|
|
||||||
@ApiOperation(value = "分页查询分类", notes = "分页查询店员分类信息列表")
|
@ApiOperation(value = "分页查询分类", notes = "分页查询店员分类信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@PostMapping("/listByPage")
|
@PostMapping("/listByPage")
|
||||||
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkTypeInfoQueryVo vo) {
|
public R listByPage(
|
||||||
|
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkTypeInfoQueryVo vo) {
|
||||||
return R.ok(playClerkTypeInfoService.selectByPage(vo));
|
return R.ok(playClerkTypeInfoService.selectByPage(vo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
/**
|
* /** 新增店员分类信息
|
||||||
* 新增店员分类信息
|
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新增分类", notes = "创建新的店员分类信息")
|
@ApiOperation(value = "新增分类", notes = "创建新的店员分类信息")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员分类信息", businessType = BusinessType.INSERT)
|
@Log(title = "店员分类信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public R create(@ApiParam(value = "分类信息", required = true) @Validated @RequestBody PlayClerkTypeInfoAddVo vo) {
|
public R create(@ApiParam(value = "分类信息", required = true) @Validated @RequestBody PlayClerkTypeInfoAddVo vo) {
|
||||||
@@ -80,13 +72,11 @@ public class PlayClerkTypeInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改分类", notes = "根据ID修改店员分类信息")
|
@ApiOperation(value = "修改分类", notes = "根据ID修改店员分类信息")
|
||||||
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员分类信息", businessType = BusinessType.UPDATE)
|
@Log(title = "店员分类信息", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update/{id}")
|
@PostMapping(value = "/update/{id}")
|
||||||
public R update(@PathVariable String id, @ApiParam(value = "分类信息", required = true) @RequestBody PlayClerkTypeInfoEntity playClerkTypeInfo) {
|
public R update(@PathVariable String id,
|
||||||
|
@ApiParam(value = "分类信息", required = true) @RequestBody PlayClerkTypeInfoEntity playClerkTypeInfo) {
|
||||||
playClerkTypeInfo.setId(id);
|
playClerkTypeInfo.setId(id);
|
||||||
boolean success = playClerkTypeInfoService.update(playClerkTypeInfo);
|
boolean success = playClerkTypeInfoService.update(playClerkTypeInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -100,9 +90,7 @@ public class PlayClerkTypeInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除分类", notes = "根据ID批量删除店员分类信息")
|
@ApiOperation(value = "删除分类", notes = "根据ID批量删除店员分类信息")
|
||||||
@ApiImplicitParam(name = "ids", value = "分类ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "分类ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
|
||||||
})
|
|
||||||
@Log(title = "店员分类信息", businessType = BusinessType.DELETE)
|
@Log(title = "店员分类信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
|
|||||||
@@ -19,17 +19,15 @@ import com.starry.common.result.R;
|
|||||||
import com.starry.common.utils.ConvertUtil;
|
import com.starry.common.utils.ConvertUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员Controller
|
* 店员Controller
|
||||||
*
|
*
|
||||||
@@ -51,8 +49,7 @@ public class PlayClerkUserInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "分页查询店员列表", notes = "根据条件分页查询店员列表信息,支持多种筛选条件")
|
@ApiOperation(value = "分页查询店员列表", notes = "根据条件分页查询店员列表信息,支持多种筛选条件")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserReturnVo.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserReturnVo.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@PostMapping("listByPage")
|
@PostMapping("listByPage")
|
||||||
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkUserQueryVo vo) {
|
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkUserQueryVo vo) {
|
||||||
IPage<PlayClerkUserReturnVo> list = playClerkUserInfoService.selectByPage(vo);
|
IPage<PlayClerkUserReturnVo> list = playClerkUserInfoService.selectByPage(vo);
|
||||||
@@ -65,8 +62,7 @@ public class PlayClerkUserInfoController {
|
|||||||
@ApiOperation(value = "按分类查询店员列表", notes = "根据店员分类ID查询所有属于该分类的店员列表")
|
@ApiOperation(value = "按分类查询店员列表", notes = "根据店员分类ID查询所有属于该分类的店员列表")
|
||||||
@ApiImplicitParam(name = "id", value = "店员分类ID", required = true, paramType = "query", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "店员分类ID", required = true, paramType = "query", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class, responseContainer = "List")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class, responseContainer = "List")})
|
||||||
})
|
|
||||||
@GetMapping("listAllByTypeId")
|
@GetMapping("listAllByTypeId")
|
||||||
public R listAllByTypeId(@RequestParam("id") String id) {
|
public R listAllByTypeId(@RequestParam("id") String id) {
|
||||||
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByTypeId(id);
|
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByTypeId(id);
|
||||||
@@ -79,8 +75,7 @@ public class PlayClerkUserInfoController {
|
|||||||
@ApiOperation(value = "按分组查询店员列表", notes = "根据店员分组ID查询所有属于该分组的店员列表")
|
@ApiOperation(value = "按分组查询店员列表", notes = "根据店员分组ID查询所有属于该分组的店员列表")
|
||||||
@ApiImplicitParam(name = "id", value = "店员分组ID", required = true, paramType = "query", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "店员分组ID", required = true, paramType = "query", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class, responseContainer = "List")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class, responseContainer = "List")})
|
||||||
})
|
|
||||||
@GetMapping("listAllByGroupId")
|
@GetMapping("listAllByGroupId")
|
||||||
public R listAllByGroupId(@RequestParam("id") String id) {
|
public R listAllByGroupId(@RequestParam("id") String id) {
|
||||||
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByGroupId(id);
|
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByGroupId(id);
|
||||||
@@ -91,12 +86,11 @@ public class PlayClerkUserInfoController {
|
|||||||
* 修改店员分类
|
* 修改店员分类
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改店员分类", notes = "将指定店员分配到指定分类中,会先清空该分类下所有店员,再重新分配")
|
@ApiOperation(value = "修改店员分类", notes = "将指定店员分配到指定分类中,会先清空该分类下所有店员,再重新分配")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = String.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = String.class)
|
|
||||||
})
|
|
||||||
@PostMapping("editClerkType")
|
@PostMapping("editClerkType")
|
||||||
public R listByPage(@ApiParam(value = "店员分类修改参数", required = true) @Validated @RequestBody PlayClerkUserTypeEditVo vo) {
|
public R listByPage(
|
||||||
//先清空当前分类下店员
|
@ApiParam(value = "店员分类修改参数", required = true) @Validated @RequestBody PlayClerkUserTypeEditVo vo) {
|
||||||
|
// 先清空当前分类下店员
|
||||||
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByTypeId(vo.getTypeId());
|
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByTypeId(vo.getTypeId());
|
||||||
for (PlayClerkUserInfoEntity clerkUserInfo : list) {
|
for (PlayClerkUserInfoEntity clerkUserInfo : list) {
|
||||||
PlayClerkUserInfoEntity entity = new PlayClerkUserInfoEntity();
|
PlayClerkUserInfoEntity entity = new PlayClerkUserInfoEntity();
|
||||||
@@ -114,18 +108,15 @@ public class PlayClerkUserInfoController {
|
|||||||
return R.ok("成功");
|
return R.ok("成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1、修改店员分组
|
* 1、修改店员分组 2、将对应账号角色ID设为组长
|
||||||
* 2、将对应账号角色ID设为组长
|
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改店员分组", notes = "将指定店员分配到指定分组中,会先清空该分组下所有店员,再重新分配,并可设置组长")
|
@ApiOperation(value = "修改店员分组", notes = "将指定店员分配到指定分组中,会先清空该分组下所有店员,再重新分配,并可设置组长")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = String.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = String.class)
|
|
||||||
})
|
|
||||||
@PostMapping("editClerkGroup")
|
@PostMapping("editClerkGroup")
|
||||||
public R editClerkGroup(@ApiParam(value = "店员分组修改参数", required = true) @Validated @RequestBody PlayClerkUserTypeEditVo vo) {
|
public R editClerkGroup(
|
||||||
//先清空当前分类下店员
|
@ApiParam(value = "店员分组修改参数", required = true) @Validated @RequestBody PlayClerkUserTypeEditVo vo) {
|
||||||
|
// 先清空当前分类下店员
|
||||||
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByGroupId(vo.getTypeId());
|
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByGroupId(vo.getTypeId());
|
||||||
for (PlayClerkUserInfoEntity clerkUserInfo : list) {
|
for (PlayClerkUserInfoEntity clerkUserInfo : list) {
|
||||||
PlayClerkUserInfoEntity entity = new PlayClerkUserInfoEntity();
|
PlayClerkUserInfoEntity entity = new PlayClerkUserInfoEntity();
|
||||||
@@ -140,14 +131,11 @@ public class PlayClerkUserInfoController {
|
|||||||
playClerkUserInfoService.update(entity);
|
playClerkUserInfoService.update(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return R.ok("成功");
|
return R.ok("成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "获取简单列表", notes = "获取店员和客户的简单列表信息,用于下拉选择等场景")
|
@ApiOperation(value = "获取简单列表", notes = "获取店员和客户的简单列表信息,用于下拉选择等场景")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class)
|
|
||||||
})
|
|
||||||
@GetMapping("/simple/list")
|
@GetMapping("/simple/list")
|
||||||
public R simpleList() {
|
public R simpleList() {
|
||||||
List<PlayClerkUserInfoEntity> clerkList = playClerkUserInfoService.simpleList();
|
List<PlayClerkUserInfoEntity> clerkList = playClerkUserInfoService.simpleList();
|
||||||
@@ -155,14 +143,12 @@ public class PlayClerkUserInfoController {
|
|||||||
return R.ok(new JSONObject().fluentPut("clerkList", clerkList).fluentPut("customerList", customerList));
|
return R.ok(new JSONObject().fluentPut("clerkList", clerkList).fluentPut("customerList", customerList));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询店员列表
|
* 查询店员列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询店员列表", notes = "分页查询店员信息列表,支持多种条件筛选,返回详细的店员信息")
|
@ApiOperation(value = "查询店员列表", notes = "分页查询店员信息列表,支持多种条件筛选,返回详细的店员信息")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoResultVo.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoResultVo.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R list(@ApiParam(value = "查询条件") PlayClerkUserInfoQueryVo vo) {
|
public R list(@ApiParam(value = "查询条件") PlayClerkUserInfoQueryVo vo) {
|
||||||
IPage<PlayClerkUserInfoResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
|
IPage<PlayClerkUserInfoResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
|
||||||
@@ -174,62 +160,59 @@ public class PlayClerkUserInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取店员详情", notes = "根据店员ID获取店员的详细信息")
|
@ApiOperation(value = "获取店员详情", notes = "根据店员ID获取店员的详细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "店员ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "店员ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class)
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public R getInfo(@PathVariable("id") String id) {
|
public R getInfo(@PathVariable("id") String id) {
|
||||||
return R.ok(playClerkUserInfoService.selectById(id));
|
return R.ok(playClerkUserInfoService.selectById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * 微信端口新增店员
|
// * 微信端口新增店员
|
||||||
// */
|
// */
|
||||||
// @Log(title = "店员", businessType = BusinessType.INSERT)
|
// @Log(title = "店员", businessType = BusinessType.INSERT)
|
||||||
// @PostMapping("/wx/add")
|
// @PostMapping("/wx/add")
|
||||||
// public R add(@Validated @RequestBody PlayClerkUserAddToWxVo vo) {
|
// public R add(@Validated @RequestBody PlayClerkUserAddToWxVo vo) {
|
||||||
// //微信申请成为店员,需要先创建账户。
|
// //微信申请成为店员,需要先创建账户。
|
||||||
// PlayUserInfoEntity userInfoEntity = ConvertUtil.entityToVo(vo, PlayUserInfoEntity.class);
|
// PlayUserInfoEntity userInfoEntity = ConvertUtil.entityToVo(vo,
|
||||||
// userInfoEntity.setId(IdUtils.getUuid());
|
// PlayUserInfoEntity.class);
|
||||||
// playUserInfoService.create(userInfoEntity);
|
// userInfoEntity.setId(IdUtils.getUuid());
|
||||||
// //账号创建完成后,创建店员
|
// playUserInfoService.create(userInfoEntity);
|
||||||
// PlayClerkUserInfoEntity clerkUserInfoEntity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
// //账号创建完成后,创建店员
|
||||||
// clerkUserInfoEntity.setPlayUserId(userInfoEntity.getId());
|
// PlayClerkUserInfoEntity clerkUserInfoEntity = ConvertUtil.entityToVo(vo,
|
||||||
// boolean success = playClerkUserInfoService.create(clerkUserInfoEntity);
|
// PlayClerkUserInfoEntity.class);
|
||||||
// if (success) {
|
// clerkUserInfoEntity.setPlayUserId(userInfoEntity.getId());
|
||||||
// clerkCommodityService.initClerkCommodity(userInfoEntity.getId());
|
// boolean success = playClerkUserInfoService.create(clerkUserInfoEntity);
|
||||||
// return R.ok();
|
// if (success) {
|
||||||
// }
|
// clerkCommodityService.initClerkCommodity(userInfoEntity.getId());
|
||||||
// return R.error("添加失败");
|
// return R.ok();
|
||||||
// }
|
// }
|
||||||
|
// return R.error("添加失败");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
// /**
|
// * 新增店员
|
||||||
// * 新增店员
|
// */
|
||||||
// */
|
// @Log(title = "店员", businessType = BusinessType.INSERT)
|
||||||
// @Log(title = "店员", businessType = BusinessType.INSERT)
|
// @PostMapping("/create")
|
||||||
// @PostMapping("/create")
|
// public R create(@Validated @RequestBody PlayClerkUserAddVo vo) {
|
||||||
// public R create(@Validated @RequestBody PlayClerkUserAddVo vo) {
|
// PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo,
|
||||||
// PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
// PlayClerkUserInfoEntity.class);
|
||||||
// boolean success = playClerkUserInfoService.create(entity);
|
// boolean success = playClerkUserInfoService.create(entity);
|
||||||
// if (success) {
|
// if (success) {
|
||||||
// clerkCommodityService.initClerkCommodity(vo.getPlayUserId());
|
// clerkCommodityService.initClerkCommodity(vo.getPlayUserId());
|
||||||
// return R.ok();
|
// return R.ok();
|
||||||
// }
|
// }
|
||||||
// return R.error("添加失败");
|
// return R.error("添加失败");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改店员
|
* 修改店员
|
||||||
*/
|
*/
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
// @PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
||||||
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
||||||
@ApiOperation(value = "修改店员信息", notes = "修改店员的基本信息,如昵称、头像、签名等")
|
@ApiOperation(value = "修改店员信息", notes = "修改店员的基本信息,如昵称、头像、签名等")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@PostMapping(value = "/update")
|
@PostMapping(value = "/update")
|
||||||
public R update(@ApiParam(value = "店员信息", required = true) @Validated @RequestBody PlayClerkUserEditVo vo) {
|
public R update(@ApiParam(value = "店员信息", required = true) @Validated @RequestBody PlayClerkUserEditVo vo) {
|
||||||
PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
||||||
@@ -240,19 +223,16 @@ public class PlayClerkUserInfoController {
|
|||||||
return R.error("修改失败");
|
return R.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改店员状态
|
* 修改店员状态
|
||||||
*/
|
*/
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
// @PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
||||||
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
||||||
@ApiOperation(value = "修改店员状态", notes = "修改店员的状态信息,如上下架状态、推荐状态、在线状态等")
|
@ApiOperation(value = "修改店员状态", notes = "修改店员的状态信息,如上下架状态、推荐状态、在线状态等")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@PostMapping(value = "/updateState")
|
@PostMapping(value = "/updateState")
|
||||||
public R updateState(@ApiParam(value = "店员状态信息", required = true) @Validated @RequestBody PlayClerkUserStateEditVo vo) {
|
public R updateState(
|
||||||
|
@ApiParam(value = "店员状态信息", required = true) @Validated @RequestBody PlayClerkUserStateEditVo vo) {
|
||||||
PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
||||||
boolean success = playClerkUserInfoService.update(entity);
|
boolean success = playClerkUserInfoService.update(entity);
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -264,13 +244,11 @@ public class PlayClerkUserInfoController {
|
|||||||
/**
|
/**
|
||||||
* 删除店员
|
* 删除店员
|
||||||
*/
|
*/
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:user:remove')")
|
// @PreAuthorize("@customSs.hasPermission('clerk:user:remove')")
|
||||||
@Log(title = "店员", businessType = BusinessType.DELETE)
|
@Log(title = "店员", businessType = BusinessType.DELETE)
|
||||||
@ApiOperation(value = "删除店员", notes = "根据ID批量删除店员信息")
|
@ApiOperation(value = "删除店员", notes = "根据ID批量删除店员信息")
|
||||||
@ApiImplicitParam(name = "ids", value = "店员ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "店员ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
|
||||||
})
|
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
return R.ok(playClerkUserInfoService.deletePlayClerkUserInfoByIds(ids));
|
return R.ok(playClerkUserInfoService.deletePlayClerkUserInfoByIds(ids));
|
||||||
|
|||||||
@@ -10,16 +10,14 @@ import com.starry.common.enums.BusinessType;
|
|||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员资料审核Controller
|
* 店员资料审核Controller
|
||||||
*
|
*
|
||||||
@@ -38,10 +36,10 @@ public class PlayClerkUserReviewInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询审核列表", notes = "分页查询店员资料审核列表")
|
@ApiOperation(value = "查询审核列表", notes = "分页查询店员资料审核列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserReviewReturnVo.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserReviewReturnVo.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@PostMapping("/listByPage")
|
@PostMapping("/listByPage")
|
||||||
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkUserReviewQueryVo vo) {
|
public R listByPage(
|
||||||
|
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkUserReviewQueryVo vo) {
|
||||||
IPage<PlayClerkUserReviewReturnVo> list = playClerkUserReviewInfoService.selectByPage(vo);
|
IPage<PlayClerkUserReviewReturnVo> list = playClerkUserReviewInfoService.selectByPage(vo);
|
||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
@@ -50,13 +48,12 @@ public class PlayClerkUserReviewInfoController {
|
|||||||
* 修改店员资料审核
|
* 修改店员资料审核
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改审核状态", notes = "更新店员资料审核状态,通过或拒绝")
|
@ApiOperation(value = "修改审核状态", notes = "更新店员资料审核状态,通过或拒绝")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "修改成功")})
|
||||||
@ApiResponse(code = 200, message = "修改成功")
|
// @PreAuthorize("@customSs.hasPermission('clerk:userReview:update')")
|
||||||
})
|
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:userReview:update')")
|
|
||||||
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update")
|
@PostMapping(value = "/update")
|
||||||
public R update(@ApiParam(value = "审核状态信息", required = true) @Validated @RequestBody PlayClerkUserReviewStateEditVo vo) {
|
public R update(
|
||||||
|
@ApiParam(value = "审核状态信息", required = true) @Validated @RequestBody PlayClerkUserReviewStateEditVo vo) {
|
||||||
playClerkUserReviewInfoService.updateDataReviewState(vo);
|
playClerkUserReviewInfoService.updateDataReviewState(vo);
|
||||||
return R.ok("修改成功");
|
return R.ok("修改成功");
|
||||||
}
|
}
|
||||||
@@ -66,10 +63,8 @@ public class PlayClerkUserReviewInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除审核记录", notes = "根据ID批量删除店员资料审核记录")
|
@ApiOperation(value = "删除审核记录", notes = "根据ID批量删除店员资料审核记录")
|
||||||
@ApiImplicitParam(name = "ids", value = "审核记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "审核记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
// @PreAuthorize("@customSs.hasPermission('clerk:userReview:delete')")
|
||||||
})
|
|
||||||
//@PreAuthorize("@customSs.hasPermission('clerk:userReview:delete')")
|
|
||||||
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
|
|||||||
@@ -8,14 +8,12 @@ import com.starry.common.enums.BusinessType;
|
|||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员工资明细信息Controller
|
* 店员工资明细信息Controller
|
||||||
@@ -35,11 +33,11 @@ public class PlayClerkWagesDetailsInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询工资明细列表", notes = "分页查询店员工资明细信息列表")
|
@ApiOperation(value = "查询工资明细列表", notes = "分页查询店员工资明细信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkWagesDetailsInfoEntity.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkWagesDetailsInfoEntity.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R list(@ApiParam(value = "查询条件") PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
public R list(@ApiParam(value = "查询条件") PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
||||||
IPage<PlayClerkWagesDetailsInfoEntity> list = playClerkWagesDetailsInfoService.selectPlayClerkWagesDetailsInfoByPage(playClerkWagesDetailsInfo);
|
IPage<PlayClerkWagesDetailsInfoEntity> list = playClerkWagesDetailsInfoService
|
||||||
|
.selectPlayClerkWagesDetailsInfoByPage(playClerkWagesDetailsInfo);
|
||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,9 +46,7 @@ public class PlayClerkWagesDetailsInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取工资明细详情", notes = "根据ID获取店员工资明细详细信息")
|
@ApiOperation(value = "获取工资明细详情", notes = "根据ID获取店员工资明细详细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "工资明细ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "工资明细ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkWagesDetailsInfoEntity.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkWagesDetailsInfoEntity.class)
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public R getInfo(@PathVariable("id") String id) {
|
public R getInfo(@PathVariable("id") String id) {
|
||||||
return R.ok(playClerkWagesDetailsInfoService.selectPlayClerkWagesDetailsInfoById(id));
|
return R.ok(playClerkWagesDetailsInfoService.selectPlayClerkWagesDetailsInfoById(id));
|
||||||
@@ -60,13 +56,11 @@ public class PlayClerkWagesDetailsInfoController {
|
|||||||
* 新增店员工资明细信息
|
* 新增店员工资明细信息
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新增工资明细", notes = "创建新的店员工资明细记录")
|
@ApiOperation(value = "新增工资明细", notes = "创建新的店员工资明细记录")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员工资明细信息", businessType = BusinessType.INSERT)
|
@Log(title = "店员工资明细信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public R create(@ApiParam(value = "工资明细信息", required = true) @RequestBody PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
public R create(
|
||||||
|
@ApiParam(value = "工资明细信息", required = true) @RequestBody PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
||||||
boolean success = playClerkWagesDetailsInfoService.create(playClerkWagesDetailsInfo);
|
boolean success = playClerkWagesDetailsInfoService.create(playClerkWagesDetailsInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@@ -79,13 +73,11 @@ public class PlayClerkWagesDetailsInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改工资明细", notes = "根据ID修改店员工资明细信息")
|
@ApiOperation(value = "修改工资明细", notes = "根据ID修改店员工资明细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "工资明细ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "工资明细ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@Log(title = "店员工资明细信息", businessType = BusinessType.UPDATE)
|
@Log(title = "店员工资明细信息", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update/{id}")
|
@PostMapping(value = "/update/{id}")
|
||||||
public R update(@PathVariable String id, @ApiParam(value = "工资明细信息", required = true) @RequestBody PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
public R update(@PathVariable String id,
|
||||||
|
@ApiParam(value = "工资明细信息", required = true) @RequestBody PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
||||||
playClerkWagesDetailsInfo.setId(id);
|
playClerkWagesDetailsInfo.setId(id);
|
||||||
boolean success = playClerkWagesDetailsInfoService.update(playClerkWagesDetailsInfo);
|
boolean success = playClerkWagesDetailsInfoService.update(playClerkWagesDetailsInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -99,9 +91,7 @@ public class PlayClerkWagesDetailsInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除工资明细", notes = "根据ID批量删除店员工资明细信息")
|
@ApiOperation(value = "删除工资明细", notes = "根据ID批量删除店员工资明细信息")
|
||||||
@ApiImplicitParam(name = "ids", value = "工资明细ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "工资明细ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
|
||||||
})
|
|
||||||
@Log(title = "店员工资明细信息", businessType = BusinessType.DELETE)
|
@Log(title = "店员工资明细信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R remove(@PathVariable String[] ids) {
|
public R remove(@PathVariable String[] ids) {
|
||||||
|
|||||||
@@ -16,18 +16,16 @@ import com.starry.common.result.R;
|
|||||||
import com.starry.common.utils.ConvertUtil;
|
import com.starry.common.utils.ConvertUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员工资结算信息Controller
|
* 店员工资结算信息Controller
|
||||||
@@ -52,9 +50,7 @@ public class PlayClerkWagesInfoController {
|
|||||||
* 查询店员工资结算信息列表
|
* 查询店员工资结算信息列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询历史工资列表", notes = "分页查询店员历史工资结算信息列表")
|
@ApiOperation(value = "查询历史工资列表", notes = "分页查询店员历史工资结算信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Object.class, responseContainer = "Page")})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Object.class, responseContainer = "Page")
|
|
||||||
})
|
|
||||||
@PostMapping("/listByPage")
|
@PostMapping("/listByPage")
|
||||||
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkWagesInfoQueryVo vo) {
|
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkWagesInfoQueryVo vo) {
|
||||||
return R.ok(playClerkWagesInfoService.selectHistoricalByPage(vo));
|
return R.ok(playClerkWagesInfoService.selectHistoricalByPage(vo));
|
||||||
@@ -65,10 +61,10 @@ public class PlayClerkWagesInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询未结算工资", notes = "分页查询店员未结算工资信息列表")
|
@ApiOperation(value = "查询未结算工资", notes = "分页查询店员未结算工资信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUnsettledWagesInfoReturnVo.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUnsettledWagesInfoReturnVo.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@PostMapping("/listUnsettledWagesByPage")
|
@PostMapping("/listUnsettledWagesByPage")
|
||||||
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkUnsettledWagesInfoQueryVo vo) {
|
public R list(
|
||||||
|
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkUnsettledWagesInfoQueryVo vo) {
|
||||||
IPage<PlayClerkUnsettledWagesInfoReturnVo> page = playClerkUserInfoService.listUnsettledWagesByPage(vo);
|
IPage<PlayClerkUnsettledWagesInfoReturnVo> page = playClerkUserInfoService.listUnsettledWagesByPage(vo);
|
||||||
for (PlayClerkUnsettledWagesInfoReturnVo record : page.getRecords()) {
|
for (PlayClerkUnsettledWagesInfoReturnVo record : page.getRecords()) {
|
||||||
Integer orderState1Number = 0;
|
Integer orderState1Number = 0;
|
||||||
@@ -105,13 +101,11 @@ public class PlayClerkWagesInfoController {
|
|||||||
return R.ok(page);
|
return R.ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "查询工资明细", notes = "根据工资结算ID查询工资明细信息")
|
@ApiOperation(value = "查询工资明细", notes = "根据工资结算ID查询工资明细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "工资结算ID", required = true, paramType = "query", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "工资结算ID", required = true, paramType = "query", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = ClerkWagesDetailsReturnVo.class, responseContainer = "List"),
|
@ApiResponse(code = 200, message = "操作成功", response = ClerkWagesDetailsReturnVo.class, responseContainer = "List"),
|
||||||
@ApiResponse(code = 500, message = "ID不能为空")
|
@ApiResponse(code = 500, message = "ID不能为空")})
|
||||||
})
|
|
||||||
@GetMapping("queryWagesDetailsById")
|
@GetMapping("queryWagesDetailsById")
|
||||||
public R clerkQueryWagesDetails(@RequestParam("id") String id) {
|
public R clerkQueryWagesDetails(@RequestParam("id") String id) {
|
||||||
if (StrUtil.isBlankIfStr(id)) {
|
if (StrUtil.isBlankIfStr(id)) {
|
||||||
@@ -125,5 +119,4 @@ public class PlayClerkWagesInfoController {
|
|||||||
return R.ok(returnVos);
|
return R.ok(returnVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,16 +8,14 @@ import com.starry.common.enums.BusinessType;
|
|||||||
import com.starry.common.result.R;
|
import com.starry.common.result.R;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 陪聊点赞动态信息Controller
|
* 陪聊点赞动态信息Controller
|
||||||
*
|
*
|
||||||
@@ -36,11 +34,11 @@ public class PlayCustomArticleInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询动态列表", notes = "分页查询陪聊点赞动态信息列表")
|
@ApiOperation(value = "查询动态列表", notes = "分页查询陪聊点赞动态信息列表")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomArticleInfoEntity.class, responseContainer = "Page")
|
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomArticleInfoEntity.class, responseContainer = "Page")})
|
||||||
})
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R list(@ApiParam(value = "查询条件") PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
public R list(@ApiParam(value = "查询条件") PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||||
IPage<PlayCustomArticleInfoEntity> list = playCustomArticleInfoService.selectPlayCustomArticleInfoByPage(playCustomArticleInfo);
|
IPage<PlayCustomArticleInfoEntity> list = playCustomArticleInfoService
|
||||||
|
.selectPlayCustomArticleInfoByPage(playCustomArticleInfo);
|
||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,9 +47,7 @@ public class PlayCustomArticleInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取动态详情", notes = "根据ID获取陪聊点赞动态详细信息")
|
@ApiOperation(value = "获取动态详情", notes = "根据ID获取陪聊点赞动态详细信息")
|
||||||
@ApiImplicitParam(name = "id", value = "动态ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "动态ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayCustomArticleInfoEntity.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomArticleInfoEntity.class)
|
|
||||||
})
|
|
||||||
@PreAuthorize("@customSs.hasPermission('play:info:query')")
|
@PreAuthorize("@customSs.hasPermission('play:info:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public R getInfo(@PathVariable("id") String id) {
|
public R getInfo(@PathVariable("id") String id) {
|
||||||
@@ -62,14 +58,12 @@ public class PlayCustomArticleInfoController {
|
|||||||
* 新增陪聊点赞动态信息
|
* 新增陪聊点赞动态信息
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新增动态", notes = "创建新的陪聊点赞动态信息")
|
@ApiOperation(value = "新增动态", notes = "创建新的陪聊点赞动态信息")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "添加失败")
|
|
||||||
})
|
|
||||||
@PreAuthorize("@customSs.hasPermission('play:info:create')")
|
@PreAuthorize("@customSs.hasPermission('play:info:create')")
|
||||||
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.INSERT)
|
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public R create(@ApiParam(value = "动态信息", required = true) @RequestBody PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
public R create(
|
||||||
|
@ApiParam(value = "动态信息", required = true) @RequestBody PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||||
boolean success = playCustomArticleInfoService.create(playCustomArticleInfo);
|
boolean success = playCustomArticleInfoService.create(playCustomArticleInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@@ -82,14 +76,12 @@ public class PlayCustomArticleInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改动态", notes = "根据ID修改陪聊点赞动态信息")
|
@ApiOperation(value = "修改动态", notes = "根据ID修改陪聊点赞动态信息")
|
||||||
@ApiImplicitParam(name = "id", value = "动态ID", required = true, paramType = "path", dataType = "String", example = "1")
|
@ApiImplicitParam(name = "id", value = "动态ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||||
@ApiResponse(code = 200, message = "操作成功"),
|
|
||||||
@ApiResponse(code = 500, message = "修改失败")
|
|
||||||
})
|
|
||||||
@PreAuthorize("@customSs.hasPermission('play:info:edit')")
|
@PreAuthorize("@customSs.hasPermission('play:info:edit')")
|
||||||
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.UPDATE)
|
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/update/{id}")
|
@PostMapping(value = "/update/{id}")
|
||||||
public R update(@PathVariable String id, @ApiParam(value = "动态信息", required = true) @RequestBody PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
public R update(@PathVariable String id,
|
||||||
|
@ApiParam(value = "动态信息", required = true) @RequestBody PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||||
playCustomArticleInfo.setId(id);
|
playCustomArticleInfo.setId(id);
|
||||||
boolean success = playCustomArticleInfoService.update(playCustomArticleInfo);
|
boolean success = playCustomArticleInfoService.update(playCustomArticleInfo);
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -103,9 +95,7 @@ public class PlayCustomArticleInfoController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "删除动态", notes = "根据ID批量删除陪聊点赞动态信息")
|
@ApiOperation(value = "删除动态", notes = "根据ID批量删除陪聊点赞动态信息")
|
||||||
@ApiImplicitParam(name = "ids", value = "动态ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
@ApiImplicitParam(name = "ids", value = "动态ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||||
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
|
|
||||||
})
|
|
||||||
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
|
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
|
||||||
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.DELETE)
|
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayAvatarFrameInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayAvatarFrameInfoEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayAvatarFrameInfoEntity;
|
|||||||
*/
|
*/
|
||||||
public interface PlayAvatarFrameInfoMapper extends BaseMapper<PlayAvatarFrameInfoEntity> {
|
public interface PlayAvatarFrameInfoMapper extends BaseMapper<PlayAvatarFrameInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkArticleInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkArticleInfoEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkArticleInfoEntity;
|
|||||||
*/
|
*/
|
||||||
public interface PlayClerkArticleInfoMapper extends MPJBaseMapper<PlayClerkArticleInfoEntity> {
|
public interface PlayClerkArticleInfoMapper extends MPJBaseMapper<PlayClerkArticleInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
|
||||||
|
|
||||||
@@ -8,9 +7,8 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoE
|
|||||||
* 店员分类Mapper接口
|
* 店员分类Mapper接口
|
||||||
*
|
*
|
||||||
* @author admin
|
* @author admin
|
||||||
* @since 2024-04-06
|
* @since 2024-04-06
|
||||||
*/
|
*/
|
||||||
public interface PlayClerkClassificationInfoMapper extends BaseMapper<PlayClerkClassificationInfoEntity> {
|
public interface PlayClerkClassificationInfoMapper extends BaseMapper<PlayClerkClassificationInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
|||||||
*/
|
*/
|
||||||
public interface PlayClerkCommodityMapper extends BaseMapper<PlayClerkCommodityEntity> {
|
public interface PlayClerkCommodityMapper extends BaseMapper<PlayClerkCommodityEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntit
|
|||||||
*/
|
*/
|
||||||
public interface PlayClerkDataReviewInfoMapper extends MPJBaseMapper<PlayClerkDataReviewInfoEntity> {
|
public interface PlayClerkDataReviewInfoMapper extends MPJBaseMapper<PlayClerkDataReviewInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||||
|
|
||||||
@@ -8,9 +7,8 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
|||||||
* 店员等级Mapper接口
|
* 店员等级Mapper接口
|
||||||
*
|
*
|
||||||
* @author admin
|
* @author admin
|
||||||
* @since 2024-03-30
|
* @since 2024-03-30
|
||||||
*/
|
*/
|
||||||
public interface PlayClerkLevelInfoMapper extends BaseMapper<PlayClerkLevelInfoEntity> {
|
public interface PlayClerkLevelInfoMapper extends BaseMapper<PlayClerkLevelInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkPkEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkPkEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkPkEntity;
|
|||||||
*/
|
*/
|
||||||
public interface PlayClerkPkMapper extends BaseMapper<PlayClerkPkEntity> {
|
public interface PlayClerkPkMapper extends BaseMapper<PlayClerkPkEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkRankingInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkRankingInfoEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkRankingInfoEntity;
|
|||||||
*/
|
*/
|
||||||
public interface PlayClerkRankingInfoMapper extends MPJBaseMapper<PlayClerkRankingInfoEntity> {
|
public interface PlayClerkRankingInfoMapper extends MPJBaseMapper<PlayClerkRankingInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeInfoEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeInfoEntity;
|
|||||||
*/
|
*/
|
||||||
public interface PlayClerkTypeInfoMapper extends MPJBaseMapper<PlayClerkTypeInfoEntity> {
|
public interface PlayClerkTypeInfoMapper extends MPJBaseMapper<PlayClerkTypeInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeUserInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeUserInfoEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeUserInfoEntity;
|
|||||||
*/
|
*/
|
||||||
public interface PlayClerkTypeUserInfoMapper extends BaseMapper<PlayClerkTypeUserInfoEntity> {
|
public interface PlayClerkTypeUserInfoMapper extends BaseMapper<PlayClerkTypeUserInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员Mapper接口
|
* 店员Mapper接口
|
||||||
*
|
*
|
||||||
* @author admin
|
* @author admin
|
||||||
* @since 2024-03-30
|
* @since 2024-03-30
|
||||||
*/
|
*/
|
||||||
public interface PlayClerkUserInfoMapper extends MPJBaseMapper<PlayClerkUserInfoEntity> {
|
public interface PlayClerkUserInfoMapper extends MPJBaseMapper<PlayClerkUserInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReviewInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReviewInfoEntity;
|
||||||
|
|
||||||
@@ -8,9 +7,8 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReviewInfoEntit
|
|||||||
* 店员资料审核Mapper接口
|
* 店员资料审核Mapper接口
|
||||||
*
|
*
|
||||||
* @author admin
|
* @author admin
|
||||||
* @since 2024-05-19
|
* @since 2024-05-19
|
||||||
*/
|
*/
|
||||||
public interface PlayClerkUserReviewInfoMapper extends MPJBaseMapper<PlayClerkUserReviewInfoEntity> {
|
public interface PlayClerkUserReviewInfoMapper extends MPJBaseMapper<PlayClerkUserReviewInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesDetailsInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesDetailsInfoEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesDetailsInfoEnt
|
|||||||
*/
|
*/
|
||||||
public interface PlayClerkWagesDetailsInfoMapper extends BaseMapper<PlayClerkWagesDetailsInfoEntity> {
|
public interface PlayClerkWagesDetailsInfoMapper extends BaseMapper<PlayClerkWagesDetailsInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesInfoEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesInfoEntity;
|
|||||||
*/
|
*/
|
||||||
public interface PlayClerkWagesInfoMapper extends MPJBaseMapper<PlayClerkWagesInfoEntity> {
|
public interface PlayClerkWagesInfoMapper extends MPJBaseMapper<PlayClerkWagesInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.starry.admin.modules.clerk.mapper;
|
package com.starry.admin.modules.clerk.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
|
||||||
|
|
||||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
|
|||||||
*/
|
*/
|
||||||
public interface PlayCustomArticleInfoMapper extends BaseMapper<PlayCustomArticleInfoEntity> {
|
public interface PlayCustomArticleInfoMapper extends BaseMapper<PlayCustomArticleInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,7 @@ import lombok.Getter;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum ClerkPkEnum {
|
public enum ClerkPkEnum {
|
||||||
|
|
||||||
TO_BE_STARTED("TO_BE_STARTED", "待开始"),
|
TO_BE_STARTED("TO_BE_STARTED", "待开始"), IN_PROGRESS("IN_PROGRESS", "进行中"), FINISHED("FINISHED", "已完成"),;
|
||||||
IN_PROGRESS("IN_PROGRESS", "进行中"),
|
|
||||||
FINISHED("FINISHED", "已完成"),
|
|
||||||
;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private String value;
|
private String value;
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ package com.starry.admin.modules.clerk.module.entity;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.starry.common.domain.BasePageEntity;
|
import com.starry.common.domain.BasePageEntity;
|
||||||
|
import java.time.LocalDate;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
* @since 2024/6/7 上午9:49
|
* @since 2024/6/7 上午9:49
|
||||||
@@ -26,19 +25,16 @@ public class IPlayClerkRankingInfoQueryVo extends BasePageEntity {
|
|||||||
*/
|
*/
|
||||||
private String historicalStatistics;
|
private String historicalStatistics;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员ID
|
* 店员ID
|
||||||
*/
|
*/
|
||||||
private String clerkId;
|
private String clerkId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员性别
|
* 店员性别
|
||||||
*/
|
*/
|
||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计时间
|
* 统计时间
|
||||||
*/
|
*/
|
||||||
@@ -46,5 +42,4 @@ public class IPlayClerkRankingInfoQueryVo extends BasePageEntity {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
private LocalDate settlementDate;
|
private LocalDate settlementDate;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.starry.admin.modules.clerk.module.entity;
|
package com.starry.admin.modules.clerk.module.entity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
@@ -34,7 +33,6 @@ public class IPlayClerkRankingInfoReturnVo {
|
|||||||
*/
|
*/
|
||||||
private String clerkSex;
|
private String clerkSex;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员昵称
|
* 店员昵称
|
||||||
*/
|
*/
|
||||||
@@ -45,7 +43,6 @@ public class IPlayClerkRankingInfoReturnVo {
|
|||||||
*/
|
*/
|
||||||
private String clerkGroupName;
|
private String clerkGroupName;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序名次
|
* 排序名次
|
||||||
*/
|
*/
|
||||||
@@ -95,7 +92,6 @@ public class IPlayClerkRankingInfoReturnVo {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal orderContinueProportion = BigDecimal.ZERO;
|
private BigDecimal orderContinueProportion = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户数
|
* 用户数
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ package com.starry.admin.modules.clerk.module.entity;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员头像框对象 play_avatar_frame_info
|
* 店员头像框对象 play_avatar_frame_info
|
||||||
*
|
*
|
||||||
@@ -18,7 +17,6 @@ import java.time.LocalDateTime;
|
|||||||
@TableName("play_avatar_frame_info")
|
@TableName("play_avatar_frame_info")
|
||||||
public class PlayAvatarFrameInfoEntity extends BaseEntity<PlayAvatarFrameInfoEntity> {
|
public class PlayAvatarFrameInfoEntity extends BaseEntity<PlayAvatarFrameInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -64,5 +62,4 @@ public class PlayAvatarFrameInfoEntity extends BaseEntity<PlayAvatarFrameInfoEnt
|
|||||||
*/
|
*/
|
||||||
private LocalDateTime addTime;
|
private LocalDateTime addTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.starry.admin.common.conf.StringTypeHandler;
|
import com.starry.admin.common.conf.StringTypeHandler;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员动态信息对象 play_clerk_article_info
|
* 店员动态信息对象 play_clerk_article_info
|
||||||
@@ -21,7 +20,6 @@ import java.util.List;
|
|||||||
@TableName(value = "play_clerk_article_info", autoResultMap = true)
|
@TableName(value = "play_clerk_article_info", autoResultMap = true)
|
||||||
public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoEntity> {
|
public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -42,7 +40,6 @@ public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoE
|
|||||||
*/
|
*/
|
||||||
private String articleCon;
|
private String articleCon;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态附件类型(0:图片;1:视频;2:音频)
|
* 动态附件类型(0:图片;1:视频;2:音频)
|
||||||
*/
|
*/
|
||||||
@@ -54,7 +51,6 @@ public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoE
|
|||||||
@TableField(typeHandler = StringTypeHandler.class)
|
@TableField(typeHandler = StringTypeHandler.class)
|
||||||
private List<String> annexCon;
|
private List<String> annexCon;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布时间
|
* 发布时间
|
||||||
*/
|
*/
|
||||||
@@ -75,5 +71,4 @@ public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoE
|
|||||||
*/
|
*/
|
||||||
private String reviewCon;
|
private String reviewCon;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
@TableName("play_clerk_classification_info")
|
@TableName("play_clerk_classification_info")
|
||||||
public class PlayClerkClassificationInfoEntity extends BaseEntity<PlayClerkClassificationInfoEntity> {
|
public class PlayClerkClassificationInfoEntity extends BaseEntity<PlayClerkClassificationInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -37,5 +36,4 @@ public class PlayClerkClassificationInfoEntity extends BaseEntity<PlayClerkClass
|
|||||||
*/
|
*/
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
@TableName("play_clerk_commodity_info")
|
@TableName("play_clerk_commodity_info")
|
||||||
public class PlayClerkCommodityEntity extends BaseEntity<PlayClerkCommodityEntity> {
|
public class PlayClerkCommodityEntity extends BaseEntity<PlayClerkCommodityEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +36,6 @@ public class PlayClerkCommodityEntity extends BaseEntity<PlayClerkCommodityEntit
|
|||||||
*/
|
*/
|
||||||
private String commodityId;
|
private String commodityId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务项目名称
|
* 服务项目名称
|
||||||
*/
|
*/
|
||||||
@@ -49,11 +47,8 @@ public class PlayClerkCommodityEntity extends BaseEntity<PlayClerkCommodityEntit
|
|||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务启动状态
|
* 服务启动状态 0:停用 1:启用
|
||||||
* 0:停用
|
|
||||||
* 1:启用
|
|
||||||
*/
|
*/
|
||||||
private String enablingState;
|
private String enablingState;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class PlayClerkDataReviewInfoEditVo {
|
public class PlayClerkDataReviewInfoEditVo {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -25,10 +24,7 @@ public class PlayClerkDataReviewInfoEditVo {
|
|||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核状态
|
* 审核状态 0:未审核 1:审核通过 2:审核未通过
|
||||||
* 0:未审核
|
|
||||||
* 1:审核通过
|
|
||||||
* 2:审核未通过
|
|
||||||
*/
|
*/
|
||||||
private String state;
|
private String state;
|
||||||
|
|
||||||
@@ -37,5 +33,4 @@ public class PlayClerkDataReviewInfoEditVo {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.starry.admin.utils.ListToStringHandle;
|
import com.starry.admin.utils.ListToStringHandle;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员资料审核对象 play_clerk_data_review_info
|
* 店员资料审核对象 play_clerk_data_review_info
|
||||||
@@ -21,7 +20,6 @@ import java.util.List;
|
|||||||
@TableName(value = "play_clerk_data_review_info", autoResultMap = true)
|
@TableName(value = "play_clerk_data_review_info", autoResultMap = true)
|
||||||
public class PlayClerkDataReviewInfoEntity extends BaseEntity<PlayClerkDataReviewInfoEntity> {
|
public class PlayClerkDataReviewInfoEntity extends BaseEntity<PlayClerkDataReviewInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.starry.admin.modules.clerk.module.entity;
|
package com.starry.admin.modules.clerk.module.entity;
|
||||||
|
|
||||||
import com.starry.common.domain.BasePageEntity;
|
import com.starry.common.domain.BasePageEntity;
|
||||||
|
import java.util.Date;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员申请对象 play_clerk_data_review_info
|
* 店员申请对象 play_clerk_data_review_info
|
||||||
*
|
*
|
||||||
@@ -16,13 +15,11 @@ import java.util.Date;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class PlayClerkDataReviewInfoQueryVo extends BasePageEntity {
|
public class PlayClerkDataReviewInfoQueryVo extends BasePageEntity {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资料类型[0:店员申请,1:头像;2:相册;3:录音]
|
* 资料类型[0:店员申请,1:头像;2:相册;3:录音]
|
||||||
*/
|
*/
|
||||||
@@ -34,10 +31,7 @@ public class PlayClerkDataReviewInfoQueryVo extends BasePageEntity {
|
|||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核状态
|
* 审核状态 0:未审核 1:审核通过 2:审核未通过
|
||||||
* 0:未审核
|
|
||||||
* 1:审核通过
|
|
||||||
* 2:审核未通过
|
|
||||||
*/
|
*/
|
||||||
private String state = "0";
|
private String state = "0";
|
||||||
|
|
||||||
@@ -61,5 +55,4 @@ public class PlayClerkDataReviewInfoQueryVo extends BasePageEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
@TableName("play_clerk_level_info")
|
@TableName("play_clerk_level_info")
|
||||||
public class PlayClerkLevelInfoEntity extends BaseEntity<PlayClerkLevelInfoEntity> {
|
public class PlayClerkLevelInfoEntity extends BaseEntity<PlayClerkLevelInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -69,5 +68,5 @@ public class PlayClerkLevelInfoEntity extends BaseEntity<PlayClerkLevelInfoEntit
|
|||||||
|
|
||||||
private Integer styleType;
|
private Integer styleType;
|
||||||
|
|
||||||
private String styleImageUrl;
|
private String styleImageUrl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ package com.starry.admin.modules.clerk.module.entity;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
|
import java.util.Date;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员pk对象 play_clerk_pk
|
* 店员pk对象 play_clerk_pk
|
||||||
*
|
*
|
||||||
@@ -18,7 +17,6 @@ import java.util.Date;
|
|||||||
@TableName("play_clerk_pk")
|
@TableName("play_clerk_pk")
|
||||||
public class PlayClerkPkEntity extends BaseEntity<PlayClerkPkEntity> {
|
public class PlayClerkPkEntity extends BaseEntity<PlayClerkPkEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -49,7 +47,6 @@ public class PlayClerkPkEntity extends BaseEntity<PlayClerkPkEntity> {
|
|||||||
*/
|
*/
|
||||||
private Date updatedTime;
|
private Date updatedTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据版本
|
* 数据版本
|
||||||
*/
|
*/
|
||||||
@@ -90,5 +87,4 @@ public class PlayClerkPkEntity extends BaseEntity<PlayClerkPkEntity> {
|
|||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,12 @@ package com.starry.admin.modules.clerk.module.entity;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员排行对象 play_clerk_ranking_info
|
* 店员排行对象 play_clerk_ranking_info
|
||||||
*
|
*
|
||||||
@@ -21,7 +20,6 @@ import java.time.LocalDate;
|
|||||||
@TableName("play_clerk_ranking_info")
|
@TableName("play_clerk_ranking_info")
|
||||||
public class PlayClerkRankingInfoEntity extends BaseEntity<PlayClerkRankingInfoEntity> {
|
public class PlayClerkRankingInfoEntity extends BaseEntity<PlayClerkRankingInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +35,6 @@ public class PlayClerkRankingInfoEntity extends BaseEntity<PlayClerkRankingInfoE
|
|||||||
*/
|
*/
|
||||||
private String clerkId;
|
private String clerkId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否为历史统计(1:是;0:不是)
|
* 是否为历史统计(1:是;0:不是)
|
||||||
*/
|
*/
|
||||||
@@ -123,5 +120,4 @@ public class PlayClerkRankingInfoEntity extends BaseEntity<PlayClerkRankingInfoE
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
private LocalDate settlementDate;
|
private LocalDate settlementDate;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
@TableName("play_clerk_type_info")
|
@TableName("play_clerk_type_info")
|
||||||
public class PlayClerkTypeInfoEntity extends BaseEntity<PlayClerkTypeInfoEntity> {
|
public class PlayClerkTypeInfoEntity extends BaseEntity<PlayClerkTypeInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
@TableName("play_clerk_type_user_info")
|
@TableName("play_clerk_type_user_info")
|
||||||
public class PlayClerkTypeUserInfoEntity extends BaseEntity<PlayClerkTypeUserInfoEntity> {
|
public class PlayClerkTypeUserInfoEntity extends BaseEntity<PlayClerkTypeUserInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.starry.admin.modules.clerk.module.entity;
|
package com.starry.admin.modules.clerk.module.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.starry.admin.modules.clerk.module.entity;
|
package com.starry.admin.modules.clerk.module.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员评价信息
|
* 店员评价信息
|
||||||
@@ -14,13 +13,11 @@ public class PlayClerkUserEvaluateInfoEntity {
|
|||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评价人ID
|
* 评价人ID
|
||||||
*/
|
*/
|
||||||
private String evaluatorId;
|
private String evaluatorId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评价人昵称
|
* 评价人昵称
|
||||||
*/
|
*/
|
||||||
@@ -41,7 +38,6 @@ public class PlayClerkUserEvaluateInfoEntity {
|
|||||||
*/
|
*/
|
||||||
private Date evaluateTime;
|
private Date evaluateTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单ID
|
* 订单ID
|
||||||
*/
|
*/
|
||||||
@@ -72,8 +68,9 @@ public class PlayClerkUserEvaluateInfoEntity {
|
|||||||
*/
|
*/
|
||||||
public Integer likeCount;
|
public Integer likeCount;
|
||||||
|
|
||||||
|
public PlayClerkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername,
|
||||||
public PlayClerkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername, String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clerkUsername, String commodityId, String commodityName, String commodityUnit) {
|
String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clerkUsername,
|
||||||
|
String commodityId, String commodityName, String commodityUnit) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.evaluatorId = evaluatorId;
|
this.evaluatorId = evaluatorId;
|
||||||
this.evaluatorUsername = evaluatorUsername;
|
this.evaluatorUsername = evaluatorUsername;
|
||||||
@@ -87,7 +84,9 @@ public class PlayClerkUserEvaluateInfoEntity {
|
|||||||
this.commodityUnit = commodityUnit;
|
this.commodityUnit = commodityUnit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayClerkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername, String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clerkUsername, String commodityId, String commodityName, String commodityUnit, int likeCount) {
|
public PlayClerkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername,
|
||||||
|
String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clerkUsername,
|
||||||
|
String commodityId, String commodityName, String commodityUnit, int likeCount) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.evaluatorId = evaluatorId;
|
this.evaluatorId = evaluatorId;
|
||||||
this.evaluatorUsername = evaluatorUsername;
|
this.evaluatorUsername = evaluatorUsername;
|
||||||
|
|||||||
@@ -6,13 +6,12 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.starry.admin.common.conf.StringTypeHandler;
|
import com.starry.admin.common.conf.StringTypeHandler;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员对象 play_clerk_user_info
|
* 店员对象 play_clerk_user_info
|
||||||
@@ -25,7 +24,6 @@ import java.util.List;
|
|||||||
@TableName(value = "play_clerk_user_info", autoResultMap = true)
|
@TableName(value = "play_clerk_user_info", autoResultMap = true)
|
||||||
public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity> {
|
public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -158,7 +156,6 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
|||||||
*/
|
*/
|
||||||
private String onboardingState;
|
private String onboardingState;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入职时间
|
* 入职时间
|
||||||
*/
|
*/
|
||||||
@@ -178,7 +175,6 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
|||||||
*/
|
*/
|
||||||
private Integer workingHours = 0;
|
private Integer workingHours = 0;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否推荐状态(1:已推荐,0:未推荐)
|
* 是否推荐状态(1:已推荐,0:未推荐)
|
||||||
*/
|
*/
|
||||||
@@ -243,7 +239,6 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
|||||||
**/
|
**/
|
||||||
private String alipayImage;
|
private String alipayImage;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ package com.starry.admin.modules.clerk.module.entity;
|
|||||||
import com.starry.common.domain.BasePageEntity;
|
import com.starry.common.domain.BasePageEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.util.List;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员对象 play_clerk_user_info
|
* 店员对象 play_clerk_user_info
|
||||||
*
|
*
|
||||||
@@ -43,14 +42,12 @@ public class PlayClerkUserQueryVo extends BasePageEntity {
|
|||||||
@ApiModelProperty(value = "分组ID")
|
@ApiModelProperty(value = "分组ID")
|
||||||
private String groupId;
|
private String groupId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 性别[0:未知;1:男;2:女]
|
* 性别[0:未知;1:男;2:女]
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "性别", notes = "0:未知;1:男;2:女")
|
@ApiModelProperty(value = "性别", notes = "0:未知;1:男;2:女")
|
||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否固定等级(0:固定等级,1:不固定)
|
* 是否固定等级(0:固定等级,1:不固定)
|
||||||
*/
|
*/
|
||||||
@@ -87,7 +84,6 @@ public class PlayClerkUserQueryVo extends BasePageEntity {
|
|||||||
@ApiModelProperty(value = "所在城市", example = "深圳市")
|
@ApiModelProperty(value = "所在城市", example = "深圳市")
|
||||||
private String city;
|
private String city;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在职状态(1:在职,0:离职)
|
* 在职状态(1:在职,0:离职)
|
||||||
*/
|
*/
|
||||||
@@ -154,5 +150,4 @@ public class PlayClerkUserQueryVo extends BasePageEntity {
|
|||||||
@ApiModelProperty(value = "身份证号")
|
@ApiModelProperty(value = "身份证号")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,12 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
|||||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员分页查询对象
|
* 店员分页查询对象
|
||||||
@@ -23,7 +22,6 @@ import java.util.List;
|
|||||||
@ApiModel(value = "店员详细信息返回对象", description = "分页查询店员详细信息的返回结果")
|
@ApiModel(value = "店员详细信息返回对象", description = "分页查询店员详细信息的返回结果")
|
||||||
public class PlayClerkUserReturnVo {
|
public class PlayClerkUserReturnVo {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -48,21 +46,18 @@ public class PlayClerkUserReturnVo {
|
|||||||
@ApiModelProperty(value = "店员等级名称")
|
@ApiModelProperty(value = "店员等级名称")
|
||||||
private String levelName;
|
private String levelName;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组ID
|
* 分组ID
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "分组ID")
|
@ApiModelProperty(value = "分组ID")
|
||||||
private String groupId;
|
private String groupId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组ID
|
* 分组ID
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "分组名称")
|
@ApiModelProperty(value = "分组名称")
|
||||||
private String groupName;
|
private String groupName;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 性别[0:未知;1:男;2:女]
|
* 性别[0:未知;1:男;2:女]
|
||||||
*/
|
*/
|
||||||
@@ -195,7 +190,6 @@ public class PlayClerkUserReturnVo {
|
|||||||
@ApiModelProperty(value = "添加时间", example = "2024-01-01 12:00:00")
|
@ApiModelProperty(value = "添加时间", example = "2024-01-01 12:00:00")
|
||||||
private LocalDateTime addTime;
|
private LocalDateTime addTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入职时间
|
* 入职时间
|
||||||
*/
|
*/
|
||||||
@@ -236,19 +230,16 @@ public class PlayClerkUserReturnVo {
|
|||||||
@ApiModelProperty(value = "是否固定等级", notes = "0:固定等级,1:不固定")
|
@ApiModelProperty(value = "是否固定等级", notes = "0:固定等级,1:不固定")
|
||||||
private String fixingLevel;
|
private String fixingLevel;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在职状态(1:在职,0:离职)
|
* 在职状态(1:在职,0:离职)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "在职状态", notes = "1:在职,0:离职")
|
@ApiModelProperty(value = "在职状态", notes = "1:在职,0:离职")
|
||||||
private String onboardingState;
|
private String onboardingState;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在职天数
|
* 在职天数
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "在职天数", example = "365")
|
@ApiModelProperty(value = "在职天数", example = "365")
|
||||||
private Integer workingHours = 0;
|
private Integer workingHours = 0;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.starry.admin.common.conf.StringTypeHandler;
|
import com.starry.admin.common.conf.StringTypeHandler;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员申请对象 play_clerk_user_review_info
|
* 店员申请对象 play_clerk_user_review_info
|
||||||
@@ -92,7 +91,6 @@ public class PlayClerkUserReviewInfoEntity extends BaseEntity<PlayClerkUserRevie
|
|||||||
*/
|
*/
|
||||||
private LocalDateTime addTime;
|
private LocalDateTime addTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||||
*/
|
*/
|
||||||
@@ -113,7 +111,4 @@ public class PlayClerkUserReviewInfoEntity extends BaseEntity<PlayClerkUserRevie
|
|||||||
*/
|
*/
|
||||||
private String reviewCon;
|
private String reviewCon;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.starry.admin.modules.clerk.module.entity;
|
package com.starry.admin.modules.clerk.module.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员动态
|
* 店员动态
|
||||||
@@ -14,7 +13,6 @@ public class PlayClerkUserTrendsInfoEntity {
|
|||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,10 +20,8 @@ public class PlayClerkUserTrendsInfoEntity {
|
|||||||
*/
|
*/
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
private String con;
|
private String con;
|
||||||
|
|
||||||
|
|
||||||
private Date releaseTime;
|
private Date releaseTime;
|
||||||
|
|
||||||
public PlayClerkUserTrendsInfoEntity(String id, String title, String con, Date releaseTime) {
|
public PlayClerkUserTrendsInfoEntity(String id, String title, String con, Date releaseTime) {
|
||||||
|
|||||||
@@ -2,10 +2,9 @@ package com.starry.admin.modules.clerk.module.entity;
|
|||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员对象 play_clerk_user_info
|
* 店员对象 play_clerk_user_info
|
||||||
@@ -17,7 +16,6 @@ import java.util.List;
|
|||||||
@ApiModel(value = "店员分类编辑对象", description = "修改店员分类或分组的参数对象")
|
@ApiModel(value = "店员分类编辑对象", description = "修改店员分类或分组的参数对象")
|
||||||
public class PlayClerkUserTypeEditVo {
|
public class PlayClerkUserTypeEditVo {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员分类ID
|
* 店员分类ID
|
||||||
*/
|
*/
|
||||||
@@ -32,5 +30,4 @@ public class PlayClerkUserTypeEditVo {
|
|||||||
@ApiModelProperty(value = "店员ID列表", required = true, notes = "要添加到分类/分组中的店员ID列表")
|
@ApiModelProperty(value = "店员ID列表", required = true, notes = "要添加到分类/分组中的店员ID列表")
|
||||||
private List<String> clerkUserIds;
|
private List<String> clerkUserIds;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ package com.starry.admin.modules.clerk.module.entity;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员工资明细信息对象 play_clerk_wages_details_info
|
* 店员工资明细信息对象 play_clerk_wages_details_info
|
||||||
@@ -19,7 +18,6 @@ import java.time.LocalDateTime;
|
|||||||
@TableName("play_clerk_wages_details_info")
|
@TableName("play_clerk_wages_details_info")
|
||||||
public class PlayClerkWagesDetailsInfoEntity extends BaseEntity<PlayClerkWagesDetailsInfoEntity> {
|
public class PlayClerkWagesDetailsInfoEntity extends BaseEntity<PlayClerkWagesDetailsInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -65,5 +63,4 @@ public class PlayClerkWagesDetailsInfoEntity extends BaseEntity<PlayClerkWagesDe
|
|||||||
*/
|
*/
|
||||||
private LocalDateTime endOrderTime;
|
private LocalDateTime endOrderTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,12 @@ package com.starry.admin.modules.clerk.module.entity;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员工资结算信息对象 play_clerk_wages_info
|
* 店员工资结算信息对象 play_clerk_wages_info
|
||||||
*
|
*
|
||||||
@@ -21,7 +20,6 @@ import java.time.LocalDate;
|
|||||||
@TableName("play_clerk_wages_info")
|
@TableName("play_clerk_wages_info")
|
||||||
public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntity> {
|
public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +35,6 @@ public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntit
|
|||||||
*/
|
*/
|
||||||
private String clerkId;
|
private String clerkId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否为往期统计(1:是;0:不是)
|
* 是否为往期统计(1:是;0:不是)
|
||||||
**/
|
**/
|
||||||
@@ -67,7 +64,6 @@ public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntit
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
private LocalDate endCountDate;
|
private LocalDate endCountDate;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结算时间
|
* 结算时间
|
||||||
*/
|
*/
|
||||||
@@ -110,5 +106,4 @@ public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntit
|
|||||||
*/
|
*/
|
||||||
private BigDecimal estimatedRevenue;
|
private BigDecimal estimatedRevenue;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ package com.starry.admin.modules.clerk.module.entity;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.starry.common.domain.BaseEntity;
|
import com.starry.common.domain.BaseEntity;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 陪聊点赞动态信息对象 play_custom_article_info
|
* 陪聊点赞动态信息对象 play_custom_article_info
|
||||||
*
|
*
|
||||||
@@ -18,7 +17,6 @@ import java.time.LocalDateTime;
|
|||||||
@TableName("play_custom_article_info")
|
@TableName("play_custom_article_info")
|
||||||
public class PlayCustomArticleInfoEntity extends BaseEntity<PlayCustomArticleInfoEntity> {
|
public class PlayCustomArticleInfoEntity extends BaseEntity<PlayCustomArticleInfoEntity> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID
|
* UUID
|
||||||
*/
|
*/
|
||||||
@@ -54,11 +52,9 @@ public class PlayCustomArticleInfoEntity extends BaseEntity<PlayCustomArticleInf
|
|||||||
*/
|
*/
|
||||||
private String endorseState;
|
private String endorseState;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作类型(1:关注;0:收藏)
|
* 操作类型(1:关注;0:收藏)
|
||||||
*/
|
*/
|
||||||
private String endorseType;
|
private String endorseType;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package com.starry.admin.modules.clerk.module.entity;
|
package com.starry.admin.modules.clerk.module.entity;
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 礼物信息
|
* 礼物信息
|
||||||
|
*
|
||||||
* @author admin
|
* @author admin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class PlayGiftInfoVo {
|
public class PlayGiftInfoVo {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 礼物ID
|
* 礼物ID
|
||||||
*/
|
*/
|
||||||
@@ -32,7 +31,6 @@ public class PlayGiftInfoVo {
|
|||||||
*/
|
*/
|
||||||
private Integer number;
|
private Integer number;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 礼物状态(0:正常,1:已下架)
|
* 礼物状态(0:正常,1:已下架)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,12 +3,11 @@ package com.starry.admin.modules.clerk.module.vo;
|
|||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
* @since 2024/6/6 下午11:13
|
* @since 2024/6/6 下午11:13
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.starry.admin.modules.clerk.module.vo;
|
|||||||
|
|
||||||
import com.starry.common.domain.BasePageEntity;
|
import com.starry.common.domain.BasePageEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ package com.starry.admin.modules.clerk.module.vo;
|
|||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
@@ -14,11 +13,9 @@ import javax.validation.constraints.NotNull;
|
|||||||
@ApiModel(value = "店员头像框赠送参数", description = "赠送头像框给店员的请求参数")
|
@ApiModel(value = "店员头像框赠送参数", description = "赠送头像框给店员的请求参数")
|
||||||
public class PlayAvatarFrameSendVo {
|
public class PlayAvatarFrameSendVo {
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "店员ID", required = true, example = "1", notes = "接收头像框的店员ID")
|
@ApiModelProperty(value = "店员ID", required = true, example = "1", notes = "接收头像框的店员ID")
|
||||||
private String clerkId;
|
private String clerkId;
|
||||||
|
|
||||||
|
|
||||||
@NotNull(message = "头像框获取方式不能为空")
|
@NotNull(message = "头像框获取方式不能为空")
|
||||||
@ApiModelProperty(value = "头像框ID", required = true, example = "1", notes = "要赠送的头像框ID")
|
@ApiModelProperty(value = "头像框ID", required = true, example = "1", notes = "要赠送的头像框ID")
|
||||||
private String avatarFrameId;
|
private String avatarFrameId;
|
||||||
|
|||||||
@@ -3,14 +3,12 @@ package com.starry.admin.modules.clerk.module.vo;
|
|||||||
import com.starry.common.domain.BasePageEntity;
|
import com.starry.common.domain.BasePageEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.util.List;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin 动态信息查询对象
|
||||||
* 动态信息查询对象
|
|
||||||
*/
|
*/
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
@@ -20,7 +18,6 @@ public class PlayClerkArticleQueryVo extends BasePageEntity {
|
|||||||
@ApiModelProperty(value = "动态ID", example = "1", notes = "特定动态的ID")
|
@ApiModelProperty(value = "动态ID", example = "1", notes = "特定动态的ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员ID
|
* 店员ID
|
||||||
*/
|
*/
|
||||||
@@ -38,7 +35,6 @@ public class PlayClerkArticleQueryVo extends BasePageEntity {
|
|||||||
@ApiModelProperty(value = "发布时间范围", example = "['2024-01-01 00:00:00','2024-12-31 23:59:59']", notes = "动态发布时间范围,包含开始和结束时间")
|
@ApiModelProperty(value = "发布时间范围", example = "['2024-01-01 00:00:00','2024-12-31 23:59:59']", notes = "动态发布时间范围,包含开始和结束时间")
|
||||||
private List<String> releaseTime;
|
private List<String> releaseTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 顾客ID
|
* 顾客ID
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,15 +5,13 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
|||||||
import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
|
import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin 动态信息查询返回对象
|
||||||
* 动态信息查询返回对象
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "店员动态返回数据", description = "店员动态信息的返回数据")
|
@ApiModel(value = "店员动态返回数据", description = "店员动态信息的返回数据")
|
||||||
@@ -48,7 +46,6 @@ public class PlayClerkArticleReturnVo {
|
|||||||
@ApiModelProperty(value = "动态内容", example = "今天天气真好,感谢大家的支持!")
|
@ApiModelProperty(value = "动态内容", example = "今天天气真好,感谢大家的支持!")
|
||||||
private String articleCon;
|
private String articleCon;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态附件类型(0:图片;1:视频;2:音频)
|
* 动态附件类型(0:图片;1:视频;2:音频)
|
||||||
*/
|
*/
|
||||||
@@ -61,7 +58,6 @@ public class PlayClerkArticleReturnVo {
|
|||||||
@ApiModelProperty(value = "附件内容", example = "[\"https://example.com/photo1.jpg\"]", notes = "附件内容,根据附件类型有不同格式")
|
@ApiModelProperty(value = "附件内容", example = "[\"https://example.com/photo1.jpg\"]", notes = "附件内容,根据附件类型有不同格式")
|
||||||
private List<String> annexCon;
|
private List<String> annexCon;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布时间
|
* 发布时间
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,21 +2,18 @@ package com.starry.admin.modules.clerk.module.vo;
|
|||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Pattern;
|
import javax.validation.constraints.Pattern;
|
||||||
import java.time.LocalDateTime;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin 动态审核
|
||||||
* 动态审核
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "店员动态审核状态修改参数", description = "修改店员动态审核状态的请求参数")
|
@ApiModel(value = "店员动态审核状态修改参数", description = "修改店员动态审核状态的请求参数")
|
||||||
public class PlayClerkArticleReviewStateEditVo {
|
public class PlayClerkArticleReviewStateEditVo {
|
||||||
|
|
||||||
|
|
||||||
@NotBlank(message = "ID不能为空")
|
@NotBlank(message = "ID不能为空")
|
||||||
@ApiModelProperty(value = "动态ID", required = true, example = "1", notes = "店员动态的ID")
|
@ApiModelProperty(value = "动态ID", required = true, example = "1", notes = "店员动态的ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
package com.starry.admin.modules.clerk.module.vo;
|
package com.starry.admin.modules.clerk.module.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Pattern;
|
import javax.validation.constraints.Pattern;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
@@ -17,11 +16,8 @@ public class PlayClerkCommodityEditVo {
|
|||||||
@NotNull(message = "项目类型名称不能为空")
|
@NotNull(message = "项目类型名称不能为空")
|
||||||
private String commodityType;
|
private String commodityType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务启动状态
|
* 服务启动状态 0:停用 1:启用
|
||||||
* 0:停用
|
|
||||||
* 1:启用
|
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "服务状态不能为空")
|
@NotNull(message = "服务状态不能为空")
|
||||||
@Pattern(regexp = "[01]", message = "服务状态必须为0或1")
|
@Pattern(regexp = "[01]", message = "服务状态必须为0或1")
|
||||||
|
|||||||
@@ -17,11 +17,8 @@ public class PlayClerkCommodityQueryVo {
|
|||||||
@ApiModelProperty(value = "项目类型", example = "1", notes = "服务项目的类型")
|
@ApiModelProperty(value = "项目类型", example = "1", notes = "服务项目的类型")
|
||||||
private String commodityType;
|
private String commodityType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务启动状态
|
* 服务启动状态 0:停用 1:启用
|
||||||
* 0:停用
|
|
||||||
* 1:启用
|
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "启用状态", example = "1", notes = "0:停用,1:启用")
|
@ApiModelProperty(value = "启用状态", example = "1", notes = "0:停用,1:启用")
|
||||||
private String enablingState;
|
private String enablingState;
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ package com.starry.admin.modules.clerk.module.vo;
|
|||||||
import com.starry.common.domain.BasePageEntity;
|
import com.starry.common.domain.BasePageEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.util.List;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店员资料审核对象 play_clerk_data_review_info
|
* 店员资料审核对象 play_clerk_data_review_info
|
||||||
*
|
*
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user