Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop
This commit is contained in:
@@ -57,7 +57,7 @@ public abstract class BaseEntity implements Serializable {
|
||||
|
||||
@CreatedDate
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
private Date createTime;
|
||||
@@ -69,7 +69,7 @@ public abstract class BaseEntity implements Serializable {
|
||||
|
||||
@LastModifiedDate
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
@ApiModelProperty(value = "更新时间", hidden = true)
|
||||
private Date updateTime;
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface Cache<T> {
|
||||
/**
|
||||
* Get an item from the cache, nontransactionally
|
||||
*
|
||||
* @param key
|
||||
* @param key 缓存key
|
||||
* @return the cached object or <tt>null</tt>
|
||||
*/
|
||||
T get(Object key);
|
||||
@@ -27,7 +27,7 @@ public interface Cache<T> {
|
||||
/**
|
||||
* Get an item from the cache, nontransactionally
|
||||
*
|
||||
* @param key
|
||||
* @param key 缓存key
|
||||
* @return the cached object or <tt>null</tt>
|
||||
*/
|
||||
String getString(Object key);
|
||||
@@ -37,14 +37,14 @@ public interface Cache<T> {
|
||||
* multiGet
|
||||
*
|
||||
* @param keys 要查询的key集合
|
||||
* @return
|
||||
* @return 集合
|
||||
*/
|
||||
List multiGet(Collection keys);
|
||||
|
||||
/**
|
||||
* 批量set
|
||||
*
|
||||
* @param map
|
||||
* @param map 键值对
|
||||
*/
|
||||
void multiSet(Map map);
|
||||
|
||||
@@ -60,16 +60,16 @@ public interface Cache<T> {
|
||||
* Add an item to the cache, nontransactionally, with
|
||||
* failfast semantics
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @param key 缓存key
|
||||
* @param value 缓存value
|
||||
*/
|
||||
void put(Object key, T value);
|
||||
|
||||
/**
|
||||
* 往缓存中写入内容
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @param key 缓存key
|
||||
* @param value 缓存value
|
||||
* @param exp 超时时间,单位为秒
|
||||
*/
|
||||
void put(Object key, T value, Long exp);
|
||||
@@ -77,24 +77,24 @@ public interface Cache<T> {
|
||||
/**
|
||||
* 往缓存中写入内容
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @param exp
|
||||
* @param timeUnit 写入单位
|
||||
* @param key 缓存key
|
||||
* @param value 缓存value
|
||||
* @param exp 过期时间
|
||||
* @param timeUnit 过期单位
|
||||
*/
|
||||
void put(Object key, T value, Long exp, TimeUnit timeUnit);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param key
|
||||
* @param key 缓存key
|
||||
*/
|
||||
void remove(Object key);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param key
|
||||
* @param key 缓存key
|
||||
*/
|
||||
void vagueDel(Object key);
|
||||
|
||||
@@ -116,33 +116,34 @@ public interface Cache<T> {
|
||||
/**
|
||||
* 玩缓存中写入内容
|
||||
*
|
||||
* @param key
|
||||
* @param map
|
||||
* @param key 缓存key
|
||||
* @param map map value
|
||||
*/
|
||||
void putAllHash(Object key, Map map);
|
||||
|
||||
/**
|
||||
* 读取缓存值
|
||||
*
|
||||
* @param key
|
||||
* @param hashKey
|
||||
* @return
|
||||
* @param key 缓存key
|
||||
* @param hashKey map value
|
||||
* @return 返回缓存中的数据
|
||||
*/
|
||||
T getHash(Object key, Object hashKey);
|
||||
|
||||
/**
|
||||
* 读取缓存值
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
* @param key 缓存key
|
||||
* @return 缓存中的数据
|
||||
*/
|
||||
Map<Object, Object> getHash(Object key);
|
||||
|
||||
/**
|
||||
* 是否包含
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
* @param key 缓存key
|
||||
* @return 缓存中的数据
|
||||
*
|
||||
*/
|
||||
boolean hasKey(Object key);
|
||||
|
||||
@@ -150,8 +151,8 @@ public interface Cache<T> {
|
||||
/**
|
||||
* 模糊匹配key
|
||||
*
|
||||
* @param pattern
|
||||
* @return
|
||||
* @param pattern 模糊key
|
||||
* @return 缓存中的数据
|
||||
*/
|
||||
List<String> keys(String pattern);
|
||||
|
||||
@@ -163,9 +164,9 @@ public interface Cache<T> {
|
||||
* 效率较高的 计数器
|
||||
* 如需清零,按照普通key 移除即可
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @return
|
||||
* @param key key值
|
||||
* @param value 去重统计值
|
||||
* @return 计数器结果
|
||||
*/
|
||||
Long cumulative(Object key, Object value);
|
||||
|
||||
@@ -175,8 +176,8 @@ public interface Cache<T> {
|
||||
* 效率较高的 计数器 统计返回
|
||||
* 如需清零,按照普通key 移除即可
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
* @param key 计数器key
|
||||
* @return 计数器结果
|
||||
*/
|
||||
Long counter(Object key);
|
||||
|
||||
@@ -184,7 +185,7 @@ public interface Cache<T> {
|
||||
* 批量计数
|
||||
*
|
||||
* @param keys 要查询的key集合
|
||||
* @return
|
||||
* @return 批量计数
|
||||
*/
|
||||
List multiCounter(Collection keys);
|
||||
|
||||
@@ -194,8 +195,8 @@ public interface Cache<T> {
|
||||
* 效率较高的 计数器 统计返回
|
||||
* 如需清零,按照普通key 移除即可
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
* @param key key值
|
||||
* @return 计数器结果
|
||||
*/
|
||||
Long mergeCounter(Object... key);
|
||||
//---------------------------------------------------用于特殊场景,redis去重统计-----------------------------------------
|
||||
@@ -208,7 +209,7 @@ public interface Cache<T> {
|
||||
*
|
||||
* @param key 为累计的key,同一key每次调用则值 +1
|
||||
* @param liveTime 单位秒后失效
|
||||
* @return
|
||||
* @return 计数器结果
|
||||
*/
|
||||
Long incr(String key, long liveTime);
|
||||
//-----------------------------------------------redis计数---------------------------------------------
|
||||
@@ -230,7 +231,7 @@ public interface Cache<T> {
|
||||
* @param sortedSetName sortedSetName
|
||||
* @param start 查询范围开始位置
|
||||
* @param end 查询范围结束位置
|
||||
* @return
|
||||
* @return 获取满足条件的集合
|
||||
*/
|
||||
Set<ZSetOperations.TypedTuple<Object>> reverseRangeWithScores(String sortedSetName, Integer start, Integer end);
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class RedisCache implements Cache {
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param key
|
||||
* @param key 模糊删除key
|
||||
*/
|
||||
@Override
|
||||
public void vagueDel(Object key) {
|
||||
@@ -130,7 +130,7 @@ public class RedisCache implements Cache {
|
||||
* 获取符合条件的key
|
||||
*
|
||||
* @param pattern 表达式
|
||||
* @return
|
||||
* @return 模糊匹配key
|
||||
*/
|
||||
@Override
|
||||
public List<String> keys(String pattern) {
|
||||
@@ -236,7 +236,7 @@ public class RedisCache implements Cache {
|
||||
* @param sortedSetName sortedSetName
|
||||
* @param start 查询范围开始位置
|
||||
* @param end 查询范围结束位置
|
||||
* @return
|
||||
* @return 符合排序的集合
|
||||
*/
|
||||
@Override
|
||||
public Set<ZSetOperations.TypedTuple<Object>> reverseRangeWithScores(String sortedSetName, Integer start, Integer end) {
|
||||
|
||||
@@ -335,7 +335,7 @@ public abstract class BaseElasticsearchService {
|
||||
* @param index index名
|
||||
* @return boolean
|
||||
* @author fanxb
|
||||
* @date 2019/7/24 14:57
|
||||
* @since 2019/7/24 14:57
|
||||
*/
|
||||
public boolean indexExist(String index) {
|
||||
try {
|
||||
|
||||
@@ -5,7 +5,7 @@ package cn.lili.common.enums;
|
||||
* 客户端类型
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/12/8 9:46
|
||||
* @since 2020/12/8 9:46
|
||||
*/
|
||||
|
||||
public enum ClientTypeEnum {
|
||||
|
||||
@@ -5,7 +5,7 @@ package cn.lili.common.enums;
|
||||
* 第一位 1:商品;2:用户;3:交易,4:促销,5:店铺,6:页面,7:设置,8:其他
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/4/8 1:36 下午
|
||||
* @since 2020/4/8 1:36 下午
|
||||
*/
|
||||
public enum ResultCode {
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ public class ResultUtil<T> {
|
||||
/**
|
||||
* 返回数据
|
||||
*
|
||||
* @param t
|
||||
* @return
|
||||
* @param t 范型
|
||||
* @return 消息
|
||||
*/
|
||||
public ResultMessage<T> setData(T t) {
|
||||
this.resultMessage.setResult(t);
|
||||
@@ -58,9 +58,9 @@ public class ResultUtil<T> {
|
||||
|
||||
/**
|
||||
* 抽象静态方法,返回结果集
|
||||
* @param t
|
||||
* @param <T>
|
||||
* @return
|
||||
* @param t 范型
|
||||
* @param <T> 范型
|
||||
* @return 消息
|
||||
*/
|
||||
public static <T> ResultMessage<T> data(T t) {
|
||||
return new ResultUtil<T>().setData(t);
|
||||
@@ -70,6 +70,7 @@ public class ResultUtil<T> {
|
||||
* 返回成功
|
||||
*
|
||||
* @param resultCode 返回状态码
|
||||
* @return 消息
|
||||
*/
|
||||
public static <T> ResultMessage<T> success(ResultCode resultCode) {
|
||||
return new ResultUtil<T>().setSuccessMsg(resultCode);
|
||||
@@ -77,6 +78,7 @@ public class ResultUtil<T> {
|
||||
|
||||
/**
|
||||
* 返回成功
|
||||
* @return 消息
|
||||
*/
|
||||
public static <T> ResultMessage<T> success() {
|
||||
return new ResultUtil<T>().setSuccessMsg(ResultCode.SUCCESS);
|
||||
@@ -86,6 +88,7 @@ public class ResultUtil<T> {
|
||||
* 返回失败
|
||||
*
|
||||
* @param resultCode 返回状态码
|
||||
* @return 消息
|
||||
*/
|
||||
public static <T> ResultMessage<T> error(ResultCode resultCode) {
|
||||
return new ResultUtil<T>().setErrorMsg(resultCode);
|
||||
@@ -96,6 +99,7 @@ public class ResultUtil<T> {
|
||||
*
|
||||
* @param code 状态码
|
||||
* @param msg 返回消息
|
||||
* @return 消息
|
||||
*/
|
||||
public static <T> ResultMessage<T> error(Integer code, String msg) {
|
||||
return new ResultUtil<T>().setErrorMsg(code, msg);
|
||||
@@ -103,8 +107,8 @@ public class ResultUtil<T> {
|
||||
|
||||
/**
|
||||
* 服务器异常 追加状态码
|
||||
*
|
||||
* @param resultCode 返回码
|
||||
* @return 消息
|
||||
*/
|
||||
public ResultMessage<T> setErrorMsg(ResultCode resultCode) {
|
||||
this.resultMessage.setSuccess(false);
|
||||
@@ -118,6 +122,7 @@ public class ResultUtil<T> {
|
||||
*
|
||||
* @param code 状态码
|
||||
* @param msg 返回消息
|
||||
* @return 消息
|
||||
*/
|
||||
public ResultMessage<T> setErrorMsg(Integer code, String msg) {
|
||||
this.resultMessage.setSuccess(false);
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.util.Map;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/12/24 19:31
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
package cn.lili.common.security.context;
|
||||
|
||||
import cn.lili.common.security.AuthUser;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 获取用户信息 处理
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/14 20:35
|
||||
*/
|
||||
@Component
|
||||
public class AuthenticationHandler {
|
||||
|
||||
/**
|
||||
* 获取当前用户信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public AuthUser getAuthUser() {
|
||||
//获取spring security 权限信息,如果token有权限,在这里就会得到内容
|
||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
if (authentication == null) {
|
||||
return null;
|
||||
}
|
||||
Object object = authentication.getDetails();
|
||||
if (object instanceof AuthUser) {
|
||||
return (AuthUser) authentication.getDetails();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/14 20:27
|
||||
*/
|
||||
public class UserContext {
|
||||
@@ -27,7 +26,7 @@ public class UserContext {
|
||||
/**
|
||||
* 根据request获取用户信息
|
||||
*
|
||||
* @return
|
||||
* @return 授权用户
|
||||
*/
|
||||
public static AuthUser getCurrentUser() {
|
||||
if (RequestContextHolder.getRequestAttributes() != null) {
|
||||
@@ -44,7 +43,7 @@ public class UserContext {
|
||||
*
|
||||
* @param cache 缓存
|
||||
* @param accessToken token
|
||||
* @return
|
||||
* @return 授权用户
|
||||
*/
|
||||
public static AuthUser getAuthUser(Cache cache, String accessToken) {
|
||||
try {
|
||||
@@ -61,7 +60,7 @@ public class UserContext {
|
||||
* 根据jwt获取token重的用户信息
|
||||
*
|
||||
* @param accessToken token
|
||||
* @return
|
||||
* @return 授权用户
|
||||
*/
|
||||
public static AuthUser getAuthUser(String accessToken) {
|
||||
try {
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
package cn.lili.common.security.context;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 给予用户上下文,初始化参数
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/14 20:30
|
||||
*/
|
||||
@Component
|
||||
public class UserContextInit implements ApplicationRunner {
|
||||
|
||||
/**
|
||||
* 用户信息holder,认证信息的获取者
|
||||
*/
|
||||
@Autowired
|
||||
private AuthenticationHandler authenticationHandler;
|
||||
|
||||
/**
|
||||
* 在项目加载时指定认证信息获取者
|
||||
* 默认是由spring 安全上下文中获取
|
||||
*
|
||||
* @param args
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
//UserContext.setHolder(authenticationHandler);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ package cn.lili.common.security.enums;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v1.0
|
||||
* @Description:
|
||||
* @since 2020/8/18 15:23
|
||||
*/
|
||||
public enum UserEnums {
|
||||
|
||||
@@ -8,7 +8,6 @@ import java.util.Map;
|
||||
/**
|
||||
* @author Chopper
|
||||
* @version v4.1
|
||||
* @Description:
|
||||
* @since 2021/2/1 6:05 下午
|
||||
*/
|
||||
public interface AliSmsUtil {
|
||||
|
||||
@@ -10,7 +10,6 @@ import java.util.Map;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/30 15:44
|
||||
*/
|
||||
public interface SmsUtil {
|
||||
|
||||
@@ -40,7 +40,6 @@ import java.util.Map;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/30 15:44
|
||||
*/
|
||||
@Component
|
||||
@@ -343,10 +342,9 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
|
||||
|
||||
|
||||
/**
|
||||
* 使用AK&SK初始化账号Client
|
||||
* 初始化账号Client
|
||||
*
|
||||
* @return Client
|
||||
* @throws Exception
|
||||
* @return Client 短信操作util
|
||||
*/
|
||||
public com.aliyun.dysmsapi20170525.Client createClient() {
|
||||
try {
|
||||
|
||||
@@ -5,7 +5,6 @@ package cn.lili.common.token;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/25 09:21
|
||||
*/
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ public class TokenUtil {
|
||||
* @param username 主体
|
||||
* @param claim 私有声明
|
||||
* @param longTerm 长时间特殊token 如:移动端,微信小程序等
|
||||
* @return
|
||||
* @param userEnums 用户枚举
|
||||
* @return TOKEN
|
||||
*/
|
||||
public Token createToken(String username, Object claim, boolean longTerm, UserEnums userEnums) {
|
||||
Token token = new Token();
|
||||
@@ -61,6 +62,7 @@ public class TokenUtil {
|
||||
* 刷新token
|
||||
*
|
||||
* @param oldRefreshToken 刷新token
|
||||
* @param userEnums 用户枚举
|
||||
* @return token
|
||||
*/
|
||||
public Token refreshToken(String oldRefreshToken, UserEnums userEnums) {
|
||||
@@ -118,7 +120,7 @@ public class TokenUtil {
|
||||
* @param username 主体
|
||||
* @param claim 私有神明内容
|
||||
* @param expirationTime 过期时间(分钟)
|
||||
* @return
|
||||
* @return token字符串
|
||||
*/
|
||||
private String createToken(String username, Object claim, Long expirationTime) {
|
||||
//JWT 生成
|
||||
|
||||
@@ -18,7 +18,7 @@ public abstract class AbstractTokenGenerate {
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param longTerm 是否长时间有效
|
||||
* @return
|
||||
* @return TOKEN对象
|
||||
*/
|
||||
public abstract Token createToken(String username, Boolean longTerm);
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.Map;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/16 10:51
|
||||
*/
|
||||
@Component
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.util.Date;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/16 10:50
|
||||
*/
|
||||
@Component
|
||||
|
||||
@@ -9,8 +9,7 @@ import org.springframework.stereotype.Component;
|
||||
*
|
||||
* @author paulG
|
||||
* @version v4.1
|
||||
* @date 2020/11/17 7:19 下午
|
||||
* @description
|
||||
* @since 2020/11/17 7:19 下午
|
||||
* @since 1
|
||||
*/
|
||||
@Component
|
||||
|
||||
@@ -4,7 +4,6 @@ package cn.lili.common.trigger.enums;
|
||||
* 队列枚举
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/7/9 1:40 上午
|
||||
*/
|
||||
public enum DelayQueueEnums {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Date;
|
||||
* 直播消息实体
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/6/1 4:48 下午
|
||||
* @since: 2021/6/1 4:48 下午
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Date;
|
||||
* 信息队列传输促销信息实体
|
||||
*
|
||||
* @author paulG
|
||||
* @date 2020/10/30
|
||||
* @since 2020/10/30
|
||||
**/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -15,8 +15,8 @@ public class BeanUtil {
|
||||
/**
|
||||
* 复制属性
|
||||
*
|
||||
* @param objectFrom
|
||||
* @param objectTo
|
||||
* @param objectFrom 源自对象
|
||||
* @param objectTo 复制给对象
|
||||
*/
|
||||
public static void copyProperties(Object objectFrom, Object objectTo) {
|
||||
BeanUtils.copyProperties(objectFrom, objectTo);
|
||||
@@ -25,6 +25,8 @@ public class BeanUtil {
|
||||
|
||||
/**
|
||||
* 获取属性名数组
|
||||
* @param o 获取字段的对象
|
||||
* @return 返回各个字段
|
||||
*/
|
||||
public static String[] getFiledName(Object o) {
|
||||
Field[] fields = o.getClass().getDeclaredFields();
|
||||
@@ -67,6 +69,8 @@ public class BeanUtil {
|
||||
/**
|
||||
* 将对象转换为key value
|
||||
* A=a&B=b&C=c 格式
|
||||
* @param object 对象
|
||||
* @return 格式化结果
|
||||
*/
|
||||
public static String formatKeyValuePair(Object object) {
|
||||
//准备接受的字符串
|
||||
@@ -91,6 +95,10 @@ public class BeanUtil {
|
||||
/**
|
||||
* key value键值对 转换为 对象
|
||||
* A=a&B=b&C=c 格式 转换为对象
|
||||
* @param str 对象字符串
|
||||
* @param t 范型
|
||||
* @param <T> 范型
|
||||
* @return 格式化结果
|
||||
*/
|
||||
public static <T> T formatKeyValuePair(String str, T t) {
|
||||
//填写对参数键值对
|
||||
|
||||
@@ -11,8 +11,8 @@ public class CommonUtil {
|
||||
|
||||
/**
|
||||
* 以UUID重命名
|
||||
* @param fileName
|
||||
* @return
|
||||
* @param fileName 文件名称
|
||||
* @return 格式化名称
|
||||
*/
|
||||
public static String rename(String fileName) {
|
||||
String extName = fileName.substring(fileName.lastIndexOf("."));
|
||||
@@ -32,20 +32,4 @@ public class CommonUtil {
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量递归删除时 判断target是否在ids中 避免重复删除
|
||||
* @param target
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public static Boolean judgeIds(String target, String[] ids){
|
||||
Boolean flag = false;
|
||||
for(String id : ids){
|
||||
if(id.equals(target)){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.math.BigDecimal;
|
||||
* 金额计算工具
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/7/9 1:40 上午
|
||||
* @since: 2021/7/9 1:40 上午
|
||||
*/
|
||||
public final class CurrencyUtil {
|
||||
/**
|
||||
@@ -130,8 +130,8 @@ public final class CurrencyUtil {
|
||||
/**
|
||||
* 金额转分
|
||||
*
|
||||
* @param money
|
||||
* @return
|
||||
* @param money 金额
|
||||
* @return 转换单位为分
|
||||
*/
|
||||
public static Integer fen(Double money) {
|
||||
double price = mul(money, 100);
|
||||
@@ -141,15 +141,11 @@ public final class CurrencyUtil {
|
||||
/**
|
||||
* 金额转分
|
||||
*
|
||||
* @param money
|
||||
* @return
|
||||
* @param money 金额
|
||||
* @return double类型分
|
||||
*/
|
||||
public static double reversalFen(Double money) {
|
||||
double price = div(money, 100);
|
||||
return price;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(fen(23.4324));
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class DateUtil {
|
||||
/**
|
||||
* 当天的开始时间
|
||||
*
|
||||
* @return
|
||||
* @return 今天开始时间
|
||||
*/
|
||||
public static Date startOfTodDayTime() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
@@ -36,8 +36,8 @@ public class DateUtil {
|
||||
|
||||
/**
|
||||
* 当天的开始时间
|
||||
*
|
||||
* @return
|
||||
* @param date 时间
|
||||
* @return 根据传入的时间获取开始时间
|
||||
*/
|
||||
public static Date startOfTodDayTime(Date date) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
@@ -51,7 +51,7 @@ public class DateUtil {
|
||||
/**
|
||||
* 当天的开始时间
|
||||
*
|
||||
* @return
|
||||
* @return 今天开始时间
|
||||
*/
|
||||
public static long startOfTodDay() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
@@ -63,14 +63,10 @@ public class DateUtil {
|
||||
return date.getTime() / 1000;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 当天的结束时间
|
||||
*
|
||||
* @return
|
||||
* @return 今天结束时间
|
||||
*/
|
||||
public static Date endOfDate() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
@@ -83,8 +79,8 @@ public class DateUtil {
|
||||
|
||||
/**
|
||||
* 当天的结束时间
|
||||
*
|
||||
* @return
|
||||
* @param date 传入日期
|
||||
* @return 获得传入日期当天结束时间
|
||||
*/
|
||||
public static Date endOfDate(Date date) {
|
||||
if (date == null) {
|
||||
@@ -125,7 +121,7 @@ public class DateUtil {
|
||||
*
|
||||
* @param date 字符串日期
|
||||
* @param pattern 日期格式
|
||||
* @return
|
||||
* @return date
|
||||
*/
|
||||
public static Date toDate(String date, String pattern) {
|
||||
if ("".equals("" + date)) {
|
||||
@@ -148,7 +144,7 @@ public class DateUtil {
|
||||
/**
|
||||
* 获取上个月的开始结束时间
|
||||
*
|
||||
* @return
|
||||
* @return 上个月的开始结束时间
|
||||
*/
|
||||
public static Long[] getLastMonth() {
|
||||
//取得系统当前时间
|
||||
@@ -198,7 +194,7 @@ public class DateUtil {
|
||||
* 把日期转换成字符串型
|
||||
*
|
||||
* @param date 日期
|
||||
* @return
|
||||
* @return 字符串时间
|
||||
*/
|
||||
public static String toString(Date date) {
|
||||
return toString(date, STANDARD_FORMAT);
|
||||
@@ -207,8 +203,8 @@ public class DateUtil {
|
||||
/**
|
||||
* 把日期转换成字符串型
|
||||
*
|
||||
* @param Long 日期
|
||||
* @return
|
||||
* @param date 日期
|
||||
* @return 字符串时间
|
||||
*/
|
||||
public static String toString(Long date) {
|
||||
return toString(date, STANDARD_FORMAT);
|
||||
@@ -219,7 +215,7 @@ public class DateUtil {
|
||||
*
|
||||
* @param date 日期
|
||||
* @param pattern 类型
|
||||
* @return
|
||||
* @return 字符串时间
|
||||
*/
|
||||
public static String toString(Date date, String pattern) {
|
||||
if (date == null) {
|
||||
@@ -243,7 +239,7 @@ public class DateUtil {
|
||||
*
|
||||
* @param time 时间戳
|
||||
* @param pattern 格式
|
||||
* @return
|
||||
* @return 字符串时间
|
||||
*/
|
||||
public static String toString(Long time, String pattern) {
|
||||
if (time > 0) {
|
||||
@@ -251,8 +247,7 @@ public class DateUtil {
|
||||
time = time * 1000;
|
||||
}
|
||||
Date date = new Date(time);
|
||||
String str = DateUtil.toString(date, pattern);
|
||||
return str;
|
||||
return DateUtil.toString(date, pattern);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@@ -321,7 +316,7 @@ public class DateUtil {
|
||||
* 获取几个月之前的日期时间戳
|
||||
*
|
||||
* @param beforeMonth 几个月之前
|
||||
* @return
|
||||
* @return 时间戳
|
||||
*/
|
||||
public static long getBeforeMonthDateline(int beforeMonth) {
|
||||
SimpleDateFormat format = new SimpleDateFormat(STANDARD_FORMAT);
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.Map;
|
||||
* HttpClientUtils
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/7/9 1:40 上午
|
||||
* @since: 2021/7/9 1:40 上午
|
||||
*/
|
||||
@Slf4j
|
||||
public class HttpClientUtils {
|
||||
|
||||
@@ -40,8 +40,8 @@ public class IpHelper {
|
||||
/**
|
||||
* 获取IP返回地理信息
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
* @param request 请求参数
|
||||
* @return 城市信息
|
||||
*/
|
||||
public String getIpCity(HttpServletRequest request) {
|
||||
|
||||
|
||||
@@ -14,29 +14,32 @@ public class JasyptUtil {
|
||||
* Jasypt生成加密结果
|
||||
* @param password 配置文件中设定的加密密码 jasypt.encryptor.password
|
||||
* @param value 待加密值
|
||||
* @return
|
||||
* @return 加密字符串
|
||||
*/
|
||||
public static String encyptPwd(String password,String value){
|
||||
public static String encryptPwd(String password, String value){
|
||||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
encryptor.setConfig(cryptor(password));
|
||||
String result = encryptor.encrypt(value);
|
||||
return result;
|
||||
encryptor.setConfig(encryptor(password));
|
||||
return encryptor.encrypt(value);
|
||||
}
|
||||
/**
|
||||
* 解密
|
||||
* @param password 配置文件中设定的加密密码 jasypt.encryptor.password
|
||||
* @param value 待解密密文
|
||||
* @return
|
||||
* @return 揭秘字符串
|
||||
*/
|
||||
public static String decyptPwd(String password,String value){
|
||||
public static String decryptPwd(String password, String value){
|
||||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
encryptor.setConfig(cryptor(password));
|
||||
encryptor.setConfig(encryptor(password));
|
||||
encryptor.decrypt(value);
|
||||
String result = encryptor.decrypt(value);
|
||||
return result;
|
||||
return encryptor.decrypt(value);
|
||||
}
|
||||
|
||||
public static SimpleStringPBEConfig cryptor(String password){
|
||||
/**
|
||||
* 加密处理
|
||||
* @param password 密码
|
||||
* @return 加密字符串
|
||||
*/
|
||||
public static SimpleStringPBEConfig encryptor(String password){
|
||||
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
||||
config.setPassword(password);
|
||||
config.setAlgorithm("PBEWITHHMACSHA512ANDAES_256");
|
||||
@@ -52,8 +55,8 @@ public class JasyptUtil {
|
||||
public static void main(String[] args){
|
||||
|
||||
//加密 若修改了第一个参数加密password记得在配置文件同步修改
|
||||
System.out.println(encyptPwd("jasypt.encryptor.password","123456"));
|
||||
System.out.println(encryptPwd("jasypt.encryptor.password","123456"));
|
||||
//解密
|
||||
System.out.println(decyptPwd("jasypt.encryptor.password","PYVnAYh+j5C3jkMV1d+myj6JzDaUk7pcfTWUaYsvQdEVkuvIVf7Y0mOU9XkffxT8"));
|
||||
System.out.println(decryptPwd("jasypt.encryptor.password","PYVnAYh+j5C3jkMV1d+myj6JzDaUk7pcfTWUaYsvQdEVkuvIVf7Y0mOU9XkffxT8"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ public class OperationalJudgment<t> {
|
||||
* 需要判定的对象必须包含属性 memberId,storeId 代表判定的角色
|
||||
*
|
||||
* @param object 判定的对象
|
||||
* @param <t>
|
||||
* @return
|
||||
* @param <t> 判定处理对象
|
||||
* @return 处理结果
|
||||
*/
|
||||
public static <t> t judgment(t object) {
|
||||
return judgment(object, "memberId", "storeId");
|
||||
@@ -28,10 +28,10 @@ public class OperationalJudgment<t> {
|
||||
/**
|
||||
* 需要判定的对象必须包含属性 memberId,storeId 代表判定的角色
|
||||
*
|
||||
* @param object
|
||||
* @param buyerIdField
|
||||
* @param storeIdField
|
||||
* @param <t>
|
||||
* @param object 判定对象
|
||||
* @param buyerIdField 买家id
|
||||
* @param storeIdField 店铺id
|
||||
* @param <t> 范型
|
||||
* @return 返回判定本身,防止多次查询对象
|
||||
*/
|
||||
public static <t> t judgment(t object, String buyerIdField, String storeIdField) {
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.util.List;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/26 15:23
|
||||
*/
|
||||
public class PageUtil {
|
||||
@@ -26,8 +25,9 @@ public class PageUtil {
|
||||
/**
|
||||
* Mybatis-Plus分页封装
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
* @param page 分页VO
|
||||
* @param <T> 范型
|
||||
* @return 分页响应
|
||||
*/
|
||||
public static <T> Page<T> initPage(PageVO page) {
|
||||
|
||||
@@ -74,8 +74,8 @@ public class PageUtil {
|
||||
* 生成条件搜索 全对象对比 equals
|
||||
* 如果需要like 需要另行处理
|
||||
*
|
||||
* @param object
|
||||
* @return
|
||||
* @param object 对象(根据对象构建查询条件)
|
||||
* @return 查询wrapper
|
||||
*/
|
||||
public static <T> QueryWrapper<T> initWrapper(Object object) {
|
||||
return initWrapper(object, null);
|
||||
@@ -84,9 +84,9 @@ public class PageUtil {
|
||||
/**
|
||||
* 生成条件搜索 全对象对比
|
||||
*
|
||||
* @param object
|
||||
* @param searchVo
|
||||
* @return
|
||||
* @param object 对象
|
||||
* @param searchVo 查询条件
|
||||
* @return 查询wrapper
|
||||
*/
|
||||
public static <T> QueryWrapper<T> initWrapper(Object object, SearchVO searchVo) {
|
||||
QueryWrapper<T> queryWrapper = new QueryWrapper<>();
|
||||
@@ -118,9 +118,9 @@ public class PageUtil {
|
||||
/**
|
||||
* List 手动分页
|
||||
*
|
||||
* @param page
|
||||
* @param list
|
||||
* @return
|
||||
* @param page 分页对象
|
||||
* @param list 分页集合
|
||||
* @return 范型结果
|
||||
*/
|
||||
public static <T> List<T> listToPage(PageVO page, List<T> list) {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class RedisUtil {
|
||||
*
|
||||
* @param key 键
|
||||
* @param time 时间(秒)
|
||||
* @return
|
||||
* @return 操作结果
|
||||
*/
|
||||
public boolean expire(String key, long time) {
|
||||
try {
|
||||
@@ -133,7 +133,7 @@ public class RedisUtil {
|
||||
*
|
||||
* @param key 键
|
||||
* @param value 值
|
||||
* @return
|
||||
* @return 操作结果
|
||||
*/
|
||||
public boolean lSet(String key, Object value) {
|
||||
try {
|
||||
@@ -151,7 +151,7 @@ public class RedisUtil {
|
||||
* @param key 键
|
||||
* @param value 值
|
||||
* @param time 时间(秒)
|
||||
* @return
|
||||
* @return 操作结果
|
||||
*/
|
||||
public boolean lSet(String key, Object value, long time) {
|
||||
try {
|
||||
@@ -171,7 +171,7 @@ public class RedisUtil {
|
||||
*
|
||||
* @param key 键
|
||||
* @param value 值
|
||||
* @return
|
||||
* @return 操作结果
|
||||
*/
|
||||
public boolean lSet(String key, List<Object> value) {
|
||||
try {
|
||||
@@ -190,7 +190,7 @@ public class RedisUtil {
|
||||
* @param key 键
|
||||
* @param value 值
|
||||
* @param time 时间(秒)
|
||||
* @return
|
||||
* @return 操作结果
|
||||
*/
|
||||
public boolean lSet(String key, List<Object> value, long time) {
|
||||
try {
|
||||
@@ -211,10 +211,10 @@ public class RedisUtil {
|
||||
/**
|
||||
* 向Zset里添加成员
|
||||
*
|
||||
* @param key
|
||||
* @param score
|
||||
* @param value
|
||||
* @return
|
||||
* @param key 键
|
||||
* @param score 分数
|
||||
* @param value 值
|
||||
* @return 操作结果
|
||||
*/
|
||||
public boolean zadd(String key, long score, String value) {
|
||||
return redisTemplate.opsForZSet().add(key, value, score);
|
||||
@@ -225,10 +225,10 @@ public class RedisUtil {
|
||||
/**
|
||||
* 获取 某key 下 某一分值区间的队列
|
||||
*
|
||||
* @param key
|
||||
* @param from
|
||||
* @param to
|
||||
* @return
|
||||
* @param key 键
|
||||
* @param from 起始位置
|
||||
* @param to 结束为止
|
||||
* @return 符合条件的结果集
|
||||
*/
|
||||
public Set<DefaultTypedTuple> zrangeByScoreWithScores(String key, int from, long to) {
|
||||
Set<DefaultTypedTuple> set = redisTemplate.opsForZSet().rangeByScoreWithScores(key, from, to);
|
||||
@@ -238,9 +238,9 @@ public class RedisUtil {
|
||||
/**
|
||||
* 移除 Zset队列值
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @return
|
||||
* @param key 键
|
||||
* @param value 值集合
|
||||
* @return 移除数量
|
||||
*/
|
||||
public Long zremove(String key, String... value) {
|
||||
return redisTemplate.opsForZSet().remove(key, value);
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.regex.Pattern;
|
||||
* 支持手机号+电话同时校验
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/7/9 1:41 上午
|
||||
* @since: 2021/7/9 1:41 上午
|
||||
*/
|
||||
public class MobileValidator implements ConstraintValidator<Mobile, String> {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.regex.Pattern;
|
||||
* 手机号校验
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/7/9 1:42 上午
|
||||
* @since: 2021/7/9 1:42 上午
|
||||
*/
|
||||
public class PhoneValidator implements ConstraintValidator<Phone, String> {
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ public class ImageUtil {
|
||||
/**
|
||||
* 添加水印
|
||||
*
|
||||
* @param oriImage
|
||||
* @param text
|
||||
* @throws IOException
|
||||
* @param oriImage 原图
|
||||
* @param text 文字
|
||||
* @throws IOException 流操作异常
|
||||
*/
|
||||
public static void addWatermark(BufferedImage oriImage, String text) {
|
||||
Graphics2D graphics2D = oriImage.createGraphics();
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.util.Random;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/17 14:34
|
||||
*/
|
||||
@Component
|
||||
|
||||
@@ -10,7 +10,6 @@ import org.springframework.stereotype.Component;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/17 15:43
|
||||
*/
|
||||
@Component
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Map;
|
||||
* 验证码模块
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/7/9 1:42 上午
|
||||
* @since: 2021/7/9 1:42 上午
|
||||
*/
|
||||
public interface VerificationService {
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,6 @@ import java.io.Serializable;
|
||||
* 查询参数
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 14:43
|
||||
*/
|
||||
@Data
|
||||
public class PageVO implements Serializable {
|
||||
|
||||
@@ -9,7 +9,6 @@ import java.io.Serializable;
|
||||
* 前后端交互VO
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 14:40
|
||||
*/
|
||||
@Data
|
||||
public class ResultMessage<T> implements Serializable {
|
||||
|
||||
@@ -15,7 +15,6 @@ import java.util.Date;
|
||||
* 日期搜索参数
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 14:43
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -10,7 +10,6 @@ import java.io.InputStream;
|
||||
* 序列化的input stream
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2021-03-25 16:32
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
|
||||
@@ -11,7 +11,6 @@ import java.nio.charset.Charset;
|
||||
* 要实现对象的缓存,定义自己的序列化和反序列化器。使用阿里的fastjson来实现的比较多
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/7/9 12:25 上午
|
||||
*/
|
||||
public class FastJsonRedisSerializer<T> implements RedisSerializer<T> {
|
||||
private static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
|
||||
|
||||
@@ -36,7 +36,6 @@ import java.util.Map;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2021/3/20 09:37
|
||||
*/
|
||||
|
||||
@@ -54,8 +53,8 @@ public class RedisConfig extends CachingConfigurerSupport {
|
||||
/**
|
||||
* 当有多个管理器的时候,必须使用该注解在一个管理器上注释:表示该管理器为默认的管理器
|
||||
*
|
||||
* @param connectionFactory
|
||||
* @return
|
||||
* @param connectionFactory 链接工厂
|
||||
* @return 缓存
|
||||
*/
|
||||
@Bean
|
||||
@Primary
|
||||
|
||||
@@ -12,7 +12,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/12/9 10:44
|
||||
*/
|
||||
public class ThreadContextHolderInterceptorAdapter extends HandlerInterceptorAdapter {
|
||||
@@ -21,11 +20,11 @@ public class ThreadContextHolderInterceptorAdapter extends HandlerInterceptorAda
|
||||
/**
|
||||
* 拦截request和response并放到上下文中
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param handler
|
||||
* @return
|
||||
* @throws Exception
|
||||
* @param request 请求
|
||||
* @param response 响应
|
||||
* @param handler 处理程序
|
||||
* @return 处理结果
|
||||
* @throws Exception 未知异常
|
||||
*/
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request,
|
||||
@@ -41,11 +40,11 @@ public class ThreadContextHolderInterceptorAdapter extends HandlerInterceptorAda
|
||||
/**
|
||||
* 从上下文中移除 request 和response
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param handler
|
||||
* @param ex
|
||||
* @throws Exception
|
||||
* @param request 请求
|
||||
* @param response 响应
|
||||
* @param handler 处理程序
|
||||
* @param ex 异常
|
||||
* @throws Exception 完成之前处理异常
|
||||
*/
|
||||
@Override
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, @Nullable Exception ex) throws Exception {
|
||||
|
||||
@@ -32,7 +32,8 @@ public class UrlConfiguration implements WebMvcConfigurer {
|
||||
|
||||
/**
|
||||
* 开放资源 这里配置swagger可以在前端访问
|
||||
* @param registry
|
||||
*
|
||||
* @param registry 资源处理
|
||||
*/
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import org.springframework.context.annotation.Configuration;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2021/2/21 10:19
|
||||
*/
|
||||
@Data
|
||||
|
||||
@@ -9,7 +9,6 @@ import cn.lili.modules.connect.exception.AuthException;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/12/4 12:17
|
||||
*/
|
||||
public interface ConnectAuth {
|
||||
|
||||
@@ -6,7 +6,6 @@ package cn.lili.modules.connect.config;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/12/4 14:10
|
||||
*/
|
||||
public enum ConnectAuthEnum implements ConnectAuth {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class Connect implements Serializable {
|
||||
|
||||
@CreatedDate
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
private Date createTime;
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.io.Serializable;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/12/4 23:48
|
||||
*/
|
||||
@Data
|
||||
|
||||
@@ -5,7 +5,6 @@ package cn.lili.modules.connect.entity.enums;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/25 18:20
|
||||
*/
|
||||
public enum ConnectEnum {
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
package cn.lili.modules.connect.util;
|
||||
|
||||
import sun.misc.BASE64Decoder;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
@@ -236,29 +232,4 @@ public class Base64Utils {
|
||||
return new String(data, charset);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 二进制流转Base64字符串
|
||||
*
|
||||
* @param data 二进制流
|
||||
* @return data
|
||||
* @throws IOException 异常
|
||||
*/
|
||||
public static String getImageString(byte[] data) throws IOException {
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
return data != null ? encoder.encode(data) : "";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Base64字符串转 二进制流
|
||||
*
|
||||
* @param base64String Base64
|
||||
* @return base64String
|
||||
* @throws IOException 异常
|
||||
*/
|
||||
public static byte[] getStringImage(String base64String) throws IOException {
|
||||
BASE64Decoder decoder = new sun.misc.BASE64Decoder();
|
||||
return base64String != null ? decoder.decodeBuffer(base64String) : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import javax.validation.constraints.Size;
|
||||
* 分销员对象
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.Date;
|
||||
* 分销佣金
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@@ -48,7 +48,7 @@ public class DistributionCash extends BaseEntity {
|
||||
|
||||
@CreatedDate
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "支付时间")
|
||||
private Date payTime;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.Map;
|
||||
* 分销商品
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@@ -56,7 +56,7 @@ public class DistributionGoods {
|
||||
|
||||
@CreatedDate
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
private Date createTime;
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Date;
|
||||
* 分销订单
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@@ -45,7 +45,7 @@ public class DistributionOrder {
|
||||
|
||||
@CreatedDate
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
private Date createTime;
|
||||
|
||||
@@ -17,7 +17,7 @@ import javax.persistence.Table;
|
||||
* 分销员已选择分销商品
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
@@ -9,7 +9,7 @@ import javax.validation.constraints.Size;
|
||||
/**
|
||||
* 分销员申请DTO
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/6/30 11:07 上午
|
||||
* @since: 2021/6/30 11:07 上午
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
|
||||
@@ -11,7 +11,7 @@ import lombok.Data;
|
||||
* 分销员商品查询条件
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Data
|
||||
public class DistributionGoodsSearchParams extends PageVO {
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.Data;
|
||||
* 分销查询参数
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2021/3/20 10:13
|
||||
* @since 2021/3/20 10:13
|
||||
*/
|
||||
@Data
|
||||
public class DistributionSearchParams {
|
||||
|
||||
@@ -4,7 +4,7 @@ package cn.lili.modules.distribution.entity.enums;
|
||||
* 分销佣金状态
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
public enum DistributionCashStatusEnum {
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@ package cn.lili.modules.distribution.entity.enums;
|
||||
* 分销员订单状态
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
*/
|
||||
public enum DistributionOrderStatusEnum {
|
||||
//待结算(冻结)
|
||||
|
||||
@@ -4,7 +4,7 @@ package cn.lili.modules.distribution.entity.enums;
|
||||
* 分销员状态
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
public enum DistributionStatusEnum {
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
* 分销佣金查询信息
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-26 09:04:53
|
||||
* @since 2020-03-26 09:04:53
|
||||
*/
|
||||
@Data
|
||||
public class DistributionCashSearchParams extends PageVO {
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Date;
|
||||
* 分销商品信息
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-26 09:04:53
|
||||
* @since 2020-03-26 09:04:53
|
||||
*/
|
||||
@Data
|
||||
public class DistributionGoodsVO {
|
||||
@@ -52,7 +52,7 @@ public class DistributionGoodsVO {
|
||||
private Double commission;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Date;
|
||||
* 分销员对象
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "分销订单查询对象")
|
||||
@@ -40,12 +40,12 @@ public class DistributionOrderSearchParams extends PageVO {
|
||||
private String storeId;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private Date startTime;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private Date endTime;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* 分销佣金数据处理层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-26 18:45:56
|
||||
* @since 2020-03-26 18:45:56
|
||||
*/
|
||||
public interface DistributionCashMapper extends BaseMapper<DistributionCash> {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Select;
|
||||
* 分销商品数据处理层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-24 23:04:56
|
||||
* @since 2020-03-24 23:04:56
|
||||
*/
|
||||
public interface DistributionGoodsMapper extends BaseMapper<DistributionGoods> {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Update;
|
||||
* 分销员数据处理层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
public interface DistributionMapper extends BaseMapper<Distribution> {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Update;
|
||||
* 分销订单数据处理层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-15 10:45:56
|
||||
* @since 2020-03-15 10:45:56
|
||||
*/
|
||||
public interface DistributionOrderMapper extends BaseMapper<DistributionOrder> {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* 选择分销商品数据处理层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-15 10:45:56
|
||||
* @since 2020-03-15 10:45:56
|
||||
*/
|
||||
public interface DistributionSelectedGoodsMapper extends BaseMapper<DistributionSelectedGoods> {
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
* 分销佣金业务层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
public interface DistributionCashService extends IService<DistributionCash> {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* 分销商品业务层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-24 10:46:33
|
||||
* @since 2020-03-24 10:46:33
|
||||
*/
|
||||
public interface DistributionGoodsService extends IService<DistributionGoods> {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* 分销订单业务层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-15 10:46:33
|
||||
* @since 2020-03-15 10:46:33
|
||||
*/
|
||||
public interface DistributionOrderService extends IService<DistributionOrder> {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* 分销选择商品业务层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-24 10:46:33
|
||||
* @since 2020-03-24 10:46:33
|
||||
*/
|
||||
public interface DistributionSelectedGoodsService extends IService<DistributionSelectedGoods> {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* 分销员业务层
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
public interface DistributionService extends IService<Distribution> {
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import java.util.Date;
|
||||
* 分销佣金业务层实现
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-126 18:04:56
|
||||
* @since 2020-03-126 18:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -84,6 +84,7 @@ public class DistributionCashServiceImpl extends ServiceImpl<DistributionCashMap
|
||||
memberWithdrawalMessage.setMemberId(distribution.getMemberId());
|
||||
memberWithdrawalMessage.setPrice(applyMoney);
|
||||
memberWithdrawalMessage.setDestination(MemberWithdrawalDestinationEnum.WALLET.name());
|
||||
memberWithdrawalMessage.setStatus(DistributionCashStatusEnum.APPLY.name());
|
||||
String destination = rocketmqCustomProperties.getMemberTopic() + ":" + MemberTagsEnum.MEMBER_WITHDRAWAL.name();
|
||||
rocketMQTemplate.asyncSend(destination, memberWithdrawalMessage, RocketmqSendCallbackBuilder.commonCallback());
|
||||
return true;
|
||||
@@ -122,8 +123,10 @@ public class DistributionCashServiceImpl extends ServiceImpl<DistributionCashMap
|
||||
//获取分销员
|
||||
Distribution distribution = distributionService.getById(distributorCash.getDistributionId());
|
||||
if (distribution != null && distributorCash != null && distribution.getDistributionStatus().equals(DistributionStatusEnum.PASS.name())) {
|
||||
MemberWithdrawalMessage memberWithdrawalMessage = new MemberWithdrawalMessage();
|
||||
//审核通过
|
||||
if (result.equals(DistributionCashStatusEnum.PASS.name())) {
|
||||
memberWithdrawalMessage.setStatus(DistributionCashStatusEnum.PASS.name());
|
||||
//审核通过需要校验冻结金额不足情况
|
||||
if (distribution.getCommissionFrozen() < distributorCash.getPrice()) {
|
||||
throw new ServiceException(ResultCode.WALLET_WITHDRAWAL_INSUFFICIENT);
|
||||
@@ -136,6 +139,7 @@ public class DistributionCashServiceImpl extends ServiceImpl<DistributionCashMap
|
||||
//提现到余额
|
||||
memberWalletService.increase(distributorCash.getPrice(), distribution.getMemberId(), "分销佣金提现到余额", DepositServiceTypeEnum.WALLET_COMMISSION.name());
|
||||
} else {
|
||||
memberWithdrawalMessage.setStatus(DistributionCashStatusEnum.REFUSE.name());
|
||||
//分销员佣金解冻
|
||||
distribution.setCommissionFrozen(CurrencyUtil.sub(distribution.getCommissionFrozen(), distributorCash.getPrice()));
|
||||
//分销员可提现金额退回
|
||||
@@ -145,7 +149,15 @@ public class DistributionCashServiceImpl extends ServiceImpl<DistributionCashMap
|
||||
//分销员金额相关处理
|
||||
distributionService.updateById(distribution);
|
||||
//修改分销提现申请
|
||||
this.updateById(distributorCash);
|
||||
boolean bool = this.updateById(distributorCash);
|
||||
if (bool) {
|
||||
//组织会员提现审核消息
|
||||
memberWithdrawalMessage.setMemberId(distribution.getMemberId());
|
||||
memberWithdrawalMessage.setPrice(distributorCash.getPrice());
|
||||
memberWithdrawalMessage.setDestination(MemberWithdrawalDestinationEnum.WALLET.name());
|
||||
String destination = rocketmqCustomProperties.getMemberTopic() + ":" + MemberTagsEnum.MEMBER_WITHDRAWAL.name();
|
||||
rocketMQTemplate.asyncSend(destination, memberWithdrawalMessage, RocketmqSendCallbackBuilder.commonCallback());
|
||||
}
|
||||
return distributorCash;
|
||||
}
|
||||
throw new ServiceException(ResultCode.DISTRIBUTION_NOT_EXIST);
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* 分销商品接口实现
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-24 23:04:56
|
||||
* @since 2020-03-24 23:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.List;
|
||||
* 分销订单接口实现
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* 分销选择商品接口实现
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-24 23:04:56
|
||||
* @since 2020-03-24 23:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* 分销员接口实现
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-14 23:04:56
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@@ -15,7 +15,7 @@ import javax.persistence.Table;
|
||||
* 文件系统
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 15:35
|
||||
* @since 2020/11/26 15:35
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.NoArgsConstructor;
|
||||
* 文件查询所属者参数对象
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2021-02-22 17:20
|
||||
* @since 2021-02-22 17:20
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* 文件管理数据处理层
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2021-02-22 17:20
|
||||
* @since 2021-02-22 17:20
|
||||
*/
|
||||
public interface FileMapper extends BaseMapper<File> {
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.List;
|
||||
* 文件管理插件
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 17:50
|
||||
*/
|
||||
public interface FileManagerPlugin {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.util.List;
|
||||
* 阿里oss 文件操作
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 17:50
|
||||
*/
|
||||
|
||||
@Component
|
||||
|
||||
@@ -14,7 +14,6 @@ import java.util.List;
|
||||
* 文件管理业务层
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 17:50
|
||||
*/
|
||||
public interface FileService extends IService<File> {
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
* 文件管理业务层实现
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 17:50
|
||||
* @since 2020/11/26 17:50
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@@ -14,7 +14,7 @@ import javax.validation.constraints.NotEmpty;
|
||||
* 商品品牌
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-02-18 15:18:56
|
||||
* @since 2020-02-18 15:18:56
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.Date;
|
||||
* 商品分类
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-02-18 15:18:56
|
||||
* @since 2020-02-18 15:18:56
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Date;
|
||||
* 分类品牌关联
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-03-02 09:34:02
|
||||
* @since 2020-03-02 09:34:02
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@@ -52,7 +52,7 @@ public class CategoryBrand implements Serializable {
|
||||
|
||||
@CreatedDate
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
private Date createTime;
|
||||
|
||||
@@ -16,7 +16,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 分类参数组关联
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-02-26 10:34:02
|
||||
* @since 2020-02-26 10:34:02
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
@@ -16,7 +16,7 @@ import javax.persistence.Table;
|
||||
* 分类参数组关联
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-02-26 10:34:02
|
||||
* @since 2020-02-26 10:34:02
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
@@ -12,7 +12,7 @@ import javax.persistence.Table;
|
||||
/**
|
||||
* 小程序直播商品
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/17 9:34 上午
|
||||
* @since: 2021/5/17 9:34 上午
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
|
||||
@@ -20,7 +20,7 @@ import javax.validation.constraints.Max;
|
||||
* 草稿商品
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-02-23 9:14:33
|
||||
* @since 2020-02-23 9:14:33
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.Map;
|
||||
* 商品
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-02-23 9:14:33
|
||||
* @since 2020-02-23 9:14:33
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.io.Serializable;
|
||||
* 商品相册
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020-02-23 9:14:33
|
||||
* @since 2020-02-23 9:14:33
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user