fix: 合并

This commit is contained in:
huchuansai
2025-09-01 10:03:13 +08:00
624 changed files with 74207 additions and 6595 deletions

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.starry</groupId>
<artifactId>play-with</artifactId>
<version>1.0</version>
<version>1.1</version>
</parent>
<artifactId>play-admin</artifactId>
@@ -33,7 +33,7 @@
<dependency>
<groupId>com.starry</groupId>
<artifactId>play-common</artifactId>
<version>1.0</version>
<version>1.1</version>
</dependency>
<!--代码生成模块-->
<dependency>

View File

@@ -12,6 +12,5 @@ import java.lang.annotation.*;
@Documented
public @interface ClerkUserLogin {
boolean manage() default false;
}

View File

@@ -8,16 +8,15 @@ import com.starry.admin.modules.weichat.service.WxTokenService;
import com.starry.common.constant.Constants;
import com.starry.common.constant.HttpStatus;
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 org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
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
public class ClerkUserLoginAspect {
@Resource
private PlayClerkUserInfoServiceImpl clerkUserInfoService;
@@ -37,7 +35,6 @@ public class ClerkUserLoginAspect {
@Resource
private HttpServletRequest request;
@Before("@annotation(clerkUserLogin)")
public void doBefore(JoinPoint point, ClerkUserLogin clerkUserLogin) {
String userToken = request.getHeader(Constants.CLERK_USER_LOGIN_TOKEN);

View File

@@ -12,6 +12,5 @@ import java.lang.annotation.*;
@Documented
public @interface CustomUserLogin {
boolean manage() default false;
}

View File

@@ -8,16 +8,15 @@ import com.starry.admin.modules.weichat.service.WxTokenService;
import com.starry.common.constant.Constants;
import com.starry.common.constant.HttpStatus;
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 org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
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
private HttpServletRequest request;
@Before("@annotation(customUserLogin)")
public void doBefore(JoinPoint point, CustomUserLogin customUserLogin) {
String userToken = request.getHeader(Constants.CUSTOM_USER_LOGIN_TOKEN);

View File

@@ -10,14 +10,13 @@ import com.starry.common.annotation.DataScope;
import com.starry.common.context.CustomSecurityContextHolder;
import com.starry.common.domain.BaseEntity;
import com.starry.common.utils.StringUtils;
import java.util.ArrayList;
import java.util.List;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
/**
* 数据过滤处理
*
@@ -59,13 +58,19 @@ public class DataScopeAspect {
/**
* 数据范围过滤
*
* @param joinPoint 切点
* @param user 用户
* @param deptAlias 部门别名
* @param userAlias 用户别名
* @param permission 权限字符
* @param joinPoint
* 切点
* @param user
* 用户
* @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();
List<String> conditions = new ArrayList<>();
for (SysRoleEntity role : user.getRoles()) {
@@ -126,7 +131,8 @@ public class DataScopeAspect {
SysUserEntity currentUser = loginUser.getUser();
// 如果是超级管理员,则不过滤数据
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(),
controllerDataScope.userAlias(), permission);
}

View File

@@ -9,6 +9,12 @@ import com.starry.admin.utils.SecurityUtils;
import com.starry.common.annotation.Log;
import com.starry.common.utils.ServletUtils;
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 org.aspectj.lang.JoinPoint;
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.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
*/
@@ -40,7 +39,8 @@ public class LogAspect {
/**
* 处理完请求后执行
*
* @param joinPoint 切点
* @param joinPoint
* 切点
*/
@AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult")
public void doAfterReturn(JoinPoint joinPoint, Log controllerLog, Object jsonResult) {
@@ -88,10 +88,13 @@ public class LogAspect {
/**
* 获取注解中对方法的描述信息 用于Controller层注解
*
* @param log 日志
* @param operLog 操作日志
* @param log
* 日志
* @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());
// 设置标题
@@ -110,7 +113,8 @@ public class LogAspect {
/**
* 获取请求的参数放到log中
*
* @param operLog 操作日志
* @param operLog
* 操作日志
*/
private void setRequestValue(JoinPoint joinPoint, SysOperationLogEntity operLog) {
String requsetMethod = operLog.getRequestMethod();
@@ -118,7 +122,8 @@ public class LogAspect {
String params = argsArrayToString(joinPoint.getArgs());
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
} 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));
}
}
@@ -143,7 +148,8 @@ public class LogAspect {
/**
* 判断是否需要过滤的对象。
*
* @param object 对象信息。
* @param object
* 对象信息。
* @return 如果是需要过滤的对象则返回true否则返回false。
*/
@SuppressWarnings("rawtypes")
@@ -163,6 +169,7 @@ public class LogAspect {
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;
}
}

View File

@@ -18,21 +18,19 @@ import com.starry.common.utils.ip.IpUtils;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
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 org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.userdetails.UserDetails;
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
* token 组件
* @author admin token 组件
* @since 2021/9/6
*/
@Slf4j
@@ -55,7 +53,6 @@ public class JwtToken {
@Resource
private RedisCache redisCache;
/**
* 从token中获取登录用户名
*/
@@ -91,7 +88,8 @@ public class JwtToken {
/**
* 创建令牌
*
* @param jwtUser 用户信息
* @param jwtUser
* 用户信息
* @return 令牌
*/
public String createToken(JwtUser jwtUser) {
@@ -108,7 +106,8 @@ public class JwtToken {
/**
* 从数据声明生成令牌
*
* @param claims 数据声明
* @param claims
* 数据声明
* @return 令牌
*/
private String createToken(Map<String, Object> claims) {
@@ -140,7 +139,8 @@ public class JwtToken {
/**
* 从令牌中获取数据声明
*
* @param token 令牌
* @param token
* 令牌
* @return 数据声明
*/
private Claims getClaimsFromToken(String token) {
@@ -156,7 +156,8 @@ public class JwtToken {
/**
* 设置用户代理信息
*
* @param jwtUser 登录信息
* @param jwtUser
* 登录信息
*/
public void setUserAgent(JwtUser jwtUser) {
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) {
UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent"));
@@ -288,7 +290,8 @@ public class JwtToken {
/**
* 刷新令牌有效期
*
* @param loginUser 登录信息
* @param loginUser
* 登录信息
* @return
*/
public String refreshToken(LoginUser loginUser) {

View File

@@ -1,15 +1,13 @@
package com.starry.admin.common.component;
import com.starry.admin.common.domain.LoginUser;
import com.starry.admin.modules.system.module.entity.SysRoleEntity;
import com.starry.admin.utils.SecurityUtils;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.Set;
/**
* 自定义权限实现ss取自SpringSecurity首字母
*
@@ -34,7 +32,8 @@ public class PermissionService {
/**
* 验证用户是否具备某权限
*
* @param permission 权限字符串
* @param permission
* 权限字符串
* @return 用户是否具备某权限
*/
public boolean hasPermission(String permission) {
@@ -51,7 +50,8 @@ public class PermissionService {
/**
* 验证用户是否不具备某权限,与 hasPermission逻辑相反
*
* @param permission 权限字符串
* @param permission
* 权限字符串
* @return 用户是否不具备某权限
*/
public boolean lacksPermission(String permission) {
@@ -61,7 +61,8 @@ public class PermissionService {
/**
* 验证用户是否具有以下任意一个权限
*
* @param permissions 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表
* @param permissions
* 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表
* @return 用户是否具有以下任意一个权限
*/
public boolean hasAnyPermission(String permissions) {
@@ -84,7 +85,8 @@ public class PermissionService {
/**
* 判断用户是否拥有某个角色
*
* @param role 角色字符串
* @param role
* 角色字符串
* @return 用户是否具备某角色
*/
public boolean hasRole(String role) {
@@ -107,7 +109,8 @@ public class PermissionService {
/**
* 验证用户是否不具备某角色,与 isRole逻辑相反。
*
* @param role 角色名称
* @param role
* 角色名称
* @return 用户是否不具备某角色
*/
public boolean lacksRole(String role) {
@@ -117,7 +120,8 @@ public class PermissionService {
/**
* 验证用户是否具有以下任意一个角色
*
* @param roles 以 ROLE_NAMES_DELIMITER 为分隔符的角色列表
* @param roles
* 以 ROLE_NAMES_DELIMITER 为分隔符的角色列表
* @return 用户是否具有以下任意一个角色
*/
public boolean hasAnyRoles(String roles) {
@@ -139,8 +143,10 @@ public class PermissionService {
/**
* 判断是否包含权限
*
* @param permissions 权限列表
* @param permission 权限字符串
* @param permissions
* 权限列表
* @param permission
* 权限字符串
* @return 用户是否具备某权限
*/
private boolean hasPermissions(Set<String> permissions, String permission) {

View File

@@ -3,21 +3,20 @@ package com.starry.admin.common.conf;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
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.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
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
*/
@@ -26,7 +25,8 @@ import java.util.List;
@MappedTypes({List.class})
public abstract class AbstractListTypeHandler<T> extends BaseTypeHandler<List<T>> {
@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);
ps.setString(i, content);
}

View File

@@ -1,12 +1,11 @@
package com.starry.admin.common.conf;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import javax.sql.DataSource;
@Configuration
public class DataSourceConfig {
@@ -17,4 +16,4 @@ public class DataSourceConfig {
return DruidDataSourceBuilder.create().build();
}
}
}

View File

@@ -1,7 +1,6 @@
package com.starry.admin.common.conf;
import com.alibaba.fastjson2.TypeReference;
import java.util.List;
/**
@@ -13,4 +12,4 @@ public class StringTypeHandler extends AbstractListTypeHandler<String> {
return new TypeReference<List<String>>() {
};
}
}
}

View File

@@ -1,13 +1,12 @@
package com.starry.admin.common.domain;
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.Date;
import java.util.Set;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
/**
* @author admin

View File

@@ -3,11 +3,10 @@ package com.starry.admin.common.domain;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.starry.admin.modules.system.module.entity.SysDeptEntity;
import com.starry.admin.modules.system.module.entity.SysMenuEntity;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
import lombok.Data;
/**
* @author Treeselect树结构实体类

View File

@@ -43,7 +43,6 @@ public class ServiceException extends RuntimeException {
this.code = code;
}
public ServiceException setDetailMessage(String detailMessage) {
this.detailMessage = detailMessage;
return this;

View File

@@ -1,11 +1,11 @@
package com.starry.admin.common.exception.handler;
import com.fasterxml.jackson.databind.exc.MismatchedInputException;
import com.starry.admin.common.exception.CustomException;
import com.starry.admin.common.exception.ServiceException;
import com.starry.common.result.R;
import com.starry.common.utils.StringUtils;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.RestControllerAdvice;
import javax.servlet.http.HttpServletRequest;
/**
* @author 全局异常处理
* @since 2023/3/9
@@ -27,7 +25,6 @@ import javax.servlet.http.HttpServletRequest;
public class GlobalExceptionHandler {
private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
/**
* 业务异常
*/
@@ -62,7 +59,6 @@ public class GlobalExceptionHandler {
return R.error("系统出现内部错误,请联系管理员");
}
/**
* 请求方法异常
*/
@@ -74,7 +70,8 @@ public class GlobalExceptionHandler {
/**
* 请求参数异常
*
* @param e HttpRequestMethodNotSupportedException
* @param e
* HttpRequestMethodNotSupportedException
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
public R methodArgumentNotValidException(MethodArgumentNotValidException e) {
@@ -101,11 +98,11 @@ public class GlobalExceptionHandler {
return R.error("请求参数格式异常");
}
/**
* 自定义异常
*
* @param e CustomException
* @param e
* CustomException
*/
@ExceptionHandler(CustomException.class)
public R customException(CustomException e) {

View File

@@ -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.TenantLineInnerInterceptor;
import com.starry.admin.common.mybatis.handler.MyTenantLineHandler;
import javax.sql.DataSource;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.context.properties.ConfigurationProperties;
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.transaction.annotation.EnableTransactionManagement;
import javax.sql.DataSource;
/**
* @author admin
*/

View File

@@ -5,26 +5,23 @@ import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.starry.admin.modules.weichat.service.WxTokenService;
import com.starry.admin.utils.SecurityUtils;
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 org.apache.ibatis.reflection.MetaObject;
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
*/
@Slf4j
@Component
public class MyMetaObjectHandler implements MetaObjectHandler {
@Resource
private HttpServletRequest request;
@@ -58,7 +55,7 @@ public class MyMetaObjectHandler implements MetaObjectHandler {
LocalDateTime localDateTime = LocalDateTime.now();
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() {

View File

@@ -3,16 +3,14 @@ package com.starry.admin.common.mybatis.handler;
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
import com.starry.admin.utils.SecurityUtils;
import com.starry.common.utils.StringUtils;
import java.util.Arrays;
import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.StringValue;
import org.springframework.stereotype.Component;
import java.util.Arrays;
/**
* @author admin
* 多租户处理器
* @author admin 多租户处理器
* @since 2023/3/7
*/
@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() {
// 取出当前请求的服务商ID通过解析器注入到SQL中。
String tenantId = SecurityUtils.getTenantId();
// if (!StrUtil.isBlankIfStr(tenantId)) {
// throw new CustomException("租户信息获取异常");
// }
// if (!StrUtil.isBlankIfStr(tenantId)) {
// throw new CustomException("租户信息获取异常");
// }
return new StringValue(tenantId);
}

View File

@@ -3,17 +3,15 @@ package com.starry.admin.common.oss.controller;
import com.starry.admin.common.oss.service.IOssFileService;
import com.starry.common.result.R;
import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
/**
* @author admin
* cos存储前端控制器
* @author admin cos存储前端控制器
* @since 2022/11/13 17:51
*/
@Slf4j
@@ -24,7 +22,6 @@ public class CosController {
@Resource
IOssFileService ossFileService;
@ApiOperation(value = "照片上传")
@PostMapping("/upload/image")
public R uploadImage(MultipartFile file) throws Exception {

View File

@@ -7,9 +7,12 @@ public interface IOssFileService {
/**
* 文件上传只阿里云OSS
*
* @param inputStream 文件流
* @param module 文件保存模块地址
* @param originalFilename 原始文件名
* @param inputStream
* 文件
* @param module
* 文件保存模块地址
* @param originalFilename
* 原始文件名
* @return String
* @author admin
* @since 2024/4/11 10:24
@@ -19,7 +22,8 @@ public interface IOssFileService {
/**
* 删除文件
*
* @param url 文件地址
* @param url
* 文件地址
*/
void remove(String url);

View File

@@ -1,6 +1,5 @@
package com.starry.admin.common.oss.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.io.FileTypeUtil;
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.service.IOssFileService;
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.IOException;
import java.io.InputStream;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.stereotype.Service;
/**
* @author admin
@@ -28,7 +26,6 @@ import java.io.InputStream;
@Slf4j
public class OssFileServiceImpl implements IOssFileService {
@Override
public String upload(InputStream inputStream, String module, String filename) {
@@ -41,7 +38,8 @@ public class OssFileServiceImpl implements IOssFileService {
throw new CustomException("文件上传到OSS失败");
}
// 创建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实例创建成功");
try {
// 判断oss实例是否存在如果不存在则创建如果存在则获取
@@ -57,12 +55,12 @@ public class OssFileServiceImpl implements IOssFileService {
String folder = new DateTime().toString("yyyy/MM/dd");
// 文件名uuid.扩展名
filename = IdUtils.getUuid() + "." + fileType;
// 文件根路径
String key = module + "/" + folder + "/" + filename;
// 创建PutObjectRequest对象。
PutObjectRequest putObjectRequest = new PutObjectRequest(OssProperties.BUCKET_NAME, key, bufferedInputStream);
PutObjectRequest putObjectRequest = new PutObjectRequest(OssProperties.BUCKET_NAME, key,
bufferedInputStream);
// 创建PutObject请求。
ossClient.putObject(putObjectRequest);
log.info("oss文件上传成功");
@@ -89,7 +87,8 @@ public class OssFileServiceImpl implements IOssFileService {
@Override
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实例创建成功");
try {
String endpoint = OssProperties.ENDPOINT.substring(OssProperties.ENDPOINT.lastIndexOf("//") + 2);

View File

@@ -1,6 +1,5 @@
package com.starry.admin.common.security.config;
import com.starry.admin.common.security.entity.JwtUser;
import com.starry.admin.common.security.filter.JwtAuthenticationTokenFilter;
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.service.SysMenuService;
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.Configuration;
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.UrlBasedCorsConfigurationSource;
import javax.annotation.Resource;
import java.util.Set;
/**
* @author admin
*/
@@ -49,16 +47,19 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
@Resource
private CustomLogoutSuccessHandler customLogoutSuccessHandler;
@Override
protected void configure(HttpSecurity httpSecurity) throws Exception {
httpSecurity.csrf().disable()// 由于使用的是JWT我们这里不需要csrf
.sessionManagement()// 基于token所以不需要session
.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("/health", "/health/**").permitAll()
// 跨域请求会先进行一次options请求
.antMatchers(HttpMethod.OPTIONS).permitAll().anyRequest()// 除上面外的所有请求全部需要鉴权认证
.authenticated().and().cors().configurationSource(this.corsConfigurationSource());
@@ -69,10 +70,11 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
// 添加JWT filter
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.setAllowCredentials(true);
corsConfiguration.addAllowedHeader("*"); // 这个得加上一些复杂的请求方式会带有header不加上跨域会失效。
@@ -80,7 +82,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
corsConfiguration.addExposedHeader("*");
corsConfiguration.addAllowedOriginPattern("*");
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**",corsConfiguration);
source.registerCorsConfiguration("/**", corsConfiguration);
return source;
}

View File

@@ -1,11 +1,10 @@
package com.starry.admin.common.security.entity;
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.Set;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
/**
* @author admin
@@ -61,7 +60,6 @@ public class JwtUser implements UserDetails {
*/
private Set<String> permissions;
public JwtUser(SysUserEntity user, Set<String> permissions) {
this.user = user;
this.permissions = permissions;

View File

@@ -1,6 +1,5 @@
package com.starry.admin.common.security.filter;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
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.result.R;
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 org.springframework.beans.factory.annotation.Qualifier;
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.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
* JWT登录授权过滤器
* @author admin JWT登录授权过滤器
* @since 2021/9/6
*/
@Slf4j
@@ -72,100 +69,112 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
@Resource
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
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());
//微信支付回调接口,不需要验证
// 微信支付回调接口,不需要验证
if ("/wx/pay/jsCallback".equals(httpServletRequest.getServletPath())) {
log.info("微信支付回调,不需要验证");
filterChain.doFilter(httpServletRequest, httpServletResponse);
} else {// 微信公众号的请求必须存在tenantkey否则抛出异常
if (httpServletRequest.getServletPath().startsWith("/wx/")) {
if (httpServletRequest.getServletPath().startsWith("/wx/")) {
String tenantKey = httpServletRequest.getHeader("tenantkey");
if (StrUtil.isBlank(tenantKey)) {
resolver.resolveException(httpServletRequest, httpServletResponse, null, new CustomException("tenantkey不能为空"));
return;
}
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("租户信息异常"));
String tenantKey = httpServletRequest.getHeader("tenantkey");
if (StrUtil.isBlank(tenantKey)) {
resolver.resolveException(httpServletRequest, httpServletResponse, null,
new CustomException("tenantkey不能为空"));
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 {
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验证失败,需要重新登录");
// 管理端的请求
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);
}
if (!checkTenantId(tenantId)) {
//返回500
resolver.resolveException(httpServletRequest, httpServletResponse, null, new CustomException("租户信息异常"));
return;
}
SecurityUtils.setTenantId(tenantId);
}
} else {
// 管理端的请求
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);
filterChain.doFilter(httpServletRequest, httpServletResponse);
}
}
/**
* 微信公众号端访问时获取当前用户租户ID
* 如果用户陪聊或客户已登录从token中获取租户ID
* 如果用户未登录从tenantKey中获取租户ID
* 微信公众号端访问时获取当前用户租户ID 如果用户陪聊或客户已登录从token中获取租户ID 如果用户未登录从tenantKey中获取租户ID
*
* @param clerkToken 陪聊登录Key
* @param customToken 客户登录key
* @param tenantKey 租户标识
* @param clerkToken
* 陪聊登录Key
* @param customToken
* 客户登录key
* @param tenantKey
* 租户标识
*/
public String getTenantId(String clerkToken, String customToken, String tenantKey) {
String tenantId = "";
//如果用户陪聊或客户已登录从token中获取租户ID
// 如果用户陪聊或客户已登录从token中获取租户ID
if (StrUtil.isNotBlank(clerkToken) || StrUtil.isNotBlank(customToken)) {
String userId = tokenService.getWxUserIdByToken(StrUtil.isNotBlank(clerkToken) ? clerkToken : customToken);
String redisKey = "TENANT_INFO:" + userId;
@@ -198,7 +207,8 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
/**
* 校验租户是否正常
*
* @param tenantId 租户ID
* @param tenantId
* 租户ID
* @return true:租户正常false:租户不正常
*/
public boolean checkTenantId(String tenantId) {
@@ -212,12 +222,12 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
if (entity == null) {
return false;
}
//判断租户是否过期
// 判断租户是否过期
if (DateUtil.compare(entity.getTenantTime(), new Date()) < 0) {
return false;
}
//...
//校验通过
// ...
// 校验通过
return true;
}
}

View File

@@ -3,28 +3,28 @@ package com.starry.admin.common.security.handler;
import cn.hutool.json.JSONUtil;
import com.starry.common.result.R;
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.web.access.AccessDeniedHandler;
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
*/
@Component
public class CustomAccessDeniedHandler implements AccessDeniedHandler {
@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.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();
}
}

View File

@@ -3,27 +3,27 @@ package com.starry.admin.common.security.handler;
import cn.hutool.json.JSONUtil;
import com.starry.common.result.R;
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.web.AuthenticationEntryPoint;
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
* 当未登录或者token失效访问接口时自定义的返回结果
* @author admin 当未登录或者token失效访问接口时自定义的返回结果
* @since 2021/9/6
*/
@Component
public class CustomAuthenticationEntryPoint implements AuthenticationEntryPoint {
@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.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();
}
}

View File

@@ -8,17 +8,15 @@ import com.starry.admin.manager.factory.AsyncFactory;
import com.starry.common.constant.Constants;
import com.starry.common.result.R;
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.web.authentication.logout.LogoutSuccessHandler;
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
*/
@Component
@@ -28,7 +26,8 @@ public class CustomLogoutSuccessHandler implements LogoutSuccessHandler {
private JwtToken jwtToken;
@Override
public void onLogoutSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) {
public void onLogoutSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse,
Authentication authentication) {
JwtUser jwtUser = jwtToken.getLoginUser(httpServletRequest);
if (null != jwtUser) {
// 删除用户缓存记录

View File

@@ -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.PlayClerkPkEntity;
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.stereotype.Component;
import javax.annotation.Resource;
import java.util.Date;
/**
* @Author: huchuansai
* @Date: 2024/8/2 4:31 PM
@@ -24,11 +23,13 @@ public class ClerkPkJob {
@Scheduled(fixedRate = 60000)
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())
.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())
.set(PlayClerkPkEntity::getStatus, ClerkPkEnum.FINISHED.name()));
}

View File

@@ -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.utils.SecurityUtils;
import com.starry.common.utils.IdUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
/**
* 订单工资结算
@@ -39,7 +38,6 @@ public class ClerkWagesSettlementTask {
@Resource
private IPlayOrderInfoService playOrderInfoService;
@Resource
private IPlayClerkWagesInfoService playClerkWagesInfoService;
@@ -47,10 +45,9 @@ public class ClerkWagesSettlementTask {
private IPlayClerkWagesDetailsInfoService playClerkWagesDetailsInfoService;
/**
* 每分钟查询未结算订单
* 如果订单完成时间超过24小时可进行结算生成工资
* 每分钟查询未结算订单 如果订单完成时间超过24小时可进行结算生成工资
*/
// @Scheduled(cron = "0 0/1 * * * ?")
// @Scheduled(cron = "0 0/1 * * * ?")
public void dailyRanking() {
// 1、查询所有的租户信息
List<SysTenantEntity> tenantEntities = sysTenantService.listAll();
@@ -64,11 +61,11 @@ public class ClerkWagesSettlementTask {
}
}
/**
* 活动24小时前完成的订单对订单进行结算
*
* @param clerkId 店员ID
* @param clerkId
* 店员ID
*/
public void updateClerkWagesInfo(String clerkId) {
// 获得24小时前完成,并且未结算的订单
@@ -80,12 +77,11 @@ public class ClerkWagesSettlementTask {
updateClerkWagesInfo(clerkId, entity == null ? IdUtils.getUuid() : entity.getId(), orderInfoEntities);
}
/**
* 更新最新一次工资统计信息
* 更新订单记录
* 更新最新一次工资统计信息 更新订单记录
*
* @param orderInfoEntities 订单列表
* @param orderInfoEntities
* 订单列表
*/
public void updateClerkWagesInfo(String clerkId, String wagesId, List<PlayOrderInfoEntity> orderInfoEntities) {
// 修改订单状态并且新增订单结算详情
@@ -95,7 +91,8 @@ public class ClerkWagesSettlementTask {
orderInfo.setOrderSettlementTime(LocalDateTime.now());
playOrderInfoService.update(orderInfo);
PlayClerkWagesDetailsInfoEntity wagesDetailsInfo = playClerkWagesDetailsInfoService.selectByOrderId(orderInfo.getId());
PlayClerkWagesDetailsInfoEntity wagesDetailsInfo = playClerkWagesDetailsInfoService
.selectByOrderId(orderInfo.getId());
if (wagesDetailsInfo == null) {
wagesDetailsInfo = new PlayClerkWagesDetailsInfoEntity();
wagesDetailsInfo.setId(IdUtils.getUuid());

View File

@@ -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.utils.SecurityUtils;
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.RoundingMode;
import java.time.LocalDate;
@@ -24,6 +20,9 @@ import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
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");
/**
* 当日订单结算,查询前一日的订单信息,生成订单排名数据
* 每天凌晨0点5分0秒时触发执行
* 当日订单结算,查询前一日的订单信息,生成订单排名数据 每天凌晨0点5分0秒时触发执行
*/
@Scheduled(cron = "0 5 0 * * ?")
public void dailyRanking() {
@@ -61,8 +59,7 @@ public class OrderRankingSettlementTask {
}
/**
* 每周订单结算周一凌晨30分执行查询上一周的订单然后生成订单排行数据
* 每周一凌晨0点30分0秒时触发执行
* 每周订单结算周一凌晨30分执行查询上一周的订单然后生成订单排行数据 每周一凌晨0点30分0秒时触发执行
*/
@Scheduled(cron = "0 30 0 ? * MON")
public void weeklyRankingSettlement() {
@@ -73,14 +70,14 @@ public class OrderRankingSettlementTask {
}
/**
* 生产排行信息
* 1、查询所有的租户信息
* 2、查询每个租户的用户以及他们在对应时间段的订单
* 3、根据订单生产排行信息
* 生产排行信息 1、查询所有的租户信息 2、查询每个租户的用户以及他们在对应时间段的订单 3、根据订单生产排行信息
*
* @param startTime 接单开始时间
* @param endTime 接单截至时间
* @param weeklyRanking weeklyRanking 日排名还是周排名0:每日排名;1:每周排名)
* @param startTime
* 接单开始时间
* @param endTime
* 接单截至时间
* @param weeklyRanking
* weeklyRanking 日排名还是周排名0:每日排名;1:每周排名)
* @author admin
* @since 2024/6/12 15:21
**/
@@ -98,7 +95,8 @@ public class OrderRankingSettlementTask {
// 生成每个人的订单排行信息
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());
@@ -106,7 +104,8 @@ public class OrderRankingSettlementTask {
PlayClerkRankingInfoEntity item = clerkRankingInfoEntities.get(i);
item.setRankingIndex(i + 1);
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 startTime 排行开始统计日期 yyyy-mm-dd 00:00:00
* @param endTime 排行结束统计日期 yyyy-mm-dd 23:59:59
* @param weeklyRanking 日排名还是周排名0:每日排名;1:每周排名)
* @param serialNumber 查询当前租户、当前排行、的最后一次统计编号
* @param clerkId
* 店员ID
* @param startTime
* 排行开始统计日期 yyyy-mm-dd 00:00:00
* @param endTime
* 排行结束统计日期 yyyy-mm-dd 23:59:59
* @param weeklyRanking
* 日排名还是周排名0:每日排名;1:每周排名)
* @param serialNumber
* 查询当前租户、当前排行、的最后一次统计编号
* @author admin
* @since 2024/6/7 11:43
**/
public PlayClerkRankingInfoEntity getClerkRanking(String clerkId, String startTime, String endTime, String weeklyRanking, Integer serialNumber) {
List<PlayOrderInfoEntity> orderInfoEntities = orderInfoService.listByTime(clerkId, startTime, endTime,null);
public PlayClerkRankingInfoEntity getClerkRanking(String clerkId, String startTime, String endTime,
String weeklyRanking, Integer serialNumber) {
List<PlayOrderInfoEntity> orderInfoEntities = orderInfoService.listByTime(clerkId, startTime, endTime, null);
int orderNumber = orderInfoEntities.size();
BigDecimal orderMoney = BigDecimal.ZERO;
Integer orderContinueNumber = 0;
@@ -146,8 +151,13 @@ public class OrderRankingSettlementTask {
ordersExpiredNumber++;
}
}
BigDecimal orderContinueProportion = orderNumber == 0 ? 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);
BigDecimal orderContinueProportion = orderNumber == 0
? 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();
rankingInfo.setId(IdUtils.getUuid());
rankingInfo.setClerkId(clerkId);
@@ -174,5 +184,4 @@ public class OrderRankingSettlementTask {
return rankingInfo;
}
}

View File

@@ -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.service.IPlayOrderInfoService;
import com.starry.admin.utils.SecurityUtils;
import java.util.ArrayList;
import java.util.Set;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.scheduling.annotation.Scheduled;
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;
@Resource
private StringRedisTemplate stringRedisTemplate;
@@ -76,7 +74,7 @@ public class OverdueOrderHandlerTask {
if ("0".equals(orderInfo.getOrderStatus())) {
try {
playOrderInfoService.updateStateTo4("2", "admin", orderInfo.getId(), "订单长时间未接单", new ArrayList<>());
}catch (Exception e){
} catch (Exception e) {
log.error("订单退款失败", e);
}

View File

@@ -1,16 +1,13 @@
package com.starry.admin.manager;
import com.starry.common.utils.SpringUtils;
import com.starry.common.utils.ThreadsUtils;
import java.util.TimerTask;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/**
* @author admin
* 异步任务管理器
* @author admin 异步任务管理器
* @since 2022/7/25
*/
public class AsyncManager {
@@ -38,7 +35,8 @@ public class AsyncManager {
/**
* 执行任务
*
* @param task 任务
* @param task
* 任务
*/
public void execute(TimerTask task) {
executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS);

View File

@@ -1,11 +1,10 @@
package com.starry.admin.manager;
import javax.annotation.PreDestroy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.PreDestroy;
/**
* 确保应用退出时能关闭后台线程
*

View File

@@ -9,10 +9,9 @@ import com.starry.common.constant.Constants;
import com.starry.common.utils.ServletUtils;
import com.starry.common.utils.SpringUtils;
import com.starry.common.utils.ip.AddressUtils;
import lombok.extern.slf4j.Slf4j;
import java.util.Date;
import java.util.TimerTask;
import lombok.extern.slf4j.Slf4j;
/**
* @author admin
@@ -23,13 +22,18 @@ public class AsyncFactory {
/**
* 记录登录信息
*
* @param username 用户名
* @param status 状态
* @param message 消息
* @param args 列表
* @param username
* 用户名
* @param status
* 状态
* @param message
* 消息
* @param args
* 列表
* @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"));
// 请求的IP地址
@@ -64,4 +68,3 @@ public class AsyncFactory {
}
}

View File

@@ -13,18 +13,16 @@ import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.io.IOException;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.IOException;
/**
* 店员头像框Controller
*
@@ -38,17 +36,15 @@ public class PlayAvatarFrameInfoController {
@Resource
private IPlayAvatarFrameInfoService playAvatarFrameInfoService;
@Resource
private IOssFileService ossFileService;
@ApiOperation(value = "分页查询头像框", notes = "分页查询店员头像框信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayAvatarFrameInfoEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayAvatarFrameInfoEntity.class, responseContainer = "Page")})
@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));
}
@@ -57,37 +53,32 @@ public class PlayAvatarFrameInfoController {
*/
@ApiOperation(value = "查询所有头像框", notes = "获取所有店员头像框信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayAvatarFrameInfoEntity.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayAvatarFrameInfoEntity.class, responseContainer = "List")})
@GetMapping("/listAll")
public R listAll() {
return R.ok(playAvatarFrameInfoService.selectAll());
}
@ApiOperation(value = "上传头像框图片", notes = "上传店员头像框图片文件")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = String.class, responseContainer = "R")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = String.class, responseContainer = "R")})
@PostMapping("/uploadFile")
public R uploadFile(@ApiParam(value = "图片文件", required = true) @RequestParam("file") MultipartFile file) throws IOException {
String fileAddress = ossFileService.upload(file.getInputStream(), SecurityUtils.getTenantId(), file.getOriginalFilename());
public R uploadFile(@ApiParam(value = "图片文件", required = true) @RequestParam("file") MultipartFile file)
throws IOException {
String fileAddress = ossFileService.upload(file.getInputStream(), SecurityUtils.getTenantId(),
file.getOriginalFilename());
return R.ok(fileAddress);
}
/**
* 新增店员头像框
*/
@ApiOperation(value = "新增头像框", notes = "创建新的店员头像框信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
@Log(title = "店员头像框", businessType = BusinessType.INSERT)
@PostMapping("/create")
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) {
return R.ok();
}
@@ -99,13 +90,11 @@ public class PlayAvatarFrameInfoController {
*/
@ApiOperation(value = "修改头像框", notes = "根据ID修改店员头像框信息")
@ApiImplicitParam(name = "id", value = "头像框ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@Log(title = "店员头像框", businessType = BusinessType.UPDATE)
@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);
boolean success = playAvatarFrameInfoService.update(playAvatarFrameInfo);
if (success) {
@@ -119,9 +108,7 @@ public class PlayAvatarFrameInfoController {
*/
@ApiOperation(value = "删除头像框", notes = "根据ID批量删除店员头像框信息")
@ApiImplicitParam(name = "ids", value = "头像框ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
@Log(title = "店员头像框", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {
@@ -132,13 +119,11 @@ public class PlayAvatarFrameInfoController {
* 新增店员头像框
*/
@ApiOperation(value = "赠送头像框", notes = "赠送头像框给指定店员")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
@Log(title = "赠送店员头像框", businessType = BusinessType.INSERT)
@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("添加失败");
}

View File

@@ -13,16 +13,14 @@ import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 店员动态信息Controller
*
@@ -38,30 +36,24 @@ public class PlayClerkArticleInfoController {
@Resource
private IPlayCustomArticleInfoService playCustomArticleInfoService;
/**
* 查询店员动态信息列表
*/
@ApiOperation(value = "分页查询动态列表", notes = "分页查询店员动态信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleReturnVo.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleReturnVo.class, responseContainer = "Page")})
@PostMapping("/listByPage")
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);
}
/**
* 修改店员动态信息
*/
@ApiOperation(value = "修改动态审核状态", notes = "更新店员动态审核状态,通过或拒绝")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
//@PreAuthorize("@customSs.hasPermission('clerk:article:update')")
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
// @PreAuthorize("@customSs.hasPermission('clerk:article:update')")
@Log(title = "店员动态信息", businessType = BusinessType.UPDATE)
@PostMapping(value = "/update")
public R update(@ApiParam(value = "审核状态信息", required = true) @RequestBody PlayClerkArticleReviewStateEditVo vo) {
@@ -78,10 +70,8 @@ public class PlayClerkArticleInfoController {
*/
@ApiOperation(value = "删除动态", notes = "根据ID批量删除店员动态信息")
@ApiImplicitParam(name = "ids", value = "动态ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
//@PreAuthorize("@customSs.hasPermission('clerk:article:delete')")
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
// @PreAuthorize("@customSs.hasPermission('clerk:article:delete')")
@Log(title = "店员动态信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -8,15 +8,13 @@ import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.*;
/**
* 店员分类Controller
@@ -36,25 +34,23 @@ public class PlayClerkClassificationInfoController {
*/
@ApiOperation(value = "查询所有分类", notes = "获取所有店员分类信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class, responseContainer = "List")})
@GetMapping("/listAll")
public R listAll() {
List<PlayClerkClassificationInfoEntity> list = playClerkClassificationInfoService.selectAll();
return R.ok(list);
}
/**
* 查询店员分类列表
*/
@ApiOperation(value = "分页查询分类", notes = "分页查询店员分类信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class, responseContainer = "Page")})
@GetMapping("/list")
public R list(@ApiParam(value = "查询条件") PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
IPage<PlayClerkClassificationInfoEntity> list = playClerkClassificationInfoService.selectPlayClerkClassificationInfoByPage(playClerkClassificationInfo);
IPage<PlayClerkClassificationInfoEntity> list = playClerkClassificationInfoService
.selectPlayClerkClassificationInfoByPage(playClerkClassificationInfo);
return R.ok(list);
}
@@ -63,9 +59,7 @@ public class PlayClerkClassificationInfoController {
*/
@ApiOperation(value = "获取分类详情", notes = "根据ID获取店员分类详细信息")
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkClassificationInfoEntity.class)})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playClerkClassificationInfoService.selectPlayClerkClassificationInfoById(id));
@@ -75,13 +69,11 @@ public class PlayClerkClassificationInfoController {
* 新增店员分类
*/
@ApiOperation(value = "新增分类", notes = "创建新的店员分类信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
@Log(title = "店员分类", businessType = BusinessType.INSERT)
@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);
if (success) {
return R.ok();
@@ -94,13 +86,11 @@ public class PlayClerkClassificationInfoController {
*/
@ApiOperation(value = "修改分类", notes = "根据ID修改店员分类信息")
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@Log(title = "店员分类", businessType = BusinessType.UPDATE)
@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);
boolean success = playClerkClassificationInfoService.update(playClerkClassificationInfo);
if (success) {
@@ -114,9 +104,7 @@ public class PlayClerkClassificationInfoController {
*/
@ApiOperation(value = "删除分类", notes = "根据ID批量删除店员分类信息")
@ApiImplicitParam(name = "ids", value = "分类ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
@Log(title = "店员分类", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -10,15 +10,13 @@ import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.*;
/**
* 陪聊服务项目Controller
@@ -38,25 +36,23 @@ public class PlayClerkCommodityController {
*/
@ApiOperation(value = "查询所有服务项目", notes = "获取所有陪聊服务项目列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityQueryVo.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityQueryVo.class, responseContainer = "List")})
@GetMapping("/listAllCommodity")
public R listAllCommodity() {
List<PlayClerkCommodityEntity> list = playClerkCommodityService.selectAll();
return R.ok(ConvertUtil.entityToVoList(list, PlayClerkCommodityQueryVo.class));
}
/**
* 查询陪聊服务项目列表
*/
@ApiOperation(value = "分页查询服务项目", notes = "分页查询陪聊服务项目列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityEntity.class, responseContainer = "Page")})
@GetMapping("/list")
public R list(@ApiParam(value = "查询条件") PlayClerkCommodityEntity playClerkCommodity) {
IPage<PlayClerkCommodityEntity> list = playClerkCommodityService.selectPlayClerkCommodityByPage(playClerkCommodity);
IPage<PlayClerkCommodityEntity> list = playClerkCommodityService
.selectPlayClerkCommodityByPage(playClerkCommodity);
return R.ok(list);
}
@@ -65,9 +61,7 @@ public class PlayClerkCommodityController {
*/
@ApiOperation(value = "获取服务项目详情", notes = "根据ID获取陪聊服务项目详细信息")
@ApiImplicitParam(name = "id", value = "服务项目ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityEntity.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityEntity.class)})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playClerkCommodityService.selectPlayClerkCommodityById(id));
@@ -77,13 +71,11 @@ public class PlayClerkCommodityController {
* 新增陪聊服务项目
*/
@ApiOperation(value = "新增服务项目", notes = "创建新的陪聊服务项目")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
@Log(title = "陪聊服务项目", businessType = BusinessType.INSERT)
@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);
if (success) {
return R.ok();
@@ -91,19 +83,16 @@ public class PlayClerkCommodityController {
return R.error("添加失败");
}
/**
* 修改陪聊服务项目
*/
@ApiOperation(value = "修改服务项目", notes = "根据ID修改陪聊服务项目信息")
@ApiImplicitParam(name = "id", value = "服务项目ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@Log(title = "陪聊服务项目", businessType = BusinessType.UPDATE)
@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);
boolean success = playClerkCommodityService.update(playClerkCommodity);
if (success) {
@@ -117,9 +106,7 @@ public class PlayClerkCommodityController {
*/
@ApiOperation(value = "删除服务项目", notes = "根据ID批量删除陪聊服务项目")
@ApiImplicitParam(name = "ids", value = "服务项目ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
@Log(title = "陪聊服务项目", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -10,16 +10,14 @@ import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 店员资料审核Controller
*
@@ -34,14 +32,12 @@ public class PlayClerkDataReviewInfoController {
@Resource
private IPlayClerkDataReviewInfoService playClerkDataReviewInfoService;
/**
* 查询店员资料审核列表
*/
@ApiOperation(value = "查询资料审核列表", notes = "分页查询店员资料审核列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkDataReviewReturnVo.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkDataReviewReturnVo.class, responseContainer = "Page")})
@PostMapping("/listByPage")
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkDataReviewQueryVo vo) {
IPage<PlayClerkDataReviewReturnVo> list = playClerkDataReviewInfoService.selectByPage(vo);
@@ -52,13 +48,12 @@ public class PlayClerkDataReviewInfoController {
* 修改店员资料审核
*/
@ApiOperation(value = "修改资料审核状态", notes = "更新店员资料审核状态,通过或拒绝")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
//@PreAuthorize("@customSs.hasPermission('clerk:dataReview:update')")
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
// @PreAuthorize("@customSs.hasPermission('clerk:dataReview:update')")
@Log(title = "店员资料审核", businessType = BusinessType.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);
return R.ok();
}
@@ -68,10 +63,8 @@ public class PlayClerkDataReviewInfoController {
*/
@ApiOperation(value = "删除资料审核记录", notes = "根据ID批量删除店员资料审核记录")
@ApiImplicitParam(name = "ids", value = "审核记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
//@PreAuthorize("@customSs.hasPermission('clerk:dataReview:delete')")
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
// @PreAuthorize("@customSs.hasPermission('clerk:dataReview:delete')")
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -11,16 +11,14 @@ import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 店员等级Controller
*
@@ -39,8 +37,7 @@ public class PlayClerkLevelInfoController {
*/
@ApiOperation(value = "查询所有等级", notes = "获取所有店员等级信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoEntity.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoEntity.class, responseContainer = "List")})
@GetMapping("/listAll")
public R listAll() {
return R.ok(playClerkLevelInfoService.selectAll());
@@ -51,9 +48,7 @@ public class PlayClerkLevelInfoController {
*/
@ApiOperation(value = "获取等级详情", notes = "根据ID获取店员等级详细信息")
@ApiImplicitParam(name = "id", value = "等级ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoEntity.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoEntity.class)})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playClerkLevelInfoService.selectPlayClerkLevelInfoById(id));
@@ -63,10 +58,7 @@ public class PlayClerkLevelInfoController {
* 新增店员等级
*/
@ApiOperation(value = "新增等级", notes = "创建新的店员等级信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
@Log(title = "店员等级", businessType = BusinessType.INSERT)
@PostMapping("/create")
public R create(@ApiParam(value = "等级信息", required = true) @RequestBody PlayClerkLevelAddVo vo) {
@@ -84,10 +76,7 @@ public class PlayClerkLevelInfoController {
* 修改店员等级
*/
@ApiOperation(value = "修改等级", notes = "修改店员等级信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@Log(title = "店员等级", businessType = BusinessType.UPDATE)
@PostMapping(value = "/update")
public R update(@ApiParam(value = "等级信息", required = true) @Validated @RequestBody PlayClerkLevelEditVo vo) {
@@ -103,10 +92,7 @@ public class PlayClerkLevelInfoController {
* 删除店员等级
*/
@ApiOperation(value = "删除最高等级", notes = "删除系统中最高的店员等级")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "最后一级,不允许删除")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "最后一级,不允许删除")})
@Log(title = "店员等级", businessType = BusinessType.DELETE)
@DeleteMapping("delMaxLevel")
public R remove() {

View File

@@ -12,9 +12,8 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.*;
/**
* 店员pkController
@@ -34,8 +33,7 @@ public class PlayClerkPkController {
*/
@ApiOperation(value = "分页查询PK列表", notes = "分页查询店员PK信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkPkEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkPkEntity.class, responseContainer = "Page")})
@GetMapping("/list")
public R list(@ApiParam(value = "查询条件") PlayClerkPkEntity playClerkPk) {
IPage<PlayClerkPkEntity> list = playClerkPkService.selectPlayClerkPkByPage(playClerkPk);
@@ -47,9 +45,7 @@ public class PlayClerkPkController {
*/
@ApiOperation(value = "获取PK详情", notes = "根据ID获取店员PK详细信息")
@ApiImplicitParam(name = "id", value = "PK记录ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkPkEntity.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkPkEntity.class)})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playClerkPkService.selectPlayClerkPkById(id));
@@ -59,10 +55,7 @@ public class PlayClerkPkController {
* 新增店员pk
*/
@ApiOperation(value = "新增PK记录", notes = "创建新的店员PK信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
@Log(title = "店员pk", businessType = BusinessType.INSERT)
@PostMapping("/create")
public R create(@ApiParam(value = "PK信息", required = true) @RequestBody PlayClerkPkEntity playClerkPk) {
@@ -78,13 +71,11 @@ public class PlayClerkPkController {
*/
@ApiOperation(value = "修改PK记录", notes = "根据ID修改店员PK信息")
@ApiImplicitParam(name = "id", value = "PK记录ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@Log(title = "店员pk", businessType = BusinessType.UPDATE)
@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);
boolean success = playClerkPkService.update(playClerkPk);
if (success) {
@@ -98,9 +89,7 @@ public class PlayClerkPkController {
*/
@ApiOperation(value = "删除PK记录", notes = "根据ID批量删除店员PK信息")
@ApiImplicitParam(name = "ids", value = "PK记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
@Log(title = "店员pk", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -10,16 +10,14 @@ import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 店员排行Controller
*
@@ -38,8 +36,7 @@ public class PlayClerkRankingInfoController {
*/
@ApiOperation(value = "查询排行列表", notes = "分页查询店员排行信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = IPlayClerkRankingInfoReturnVo.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = IPlayClerkRankingInfoReturnVo.class, responseContainer = "Page")})
@PostMapping("/listByPage")
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody IPlayClerkRankingInfoQueryVo vo) {
IPage<IPlayClerkRankingInfoReturnVo> list = playClerkRankingInfoService.selectByPage(vo);
@@ -51,9 +48,7 @@ public class PlayClerkRankingInfoController {
*/
@ApiOperation(value = "获取排行详情", notes = "根据ID获取店员排行详细信息")
@ApiImplicitParam(name = "id", value = "排行ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkRankingInfoEntity.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkRankingInfoEntity.class)})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playClerkRankingInfoService.selectPlayClerkRankingInfoById(id));
@@ -63,14 +58,12 @@ public class PlayClerkRankingInfoController {
* 新增店员排行
*/
@ApiOperation(value = "新增排行", notes = "创建新的店员排行记录")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
//@PreAuthorize("@customSs.hasPermission('clerk:ranking:add')")
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
// @PreAuthorize("@customSs.hasPermission('clerk:ranking:add')")
@Log(title = "店员排行", businessType = BusinessType.INSERT)
@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);
if (success) {
return R.ok();
@@ -83,14 +76,12 @@ public class PlayClerkRankingInfoController {
*/
@ApiOperation(value = "修改排行", notes = "根据ID修改店员排行信息")
@ApiImplicitParam(name = "id", value = "排行ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
//@PreAuthorize("@customSs.hasPermission('clerk:ranking:update')")
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
// @PreAuthorize("@customSs.hasPermission('clerk:ranking:update')")
@Log(title = "店员排行", businessType = BusinessType.UPDATE)
@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);
boolean success = playClerkRankingInfoService.update(playClerkRankingInfo);
if (success) {
@@ -104,10 +95,8 @@ public class PlayClerkRankingInfoController {
*/
@ApiOperation(value = "删除排行", notes = "根据ID批量删除店员排行信息")
@ApiImplicitParam(name = "ids", value = "排行ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
//@PreAuthorize("@customSs.hasPermission('clerk:ranking:delete')")
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
// @PreAuthorize("@customSs.hasPermission('clerk:ranking:delete')")
@Log(title = "店员排行", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -10,16 +10,14 @@ import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 店员分类信息Controller
*
@@ -38,8 +36,7 @@ public class PlayClerkTypeInfoController {
*/
@ApiOperation(value = "查询所有分类", notes = "获取所有店员分类信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "List")})
@GetMapping("/listByAll")
public R listByAll() {
return R.ok(playClerkTypeInfoService.selectByAll());
@@ -47,24 +44,19 @@ public class PlayClerkTypeInfoController {
@ApiOperation(value = "分页查询分类", notes = "分页查询店员分类信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "Page")})
@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));
}
/**
/**
* 新增店员分类信息
*
* /** 新增店员分类信息
*/
@ApiOperation(value = "新增分类", notes = "创建新的店员分类信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
@Log(title = "店员分类信息", businessType = BusinessType.INSERT)
@PostMapping("/create")
public R create(@ApiParam(value = "分类信息", required = true) @Validated @RequestBody PlayClerkTypeInfoAddVo vo) {
@@ -80,13 +72,11 @@ public class PlayClerkTypeInfoController {
*/
@ApiOperation(value = "修改分类", notes = "根据ID修改店员分类信息")
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@Log(title = "店员分类信息", businessType = BusinessType.UPDATE)
@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);
boolean success = playClerkTypeInfoService.update(playClerkTypeInfo);
if (success) {
@@ -100,9 +90,7 @@ public class PlayClerkTypeInfoController {
*/
@ApiOperation(value = "删除分类", notes = "根据ID批量删除店员分类信息")
@ApiImplicitParam(name = "ids", value = "分类ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
@Log(title = "店员分类信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -19,17 +19,15 @@ import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 店员Controller
*
@@ -51,8 +49,7 @@ public class PlayClerkUserInfoController {
*/
@ApiOperation(value = "分页查询店员列表", notes = "根据条件分页查询店员列表信息,支持多种筛选条件")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserReturnVo.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserReturnVo.class, responseContainer = "Page")})
@PostMapping("listByPage")
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkUserQueryVo vo) {
IPage<PlayClerkUserReturnVo> list = playClerkUserInfoService.selectByPage(vo);
@@ -65,8 +62,7 @@ public class PlayClerkUserInfoController {
@ApiOperation(value = "按分类查询店员列表", notes = "根据店员分类ID查询所有属于该分类的店员列表")
@ApiImplicitParam(name = "id", value = "店员分类ID", required = true, paramType = "query", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class, responseContainer = "List")})
@GetMapping("listAllByTypeId")
public R listAllByTypeId(@RequestParam("id") String id) {
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByTypeId(id);
@@ -79,8 +75,7 @@ public class PlayClerkUserInfoController {
@ApiOperation(value = "按分组查询店员列表", notes = "根据店员分组ID查询所有属于该分组的店员列表")
@ApiImplicitParam(name = "id", value = "店员分组ID", required = true, paramType = "query", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class, responseContainer = "List")})
@GetMapping("listAllByGroupId")
public R listAllByGroupId(@RequestParam("id") String id) {
List<PlayClerkUserInfoEntity> list = playClerkUserInfoService.listAllByGroupId(id);
@@ -91,12 +86,11 @@ public class PlayClerkUserInfoController {
* 修改店员分类
*/
@ApiOperation(value = "修改店员分类", notes = "将指定店员分配到指定分类中,会先清空该分类下所有店员,再重新分配")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = String.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = String.class)})
@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());
for (PlayClerkUserInfoEntity clerkUserInfo : list) {
PlayClerkUserInfoEntity entity = new PlayClerkUserInfoEntity();
@@ -114,18 +108,15 @@ public class PlayClerkUserInfoController {
return R.ok("成功");
}
/**
* 1、修改店员分组
* 2、将对应账号角色ID设为组长
* 1、修改店员分组 2、将对应账号角色ID设为组长
*/
@ApiOperation(value = "修改店员分组", notes = "将指定店员分配到指定分组中,会先清空该分组下所有店员,再重新分配,并可设置组长")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = String.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = String.class)})
@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());
for (PlayClerkUserInfoEntity clerkUserInfo : list) {
PlayClerkUserInfoEntity entity = new PlayClerkUserInfoEntity();
@@ -140,14 +131,11 @@ public class PlayClerkUserInfoController {
playClerkUserInfoService.update(entity);
}
return R.ok("成功");
}
@ApiOperation(value = "获取简单列表", notes = "获取店员和客户的简单列表信息,用于下拉选择等场景")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class)})
@GetMapping("/simple/list")
public R simpleList() {
List<PlayClerkUserInfoEntity> clerkList = playClerkUserInfoService.simpleList();
@@ -155,14 +143,12 @@ public class PlayClerkUserInfoController {
return R.ok(new JSONObject().fluentPut("clerkList", clerkList).fluentPut("customerList", customerList));
}
/**
* 查询店员列表
*/
@ApiOperation(value = "查询店员列表", notes = "分页查询店员信息列表,支持多种条件筛选,返回详细的店员信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoResultVo.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoResultVo.class, responseContainer = "Page")})
@GetMapping("/list")
public R list(@ApiParam(value = "查询条件") PlayClerkUserInfoQueryVo vo) {
IPage<PlayClerkUserInfoResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
@@ -174,62 +160,59 @@ public class PlayClerkUserInfoController {
*/
@ApiOperation(value = "获取店员详情", notes = "根据店员ID获取店员的详细信息")
@ApiImplicitParam(name = "id", value = "店员ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoEntity.class)})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playClerkUserInfoService.selectById(id));
}
//
// /**
// * 微信端口新增店员
// */
// @Log(title = "店员", businessType = BusinessType.INSERT)
// @PostMapping("/wx/add")
// public R add(@Validated @RequestBody PlayClerkUserAddToWxVo vo) {
// //微信申请成为店员,需要先创建账户。
// PlayUserInfoEntity userInfoEntity = ConvertUtil.entityToVo(vo, PlayUserInfoEntity.class);
// userInfoEntity.setId(IdUtils.getUuid());
// playUserInfoService.create(userInfoEntity);
// //账号创建完成后,创建店员
// PlayClerkUserInfoEntity clerkUserInfoEntity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
// clerkUserInfoEntity.setPlayUserId(userInfoEntity.getId());
// boolean success = playClerkUserInfoService.create(clerkUserInfoEntity);
// if (success) {
// clerkCommodityService.initClerkCommodity(userInfoEntity.getId());
// return R.ok();
// }
// return R.error("添加失败");
// }
//
// /**
// * 微信端口新增店员
// */
// @Log(title = "店员", businessType = BusinessType.INSERT)
// @PostMapping("/wx/add")
// public R add(@Validated @RequestBody PlayClerkUserAddToWxVo vo) {
// //微信申请成为店员,需要先创建账户。
// PlayUserInfoEntity userInfoEntity = ConvertUtil.entityToVo(vo,
// PlayUserInfoEntity.class);
// userInfoEntity.setId(IdUtils.getUuid());
// playUserInfoService.create(userInfoEntity);
// //账号创建完成后,创建店员
// PlayClerkUserInfoEntity clerkUserInfoEntity = ConvertUtil.entityToVo(vo,
// PlayClerkUserInfoEntity.class);
// clerkUserInfoEntity.setPlayUserId(userInfoEntity.getId());
// boolean success = playClerkUserInfoService.create(clerkUserInfoEntity);
// if (success) {
// clerkCommodityService.initClerkCommodity(userInfoEntity.getId());
// return R.ok();
// }
// return R.error("添加失败");
// }
// /**
// * 新增店员
// */
// @Log(title = "店员", businessType = BusinessType.INSERT)
// @PostMapping("/create")
// public R create(@Validated @RequestBody PlayClerkUserAddVo vo) {
// PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
// boolean success = playClerkUserInfoService.create(entity);
// if (success) {
// clerkCommodityService.initClerkCommodity(vo.getPlayUserId());
// return R.ok();
// }
// return R.error("添加失败");
// }
// /**
// * 新增店员
// */
// @Log(title = "店员", businessType = BusinessType.INSERT)
// @PostMapping("/create")
// public R create(@Validated @RequestBody PlayClerkUserAddVo vo) {
// PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo,
// PlayClerkUserInfoEntity.class);
// boolean success = playClerkUserInfoService.create(entity);
// if (success) {
// clerkCommodityService.initClerkCommodity(vo.getPlayUserId());
// return R.ok();
// }
// return R.error("添加失败");
// }
/**
* 修改店员
*/
//@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
// @PreAuthorize("@customSs.hasPermission('clerk:user:update')")
@Log(title = "店员", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改店员信息", notes = "修改店员的基本信息,如昵称、头像、签名等")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@PostMapping(value = "/update")
public R update(@ApiParam(value = "店员信息", required = true) @Validated @RequestBody PlayClerkUserEditVo vo) {
PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
@@ -240,19 +223,16 @@ public class PlayClerkUserInfoController {
return R.error("修改失败");
}
/**
* 修改店员状态
*/
//@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
// @PreAuthorize("@customSs.hasPermission('clerk:user:update')")
@Log(title = "店员", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改店员状态", notes = "修改店员的状态信息,如上下架状态、推荐状态、在线状态等")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@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);
boolean success = playClerkUserInfoService.update(entity);
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)
@ApiOperation(value = "删除店员", notes = "根据ID批量删除店员信息")
@ApiImplicitParam(name = "ids", value = "店员ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {
return R.ok(playClerkUserInfoService.deletePlayClerkUserInfoByIds(ids));

View File

@@ -10,16 +10,14 @@ import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 店员资料审核Controller
*
@@ -38,10 +36,10 @@ public class PlayClerkUserReviewInfoController {
*/
@ApiOperation(value = "查询审核列表", notes = "分页查询店员资料审核列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserReviewReturnVo.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserReviewReturnVo.class, responseContainer = "Page")})
@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);
return R.ok(list);
}
@@ -50,13 +48,12 @@ public class PlayClerkUserReviewInfoController {
* 修改店员资料审核
*/
@ApiOperation(value = "修改审核状态", notes = "更新店员资料审核状态,通过或拒绝")
@ApiResponses({
@ApiResponse(code = 200, message = "修改成功")
})
//@PreAuthorize("@customSs.hasPermission('clerk:userReview:update')")
@ApiResponses({@ApiResponse(code = 200, message = "修改成功")})
// @PreAuthorize("@customSs.hasPermission('clerk:userReview:update')")
@Log(title = "店员资料审核", businessType = BusinessType.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);
return R.ok("修改成功");
}
@@ -66,10 +63,8 @@ public class PlayClerkUserReviewInfoController {
*/
@ApiOperation(value = "删除审核记录", notes = "根据ID批量删除店员资料审核记录")
@ApiImplicitParam(name = "ids", value = "审核记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
//@PreAuthorize("@customSs.hasPermission('clerk:userReview:delete')")
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
// @PreAuthorize("@customSs.hasPermission('clerk:userReview:delete')")
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -8,14 +8,12 @@ import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.*;
/**
* 店员工资明细信息Controller
@@ -35,11 +33,11 @@ public class PlayClerkWagesDetailsInfoController {
*/
@ApiOperation(value = "查询工资明细列表", notes = "分页查询店员工资明细信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkWagesDetailsInfoEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkWagesDetailsInfoEntity.class, responseContainer = "Page")})
@GetMapping("/list")
public R list(@ApiParam(value = "查询条件") PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
IPage<PlayClerkWagesDetailsInfoEntity> list = playClerkWagesDetailsInfoService.selectPlayClerkWagesDetailsInfoByPage(playClerkWagesDetailsInfo);
IPage<PlayClerkWagesDetailsInfoEntity> list = playClerkWagesDetailsInfoService
.selectPlayClerkWagesDetailsInfoByPage(playClerkWagesDetailsInfo);
return R.ok(list);
}
@@ -48,9 +46,7 @@ public class PlayClerkWagesDetailsInfoController {
*/
@ApiOperation(value = "获取工资明细详情", notes = "根据ID获取店员工资明细详细信息")
@ApiImplicitParam(name = "id", value = "工资明细ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkWagesDetailsInfoEntity.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkWagesDetailsInfoEntity.class)})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playClerkWagesDetailsInfoService.selectPlayClerkWagesDetailsInfoById(id));
@@ -60,13 +56,11 @@ public class PlayClerkWagesDetailsInfoController {
* 新增店员工资明细信息
*/
@ApiOperation(value = "新增工资明细", notes = "创建新的店员工资明细记录")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
@Log(title = "店员工资明细信息", businessType = BusinessType.INSERT)
@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);
if (success) {
return R.ok();
@@ -79,13 +73,11 @@ public class PlayClerkWagesDetailsInfoController {
*/
@ApiOperation(value = "修改工资明细", notes = "根据ID修改店员工资明细信息")
@ApiImplicitParam(name = "id", value = "工资明细ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@Log(title = "店员工资明细信息", businessType = BusinessType.UPDATE)
@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);
boolean success = playClerkWagesDetailsInfoService.update(playClerkWagesDetailsInfo);
if (success) {
@@ -99,9 +91,7 @@ public class PlayClerkWagesDetailsInfoController {
*/
@ApiOperation(value = "删除工资明细", notes = "根据ID批量删除店员工资明细信息")
@ApiImplicitParam(name = "ids", value = "工资明细ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
@Log(title = "店员工资明细信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -16,18 +16,16 @@ import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
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.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* 店员工资结算信息Controller
@@ -52,9 +50,7 @@ public class PlayClerkWagesInfoController {
* 查询店员工资结算信息列表
*/
@ApiOperation(value = "查询历史工资列表", notes = "分页查询店员历史工资结算信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Object.class, responseContainer = "Page")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Object.class, responseContainer = "Page")})
@PostMapping("/listByPage")
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkWagesInfoQueryVo vo) {
return R.ok(playClerkWagesInfoService.selectHistoricalByPage(vo));
@@ -65,10 +61,10 @@ public class PlayClerkWagesInfoController {
*/
@ApiOperation(value = "查询未结算工资", notes = "分页查询店员未结算工资信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUnsettledWagesInfoReturnVo.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUnsettledWagesInfoReturnVo.class, responseContainer = "Page")})
@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);
for (PlayClerkUnsettledWagesInfoReturnVo record : page.getRecords()) {
Integer orderState1Number = 0;
@@ -105,13 +101,11 @@ public class PlayClerkWagesInfoController {
return R.ok(page);
}
@ApiOperation(value = "查询工资明细", notes = "根据工资结算ID查询工资明细信息")
@ApiImplicitParam(name = "id", value = "工资结算ID", required = true, paramType = "query", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = ClerkWagesDetailsReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "ID不能为空")
})
@ApiResponse(code = 200, message = "操作成功", response = ClerkWagesDetailsReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "ID不能为空")})
@GetMapping("queryWagesDetailsById")
public R clerkQueryWagesDetails(@RequestParam("id") String id) {
if (StrUtil.isBlankIfStr(id)) {
@@ -125,5 +119,4 @@ public class PlayClerkWagesInfoController {
return R.ok(returnVos);
}
}

View File

@@ -8,16 +8,14 @@ import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import javax.annotation.Resource;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 陪聊点赞动态信息Controller
*
@@ -36,11 +34,11 @@ public class PlayCustomArticleInfoController {
*/
@ApiOperation(value = "查询动态列表", notes = "分页查询陪聊点赞动态信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomArticleInfoEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomArticleInfoEntity.class, responseContainer = "Page")})
@GetMapping("/list")
public R list(@ApiParam(value = "查询条件") PlayCustomArticleInfoEntity playCustomArticleInfo) {
IPage<PlayCustomArticleInfoEntity> list = playCustomArticleInfoService.selectPlayCustomArticleInfoByPage(playCustomArticleInfo);
IPage<PlayCustomArticleInfoEntity> list = playCustomArticleInfoService
.selectPlayCustomArticleInfoByPage(playCustomArticleInfo);
return R.ok(list);
}
@@ -49,9 +47,7 @@ public class PlayCustomArticleInfoController {
*/
@ApiOperation(value = "获取动态详情", notes = "根据ID获取陪聊点赞动态详细信息")
@ApiImplicitParam(name = "id", value = "动态ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomArticleInfoEntity.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayCustomArticleInfoEntity.class)})
@PreAuthorize("@customSs.hasPermission('play:info:query')")
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
@@ -62,14 +58,12 @@ public class PlayCustomArticleInfoController {
* 新增陪聊点赞动态信息
*/
@ApiOperation(value = "新增动态", notes = "创建新的陪聊点赞动态信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
@PreAuthorize("@customSs.hasPermission('play:info:create')")
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.INSERT)
@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);
if (success) {
return R.ok();
@@ -82,14 +76,12 @@ public class PlayCustomArticleInfoController {
*/
@ApiOperation(value = "修改动态", notes = "根据ID修改陪聊点赞动态信息")
@ApiImplicitParam(name = "id", value = "动态ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
@PreAuthorize("@customSs.hasPermission('play:info:edit')")
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.UPDATE)
@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);
boolean success = playCustomArticleInfoService.update(playCustomArticleInfo);
if (success) {
@@ -103,9 +95,7 @@ public class PlayCustomArticleInfoController {
*/
@ApiOperation(value = "删除动态", notes = "根据ID批量删除陪聊点赞动态信息")
@ApiImplicitParam(name = "ids", value = "动态ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.github.yulichang.base.MPJBaseMapper;
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> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
@@ -8,9 +7,8 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoE
* 店员分类Mapper接口
*
* @author admin
* @since 2024-04-06
* @since 2024-04-06
*/
public interface PlayClerkClassificationInfoMapper extends BaseMapper<PlayClerkClassificationInfoEntity> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.github.yulichang.base.MPJBaseMapper;
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> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
@@ -8,9 +7,8 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
* 店员等级Mapper接口
*
* @author admin
* @since 2024-03-30
* @since 2024-03-30
*/
public interface PlayClerkLevelInfoMapper extends BaseMapper<PlayClerkLevelInfoEntity> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.github.yulichang.base.MPJBaseMapper;
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> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.github.yulichang.base.MPJBaseMapper;
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> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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> {
}

View File

@@ -1,17 +1,14 @@
package com.starry.admin.modules.clerk.mapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
/**
* 店员Mapper接口
*
* @author admin
* @since 2024-03-30
* @since 2024-03-30
*/
public interface PlayClerkUserInfoMapper extends MPJBaseMapper<PlayClerkUserInfoEntity> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReviewInfoEntity;
@@ -8,9 +7,8 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReviewInfoEntit
* 店员资料审核Mapper接口
*
* @author admin
* @since 2024-05-19
* @since 2024-05-19
*/
public interface PlayClerkUserReviewInfoMapper extends MPJBaseMapper<PlayClerkUserReviewInfoEntity> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.github.yulichang.base.MPJBaseMapper;
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> {
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.clerk.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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> {
}

View File

@@ -11,10 +11,7 @@ import lombok.Getter;
@AllArgsConstructor
public enum ClerkPkEnum {
TO_BE_STARTED("TO_BE_STARTED", "待开始"),
IN_PROGRESS("IN_PROGRESS", "进行中"),
FINISHED("FINISHED", "已完成"),
;
TO_BE_STARTED("TO_BE_STARTED", "待开始"), IN_PROGRESS("IN_PROGRESS", "进行中"), FINISHED("FINISHED", "已完成"),;
@Getter
private String value;

View File

@@ -2,12 +2,11 @@ package com.starry.admin.modules.clerk.module.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.starry.common.domain.BasePageEntity;
import java.time.LocalDate;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;
/**
* @author admin
* @since 2024/6/7 上午9:49
@@ -26,19 +25,16 @@ public class IPlayClerkRankingInfoQueryVo extends BasePageEntity {
*/
private String historicalStatistics;
/**
* 店员ID
*/
private String clerkId;
/**
* 店员性别
*/
private String sex;
/**
* 统计时间
*/
@@ -46,5 +42,4 @@ public class IPlayClerkRankingInfoQueryVo extends BasePageEntity {
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate settlementDate;
}

View File

@@ -1,11 +1,10 @@
package com.starry.admin.modules.clerk.module.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDate;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @author admin
@@ -34,7 +33,6 @@ public class IPlayClerkRankingInfoReturnVo {
*/
private String clerkSex;
/**
* 店员昵称
*/
@@ -45,7 +43,6 @@ public class IPlayClerkRankingInfoReturnVo {
*/
private String clerkGroupName;
/**
* 排序名次
*/
@@ -95,7 +92,6 @@ public class IPlayClerkRankingInfoReturnVo {
*/
private BigDecimal orderContinueProportion = BigDecimal.ZERO;
/**
* 用户数
*/

View File

@@ -2,11 +2,10 @@ package com.starry.admin.modules.clerk.module.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starry.common.domain.BaseEntity;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 店员头像框对象 play_avatar_frame_info
*
@@ -18,7 +17,6 @@ import java.time.LocalDateTime;
@TableName("play_avatar_frame_info")
public class PlayAvatarFrameInfoEntity extends BaseEntity<PlayAvatarFrameInfoEntity> {
/**
* UUID
*/
@@ -64,5 +62,4 @@ public class PlayAvatarFrameInfoEntity extends BaseEntity<PlayAvatarFrameInfoEnt
*/
private LocalDateTime addTime;
}

View File

@@ -4,11 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starry.admin.common.conf.StringTypeHandler;
import com.starry.common.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 店员动态信息对象 play_clerk_article_info
@@ -21,7 +20,6 @@ import java.util.List;
@TableName(value = "play_clerk_article_info", autoResultMap = true)
public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoEntity> {
/**
* UUID
*/
@@ -42,7 +40,6 @@ public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoE
*/
private String articleCon;
/**
* 动态附件类型0:图片;1:视频;2:音频)
*/
@@ -54,7 +51,6 @@ public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoE
@TableField(typeHandler = StringTypeHandler.class)
private List<String> annexCon;
/**
* 发布时间
*/
@@ -75,5 +71,4 @@ public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoE
*/
private String reviewCon;
}

View File

@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
@TableName("play_clerk_classification_info")
public class PlayClerkClassificationInfoEntity extends BaseEntity<PlayClerkClassificationInfoEntity> {
/**
* UUID
*/
@@ -37,5 +36,4 @@ public class PlayClerkClassificationInfoEntity extends BaseEntity<PlayClerkClass
*/
private Integer sort;
}

View File

@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
@TableName("play_clerk_commodity_info")
public class PlayClerkCommodityEntity extends BaseEntity<PlayClerkCommodityEntity> {
/**
* UUID
*/
@@ -37,7 +36,6 @@ public class PlayClerkCommodityEntity extends BaseEntity<PlayClerkCommodityEntit
*/
private String commodityId;
/**
* 服务项目名称
*/
@@ -49,11 +47,8 @@ public class PlayClerkCommodityEntity extends BaseEntity<PlayClerkCommodityEntit
private Integer sort;
/**
* 服务启动状态
* 0:停用
* 1:启用
* 服务启动状态 0:停用 1:启用
*/
private String enablingState;
}

View File

@@ -13,7 +13,6 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false)
public class PlayClerkDataReviewInfoEditVo {
/**
* UUID
*/
@@ -25,10 +24,7 @@ public class PlayClerkDataReviewInfoEditVo {
private String dataType;
/**
* 审核状态
* 0未审核
* 1审核通过
* 2审核未通过
* 审核状态 0未审核 1审核通过 2审核未通过
*/
private String state;
@@ -37,5 +33,4 @@ public class PlayClerkDataReviewInfoEditVo {
*/
private String remark;
}

View File

@@ -4,11 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starry.admin.utils.ListToStringHandle;
import com.starry.common.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 店员资料审核对象 play_clerk_data_review_info
@@ -21,7 +20,6 @@ import java.util.List;
@TableName(value = "play_clerk_data_review_info", autoResultMap = true)
public class PlayClerkDataReviewInfoEntity extends BaseEntity<PlayClerkDataReviewInfoEntity> {
/**
* UUID
*/

View File

@@ -1,11 +1,10 @@
package com.starry.admin.modules.clerk.module.entity;
import com.starry.common.domain.BasePageEntity;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 店员申请对象 play_clerk_data_review_info
*
@@ -16,13 +15,11 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = false)
public class PlayClerkDataReviewInfoQueryVo extends BasePageEntity {
/**
* UUID
*/
private String id;
/**
* 资料类型[0:店员申请,1:头像;2:相册;3:录音]
*/
@@ -34,10 +31,7 @@ public class PlayClerkDataReviewInfoQueryVo extends BasePageEntity {
private String content;
/**
* 审核状态
* 0未审核
* 1审核通过
* 2审核未通过
* 审核状态 0未审核 1审核通过 2审核未通过
*/
private String state = "0";
@@ -61,5 +55,4 @@ public class PlayClerkDataReviewInfoQueryVo extends BasePageEntity {
*/
private String remark;
}

View File

@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
@TableName("play_clerk_level_info")
public class PlayClerkLevelInfoEntity extends BaseEntity<PlayClerkLevelInfoEntity> {
/**
* UUID
*/
@@ -69,5 +68,5 @@ public class PlayClerkLevelInfoEntity extends BaseEntity<PlayClerkLevelInfoEntit
private Integer styleType;
private String styleImageUrl;
private String styleImageUrl;
}

View File

@@ -2,11 +2,10 @@ package com.starry.admin.modules.clerk.module.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starry.common.domain.BaseEntity;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 店员pk对象 play_clerk_pk
*
@@ -18,7 +17,6 @@ import java.util.Date;
@TableName("play_clerk_pk")
public class PlayClerkPkEntity extends BaseEntity<PlayClerkPkEntity> {
/**
* UUID
*/
@@ -49,7 +47,6 @@ public class PlayClerkPkEntity extends BaseEntity<PlayClerkPkEntity> {
*/
private Date updatedTime;
/**
* 数据版本
*/
@@ -90,5 +87,4 @@ public class PlayClerkPkEntity extends BaseEntity<PlayClerkPkEntity> {
*/
private String status;
}

View File

@@ -3,13 +3,12 @@ package com.starry.admin.modules.clerk.module.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.starry.common.domain.BaseEntity;
import java.math.BigDecimal;
import java.time.LocalDate;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* 店员排行对象 play_clerk_ranking_info
*
@@ -21,7 +20,6 @@ import java.time.LocalDate;
@TableName("play_clerk_ranking_info")
public class PlayClerkRankingInfoEntity extends BaseEntity<PlayClerkRankingInfoEntity> {
/**
* UUID
*/
@@ -37,7 +35,6 @@ public class PlayClerkRankingInfoEntity extends BaseEntity<PlayClerkRankingInfoE
*/
private String clerkId;
/**
* 是否为历史统计(1:是;0:不是)
*/
@@ -123,5 +120,4 @@ public class PlayClerkRankingInfoEntity extends BaseEntity<PlayClerkRankingInfoE
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate settlementDate;
}

View File

@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
@TableName("play_clerk_type_info")
public class PlayClerkTypeInfoEntity extends BaseEntity<PlayClerkTypeInfoEntity> {
/**
* UUID
*/

View File

@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
@TableName("play_clerk_type_user_info")
public class PlayClerkTypeUserInfoEntity extends BaseEntity<PlayClerkTypeUserInfoEntity> {
/**
* UUID
*/

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.clerk.module.entity;
import lombok.Data;
import java.util.List;
import lombok.Data;
/**
* @author admin

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.clerk.module.entity;
import lombok.Data;
import java.util.Date;
import lombok.Data;
/**
* 店员评价信息
@@ -14,13 +13,11 @@ public class PlayClerkUserEvaluateInfoEntity {
private String id;
/**
* 评价人ID
*/
private String evaluatorId;
/**
* 评价人昵称
*/
@@ -41,7 +38,6 @@ public class PlayClerkUserEvaluateInfoEntity {
*/
private Date evaluateTime;
/**
* 订单ID
*/
@@ -72,8 +68,9 @@ public class PlayClerkUserEvaluateInfoEntity {
*/
public Integer 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) {
public PlayClerkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername,
String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clerkUsername,
String commodityId, String commodityName, String commodityUnit) {
this.id = id;
this.evaluatorId = evaluatorId;
this.evaluatorUsername = evaluatorUsername;
@@ -87,7 +84,9 @@ public class PlayClerkUserEvaluateInfoEntity {
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.evaluatorId = evaluatorId;
this.evaluatorUsername = evaluatorUsername;

View File

@@ -6,13 +6,12 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.starry.admin.common.conf.StringTypeHandler;
import com.starry.common.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 店员对象 play_clerk_user_info
@@ -25,7 +24,6 @@ import java.util.List;
@TableName(value = "play_clerk_user_info", autoResultMap = true)
public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity> {
/**
* UUID
*/
@@ -158,7 +156,6 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
*/
private String onboardingState;
/**
* 入职时间
*/
@@ -178,7 +175,6 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
*/
private Integer workingHours = 0;
/**
* 是否推荐状态1已推荐0未推荐
*/
@@ -243,7 +239,6 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
**/
private String alipayImage;
/**
* 创建时间
**/

View File

@@ -3,11 +3,10 @@ package com.starry.admin.modules.clerk.module.entity;
import com.starry.common.domain.BasePageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 店员对象 play_clerk_user_info
*
@@ -43,14 +42,12 @@ public class PlayClerkUserQueryVo extends BasePageEntity {
@ApiModelProperty(value = "分组ID")
private String groupId;
/**
* 性别[0:未知;1:男;2:女]
*/
@ApiModelProperty(value = "性别", notes = "0:未知;1:男;2:女")
private String sex;
/**
* 是否固定等级(0:固定等级1:不固定)
*/
@@ -87,7 +84,6 @@ public class PlayClerkUserQueryVo extends BasePageEntity {
@ApiModelProperty(value = "所在城市", example = "深圳市")
private String city;
/**
* 在职状态1在职0离职
*/
@@ -154,5 +150,4 @@ public class PlayClerkUserQueryVo extends BasePageEntity {
@ApiModelProperty(value = "身份证号")
private String code;
}

View File

@@ -5,13 +5,12 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 店员分页查询对象
@@ -23,7 +22,6 @@ import java.util.List;
@ApiModel(value = "店员详细信息返回对象", description = "分页查询店员详细信息的返回结果")
public class PlayClerkUserReturnVo {
/**
* UUID
*/
@@ -48,21 +46,18 @@ public class PlayClerkUserReturnVo {
@ApiModelProperty(value = "店员等级名称")
private String levelName;
/**
* 分组ID
*/
@ApiModelProperty(value = "分组ID")
private String groupId;
/**
* 分组ID
*/
@ApiModelProperty(value = "分组名称")
private String groupName;
/**
* 性别[0:未知;1:男;2:女]
*/
@@ -195,7 +190,6 @@ public class PlayClerkUserReturnVo {
@ApiModelProperty(value = "添加时间", example = "2024-01-01 12:00:00")
private LocalDateTime addTime;
/**
* 入职时间
*/
@@ -236,19 +230,16 @@ public class PlayClerkUserReturnVo {
@ApiModelProperty(value = "是否固定等级", notes = "0:固定等级1:不固定")
private String fixingLevel;
/**
* 在职状态1在职0离职
*/
@ApiModelProperty(value = "在职状态", notes = "1在职0离职")
private String onboardingState;
/**
* 在职天数
*/
@ApiModelProperty(value = "在职天数", example = "365")
private Integer workingHours = 0;
}

View File

@@ -4,11 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starry.admin.common.conf.StringTypeHandler;
import com.starry.common.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 店员申请对象 play_clerk_user_review_info
@@ -92,7 +91,6 @@ public class PlayClerkUserReviewInfoEntity extends BaseEntity<PlayClerkUserRevie
*/
private LocalDateTime addTime;
/**
* 审核状态0未审核:1审核通过2审核不通过
*/
@@ -113,7 +111,4 @@ public class PlayClerkUserReviewInfoEntity extends BaseEntity<PlayClerkUserRevie
*/
private String reviewCon;
}

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.clerk.module.entity;
import lombok.Data;
import java.util.Date;
import lombok.Data;
/**
* 店员动态
@@ -14,7 +13,6 @@ public class PlayClerkUserTrendsInfoEntity {
private String id;
private String title;
/**
@@ -22,10 +20,8 @@ public class PlayClerkUserTrendsInfoEntity {
*/
private String type;
private String con;
private Date releaseTime;
public PlayClerkUserTrendsInfoEntity(String id, String title, String con, Date releaseTime) {

View File

@@ -2,10 +2,9 @@ package com.starry.admin.modules.clerk.module.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* 店员对象 play_clerk_user_info
@@ -17,7 +16,6 @@ import java.util.List;
@ApiModel(value = "店员分类编辑对象", description = "修改店员分类或分组的参数对象")
public class PlayClerkUserTypeEditVo {
/**
* 店员分类ID
*/
@@ -32,5 +30,4 @@ public class PlayClerkUserTypeEditVo {
@ApiModelProperty(value = "店员ID列表", required = true, notes = "要添加到分类/分组中的店员ID列表")
private List<String> clerkUserIds;
}

View File

@@ -2,11 +2,10 @@ package com.starry.admin.modules.clerk.module.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starry.common.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 店员工资明细信息对象 play_clerk_wages_details_info
@@ -19,7 +18,6 @@ import java.time.LocalDateTime;
@TableName("play_clerk_wages_details_info")
public class PlayClerkWagesDetailsInfoEntity extends BaseEntity<PlayClerkWagesDetailsInfoEntity> {
/**
* UUID
*/
@@ -65,5 +63,4 @@ public class PlayClerkWagesDetailsInfoEntity extends BaseEntity<PlayClerkWagesDe
*/
private LocalDateTime endOrderTime;
}

View File

@@ -3,13 +3,12 @@ package com.starry.admin.modules.clerk.module.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.starry.common.domain.BaseEntity;
import java.math.BigDecimal;
import java.time.LocalDate;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* 店员工资结算信息对象 play_clerk_wages_info
*
@@ -21,7 +20,6 @@ import java.time.LocalDate;
@TableName("play_clerk_wages_info")
public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntity> {
/**
* UUID
*/
@@ -37,7 +35,6 @@ public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntit
*/
private String clerkId;
/**
* 是否为往期统计(1:是;0:不是)
**/
@@ -67,7 +64,6 @@ public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntit
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate endCountDate;
/**
* 结算时间
*/
@@ -110,5 +106,4 @@ public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntit
*/
private BigDecimal estimatedRevenue;
}

View File

@@ -2,11 +2,10 @@ package com.starry.admin.modules.clerk.module.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starry.common.domain.BaseEntity;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 陪聊点赞动态信息对象 play_custom_article_info
*
@@ -18,7 +17,6 @@ import java.time.LocalDateTime;
@TableName("play_custom_article_info")
public class PlayCustomArticleInfoEntity extends BaseEntity<PlayCustomArticleInfoEntity> {
/**
* UUID
*/
@@ -54,11 +52,9 @@ public class PlayCustomArticleInfoEntity extends BaseEntity<PlayCustomArticleInf
*/
private String endorseState;
/**
* 操作类型(1:关注;0:收藏)
*/
private String endorseType;
}

View File

@@ -1,17 +1,16 @@
package com.starry.admin.modules.clerk.module.entity;
import lombok.Data;
/**
* 礼物信息
*
* @author admin
*/
@Data
public class PlayGiftInfoVo {
/**
* 礼物ID
*/
@@ -32,7 +31,6 @@ public class PlayGiftInfoVo {
*/
private Integer number;
/**
* 礼物状态0正常1已下架
*/

View File

@@ -3,12 +3,11 @@ package com.starry.admin.modules.clerk.module.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import javax.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
/**
* @author admin
* @since 2024/6/6 下午11:13

View File

@@ -2,7 +2,6 @@ package com.starry.admin.modules.clerk.module.vo;
import com.starry.common.domain.BasePageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@@ -2,9 +2,8 @@ package com.starry.admin.modules.clerk.module.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* @author admin
@@ -14,11 +13,9 @@ import javax.validation.constraints.NotNull;
@ApiModel(value = "店员头像框赠送参数", description = "赠送头像框给店员的请求参数")
public class PlayAvatarFrameSendVo {
@ApiModelProperty(value = "店员ID", required = true, example = "1", notes = "接收头像框的店员ID")
private String clerkId;
@NotNull(message = "头像框获取方式不能为空")
@ApiModelProperty(value = "头像框ID", required = true, example = "1", notes = "要赠送的头像框ID")
private String avatarFrameId;

View File

@@ -3,14 +3,12 @@ package com.starry.admin.modules.clerk.module.vo;
import com.starry.common.domain.BasePageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* @author admin
* 动态信息查询对象
* @author admin 动态信息查询对象
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -20,7 +18,6 @@ public class PlayClerkArticleQueryVo extends BasePageEntity {
@ApiModelProperty(value = "动态ID", example = "1", notes = "特定动态的ID")
private String 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 = "动态发布时间范围,包含开始和结束时间")
private List<String> releaseTime;
/**
* 顾客ID
*/

View File

@@ -5,15 +5,13 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author admin
* 动态信息查询返回对象
* @author admin 动态信息查询返回对象
*/
@Data
@ApiModel(value = "店员动态返回数据", description = "店员动态信息的返回数据")
@@ -48,7 +46,6 @@ public class PlayClerkArticleReturnVo {
@ApiModelProperty(value = "动态内容", example = "今天天气真好,感谢大家的支持!")
private String articleCon;
/**
* 动态附件类型0:图片;1:视频;2:音频)
*/
@@ -61,7 +58,6 @@ public class PlayClerkArticleReturnVo {
@ApiModelProperty(value = "附件内容", example = "[\"https://example.com/photo1.jpg\"]", notes = "附件内容,根据附件类型有不同格式")
private List<String> annexCon;
/**
* 发布时间
*/

View File

@@ -2,21 +2,18 @@ package com.starry.admin.modules.clerk.module.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;
import lombok.Data;
/**
* @author admin
* 动态审核
* @author admin 动态审核
*/
@Data
@ApiModel(value = "店员动态审核状态修改参数", description = "修改店员动态审核状态的请求参数")
public class PlayClerkArticleReviewStateEditVo {
@NotBlank(message = "ID不能为空")
@ApiModelProperty(value = "动态ID", required = true, example = "1", notes = "店员动态的ID")
private String id;

View File

@@ -1,9 +1,8 @@
package com.starry.admin.modules.clerk.module.vo;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.Data;
/**
* @author admin
@@ -17,11 +16,8 @@ public class PlayClerkCommodityEditVo {
@NotNull(message = "项目类型名称不能为空")
private String commodityType;
/**
* 服务启动状态
* 0:停用
* 1:启用
* 服务启动状态 0:停用 1:启用
*/
@NotNull(message = "服务状态不能为空")
@Pattern(regexp = "[01]", message = "服务状态必须为0或1")

View File

@@ -17,11 +17,8 @@ public class PlayClerkCommodityQueryVo {
@ApiModelProperty(value = "项目类型", example = "1", notes = "服务项目的类型")
private String commodityType;
/**
* 服务启动状态
* 0:停用
* 1:启用
* 服务启动状态 0:停用 1:启用
*/
@ApiModelProperty(value = "启用状态", example = "1", notes = "0:停用,1:启用")
private String enablingState;

View File

@@ -3,11 +3,10 @@ package com.starry.admin.modules.clerk.module.vo;
import com.starry.common.domain.BasePageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 店员资料审核对象 play_clerk_data_review_info
*

Some files were not shown because too many files have changed in this diff Show More