Compare commits
12 Commits
Author | SHA1 | Date |
---|---|---|
|
c9cf72d311 | |
|
a0dae5aeb2 | |
|
ddecd8e429 | |
|
e09cb28b9c | |
|
ad07b4b025 | |
|
e083e409db | |
|
c40c0bc0cf | |
|
8757ab1e22 | |
|
056c0e5124 | |
|
0bd4aa8d46 | |
|
25ca6644f7 | |
|
5cabdfbc05 |
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"商品id(projectId)": "Long",
|
||||||
|
"商品图片(projectImage)": "String",
|
||||||
|
"活动名称(activityName)": "String",
|
||||||
|
"活动介绍(activities)": "Test",
|
||||||
|
"商品单位(projectUnit)": "Long",
|
||||||
|
|
||||||
|
"轮播图(carouselImages)": [
|
||||||
|
"String",
|
||||||
|
"String"
|
||||||
|
],
|
||||||
|
|
||||||
|
"拼团策略id(strategyId)": "Long",
|
||||||
|
"拼团策略类型(strategyType)": "String",
|
||||||
|
"商品规格List(projectSkuList)": [
|
||||||
|
{
|
||||||
|
"商品sku(productSku)": "String",
|
||||||
|
"拼团价格(teamPrice)": "decimal",
|
||||||
|
"库存库存(teamStock)": "int"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"全重(weight)": "Long",
|
||||||
|
"商品详情(goodsDetails)": "String"
|
||||||
|
}
|
|
@ -69,7 +69,7 @@ public class SysLoginService {
|
||||||
|
|
||||||
if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData())) {
|
if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData())) {
|
||||||
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在");
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在");
|
||||||
throw new ServiceException("登录用户:" + username + " 不存在");
|
throw new ServiceException("登录用户:" + username + " 不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Result.FAIL == userResult.getCode()) {
|
if (Result.FAIL == userResult.getCode()) {
|
||||||
|
@ -80,11 +80,11 @@ public class SysLoginService {
|
||||||
SysUser user = userResult.getData().getSysUser();
|
SysUser user = userResult.getData().getSysUser();
|
||||||
if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
|
if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
|
||||||
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除");
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除");
|
||||||
throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
|
throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
|
||||||
}
|
}
|
||||||
if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
|
if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
|
||||||
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|
||||||
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
||||||
}
|
}
|
||||||
passwordService.validate(user, password);
|
passwordService.validate(user, password);
|
||||||
recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
|
recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/info.log</file>
|
<file>${log.path}/info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -28,16 +28,16 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/error.log</file>
|
<file>${log.path}/error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
|
@ -144,7 +144,7 @@ public @interface Excel {
|
||||||
public String[] args () default {};
|
public String[] args () default {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字段类型(0:导出导入;1:仅导出;2:仅导入)
|
* 字段类型(0:导出导入;1:仅导出;2:仅导入)
|
||||||
*/
|
*/
|
||||||
Type type () default Type.ALL;
|
Type type () default Type.ALL;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前线程变量中的 用户id、用户名称、Token等信息
|
* 获取当前线程变量中的 用户id、用户名称、Token等信息
|
||||||
* 注意: 必须在网关通过请求头的方法传入,同时在HeaderInterceptor拦截器设置值。 否则这里无法获取
|
* 注意: 必须在网关通过请求头的方法传入,同时在HeaderInterceptor拦截器设置值。 否则这里无法获取
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author muyu
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.muyu.common.core.enums.market.team;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参团类型枚举类
|
||||||
|
*/
|
||||||
|
|
||||||
|
public enum TeamOpenTypeEnum {
|
||||||
|
|
||||||
|
TEAM_ADD("team_add","参团"),
|
||||||
|
TEAT_OPEN("team_open","开团");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String label;
|
||||||
|
|
||||||
|
|
||||||
|
public String code() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String label() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
TeamOpenTypeEnum(String code, String label) {
|
||||||
|
this.code = code;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.muyu.common.core.model;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.muyu.common.core.web.page.PageDomain;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
|
||||||
|
public class QueryModel<T> {
|
||||||
|
/**
|
||||||
|
* 起始页
|
||||||
|
*/
|
||||||
|
private Integer pageNum;
|
||||||
|
/**
|
||||||
|
*分页单位
|
||||||
|
*/
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序列
|
||||||
|
*/
|
||||||
|
private String orderByColum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序方向
|
||||||
|
* @param domain
|
||||||
|
*/
|
||||||
|
private Boolean isAec =true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建模型分页对象
|
||||||
|
*/
|
||||||
|
public T domainBuild(PageDomain domain) {
|
||||||
|
this.pageNum=domain.getPageNum();
|
||||||
|
this.pageSize=domain.getPageSize();
|
||||||
|
this.orderByColum=domain.getOrderByColumn();
|
||||||
|
this.isAec="asc".equals(domain.getIsAsc());
|
||||||
|
return (T) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 构建分页对象
|
||||||
|
* @return查询分页对象
|
||||||
|
*/
|
||||||
|
public <I> Page<I> buildPage(){
|
||||||
|
Page<I> page = Page.of(this.getPageNum(), this.getPageSize());
|
||||||
|
page.setOrders(List.of(this.getIsAec() ? OrderItem.asc(this.getOrderByColum()): OrderItem.desc(this.getOrderByColum())));
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -480,7 +480,7 @@ public class Convert {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换为boolean<br>
|
* 转换为boolean<br>
|
||||||
* String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值<br>
|
* String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||||
* 转换失败不会报错
|
* 转换失败不会报错
|
||||||
*
|
*
|
||||||
* @param value 被转换的值
|
* @param value 被转换的值
|
||||||
|
|
|
@ -17,10 +17,10 @@ public class StrFormatter {
|
||||||
* 格式化字符串<br>
|
* 格式化字符串<br>
|
||||||
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
|
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
|
||||||
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
|
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
|
||||||
* 例:<br>
|
* 例:<br>
|
||||||
* 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
|
* 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
|
||||||
* 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
|
* 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
|
||||||
* 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
|
* 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
|
||||||
*
|
*
|
||||||
* @param strPattern 字符串模板
|
* @param strPattern 字符串模板
|
||||||
* @param argArray 参数列表
|
* @param argArray 参数列表
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param coll 要判断的Collection
|
* @param coll 要判断的Collection
|
||||||
*
|
*
|
||||||
* @return true:为空 false:非空
|
* @return true:为空 false:非空
|
||||||
*/
|
*/
|
||||||
public static boolean isEmpty (Collection<?> coll) {
|
public static boolean isEmpty (Collection<?> coll) {
|
||||||
return isNull(coll) || coll.isEmpty();
|
return isNull(coll) || coll.isEmpty();
|
||||||
|
@ -51,7 +51,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param coll 要判断的Collection
|
* @param coll 要判断的Collection
|
||||||
*
|
*
|
||||||
* @return true:非空 false:空
|
* @return true:非空 false:空
|
||||||
*/
|
*/
|
||||||
public static boolean isNotEmpty (Collection<?> coll) {
|
public static boolean isNotEmpty (Collection<?> coll) {
|
||||||
return !isEmpty(coll);
|
return !isEmpty(coll);
|
||||||
|
@ -61,7 +61,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
* * 判断一个对象数组是否为空
|
* * 判断一个对象数组是否为空
|
||||||
*
|
*
|
||||||
* @param objects 要判断的对象数组
|
* @param objects 要判断的对象数组
|
||||||
* * @return true:为空 false:非空
|
* * @return true:为空 false:非空
|
||||||
*/
|
*/
|
||||||
public static boolean isEmpty (Object[] objects) {
|
public static boolean isEmpty (Object[] objects) {
|
||||||
return isNull(objects) || (objects.length == 0);
|
return isNull(objects) || (objects.length == 0);
|
||||||
|
@ -72,7 +72,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param objects 要判断的对象数组
|
* @param objects 要判断的对象数组
|
||||||
*
|
*
|
||||||
* @return true:非空 false:空
|
* @return true:非空 false:空
|
||||||
*/
|
*/
|
||||||
public static boolean isNotEmpty (Object[] objects) {
|
public static boolean isNotEmpty (Object[] objects) {
|
||||||
return !isEmpty(objects);
|
return !isEmpty(objects);
|
||||||
|
@ -83,7 +83,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param map 要判断的Map
|
* @param map 要判断的Map
|
||||||
*
|
*
|
||||||
* @return true:为空 false:非空
|
* @return true:为空 false:非空
|
||||||
*/
|
*/
|
||||||
public static boolean isEmpty (Map<?, ?> map) {
|
public static boolean isEmpty (Map<?, ?> map) {
|
||||||
return isNull(map) || map.isEmpty();
|
return isNull(map) || map.isEmpty();
|
||||||
|
@ -94,7 +94,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param map 要判断的Map
|
* @param map 要判断的Map
|
||||||
*
|
*
|
||||||
* @return true:非空 false:空
|
* @return true:非空 false:空
|
||||||
*/
|
*/
|
||||||
public static boolean isNotEmpty (Map<?, ?> map) {
|
public static boolean isNotEmpty (Map<?, ?> map) {
|
||||||
return !isEmpty(map);
|
return !isEmpty(map);
|
||||||
|
@ -105,7 +105,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param str String
|
* @param str String
|
||||||
*
|
*
|
||||||
* @return true:为空 false:非空
|
* @return true:为空 false:非空
|
||||||
*/
|
*/
|
||||||
public static boolean isEmpty (String str) {
|
public static boolean isEmpty (String str) {
|
||||||
return isNull(str) || NULLSTR.equals(str.trim());
|
return isNull(str) || NULLSTR.equals(str.trim());
|
||||||
|
@ -116,7 +116,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param str String
|
* @param str String
|
||||||
*
|
*
|
||||||
* @return true:非空串 false:空串
|
* @return true:非空串 false:空串
|
||||||
*/
|
*/
|
||||||
public static boolean isNotEmpty (String str) {
|
public static boolean isNotEmpty (String str) {
|
||||||
return !isEmpty(str);
|
return !isEmpty(str);
|
||||||
|
@ -127,7 +127,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param object Object
|
* @param object Object
|
||||||
*
|
*
|
||||||
* @return true:为空 false:非空
|
* @return true:为空 false:非空
|
||||||
*/
|
*/
|
||||||
public static boolean isNull (Object object) {
|
public static boolean isNull (Object object) {
|
||||||
return object == null;
|
return object == null;
|
||||||
|
@ -138,7 +138,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param object Object
|
* @param object Object
|
||||||
*
|
*
|
||||||
* @return true:非空 false:空
|
* @return true:非空 false:空
|
||||||
*/
|
*/
|
||||||
public static boolean isNotNull (Object object) {
|
public static boolean isNotNull (Object object) {
|
||||||
return !isNull(object);
|
return !isNull(object);
|
||||||
|
@ -149,7 +149,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
*
|
*
|
||||||
* @param object 对象
|
* @param object 对象
|
||||||
*
|
*
|
||||||
* @return true:是数组 false:不是数组
|
* @return true:是数组 false:不是数组
|
||||||
*/
|
*/
|
||||||
public static boolean isArray (Object object) {
|
public static boolean isArray (Object object) {
|
||||||
return isNotNull(object) && object.getClass().isArray();
|
return isNotNull(object) && object.getClass().isArray();
|
||||||
|
@ -253,10 +253,10 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
* 格式化文本, {} 表示占位符<br>
|
* 格式化文本, {} 表示占位符<br>
|
||||||
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
|
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
|
||||||
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
|
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
|
||||||
* 例:<br>
|
* 例:<br>
|
||||||
* 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
|
* 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
|
||||||
* 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
|
* 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
|
||||||
* 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
|
* 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
|
||||||
*
|
*
|
||||||
* @param template 文本模板,被替换的部分用 {} 表示
|
* @param template 文本模板,被替换的部分用 {} 表示
|
||||||
* @param params 参数值
|
* @param params 参数值
|
||||||
|
@ -361,7 +361,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
|
* 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
|
||||||
*
|
*
|
||||||
* @param name 转换前的下划线大写方式命名的字符串
|
* @param name 转换前的下划线大写方式命名的字符串
|
||||||
*
|
*
|
||||||
|
@ -393,7 +393,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 驼峰式命名法
|
* 驼峰式命名法
|
||||||
* 例如:user_name->userName
|
* 例如:user_name->userName
|
||||||
*/
|
*/
|
||||||
public static String toCamelCase (String s) {
|
public static String toCamelCase (String s) {
|
||||||
if (s == null) {
|
if (s == null) {
|
||||||
|
|
|
@ -16,12 +16,12 @@ import java.nio.charset.StandardCharsets;
|
||||||
*/
|
*/
|
||||||
public class FileUtils {
|
public class FileUtils {
|
||||||
/**
|
/**
|
||||||
* 字符常量:斜杠 {@code '/'}
|
* 字符常量:斜杠 {@code '/'}
|
||||||
*/
|
*/
|
||||||
public static final char SLASH = '/';
|
public static final char SLASH = '/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字符常量:反斜杠 {@code '\\'}
|
* 字符常量:反斜杠 {@code '\\'}
|
||||||
*/
|
*/
|
||||||
public static final char BACKSLASH = '\\';
|
public static final char BACKSLASH = '\\';
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class ExcelUtil<T> {
|
||||||
*/
|
*/
|
||||||
private String sheetName;
|
private String sheetName;
|
||||||
/**
|
/**
|
||||||
* 导出类型(EXPORT:导出数据;IMPORT:导入模板)
|
* 导出类型(EXPORT:导出数据;IMPORT:导入模板)
|
||||||
*/
|
*/
|
||||||
private Type type;
|
private Type type;
|
||||||
/**
|
/**
|
||||||
|
@ -764,7 +764,7 @@ public class ExcelUtil<T> {
|
||||||
* 创建表格样式
|
* 创建表格样式
|
||||||
*/
|
*/
|
||||||
public void setDataValidation (Excel attr, Row row, int column) {
|
public void setDataValidation (Excel attr, Row row, int column) {
|
||||||
if (attr.name().indexOf("注:") >= 0) {
|
if (attr.name().indexOf("注:") >= 0) {
|
||||||
sheet.setColumnWidth(column, 6000);
|
sheet.setColumnWidth(column, 6000);
|
||||||
} else {
|
} else {
|
||||||
// 设置列宽
|
// 设置列宽
|
||||||
|
@ -880,7 +880,7 @@ public class ExcelUtil<T> {
|
||||||
DataValidationHelper helper = sheet.getDataValidationHelper();
|
DataValidationHelper helper = sheet.getDataValidationHelper();
|
||||||
// 加载下拉列表内容
|
// 加载下拉列表内容
|
||||||
DataValidationConstraint constraint = helper.createFormulaListConstraint(hideSheetName + "_data");
|
DataValidationConstraint constraint = helper.createFormulaListConstraint(hideSheetName + "_data");
|
||||||
// 设置数据有效性加载在哪个单元格上,四个参数分别是:起始行、终止行、起始列、终止列
|
// 设置数据有效性加载在哪个单元格上,四个参数分别是:起始行、终止行、起始列、终止列
|
||||||
CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol);
|
CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol);
|
||||||
// 数据有效性对象
|
// 数据有效性对象
|
||||||
DataValidation dataValidation = helper.createValidation(constraint, regions);
|
DataValidation dataValidation = helper.createValidation(constraint, regions);
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class ReflectUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调用Getter方法.
|
* 调用Getter方法.
|
||||||
* 支持多级,如:对象名.对象名.方法
|
* 支持多级,如:对象名.对象名.方法
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static <E> E invokeGetter (Object obj, String propertyName) {
|
public static <E> E invokeGetter (Object obj, String propertyName) {
|
||||||
|
@ -42,7 +42,7 @@ public class ReflectUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调用Setter方法, 仅匹配方法名。
|
* 调用Setter方法, 仅匹配方法名。
|
||||||
* 支持多级,如:对象名.对象名.方法
|
* 支持多级,如:对象名.对象名.方法
|
||||||
*/
|
*/
|
||||||
public static <E> void invokeSetter (Object obj, String propertyName, E value) {
|
public static <E> void invokeSetter (Object obj, String propertyName, E value) {
|
||||||
Object object = obj;
|
Object object = obj;
|
||||||
|
|
|
@ -219,7 +219,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
||||||
/**
|
/**
|
||||||
* 与此 {@code UUID} 相关联的变体号。变体号描述 {@code UUID} 的布局。
|
* 与此 {@code UUID} 相关联的变体号。变体号描述 {@code UUID} 的布局。
|
||||||
* <p>
|
* <p>
|
||||||
* 变体号具有以下含意:
|
* 变体号具有以下含意:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>0 为 NCS 向后兼容保留
|
* <li>0 为 NCS 向后兼容保留
|
||||||
* <li>2 <a href="http://www.ietf.org/rfc/rfc4122.txt">IETF RFC 4122</a>(Leach-Salz), 用于此类
|
* <li>2 <a href="http://www.ietf.org/rfc/rfc4122.txt">IETF RFC 4122</a>(Leach-Salz), 用于此类
|
||||||
|
@ -298,7 +298,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
||||||
* 返回此{@code UUID} 的字符串表现形式。
|
* 返回此{@code UUID} 的字符串表现形式。
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* UUID 的字符串表示形式由此 BNF 描述:
|
* UUID 的字符串表示形式由此 BNF 描述:
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* {@code
|
* {@code
|
||||||
|
@ -328,7 +328,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
||||||
* 返回此{@code UUID} 的字符串表现形式。
|
* 返回此{@code UUID} 的字符串表现形式。
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* UUID 的字符串表示形式由此 BNF 描述:
|
* UUID 的字符串表示形式由此 BNF 描述:
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* {@code
|
* {@code
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
package com.muyu.common.core.web.page;
|
package com.muyu.common.core.web.page;
|
||||||
|
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页数据
|
* 分页数据
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author muyu
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
public class PageDomain {
|
public class PageDomain {
|
||||||
/**
|
/**
|
||||||
* 当前记录起始索引
|
* 当前记录起始索引
|
||||||
|
|
|
@ -4,7 +4,6 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录认证:只有登录之后才能进入该方法
|
* 登录认证:只有登录之后才能进入该方法
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author muyu
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限认证:必须具有指定权限才能进入该方法
|
* 权限认证:必须具有指定权限才能进入该方法
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author muyu
|
||||||
*/
|
*/
|
||||||
|
@ -19,7 +19,7 @@ public @interface RequiresPermissions {
|
||||||
String[] value () default {};
|
String[] value () default {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证模式:AND | OR,默认AND
|
* 验证模式:AND | OR,默认AND
|
||||||
*/
|
*/
|
||||||
Logical logical () default Logical.AND;
|
Logical logical () default Logical.AND;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色认证:必须具有指定角色标识才能进入该方法
|
* 角色认证:必须具有指定角色标识才能进入该方法
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author muyu
|
||||||
*/
|
*/
|
||||||
|
@ -19,7 +19,7 @@ public @interface RequiresRoles {
|
||||||
String[] value () default {};
|
String[] value () default {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证逻辑:AND | OR,默认AND
|
* 验证逻辑:AND | OR,默认AND
|
||||||
*/
|
*/
|
||||||
Logical logical () default Logical.AND;
|
Logical logical () default Logical.AND;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class GlobalExceptionHandler {
|
||||||
public Result handleMethodArgumentTypeMismatchException (MethodArgumentTypeMismatchException e, HttpServletRequest request) {
|
public Result handleMethodArgumentTypeMismatchException (MethodArgumentTypeMismatchException e, HttpServletRequest request) {
|
||||||
String requestURI = request.getRequestURI();
|
String requestURI = request.getRequestURI();
|
||||||
log.error("请求参数类型不匹配'{}',发生系统异常.", requestURI, e);
|
log.error("请求参数类型不匹配'{}',发生系统异常.", requestURI, e);
|
||||||
return Result.error(String.format("请求参数类型不匹配,参数[%s]要求类型为:'%s',但输入值为:'%s'", e.getName(), e.getRequiredType().getName(), e.getValue()));
|
return Result.error(String.format("请求参数类型不匹配,参数[%s]要求类型为:'%s',但输入值为:'%s'", e.getName(), e.getRequiredType().getName(), e.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义请求头拦截器,将Header数据封装到线程变量中方便获取
|
* 自定义请求头拦截器,将Header数据封装到线程变量中方便获取
|
||||||
* 注意:此拦截器会同时验证当前用户有效期自动刷新有效期
|
* 注意:此拦截器会同时验证当前用户有效期自动刷新有效期
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author muyu
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -54,18 +54,18 @@ public class SysRole extends BaseEntity {
|
||||||
private Integer roleSort;
|
private Integer roleSort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)
|
* 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
|
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
|
||||||
private String dataScope;
|
private String dataScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)
|
* 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)
|
||||||
*/
|
*/
|
||||||
private boolean menuCheckStrictly;
|
private boolean menuCheckStrictly;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )
|
* 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )
|
||||||
*/
|
*/
|
||||||
private boolean deptCheckStrictly;
|
private boolean deptCheckStrictly;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/info.log</file>
|
<file>${log.path}/info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -28,16 +28,16 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/error.log</file>
|
<file>${log.path}/error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/info.log</file>
|
<file>${log.path}/info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -28,16 +28,16 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/error.log</file>
|
<file>${log.path}/error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
|
@ -0,0 +1,126 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-marketing</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<modules>
|
||||||
|
|
||||||
|
</modules>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>marketing-service</artifactId>
|
||||||
|
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Nacos Config -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Sentinel -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringBoot Actuator -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Swagger UI -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
|
<version>${swagger.fox.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mysql Connector -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common DataSource -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-datasource</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common DataScope -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-datascope</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common Log -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common Swagger -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-swagger</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.dtflys.forest</groupId>
|
||||||
|
<artifactId>forest-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>marketing-common</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>marketing-remote</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<!-- 加入maven deploy插件,当在deploy时,忽略些model-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.muyu.marketing;
|
||||||
|
|
||||||
|
import com.muyu.common.security.annotation.EnableCustomConfig;
|
||||||
|
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||||
|
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统模块
|
||||||
|
*
|
||||||
|
* @author muyu
|
||||||
|
*/
|
||||||
|
@EnableCustomConfig
|
||||||
|
@EnableCustomSwagger2
|
||||||
|
@EnableMyFeignClients
|
||||||
|
@SpringBootApplication
|
||||||
|
public class MuYuMarketIngApplication {
|
||||||
|
public static void main (String[] args) {
|
||||||
|
SpringApplication.run(MuYuMarketIngApplication.class,args);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
Spring Application Name: ${spring.application.name}
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 9204
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: muyu-marketing
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 60.204.150.30:8848
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 60.204.150.30:8848
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.muyu.marketing.mapper: DEBUG
|
|
@ -187,7 +187,7 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException("导入失败:" + e.getMessage());
|
throw new ServiceException("导入失败:" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||||
String path = getGenPath(table, template);
|
String path = getGenPath(table, template);
|
||||||
FileUtils.writeStringToFile(new File(path), sw.toString(), CharsetKit.UTF_8);
|
FileUtils.writeStringToFile(new File(path), sw.toString(), CharsetKit.UTF_8);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ServiceException("渲染模板失败,表名:" + table.getTableName());
|
throw new ServiceException("渲染模板失败,表名:" + table.getTableName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||||
zip.flush();
|
zip.flush();
|
||||||
zip.closeEntry();
|
zip.closeEntry();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("渲染模板失败,表名:" + table.getTableName(), e);
|
log.error("渲染模板失败,表名:" + table.getTableName(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/info.log</file>
|
<file>${log.path}/info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -28,16 +28,16 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/error.log</file>
|
<file>${log.path}/error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class SysJobServiceImpl implements ISysJobService {
|
||||||
private SysJobMapper jobMapper;
|
private SysJobMapper jobMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目启动时,初始化定时器 主要是防止手动修改数据库导致未同步到定时任务处理(注:不能手动修改数据库ID和任务组名,否则会导致脏数据)
|
* 项目启动时,初始化定时器 主要是防止手动修改数据库导致未同步到定时任务处理(注:不能手动修改数据库ID和任务组名,否则会导致脏数据)
|
||||||
*/
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init () throws SchedulerException, TaskException {
|
public void init () throws SchedulerException, TaskException {
|
||||||
|
|
|
@ -11,11 +11,11 @@ import org.springframework.stereotype.Component;
|
||||||
@Component("myTask")
|
@Component("myTask")
|
||||||
public class MyTask {
|
public class MyTask {
|
||||||
public void ryMultipleParams (String s, Boolean b, Long l, Double d, Integer i) {
|
public void ryMultipleParams (String s, Boolean b, Long l, Double d, Integer i) {
|
||||||
System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
|
System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ryParams (String params) {
|
public void ryParams (String params) {
|
||||||
System.out.println("执行有参方法:" + params);
|
System.out.println("执行有参方法:" + params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ryNoParams () {
|
public void ryNoParams () {
|
||||||
|
|
|
@ -40,7 +40,7 @@ public abstract class AbstractQuartzJob implements Job {
|
||||||
}
|
}
|
||||||
after(context, sysJob, null);
|
after(context, sysJob, null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("任务执行异常 - :", e);
|
log.error("任务执行异常 - :", e);
|
||||||
after(context, sysJob, e);
|
after(context, sysJob, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ public abstract class AbstractQuartzJob implements Job {
|
||||||
sysJobLog.setStartTime(startTime);
|
sysJobLog.setStartTime(startTime);
|
||||||
sysJobLog.setStopTime(new Date());
|
sysJobLog.setStopTime(new Date());
|
||||||
long runMs = sysJobLog.getStopTime().getTime() - sysJobLog.getStartTime().getTime();
|
long runMs = sysJobLog.getStopTime().getTime() - sysJobLog.getStartTime().getTime();
|
||||||
sysJobLog.setJobMessage(sysJobLog.getJobName() + " 总共耗时:" + runMs + "毫秒");
|
sysJobLog.setJobMessage(sysJobLog.getJobName() + " 总共耗时:" + runMs + "毫秒");
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
sysJobLog.setStatus("1");
|
sysJobLog.setStatus("1");
|
||||||
String errorMsg = StringUtils.substring(ExceptionUtil.getExceptionMessage(e), 0, 2000);
|
String errorMsg = StringUtils.substring(ExceptionUtil.getExceptionMessage(e), 0, 2000);
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/info.log</file>
|
<file>${log.path}/info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -28,16 +28,16 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/error.log</file>
|
<file>${log.path}/error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-marketing</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>marketing-common</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.muyu.marketing.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.sql.Time;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/** 商品拼团*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("activity_team_info")
|
||||||
|
public class ActivityTeamInfo extends BaseEntity {
|
||||||
|
/** 主键*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
/** 拼团名称*/
|
||||||
|
private String name;
|
||||||
|
/** 商品ID*/
|
||||||
|
private Long productId;
|
||||||
|
/** 商品活动图*/
|
||||||
|
private String productImage;
|
||||||
|
/** 活动简介*/
|
||||||
|
private String introduction;
|
||||||
|
/** 单位*/
|
||||||
|
private String unit;
|
||||||
|
/** 轮播图*/
|
||||||
|
private String imageList;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
/** 活动结束时间*/
|
||||||
|
private Date endTime;
|
||||||
|
/** 活动排序*/
|
||||||
|
private long sort;
|
||||||
|
/** 活动详情*/
|
||||||
|
private String content;
|
||||||
|
/** 活动状态*/
|
||||||
|
private String status;
|
||||||
|
/** 策略类型*/
|
||||||
|
private String strategyType;
|
||||||
|
/** 策略ID*/
|
||||||
|
private Long strategyId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.muyu.marketing.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
/** 团购活动执行*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName(value = "activity_team_open_info",autoResultMap = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "ActivityTeamOpenInfo", description = "团购活动执行")
|
||||||
|
public class ActivityTeamOpenInfo extends BaseEntity {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
/** 主键*/
|
||||||
|
private long id;
|
||||||
|
/** 团购活动ID*/
|
||||||
|
private long teamId;
|
||||||
|
/** 团购类型*/
|
||||||
|
private String teamType;
|
||||||
|
/** 团购策略*/
|
||||||
|
private String teamStrategyId;
|
||||||
|
/** 参团类型*/
|
||||||
|
private String executiveType;
|
||||||
|
/** 结束团购时间*/
|
||||||
|
private Timestamp endTime;
|
||||||
|
/** 商品ID*/
|
||||||
|
private String productId;
|
||||||
|
/** 商品名称*/
|
||||||
|
private String productName;
|
||||||
|
/** 商品规格*/
|
||||||
|
private String productSku;
|
||||||
|
/** 开团标识*/
|
||||||
|
private String key;
|
||||||
|
/** 订单ID*/
|
||||||
|
private String orderId;
|
||||||
|
/** 开团状态*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.muyu.marketing.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/** 商品拼团规格信息*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName(value = "activity_team_open_info",autoResultMap = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "ActivityTeamProductSkuInfo", description = "商品拼团规格信息")
|
||||||
|
public class ActivityTeamProductSkuInfo extends BaseEntity {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
/** 主键*/
|
||||||
|
private Long id;
|
||||||
|
/** 活动ID*/
|
||||||
|
private Long teamId;
|
||||||
|
/** 商品ID*/
|
||||||
|
private Long productId;
|
||||||
|
/** 商品SKU*/
|
||||||
|
private String productSku;
|
||||||
|
/** 拼团库存*/
|
||||||
|
private Integer teamStock;
|
||||||
|
/** 拼团价格*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.muyu.marketing.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.sql.Date;
|
||||||
|
import java.sql.Time;
|
||||||
|
/** 拼团免单策略*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName(value = "team_strategy_exemption",autoResultMap = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "TeamStrategyExemption", description = "拼团免单策略")
|
||||||
|
public class TeamStrategyExemption extends BaseEntity {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
/** 主键*/
|
||||||
|
private long id;
|
||||||
|
/** 持续时间*/
|
||||||
|
private long duration;
|
||||||
|
/** 免单人数*/
|
||||||
|
private long exemptionNumber;
|
||||||
|
/** 最大购买量*/
|
||||||
|
private long maxBuy;
|
||||||
|
/** 单次购买量*/
|
||||||
|
private long oneBuy;
|
||||||
|
/** 虚拟人数*/
|
||||||
|
private long virtualNumber;
|
||||||
|
/** 面单类型*/
|
||||||
|
private String type;
|
||||||
|
/** 返款阶梯*/
|
||||||
|
private String ruleInfo;
|
||||||
|
/** 策略状态*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.muyu.marketing.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.sql.Date;
|
||||||
|
import java.sql.Time;
|
||||||
|
/** 百人策略*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName(value = "team_strategy_exemption_hundred",autoResultMap = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "TeamStrategyExemptionHundred", description = "百人策略")
|
||||||
|
public class TeamStrategyExemptionHundred extends BaseEntity {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
/** 主键*/
|
||||||
|
private long id;
|
||||||
|
/** 持续时间*/
|
||||||
|
private long duration;
|
||||||
|
/** 最大购买量*/
|
||||||
|
private long maxBuy;
|
||||||
|
/** 单次购买量*/
|
||||||
|
private long oneBuy;
|
||||||
|
/** 虚拟人数*/
|
||||||
|
private long virtualNumber;
|
||||||
|
/** 策略状态*/
|
||||||
|
private String status;
|
||||||
|
/** 规则信息*/
|
||||||
|
private String ruleInfo;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.muyu.marketing.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.sql.Date;
|
||||||
|
import java.sql.Time;
|
||||||
|
/** 普通策略*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName(value = "team_strategy_exemption_ordinary",autoResultMap = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "TeamStrategyExemptionOrdinary", description = "普通策略")
|
||||||
|
public class TeamStrategyExemptionOrdinary extends BaseEntity {
|
||||||
|
|
||||||
|
/** 主键*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private long id;
|
||||||
|
/** 持续时间*/
|
||||||
|
private long duration;
|
||||||
|
/** 成团人数*/
|
||||||
|
private long teamNumber;
|
||||||
|
/** 最大购买量*/
|
||||||
|
private long maxBuy;
|
||||||
|
/** 单次购买量*/
|
||||||
|
private long oneBuy;
|
||||||
|
/** 虚拟人数*/
|
||||||
|
private long virtualNumber;
|
||||||
|
/** 策略状态*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import com.muyu.marketing.domain.req.ActivityTeamInfoReq;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.sql.Date;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团 添加 Model
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ActivityTeamInfoAddModel {
|
||||||
|
|
||||||
|
/** 主键*/
|
||||||
|
private Long id;
|
||||||
|
/** 拼团名称*/
|
||||||
|
private String name;
|
||||||
|
/** 商品ID*/
|
||||||
|
private Long productId;
|
||||||
|
/** 商品活动图*/
|
||||||
|
private String productImage;
|
||||||
|
/** 活动简介*/
|
||||||
|
private String introduction;
|
||||||
|
/** 单位*/
|
||||||
|
private String unit;
|
||||||
|
/** 轮播图*/
|
||||||
|
private String imageList;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
/** 活动结束时间*/
|
||||||
|
private Date endTime;
|
||||||
|
/** 活动排序*/
|
||||||
|
private Long sort;
|
||||||
|
/** 活动详情*/
|
||||||
|
private String content;
|
||||||
|
/** 活动状态*/
|
||||||
|
private String status;
|
||||||
|
/** 策略类型*/
|
||||||
|
private String strategyType;
|
||||||
|
/** 策略ID*/
|
||||||
|
private Long strategyId;
|
||||||
|
|
||||||
|
|
||||||
|
/** 拼团活动对象*/
|
||||||
|
public static ActivityTeamInfo saveModelBuild(ActivityTeamInfoReq teamInfoReq) {
|
||||||
|
ActivityTeamInfo build = ActivityTeamInfo.builder()
|
||||||
|
.name(teamInfoReq.getActivityName())
|
||||||
|
.productId(teamInfoReq.getProjectId())
|
||||||
|
.productImage(teamInfoReq.getProjectImage())
|
||||||
|
.introduction(teamInfoReq.getActivities())
|
||||||
|
.unit(teamInfoReq.getProjectUnit())
|
||||||
|
.imageList(teamInfoReq.getCarouselImages())
|
||||||
|
.endTime(teamInfoReq.getEndTime())
|
||||||
|
.content(teamInfoReq.getGoodsDetails())
|
||||||
|
.strategyType(teamInfoReq.getStrategyType())
|
||||||
|
.strategyId(teamInfoReq.getStrategyId())
|
||||||
|
.build();
|
||||||
|
return build;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,75 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.muyu.common.core.model.QueryModel;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团购活动 列表查询 结果模型
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class ActivityTeamInfoListModel extends QueryModel<ActivityTeamInfoListModel> {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
/** 拼团活动id*/
|
||||||
|
private long id;
|
||||||
|
/** 拼团名称*/
|
||||||
|
private String name;
|
||||||
|
/** 参团人数*/
|
||||||
|
private Long addTeamNumber;
|
||||||
|
/** 拼团人数*/
|
||||||
|
private Long attendNumber;
|
||||||
|
/** 活动结束时间*/
|
||||||
|
private Date endTime;
|
||||||
|
/** 开团人数*/
|
||||||
|
private Long openTeamNumber;
|
||||||
|
/** 拼团商品图片*/
|
||||||
|
private String productImage;
|
||||||
|
/**
|
||||||
|
* 商品价格
|
||||||
|
*/
|
||||||
|
private BigDecimal productPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存
|
||||||
|
*/
|
||||||
|
private Long remainStock;
|
||||||
|
/**
|
||||||
|
* 团购状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
public static ActivityTeamInfoListModel infoBuild(ActivityTeamInfo activityTeamInfo, Function<ActivityTeamInfoListModelBuilder , ActivityTeamInfoListModel> function){
|
||||||
|
return function.apply(
|
||||||
|
ActivityTeamInfoListModel.builder()
|
||||||
|
.id(activityTeamInfo.getId())
|
||||||
|
.name(activityTeamInfo.getName())
|
||||||
|
.endTime(activityTeamInfo.getEndTime())
|
||||||
|
.productImage(activityTeamInfo.getProductImage())
|
||||||
|
.status(activityTeamInfo.getStatus())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
import com.muyu.common.core.model.QueryModel;
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团购活动列表查询模型
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class ActivityTeamInfoListQueryModel extends QueryModel<ActivityTeamInfoListQueryModel>{
|
||||||
|
/**
|
||||||
|
*活动名查询字段
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 活动状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
|
import com.muyu.marketing.domain.req.AddProjectSkuListReq;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.apache.poi.hpsf.Decimal;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/** 添加拼团商品规格Model*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class ActivityTeamProductSkuInfoModel {
|
||||||
|
/** 主键*/
|
||||||
|
private Long id;
|
||||||
|
/** 活动ID*/
|
||||||
|
private Long teamId;
|
||||||
|
/** 商品ID*/
|
||||||
|
private Long productId;
|
||||||
|
/** 商品SKU*/
|
||||||
|
private String productSku;
|
||||||
|
/** 拼团库存*/
|
||||||
|
private Long teamStock;
|
||||||
|
/** 拼团价格*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
|
||||||
|
/** * 拼团活动的商品规格*/
|
||||||
|
public static ActivityTeamProductSkuInfo saveModelBuild(Long projectId,Long goodsId,AddProjectSkuListReq skuInfo) {
|
||||||
|
ActivityTeamProductSkuInfo build = ActivityTeamProductSkuInfo.builder()
|
||||||
|
.teamId(projectId)
|
||||||
|
.productId(goodsId)
|
||||||
|
.productSku(skuInfo.getProductSku())
|
||||||
|
.teamStock(skuInfo.getTeamStock())
|
||||||
|
.teamPrice(skuInfo.getTeamPrice())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
return build;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
|
||||||
|
/** 团购活动 优惠模型*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TeamProductDiscountPriceModel {
|
||||||
|
|
||||||
|
/** 商品价格*/
|
||||||
|
private BigDecimal productPrice;
|
||||||
|
/** 团购优惠价*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
/** 优惠力度*/
|
||||||
|
private Double discount;
|
||||||
|
|
||||||
|
public static TeamProductDiscountPriceModel of (BigDecimal productPrice,BigDecimal teamPrice){
|
||||||
|
TeamProductDiscountPriceModel teamProductDiscountPriceModel = TeamProductDiscountPriceModel.builder()
|
||||||
|
.productPrice(productPrice)
|
||||||
|
.teamPrice(teamPrice)
|
||||||
|
.discount(
|
||||||
|
productPrice.subtract(teamPrice).divide(productPrice, 2, RoundingMode.HALF_DOWN).doubleValue()
|
||||||
|
)
|
||||||
|
.build();
|
||||||
|
return teamProductDiscountPriceModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存
|
||||||
|
* @author: CuiFu Bo
|
||||||
|
* @create: 2024-11-21 16:54
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TeamProductStockModel {
|
||||||
|
/**
|
||||||
|
* 团购库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
/**
|
||||||
|
* 剩余库存
|
||||||
|
*/
|
||||||
|
private Long remainStock;
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.muyu.marketing.domain.req;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团 添加 req
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel(value = "ActivityTeamInfoListReq", description = "拼团")
|
||||||
|
public class ActivityTeamInfoReq {
|
||||||
|
|
||||||
|
private Long projectId;
|
||||||
|
/** 商品图片*/
|
||||||
|
private String projectImage;
|
||||||
|
|
||||||
|
/** 活动名称*/
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
/** 活动介绍*/
|
||||||
|
private String activities;
|
||||||
|
|
||||||
|
/** 商品单位*/
|
||||||
|
private String projectUnit;
|
||||||
|
|
||||||
|
/** 轮播图*/
|
||||||
|
private String carouselImages;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
|
/** 结束时间*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/** 拼团策略id*/
|
||||||
|
private Long strategyId;
|
||||||
|
|
||||||
|
/** 拼团策略类型*/
|
||||||
|
private String strategyType;
|
||||||
|
|
||||||
|
/** 商品规格List*/
|
||||||
|
private List<AddProjectSkuListReq> projectSkuList;
|
||||||
|
|
||||||
|
/** 全重*/
|
||||||
|
private Long weight;
|
||||||
|
/** 商品详情*/
|
||||||
|
private String goodsDetails;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.muyu.marketing.domain.req;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.apache.poi.hpsf.Decimal;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/** 添加拼团(商品规格List)Resp*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class AddProjectSkuListReq {
|
||||||
|
/** 商品sku*/
|
||||||
|
private String productSku;
|
||||||
|
/** 拼团价格*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
/** 库存库存*/
|
||||||
|
private Integer teamStock;
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.muyu.marketing.domain.req;
|
||||||
|
|
||||||
|
import com.muyu.common.core.web.page.PageDomain;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团req
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class TeamInfoListReq extends PageDomain {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*活动名查询字段
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 活动状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
public ActivityTeamInfoListQueryModel buildQueryModel(){
|
||||||
|
return ActivityTeamInfoListQueryModel.builder()
|
||||||
|
.name(this.getName())
|
||||||
|
.status(this.getStatus())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.muyu.marketing.domain.resp;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加拼团Resp
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel(value = "ActivityTeamInfoReq", description = "添加拼团")
|
||||||
|
public class ActivityTeamInfoAddResp {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
/** 商品id*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
|
||||||
|
/** 商品图片*/
|
||||||
|
private String projectImage;
|
||||||
|
|
||||||
|
/** 活动名称*/
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
/** 活动介绍*/
|
||||||
|
private String activities;
|
||||||
|
|
||||||
|
/** 商品单位*/
|
||||||
|
private String projectUnit;
|
||||||
|
|
||||||
|
/** 轮播图*/
|
||||||
|
private String carouselImages;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
/** 结束时间*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/** 拼团策略id*/
|
||||||
|
private Long strategyId;
|
||||||
|
|
||||||
|
/** 拼团策略类型*/
|
||||||
|
private String strategyType;
|
||||||
|
|
||||||
|
/** 商品规格List*/
|
||||||
|
private String projectSkuList;
|
||||||
|
|
||||||
|
/** 全重*/
|
||||||
|
private Long weight;
|
||||||
|
/** 商品详情*/
|
||||||
|
private String goodsDetails;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-marketing</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>marketing-remote</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>marketing-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,64 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-marketing</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>marketing-server</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>marketing-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Druid -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
|
<version>${druid.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Dynamic DataSource -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
|
<version>${dynamic-ds.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-product-cache</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-security</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.muyu.marketing;
|
||||||
|
|
||||||
|
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营销模块
|
||||||
|
*
|
||||||
|
* @author muyu
|
||||||
|
*/
|
||||||
|
@SpringBootApplication
|
||||||
|
@EnableMyFeignClients
|
||||||
|
public class MuYuMarketIngApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(MuYuMarketIngApplication.class,args);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.muyu.marketing.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||||
|
import com.muyu.marketing.domain.req.ActivityTeamInfoReq;
|
||||||
|
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
||||||
|
import com.muyu.marketing.service.ActivityTeamInfoService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团
|
||||||
|
* @author muyu
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/team")
|
||||||
|
public class ActivityTeamInfoController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ActivityTeamInfoService activityTeamInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团 活动表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取拼团列表")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public Result<TableDataInfo<ActivityTeamInfoListModel>> ActivityTeamInfoList(@RequestBody TeamInfoListReq teamInfoListReq){
|
||||||
|
ActivityTeamInfoListQueryModel queryModel = ActivityTeamInfoListQueryModel.builder()
|
||||||
|
.name(teamInfoListReq.getName())
|
||||||
|
.status(teamInfoListReq.getStatus())
|
||||||
|
.build();
|
||||||
|
TableDataInfo<ActivityTeamInfoListModel> tableDataInfo = activityTeamInfoService.tabDateInfo(queryModel);
|
||||||
|
return Result.success(tableDataInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增拼团活动
|
||||||
|
*/
|
||||||
|
@ApiOperation("添加拼团")
|
||||||
|
@PostMapping("/add")
|
||||||
|
public Result<String> add(@RequestBody ActivityTeamInfoReq activityTeamInfoReq) {
|
||||||
|
activityTeamInfoService.addActivityTeamInfo(activityTeamInfoReq);
|
||||||
|
return Result.success("创建成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.muyu.marketing.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/** 团购活动执行*/
|
||||||
|
@RestController
|
||||||
|
public class ActivityTeamOpenInfoController {
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.muyu.marketing.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/** 商品拼团规格信息*/
|
||||||
|
@RestController
|
||||||
|
public class ActivityTeamProductSkuInfoController {
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.muyu.marketing.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/** 拼团免单策略*/
|
||||||
|
@RestController
|
||||||
|
public class TeamStrategyExemptionController {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.muyu.marketing.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/** 百人策略*/
|
||||||
|
@RestController
|
||||||
|
public class TeamStrategyExemptionHundredController {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.muyu.marketing.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/** 普通策略*/
|
||||||
|
@RestController
|
||||||
|
public class TeamStrategyExemptionOrdinaryController {
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.muyu.marketing.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团
|
||||||
|
* @author muyu
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ActivityTeamInfoMapper extends BaseMapper<ActivityTeamInfo> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.muyu.marketing.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamOpenInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface ActivityTeamOpenInfoMapper extends BaseMapper<ActivityTeamOpenInfo> {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.muyu.marketing.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface ActivityTeamProductSkuInfoMapper extends BaseMapper<ActivityTeamProductSkuInfo> {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.muyu.marketing.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TeamStrategyExemptionHundredMapper extends BaseMapper<TeamStrategyExemptionHundred> {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.muyu.marketing.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TeamStrategyExemptionMapper extends BaseMapper<TeamStrategyExemption> {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.muyu.marketing.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionOrdinary;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TeamStrategyExemptionOrdinaryMapper extends BaseMapper<TeamStrategyExemptionOrdinary> {
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.muyu.marketing.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||||
|
import com.muyu.marketing.domain.req.ActivityTeamInfoReq;
|
||||||
|
import com.muyu.marketing.domain.resp.ActivityTeamInfoAddResp;
|
||||||
|
|
||||||
|
|
||||||
|
/** 拼团*/
|
||||||
|
|
||||||
|
public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团活动列表
|
||||||
|
* @param activityTeamInfoListQueryModel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
TableDataInfo<ActivityTeamInfoListModel> tabDateInfo(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加拼团活动
|
||||||
|
*/
|
||||||
|
void addActivityTeamInfo(ActivityTeamInfoReq activityTeamInfoReq);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.muyu.marketing.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.common.core.enums.market.team.TeamOpenTypeEnum;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamOpenInfo;
|
||||||
|
|
||||||
|
public interface ActivityTeamOpenInfoService extends IService<ActivityTeamOpenInfo> {
|
||||||
|
/**
|
||||||
|
* 开团类型
|
||||||
|
* @param teamId
|
||||||
|
* @param teamOpenTypeEnum
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getTeamTeamOpenInfoByTeamIdAndType(Long teamId, TeamOpenTypeEnum teamOpenTypeEnum);
|
||||||
|
|
||||||
|
/** 根据Id获取开团数量*/
|
||||||
|
public Long getTeamTypeNumberByTeamId(Long teamId);
|
||||||
|
/** 跟Id获取参团数量*/
|
||||||
|
public Long getAddTeamTypeNumberByTeamId(Long teamId);
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.muyu.marketing.service;
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.model.TeamProductDiscountPriceModel;
|
||||||
|
|
||||||
|
public interface ActivityTeamProductSkuInfoService {
|
||||||
|
/** 商品优惠*/
|
||||||
|
public TeamProductDiscountPriceModel getDiscountPrice(Long teamId);
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package com.muyu.marketing.service;
|
||||||
|
|
||||||
|
public interface TeamStrategyExemptionHundredService {
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package com.muyu.marketing.service;
|
||||||
|
|
||||||
|
public interface TeamStrategyExemptionOrdinaryService {
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package com.muyu.marketing.service;
|
||||||
|
|
||||||
|
public interface TeamStrategyExemptionService {
|
||||||
|
}
|
|
@ -0,0 +1,113 @@
|
||||||
|
package com.muyu.marketing.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
|
import com.muyu.marketing.domain.model.*;
|
||||||
|
import com.muyu.marketing.domain.req.ActivityTeamInfoReq;
|
||||||
|
import com.muyu.marketing.domain.req.AddProjectSkuListReq;
|
||||||
|
import com.muyu.marketing.mapper.ActivityTeamInfoMapper;
|
||||||
|
import com.muyu.marketing.mapper.ActivityTeamProductSkuInfoMapper;
|
||||||
|
import com.muyu.marketing.service.ActivityTeamInfoService;
|
||||||
|
import com.muyu.marketing.service.ActivityTeamOpenInfoService;
|
||||||
|
import com.muyu.marketing.service.ActivityTeamProductSkuInfoService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团
|
||||||
|
* @author muyu
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMapper,ActivityTeamInfo>
|
||||||
|
implements ActivityTeamInfoService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ActivityTeamInfoMapper activityTeamInfoMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ActivityTeamOpenInfoService activityTeamOpenInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ActivityTeamProductSkuInfoMapper activityTeamProductSkuInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private ActivityTeamProductSkuInfoServiceImpl activityTeamProductSkuInfoService;
|
||||||
|
/**
|
||||||
|
* 团购活动列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<ActivityTeamInfoListModel> tabDateInfo(ActivityTeamInfoListQueryModel teamInfoListQueryModel) {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.like(StringUtils.isNotEmpty(teamInfoListQueryModel.getName()),ActivityTeamInfo::getName,teamInfoListQueryModel.getName());
|
||||||
|
queryWrapper.like(StringUtils.isNotEmpty(teamInfoListQueryModel.getStatus()),ActivityTeamInfo::getStatus,teamInfoListQueryModel.getStatus());
|
||||||
|
|
||||||
|
Page<ActivityTeamInfo> activityTeamInfoPage = this.page(teamInfoListQueryModel.buildPage(), queryWrapper);
|
||||||
|
List<ActivityTeamInfo> activityTeamInfoList = activityTeamInfoPage.getRecords();
|
||||||
|
|
||||||
|
ArrayList<ActivityTeamInfoListModel> activityTeamInfoListModels = new ArrayList<>();
|
||||||
|
|
||||||
|
for (ActivityTeamInfo activityTeamInfo : activityTeamInfoList) {
|
||||||
|
ActivityTeamInfoListModel activityTeamInfoListModel = new ActivityTeamInfoListModel();
|
||||||
|
|
||||||
|
activityTeamInfoListModel.setId(activityTeamInfo.getId());//拼团活动id
|
||||||
|
activityTeamInfoListModel.setName(activityTeamInfo.getName());//拼团名称
|
||||||
|
activityTeamInfoListModel.setAddTeamNumber(activityTeamOpenInfoService.getAddTeamTypeNumberByTeamId(activityTeamInfo.getId()));//参团人数
|
||||||
|
activityTeamInfoListModel.setOpenTeamNumber(activityTeamOpenInfoService.getTeamTypeNumberByTeamId(activityTeamInfoListModel.getId()));//开团人数
|
||||||
|
activityTeamInfoListModel.setAttendNumber(activityTeamInfoListModel.getAttendNumber());//拼团人数
|
||||||
|
activityTeamInfoListModel.setEndTime(activityTeamInfo.getEndTime());//活动结束时间
|
||||||
|
|
||||||
|
activityTeamInfoListModel.setProductImage(activityTeamInfo.getProductImage());//拼团商品图片
|
||||||
|
TeamProductDiscountPriceModel discountPrice = activityTeamProductSkuInfoService.getDiscountPrice(activityTeamInfo.getId());
|
||||||
|
activityTeamInfoListModel.setProductPrice(discountPrice.getProductPrice());//商品价格
|
||||||
|
activityTeamInfoListModel.setRemainStock(0L);//商品库存
|
||||||
|
activityTeamInfoListModel.setStatus(activityTeamInfo.getStatus());//团购状态
|
||||||
|
activityTeamInfoListModel.setTeamPrice(discountPrice.getTeamPrice());//拼团价格
|
||||||
|
activityTeamInfoListModel.setTeamStock(0L);//拼团库存
|
||||||
|
|
||||||
|
activityTeamInfoListModels.add(activityTeamInfoListModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
TableDataInfo<ActivityTeamInfoListModel> tableDataInfo = new TableDataInfo<>();
|
||||||
|
tableDataInfo.setTotal(activityTeamInfoPage.getTotal());
|
||||||
|
tableDataInfo.setRows(activityTeamInfoListModels);
|
||||||
|
|
||||||
|
return tableDataInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加 拼团 活动
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addActivityTeamInfo(ActivityTeamInfoReq activityTeamInfoReq) {
|
||||||
|
|
||||||
|
ActivityTeamInfo activityTeamInfo = ActivityTeamInfoAddModel.saveModelBuild(activityTeamInfoReq);
|
||||||
|
boolean save = this.save(activityTeamInfo);
|
||||||
|
List<AddProjectSkuListReq> skuList = activityTeamInfoReq.getProjectSkuList();
|
||||||
|
ArrayList<ActivityTeamProductSkuInfo> infoArrayList = new ArrayList<>();
|
||||||
|
//添加 拼团规格表
|
||||||
|
if (save){
|
||||||
|
Long projectId = activityTeamInfo.getId();//活动id
|
||||||
|
Long goodsId = activityTeamInfo.getProductId();
|
||||||
|
skuList.forEach(skuInfo->{
|
||||||
|
ActivityTeamProductSkuInfo activityTeamProductSkuInfo = ActivityTeamProductSkuInfoModel.saveModelBuild(projectId, goodsId, skuInfo);
|
||||||
|
infoArrayList.add(activityTeamProductSkuInfo);
|
||||||
|
});
|
||||||
|
activityTeamProductSkuInfoService.saveBatch(infoArrayList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.muyu.marketing.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import com.muyu.common.core.enums.market.team.TeamOpenTypeEnum;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamOpenInfo;
|
||||||
|
import com.muyu.marketing.mapper.ActivityTeamOpenInfoMapper;
|
||||||
|
import com.muyu.marketing.service.ActivityTeamOpenInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ActivityTeamOpenInfoServiceImpl extends ServiceImpl<ActivityTeamOpenInfoMapper, ActivityTeamOpenInfo>
|
||||||
|
implements ActivityTeamOpenInfoService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过活动Id 和活动类型查询开团数量
|
||||||
|
* @param teamId
|
||||||
|
* @param teamOpenTypeEnum
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Long getTeamTeamOpenInfoByTeamIdAndType(Long teamId, TeamOpenTypeEnum teamOpenTypeEnum) {
|
||||||
|
LambdaQueryWrapper<ActivityTeamOpenInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ActivityTeamOpenInfo::getTeamId,teamId);
|
||||||
|
queryWrapper.eq(ActivityTeamOpenInfo::getTeamType,teamOpenTypeEnum.code());
|
||||||
|
return this.count(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据Id获取开团数量
|
||||||
|
* @param teamId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Long getTeamTypeNumberByTeamId(Long teamId) {
|
||||||
|
return this.getTeamTeamOpenInfoByTeamIdAndType(teamId,TeamOpenTypeEnum.TEAT_OPEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跟Id获取参团数量
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Long getAddTeamTypeNumberByTeamId(Long teamId) {
|
||||||
|
return this.getTeamTeamOpenInfoByTeamIdAndType(teamId,TeamOpenTypeEnum.TEAM_ADD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.muyu.marketing.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
|
import com.muyu.marketing.domain.model.TeamProductDiscountPriceModel;
|
||||||
|
import com.muyu.marketing.mapper.ActivityTeamProductSkuInfoMapper;
|
||||||
|
import com.muyu.marketing.service.ActivityTeamProductSkuInfoService;
|
||||||
|
import com.muyu.product.cache.ProjectSkuCache;
|
||||||
|
import com.muyu.product.domain.ProjectSkuInfo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityTeamProductSkuInfoMapper, ActivityTeamProductSkuInfo>
|
||||||
|
implements ActivityTeamProductSkuInfoService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
|
||||||
|
private ProjectSkuCache projectSkuCache;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品优惠
|
||||||
|
* @param teamId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override //
|
||||||
|
public TeamProductDiscountPriceModel getDiscountPrice(Long teamId) {
|
||||||
|
LambdaQueryWrapper<ActivityTeamProductSkuInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ActivityTeamProductSkuInfo :: getTeamId , teamId);
|
||||||
|
List<ActivityTeamProductSkuInfo> teamProductSkuInfoList = this.list(queryWrapper);
|
||||||
|
//优惠模型集合
|
||||||
|
|
||||||
|
Optional<TeamProductDiscountPriceModel> discountPriceModelOptional = teamProductSkuInfoList.stream()
|
||||||
|
.map(activityTeamProductSkuInfo -> {
|
||||||
|
ProjectSkuInfo projectSkuInfo = projectSkuCache.get(activityTeamProductSkuInfo.getProductId(), activityTeamProductSkuInfo.getProductSku());
|
||||||
|
return TeamProductDiscountPriceModel.of(projectSkuInfo.getPrice(), activityTeamProductSkuInfo.getTeamPrice());
|
||||||
|
}).min((o1, o2) -> Double.valueOf(o1.getDiscount() *100 - o2.getDiscount() * 100). intValue());
|
||||||
|
|
||||||
|
|
||||||
|
if (discountPriceModelOptional.isEmpty()){
|
||||||
|
throw new RuntimeException("团队下没有绑定商品");
|
||||||
|
}
|
||||||
|
|
||||||
|
return discountPriceModelOptional.get();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.muyu.marketing.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||||
|
import com.muyu.marketing.mapper.TeamStrategyExemptionHundredMapper;
|
||||||
|
import com.muyu.marketing.service.TeamStrategyExemptionHundredService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class TeamStrategyExemptionHundredServiceImpl extends ServiceImpl<TeamStrategyExemptionHundredMapper, TeamStrategyExemptionHundred>
|
||||||
|
implements TeamStrategyExemptionHundredService {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.muyu.marketing.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionOrdinary;
|
||||||
|
import com.muyu.marketing.mapper.TeamStrategyExemptionOrdinaryMapper;
|
||||||
|
import com.muyu.marketing.service.TeamStrategyExemptionOrdinaryService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class TeamStrategyExemptionOrdinaryServiceImpl extends ServiceImpl<TeamStrategyExemptionOrdinaryMapper, TeamStrategyExemptionOrdinary>
|
||||||
|
implements TeamStrategyExemptionOrdinaryService {
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.muyu.marketing.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||||
|
import com.muyu.marketing.mapper.TeamStrategyExemptionMapper;
|
||||||
|
import com.muyu.marketing.service.TeamStrategyExemptionService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
|
||||||
|
implements TeamStrategyExemptionService {
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
Spring Application Name: ${spring.application.name}
|
|
@ -0,0 +1,39 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 9204
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
primary: master
|
||||||
|
datasource:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://60.204.150.30:3306/activity_team?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: xx-12345
|
||||||
|
slave:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://60.204.150.30:3306/product?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: xx-12345
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: muyu-marketing
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 60.204.150.30:8848
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 60.204.150.30:8848
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
|
@ -0,0 +1,74 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<!-- 日志存放路径 -->
|
||||||
|
<property name="log.path" value="logs/muyu-system"/>
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统日志输出 -->
|
||||||
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/info.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>INFO</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/error.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>ERROR</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统模块日志级别控制 -->
|
||||||
|
<logger name="com.muyu" level="info"/>
|
||||||
|
<!-- Spring日志级别控制 -->
|
||||||
|
<logger name="org.springframework" level="warn"/>
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="console"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!--系统操作日志-->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="file_info"/>
|
||||||
|
<appender-ref ref="file_error"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-modules</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
muyu-marketing营销管理
|
||||||
|
</description>
|
||||||
|
<artifactId>muyu-marketing</artifactId>
|
||||||
|
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>marketing-common</module>
|
||||||
|
<module>marketing-remote</module>
|
||||||
|
<module>marketing-server</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
|
@ -1,17 +1,18 @@
|
||||||
package com.muyu.product.cache.datasource.impl;
|
package com.muyu.product.cache.datasource.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.product.cache.datasource.ProjectSkuData;
|
import com.muyu.product.cache.datasource.ProjectSkuData;
|
||||||
import com.muyu.product.domain.ProjectSkuInfo;
|
import com.muyu.product.domain.ProjectSkuInfo;
|
||||||
import com.muyu.product.remote.RemoteProjectSkuService;
|
import com.muyu.product.remote.RemoteProjectSkuService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +23,7 @@ import java.util.stream.Collectors;
|
||||||
@Service
|
@Service
|
||||||
public class ProjectSkuDataRemoteImpl implements ProjectSkuData {
|
public class ProjectSkuDataRemoteImpl implements ProjectSkuData {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private RemoteProjectSkuService remoteProjectSkuService;
|
private RemoteProjectSkuService remoteProjectSkuService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -91,6 +91,8 @@ public class ProjectInfo extends BaseEntity {
|
||||||
@ApiModelProperty(name = "品牌", value = "品牌")
|
@ApiModelProperty(name = "品牌", value = "品牌")
|
||||||
private Long brandId;
|
private Long brandId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询构造器
|
* 查询构造器
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -21,6 +21,7 @@ import java.util.List;
|
||||||
fallbackFactory = RemoteProjectSkuFactory.class,
|
fallbackFactory = RemoteProjectSkuFactory.class,
|
||||||
path = "/sku"
|
path = "/sku"
|
||||||
)
|
)
|
||||||
|
|
||||||
public interface RemoteProjectSkuService {
|
public interface RemoteProjectSkuService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
package com.muyu.product.remote.factory;
|
package com.muyu.product.remote.factory;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.product.domain.ProjectSkuInfo;
|
|
||||||
import com.muyu.product.domain.RuleInfo;
|
import com.muyu.product.domain.RuleInfo;
|
||||||
import com.muyu.product.remote.RemoteProjectSkuService;
|
|
||||||
import com.muyu.product.remote.RemoteRuleService;
|
import com.muyu.product.remote.RemoteRuleService;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,7 @@ public class CategoryInfoController extends BaseController {
|
||||||
CategoryInfoSaveModel.saveBuild(categoryInfoSaveReq, SecurityUtils::getUsername)
|
CategoryInfoSaveModel.saveBuild(categoryInfoSaveReq, SecurityUtils::getUsername)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改品类信息
|
* 修改品类信息
|
||||||
*/
|
*/
|
||||||
|
@ -104,7 +105,7 @@ public class CategoryInfoController extends BaseController {
|
||||||
@ApiOperation("修改品类信息")
|
@ApiOperation("修改品类信息")
|
||||||
public Result<String> edit(@PathVariable Long id, @RequestBody CategoryInfoEditReq categoryInfoEditReq) {
|
public Result<String> edit(@PathVariable Long id, @RequestBody CategoryInfoEditReq categoryInfoEditReq) {
|
||||||
boolean b = categoryInfoService.updateUpdById(id, categoryInfoEditReq);
|
boolean b = categoryInfoService.updateUpdById(id, categoryInfoEditReq);
|
||||||
if (b){
|
if (b) {
|
||||||
return Result.success("修改成功");
|
return Result.success("修改成功");
|
||||||
}
|
}
|
||||||
return Result.success("......");
|
return Result.success("......");
|
||||||
|
@ -124,15 +125,14 @@ public class CategoryInfoController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过品类ID获取父级以上的属性、属性组、品牌集合
|
* 通过品类ID获取父级以上的属性、属性组、品牌集合
|
||||||
|
*
|
||||||
* @param categoryId 品类ID
|
* @param categoryId 品类ID
|
||||||
* @return 父级以上的属性、属性组、品牌集合
|
* @return 父级以上的属性、属性组、品牌集合
|
||||||
*/
|
*/
|
||||||
@GetMapping("/parentCommonElement/{categoryId}")
|
@GetMapping("/parentCommonElement/{categoryId}")
|
||||||
@ApiOperation("通过品类ID获取父级以上的属性集合")
|
@ApiOperation("通过品类ID获取父级以上的属性集合")
|
||||||
@ApiImplicitParam(name = "categoryId", value = "categoryId", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class, example = "1")
|
@ApiImplicitParam(name = "categoryId", value = "categoryId", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class, example = "1")
|
||||||
public Result<CategoryParentCommonElementResp> parentCommonElement(
|
public Result<CategoryParentCommonElementResp> parentCommonElement(@PathVariable(value = "categoryId") Long categoryId) {
|
||||||
@PathVariable(value = "categoryId") Long categoryId
|
|
||||||
) {
|
|
||||||
return Result.success(categoryInfoService.parentCommonElement(categoryId));
|
return Result.success(categoryInfoService.parentCommonElement(categoryId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class ProjectInfoController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取商品信息详细信息
|
* 获取 商品信息 详细信息
|
||||||
*/
|
*/
|
||||||
@ApiOperation("获取商品信息详细信息")
|
@ApiOperation("获取商品信息详细信息")
|
||||||
@RequiresPermissions("product:info:query")
|
@RequiresPermissions("product:info:query")
|
||||||
|
@ -81,7 +81,7 @@ public class ProjectInfoController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取商品信息详细信息
|
* 获取 商品信息 详细信息
|
||||||
*/
|
*/
|
||||||
@ApiOperation("获取商品信息详细信息")
|
@ApiOperation("获取商品信息详细信息")
|
||||||
@RequiresPermissions("product:info:query")
|
@RequiresPermissions("product:info:query")
|
||||||
|
@ -92,7 +92,7 @@ public class ProjectInfoController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取商品信息详细信息
|
* 获取 商品信息详 细信息
|
||||||
*/
|
*/
|
||||||
@ApiOperation("获取商品信息详细信息")
|
@ApiOperation("获取商品信息详细信息")
|
||||||
@RequiresPermissions("product:info:query")
|
@RequiresPermissions("product:info:query")
|
||||||
|
|
|
@ -398,6 +398,7 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
||||||
List<Long> cateGoryIdList = new ArrayList<>();
|
List<Long> cateGoryIdList = new ArrayList<>();
|
||||||
getParentIdListByCateGoryId(cateGoryIdList, cateGoryId);
|
getParentIdListByCateGoryId(cateGoryIdList, cateGoryId);
|
||||||
// 取出和品类相关联的属性组关系 - 中间表
|
// 取出和品类相关联的属性组关系 - 中间表
|
||||||
|
|
||||||
LambdaQueryWrapper<AsCategoryAttributeGroup> asCategoryAttributeGroupLambdaQueryWrapper = new LambdaQueryWrapper<>(){{
|
LambdaQueryWrapper<AsCategoryAttributeGroup> asCategoryAttributeGroupLambdaQueryWrapper = new LambdaQueryWrapper<>(){{
|
||||||
in(AsCategoryAttributeGroup::getCategoryId, cateGoryIdList);
|
in(AsCategoryAttributeGroup::getCategoryId, cateGoryIdList);
|
||||||
}};
|
}};
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/info.log</file>
|
<file>${log.path}/info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -28,16 +28,16 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/error.log</file>
|
<file>${log.path}/error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/info.log</file>
|
<file>${log.path}/info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -28,16 +28,16 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/error.log</file>
|
<file>${log.path}/error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class RouterVo {
|
||||||
private String component;
|
private String component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路由参数:如 {"id": 1, "name": "ry"}
|
* 路由参数:如 {"id": 1, "name": "ry"}
|
||||||
*/
|
*/
|
||||||
private String query;
|
private String query;
|
||||||
|
|
||||||
|
|
|
@ -486,16 +486,16 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
failureNum++;
|
failureNum++;
|
||||||
String msg = "<br/>" + failureNum + "、账号 " + user.getUserName() + " 导入失败:";
|
String msg = "<br/>" + failureNum + "、账号 " + user.getUserName() + " 导入失败:";
|
||||||
failureMsg.append(msg + e.getMessage());
|
failureMsg.append(msg + e.getMessage());
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (failureNum > 0) {
|
if (failureNum > 0) {
|
||||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||||
throw new ServiceException(failureMsg.toString());
|
throw new ServiceException(failureMsg.toString());
|
||||||
} else {
|
} else {
|
||||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||||
}
|
}
|
||||||
return successMsg.toString();
|
return successMsg.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/info.log</file>
|
<file>${log.path}/info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -28,16 +28,16 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/error.log</file>
|
<file>${log.path}/error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<module>muyu-file</module>
|
<module>muyu-file</module>
|
||||||
<module>muyu-product</module>
|
<module>muyu-product</module>
|
||||||
<module>muyu-shop-cart</module>
|
<module>muyu-shop-cart</module>
|
||||||
|
<module>muyu-marketing</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>muyu-modules</artifactId>
|
<artifactId>muyu-modules</artifactId>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/info.log</file>
|
<file>${log.path}/info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -28,16 +28,16 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/error.log</file>
|
<file>${log.path}/error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
<!-- 日志文件名格式 -->
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
6
pom.xml
6
pom.xml
|
@ -228,6 +228,12 @@
|
||||||
<version>${muyu.version}</version>
|
<version>${muyu.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>marketing-common</artifactId>
|
||||||
|
<version>${muyu.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 商品模块 远程调用 依赖 -->
|
<!-- 商品模块 远程调用 依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
|
|
|
@ -721,9 +721,9 @@ CREATE TABLE `sys_job_log` (
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_job_log
|
-- Records of sys_job_log
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_job_log` VALUES (1, '系统默认(无参)', 'DEFAULT', 'myTask.ryNoParams', '系统默认(无参) 总共耗时:2毫秒', '0', '', '2024-03-08 20:51:30');
|
INSERT INTO `sys_job_log` VALUES (1, '系统默认(无参)', 'DEFAULT', 'myTask.ryNoParams', '系统默认(无参) 总共耗时:2毫秒', '0', '', '2024-03-08 20:51:30');
|
||||||
INSERT INTO `sys_job_log` VALUES (2, '系统默认(无参)', 'DEFAULT', 'myTask.ryNoParams', '系统默认(无参) 总共耗时:0毫秒', '0', '', '2024-03-08 20:51:38');
|
INSERT INTO `sys_job_log` VALUES (2, '系统默认(无参)', 'DEFAULT', 'myTask.ryNoParams', '系统默认(无参) 总共耗时:0毫秒', '0', '', '2024-03-08 20:51:38');
|
||||||
INSERT INTO `sys_job_log` VALUES (3, '系统默认(无参)', 'DEFAULT', 'myTask.ryNoParams', '系统默认(无参) 总共耗时:0毫秒', '0', '', '2024-03-08 21:22:37');
|
INSERT INTO `sys_job_log` VALUES (3, '系统默认(无参)', 'DEFAULT', 'myTask.ryNoParams', '系统默认(无参) 总共耗时:0毫秒', '0', '', '2024-03-08 21:22:37');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_logininfor
|
-- Table structure for sys_logininfor
|
||||||
|
@ -1388,8 +1388,8 @@ CREATE TABLE `sys_notice` (
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_notice
|
-- Records of sys_notice
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_notice` VALUES (1, '温馨提醒:2018-07-01 若依新版本发布啦', '1', 0xE696B0E78988E69CACE58685E5AEB9, '0', 'admin', '2023-11-12 15:57:50', 'admin', '2024-03-08 20:52:38', '管理员');
|
INSERT INTO `sys_notice` VALUES (1, '温馨提醒:2018-07-01 若依新版本发布啦', '1', 0xE696B0E78988E69CACE58685E5AEB9, '0', 'admin', '2023-11-12 15:57:50', 'admin', '2024-03-08 20:52:38', '管理员');
|
||||||
INSERT INTO `sys_notice` VALUES (2, '维护通知:2018-07-01 若依系统凌晨维护', '1', 0xE7BBB4E68AA4E58685E5AEB9, '0', 'admin', '2023-11-12 15:57:50', '', NULL, '管理员');
|
INSERT INTO `sys_notice` VALUES (2, '维护通知:2018-07-01 若依系统凌晨维护', '1', 0xE7BBB4E68AA4E58685E5AEB9, '0', 'admin', '2023-11-12 15:57:50', '', NULL, '管理员');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_oper_log
|
-- Table structure for sys_oper_log
|
||||||
|
@ -1696,7 +1696,7 @@ CREATE TABLE `sys_role` (
|
||||||
`role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称',
|
`role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称',
|
||||||
`role_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色权限字符串',
|
`role_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色权限字符串',
|
||||||
`role_sort` int(4) NOT NULL COMMENT '显示顺序',
|
`role_sort` int(4) NOT NULL COMMENT '显示顺序',
|
||||||
`data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)',
|
`data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)',
|
||||||
`menu_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '菜单树选择项是否关联显示',
|
`menu_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '菜单树选择项是否关联显示',
|
||||||
`dept_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '部门树选择项是否关联显示',
|
`dept_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '部门树选择项是否关联显示',
|
||||||
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色状态(0正常 1停用)',
|
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色状态(0正常 1停用)',
|
||||||
|
|
Loading…
Reference in New Issue