From 753f3d9d8b89058afc8a2995daffa802e80cfd38 Mon Sep 17 00:00:00 2001
From: SongZhang <2064194730@qq.com>
Date: Fri, 20 Sep 2024 15:51:59 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4mapper=E6=89=AB=E6=8F=8F?=
=?UTF-8?q?=E6=96=B9=E5=BC=8F=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=AF=B7=E6=B1=82?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=89=93=E5=8D=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 12 +-
.../system/cashierservice/Shell.java | 7 +-
.../cashierservice/annotation/MyLog.java | 26 ---
.../system/cashierservice/aop/LogAop.java | 201 ------------------
.../cashierservice/bean/ActionType.java | 25 ---
.../cashierservice/bean/GetKeyWith.java | 20 --
.../system/cashierservice/bean/LogTag.java | 19 --
.../system/cashierservice/bean/LogType.java | 21 --
.../bean/OperationLogState.java | 24 ---
.../cashierservice/bean/OperationLogType.java | 43 ----
.../system/cashierservice/bean/Plat.java | 23 --
.../config/RequestLoggingConfig.java | 30 +++
.../dao/ShopUserDutyDetailMapper.java | 4 +-
.../dao/ShopUserDutyMapper.java | 4 +-
.../dao/ShopUserDutyPayMapper.java | 4 +-
.../dao/TbCashierCartMapper.java | 2 -
.../dao/TbConsInfoFlowMapper.java | 4 +-
.../cashierservice/dao/TbConsInfoMapper.java | 4 +-
.../cashierservice/dao/TbMemberInMapper.java | 4 +-
.../dao/TbMerchantThirdApplyMapper.java | 4 +-
.../dao/TbOrderDetailMapper.java | 4 +-
.../cashierservice/dao/TbOrderInfoMapper.java | 2 -
.../dao/TbOrderOutNumberMapper.java | 4 +-
.../dao/TbOrderPaymentMapper.java | 4 +-
.../dao/TbPlussShopStaffMapper.java | 4 +-
.../dao/TbPrintMachineMapper.java | 4 +-
.../dao/TbPrintPCMachineMapper.java | 2 -
.../cashierservice/dao/TbProductMapper.java | 2 -
.../dao/TbProductSkuMapper.java | 2 -
.../dao/TbProductSkuResultMapper.java | 4 +-
.../dao/TbProductSpecMapper.java | 4 +-
.../cashierservice/dao/TbProskuConMapper.java | 2 -
.../cashierservice/dao/TbQuickPayMapper.java | 4 +-
.../cashierservice/dao/TbShopAreaMapper.java | 4 +-
.../dao/TbShopCategoryMapper.java | 4 +-
.../cashierservice/dao/TbShopInfoMapper.java | 4 +-
.../dao/TbShopOnlineMapper.java | 4 +-
.../dao/TbShopPayTypeMapper.java | 4 +-
.../cashierservice/dao/TbShopTableMapper.java | 2 -
.../dao/TbShopUserFlowMapper.java | 4 +-
.../cashierservice/dao/TbShopUserMapper.java | 4 +-
.../cashierservice/dao/TbTokenMapper.java | 4 +-
.../cashierservice/dao/TbUserInfoMapper.java | 4 +-
.../dao/TbUserShopMsgMapper.java | 4 +-
.../dao/TbmerchantAccountMapper.java | 4 +-
.../cashierservice/dao/tbHandoverMapper.java | 4 +-
src/main/resources/application-dev.yml | 4 +-
src/main/resources/application.yml | 20 +-
48 files changed, 77 insertions(+), 520 deletions(-)
delete mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/annotation/MyLog.java
delete mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/aop/LogAop.java
delete mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/bean/ActionType.java
delete mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/bean/GetKeyWith.java
delete mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/bean/LogTag.java
delete mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/bean/LogType.java
delete mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/bean/OperationLogState.java
delete mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/bean/OperationLogType.java
delete mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/bean/Plat.java
create mode 100644 src/main/java/com/chaozhanggui/system/cashierservice/config/RequestLoggingConfig.java
diff --git a/pom.xml b/pom.xml
index c5adaeb..3debfd4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -189,17 +189,7 @@
2.2.0
-
- com.baomidou
- mybatis-plus
- 3.3.1
-
-
- org.mybatis
- mybatis-spring
-
-
-
+
p6spy
p6spy
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/Shell.java b/src/main/java/com/chaozhanggui/system/cashierservice/Shell.java
index bb1fc4f..f8d2b23 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/Shell.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/Shell.java
@@ -20,11 +20,10 @@ import org.springframework.web.client.RestTemplate;
@SpringBootApplication
@EnableScheduling
-@EntityScan(basePackageClasses = {Shell.class})
-@MapperScan(basePackageClasses ={Shell.class} )
-@ComponentScan(basePackageClasses ={Shell.class})
-@EnableAspectJAutoProxy(proxyTargetClass = true)
+//@EntityScan(basePackageClasses = {Shell.class})
+//@EnableAspectJAutoProxy(proxyTargetClass = true)
@Slf4j
+@MapperScan({"com.chaozhanggui.system.cashierservice.mybatis", "com.chaozhanggui.system.cashierservice.mapper", "com.chaozhanggui.system.cashierservice.dao"})
public class Shell {
private static Logger logger = LoggerFactory.getLogger(Shell.class);
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/annotation/MyLog.java b/src/main/java/com/chaozhanggui/system/cashierservice/annotation/MyLog.java
deleted file mode 100644
index 19c4391..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/annotation/MyLog.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.chaozhanggui.system.cashierservice.annotation;
-
-
-
-import com.chaozhanggui.system.cashierservice.bean.*;
-
-import java.lang.annotation.*;
-
-/**
- * 日志注解
- */
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface MyLog {
- String value() default "未命名日志";
- LogTag tag();
- OperationLogType operationLogType() default OperationLogType.NULL;
- boolean write() default false;
- GetKeyWith getKeyWith() default GetKeyWith.WITH_NULL;
- String keyName() default "";
- OperationLogState operationLogstate() default OperationLogState.UN_HTTP_STATE;
- ActionType actionType() default ActionType.SELECT;
- LogType type() default LogType.INFO;
- boolean showBody() default false;
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/aop/LogAop.java b/src/main/java/com/chaozhanggui/system/cashierservice/aop/LogAop.java
deleted file mode 100644
index 579f673..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/aop/LogAop.java
+++ /dev/null
@@ -1,201 +0,0 @@
-package com.chaozhanggui.system.cashierservice.aop;
-
-import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.text.StrFormatter;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.chaozhanggui.system.cashierservice.annotation.MyLog;
-import com.chaozhanggui.system.cashierservice.bean.GetKeyWith;
-import lombok.extern.log4j.Log4j2;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Before;
-import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.core.annotation.Order;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Component;
-import org.springframework.web.context.request.RequestContextHolder;
-import org.springframework.web.context.request.ServletRequestAttributes;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-@Aspect
-@Order
-@Component
-@Log4j2
-public class LogAop {
-
-
- @Pointcut("@annotation(com.chaozhanggui.system.cashierservice.annotation.MyLog)")
- private void getLogPointCut() {
- }
-
- private String getRequestBodyInfo(HttpServletRequest request) {
- try {
- //利用InputStreamReader将字节流转换为字符流
- BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(request.getInputStream()));
- String string;
- StringBuilder stringBuffer=new StringBuilder();
- //读取字符流的字符拼接在stringBuffer,StringBuffer在进行字符串处理时,不生成新的对象,在内存使用上要优于String类
- while((string=bufferedReader.readLine())!=null){
- stringBuffer.append(string);
- }
- return stringBuffer.toString();
- }catch (Exception e) {
- log.error(e);
- }
- return "";
- }
-
-
- @Async
- public void writeLog(String remoteAddr, String url, MyLog logAnnotation, Map parameterMap, String bodyInfo, Object resp, long duration) {
- if (!logAnnotation.write()) return;
- // 系统操作日志, 异步事件
- String keyVal = null;
- JSONObject jsonObject = JSON.parseObject(bodyInfo);
- if (logAnnotation.keyName() != null && jsonObject != null) {
- if (GetKeyWith.WITH_POST.equals(logAnnotation.getKeyWith())) {
- keyVal = jsonObject.getString(logAnnotation.keyName());
- }else if (GetKeyWith.WITH_GET.equals(logAnnotation.getKeyWith())) {
- for (Map.Entry entry : parameterMap.entrySet()) {
- if (entry.getKey().equals(logAnnotation.keyName())) {
- keyVal = entry.getValue()[0];
- }
- }
-
- }
- }
-
-// SystemOperationLog operationLog = new SystemOperationLog();
-// operationLog.setMsg(logAnnotation.tag().getValue() + " " + logAnnotation.value())
-// .setKeyValue(keyVal)
-// .setKeyName(logAnnotation.keyName())
-// .setState(logAnnotation.operationLogstate())
-// .setType(logAnnotation.operationLogType())
-// .setRespData(resp)
-// .setDuration(duration)
-// .setIp(remoteAddr)
-// .setUrl(url)
-// .setReqData(jsonObject);
-// Utils.publishEvent(operationLog, OperationLogEvent.class);
- }
-
- /**
- * 配置环绕通知,使用在方法logPointcut()上注册的切入点
- *
- * @param joinPoint join point for advice
- */
- @Around("getLogPointCut()")
- public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
- ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
- String logInfo = "\033[34m请求地址: {}, 请求ip: {}, 请求方式: {}, GET参数: {}, POST参数: {}\033[0m";
- String logStr = "";
- String bodyInfo = "";
-
- Map parameterMap = new HashMap<>();
- HttpServletRequest request = null;
- String remoteAddr = "";
- if (attributes != null) {
- request = attributes.getRequest();
- if (request.getHeader("X-Forwarded-For") != null) {
- remoteAddr = request.getHeader("X-Forwarded-For").split(",")[0];
- } else {
- remoteAddr = request.getRemoteAddr();
- }
- parameterMap = request.getParameterMap();
- bodyInfo = getRequestBodyInfo(request);
- logStr = StrFormatter.format(logInfo,
- request.getRequestURI(), remoteAddr, request.getMethod(), request.getQueryString(), bodyInfo);
- log.info(logStr);
- }
-
- MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
- Method method = methodSignature.getMethod();
- MyLog logAnnotation = method.getAnnotation(MyLog.class);
-
-
- // 开始时间
- long startTime = DateUtil.current(false);
- Object result = null;
- Exception error = null;
- try {
- result = joinPoint.proceed();
- return result;
- }catch (Exception e) {
- error = e;
- throw e;
- }
- finally {
- long endTime = DateUtil.current(false);
-
- writeLog(remoteAddr, request != null ? request.getRequestURI() : "", logAnnotation, parameterMap, bodyInfo, result == null ? Objects.requireNonNull(error).getCause() + error.getMessage(): result, endTime - startTime);
-
- // 异步记录日志
- if (logAnnotation.showBody()) {
- logInfo = "\033[32;4m包名: {}, 方法名: {}, 描述: {}, 操作类型: {}, 执行结果: {}, 执行时间: {}ms\033[0m";
- }else {
- logInfo = "\033[32;4m包名: {}, 方法名: {}, 描述: {}, 操作类型: {}, 执行时间: {}ms\033[0m";
- }
- switch (logAnnotation.type()) {
- case INFO:
- if (logAnnotation.showBody()) {
- log.info(logInfo,
- joinPoint.getTarget().getClass().getPackage().getName(),
- method.getName(), logAnnotation.value(), logAnnotation.actionType().getType(), result, endTime - startTime);
- }else {
- log.info(logInfo,
- joinPoint.getTarget().getClass().getPackage().getName(),
- method.getName(), logAnnotation.tag() + logAnnotation.value(), logAnnotation.actionType().getType(), endTime - startTime);
- }
-
- break;
- case ERROR:
- if (logAnnotation.showBody()) {
- log.error(logInfo,
- joinPoint.getTarget().getClass().getPackage().getName(),
- method.getName(), logAnnotation.value(), logAnnotation.actionType().getType(), result, endTime - startTime);
- }else {
- log.error(logInfo,
- joinPoint.getTarget().getClass().getPackage().getName(),
- method.getName(), logAnnotation.tag() + logAnnotation.value(), logAnnotation.actionType().getType(), endTime - startTime);
- }
- break;
- case WARN:
- if (logAnnotation.showBody()) {
- log.warn(logInfo,
- joinPoint.getTarget().getClass().getPackage().getName(),
- method.getName(), logAnnotation.value(), logAnnotation.actionType().getType(), result, endTime - startTime);
- }else {
- log.warn(logInfo,
- joinPoint.getTarget().getClass().getPackage().getName(),
- method.getName(), logAnnotation.tag() + logAnnotation.value(), logAnnotation.actionType().getType(), endTime - startTime);
- }
- break;
- default:
- if (logAnnotation.showBody()) {
- log.debug(logInfo,
- joinPoint.getTarget().getClass().getPackage().getName(),
- method.getName(), logAnnotation.value(), logAnnotation.actionType().getType(), result, endTime - startTime);
- }else {
- log.debug(logInfo,
- joinPoint.getTarget().getClass().getPackage().getName(),
- method.getName(), logAnnotation.tag() + logAnnotation.value(), logAnnotation.actionType().getType(), endTime - startTime);
- }
- break;
- }
- }
-
- }
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/bean/ActionType.java b/src/main/java/com/chaozhanggui/system/cashierservice/bean/ActionType.java
deleted file mode 100644
index 71bf830..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/bean/ActionType.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.chaozhanggui.system.cashierservice.bean;
-
-
-/**
- * 日志操作活动枚举
- */
-public enum ActionType {
- SELECT("查询操作"),
- UPDATE("修改操作"),
- DELETE("删除操作"),
- ADD("新增操作");
- private String type;
-
- ActionType(String type) {
- this.type = type;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/bean/GetKeyWith.java b/src/main/java/com/chaozhanggui/system/cashierservice/bean/GetKeyWith.java
deleted file mode 100644
index dcd1ee8..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/bean/GetKeyWith.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.chaozhanggui.system.cashierservice.bean;
-
-import lombok.Getter;
-
-/**
- * @author: ZhangSong
- * @create: 2024-05-15 17:01
- */
-@Getter
-public enum GetKeyWith {
- WITH_GET(0),
- WITH_POST(1),
- WITH_NULL(-1);
-
- private final Integer value;
-
- GetKeyWith(Integer value) {
- this.value = value;
- }
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/bean/LogTag.java b/src/main/java/com/chaozhanggui/system/cashierservice/bean/LogTag.java
deleted file mode 100644
index 6222c46..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/bean/LogTag.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.chaozhanggui.system.cashierservice.bean;
-
-import lombok.Getter;
-
-/**
- * 日志标签
- * @author: ZhangSong
- * @create: 2024-05-15 16:32
- */
-@Getter
-public enum LogTag {
- JPUSH("极光"), CLIENT("安卓"),
- LOGIN("登录"), SYSTEM("系统"), CART("订单购物车"), PLACE("下单");
- private final String value;
-
- LogTag(String value) {
- this.value = value;
- }
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/bean/LogType.java b/src/main/java/com/chaozhanggui/system/cashierservice/bean/LogType.java
deleted file mode 100644
index 1bb599d..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/bean/LogType.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.chaozhanggui.system.cashierservice.bean;
-
-public enum LogType {
- INFO("INFO"),
- ERROR("ERROR"),
- WARN("WARN"),
- DEBUG("DEBUG");
- private String value;
-
- LogType(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/bean/OperationLogState.java b/src/main/java/com/chaozhanggui/system/cashierservice/bean/OperationLogState.java
deleted file mode 100644
index cec77e1..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/bean/OperationLogState.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.chaozhanggui.system.cashierservice.bean;
-
-/**
- * 操作日志所有状态
- * @author: ZhangSong
- * @create: 2024-04-28 11:06
- */
-public enum OperationLogState {
- UN_HTTP_STATE(-1),
- HTTP_FAIL_STATE(0),
- HTTP_SUCCESS_STATE(1),
- SQL_EXE_FAIL_STATE(2),
- SQL_EXE_SUCCESS_STATE(3);
-
- private Integer state;
-
- OperationLogState(Integer state) {
- this.state = state;
- }
-
- public Integer getState() {
- return state;
- }
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/bean/OperationLogType.java b/src/main/java/com/chaozhanggui/system/cashierservice/bean/OperationLogType.java
deleted file mode 100644
index 522bc70..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/bean/OperationLogType.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.chaozhanggui.system.cashierservice.bean;
-
-/**
- * 操作日志所有操作类型
- * @author: ZhangSong
- * @create: 2024-04-28 11:04
- */
-public enum OperationLogType {
- UM_API_QUERY_CITY_CALL(1000),
- UM_API_UPDATE_ORDER_PHONE(1010),
- UM_API_QUERY_DRIVER_LOCATION(1020),
- UM_API_CANCEL_ORDER(1030),
- UM_API_CANCEL_ORDER_SUCCESS(1040),
- UM_API_PAY_ORDER_CALL(1050),
- UM_API_CREATE_INVOICE_CALL(1060),
- UM_API_QUERY_INVOICE_CALL(1070),
- UM_API_RED_REVERSE_CALL(1080),
- UM_API_RED_REVERSE_CALL_SUCCESS(1081),
- UM_API_PUSH_ORDER_STATE_CALL(1090),
- UM_API_PUSH_ORDER_STATE_CALL_GET_HL_STATE_FAIL(1091),
- UM_API_PUSH_DRIVER_CALL(1100),
- UM_API_PUSH_DRIVER_CALL_API_FAIL(1101),
- UM_API_QUERY_PRICE_CALL(1110),
- UM_API_CREATE_ORDER_CALL(1120),
- UM_API_QUERY_ORDER_DETAIL_CALL(1130),
- JPUSH_API_CALL(1140),
- UM_CONTROLLER_MAKE_INVOICE_CALL(1150), UM_API_PUSH_TEMP_DRIVER_CALL(1160),
- ENUOYUN_INVOICE_CALL(1170),
- UM_API_CALL_UM_CHANGE_ORDER_STATE(1180),
- API_CHARGEBACK_CALL(1190),
- API_REDISTRIBUTE_CALL(1200), API_DRIVER_LOGIN_CALL(1210), NULL(-1),
- API_CHANGXING_HANGLV_CHONGXIN_SHANGCHUAN(1220),
- API_CHANGXING_HANGLV_FAPIAO_ZUOFEI(1230);
- private final Integer value;
-
- OperationLogType(Integer value) {
- this.value = value;
- }
-
- public Integer getValue() {
- return value;
- }
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/bean/Plat.java b/src/main/java/com/chaozhanggui/system/cashierservice/bean/Plat.java
deleted file mode 100644
index e08f21e..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/bean/Plat.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.chaozhanggui.system.cashierservice.bean;
-
-import lombok.Getter;
-
-/**
- * @author: ZhangSong
- * @create: 2024-05-23 19:01
- */
-@Getter
-public enum Plat {
- TT(1),
- CX(2),
- RZ(3),
- JS(5),
- UNDEFINED(-1);
-
- private final Integer value;
-
- Plat(Integer value) {
- this.value = value;
- }
-
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/config/RequestLoggingConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/config/RequestLoggingConfig.java
new file mode 100644
index 0000000..e5207cf
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/config/RequestLoggingConfig.java
@@ -0,0 +1,30 @@
+package com.chaozhanggui.system.cashierservice.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.annotation.Order;
+import org.springframework.web.filter.CommonsRequestLoggingFilter;
+
+@Configuration
+public class RequestLoggingConfig {
+ @Bean
+ @Order(-9999)
+ public CommonsRequestLoggingFilter logFilter() {
+ CommonsRequestLoggingFilter filter = new CommonsRequestLoggingFilter();
+ // 是否记录请求的查询参数信息
+ filter.setIncludeQueryString(true);
+ // 是否记录请求body内容
+ filter.setIncludePayload(true);
+ filter.setMaxPayloadLength(10000);
+ //是否记录请求header信息
+ filter.setIncludeHeaders(false);
+ // 是否记录请求客户端信息
+ filter.setIncludeClientInfo(true);
+ // 设置日期记录的前缀
+ filter.setBeforeMessagePrefix("\033[32;4m请求开始:");
+ filter.setBeforeMessageSuffix("\033[0m");
+ filter.setAfterMessagePrefix("\033[34m请求结束:");
+ filter.setAfterMessageSuffix("\033[0m");
+ return filter;
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyDetailMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyDetailMapper.java
index 3e1f51f..bd09bb2 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyDetailMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyDetailMapper.java
@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
-@Mapper
-@Component
public interface ShopUserDutyDetailMapper {
int deleteByPrimaryKey(Integer id);
@@ -26,4 +24,4 @@ public interface ShopUserDutyDetailMapper {
List selectByDuctId(@Param("id") Integer id, @Param("list") List list);
List selectAllByDuctId(@Param("id") Integer id);
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java
index 4931b1a..948b320 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java
@@ -9,8 +9,6 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.List;
-@Component
-@Mapper
public interface ShopUserDutyMapper {
int deleteByPrimaryKey(Integer id);
@@ -47,4 +45,4 @@ public interface ShopUserDutyMapper {
List selectByDutyId(Integer dutyId);
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyPayMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyPayMapper.java
index 80e4ecc..75087f0 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyPayMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyPayMapper.java
@@ -10,8 +10,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
-@Component
-@Mapper
public interface ShopUserDutyPayMapper {
int deleteByPrimaryKey(Integer id);
@@ -34,4 +32,4 @@ public interface ShopUserDutyPayMapper {
List