调整mapper扫描方式,增加请求信息打印

This commit is contained in:
2024-09-20 15:51:59 +08:00
parent fa94b0b1bf
commit 753f3d9d8b
48 changed files with 77 additions and 520 deletions

12
pom.xml
View File

@@ -189,17 +189,7 @@
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>3.3.1</version>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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();
//读取字符流的字符拼接在stringBufferStringBuffer在进行字符串处理时不生成新的对象在内存使用上要优于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<String, String[]> 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<String, String[]> 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<String, String[]> 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;
}
}
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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<ShopUserDutyDetail> selectByDuctId(@Param("id") Integer id, @Param("list") List<Integer> list);
List<ShopUserDutyDetail> selectAllByDuctId(@Param("id") Integer id);
}
}

View File

@@ -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<ProductInfo> selectByDutyId(Integer dutyId);
}
}

View File

@@ -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<Map<String,Object>> selectCetoryBydutyId(Integer dutyId);
List<ProductInfoPO> selectProductByDutyId(Integer dutyId);
}
}

View File

@@ -11,8 +11,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbCashierCartMapper {
int deleteByPrimaryKey(Integer id);

View File

@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbConsInfoFlowMapper {
int deleteByPrimaryKey(Integer id);
@@ -23,4 +21,4 @@ public interface TbConsInfoFlowMapper {
int updateByPrimaryKey(TbConsInfoFlow record);
void insertBatch(@Param("list")List<TbConsInfoFlow> list);
}
}

View File

@@ -8,8 +8,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbConsInfoMapper {
int deleteByPrimaryKey(Integer id);
@@ -27,4 +25,4 @@ public interface TbConsInfoMapper {
int countAll();
List<TbConsInfo> selectAllInfo();
}
}

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.TbMemberIn;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbMemberInMapper {
int deleteByPrimaryKey(Integer id);
@@ -18,4 +16,4 @@ public interface TbMemberInMapper {
int updateByPrimaryKeySelective(TbMemberIn record);
int updateByPrimaryKey(TbMemberIn record);
}
}

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbMerchantThirdApplyMapper {
int deleteByPrimaryKey(Integer id);
@@ -20,4 +18,4 @@ public interface TbMerchantThirdApplyMapper {
int updateByPrimaryKeyWithBLOBs(TbMerchantThirdApply record);
int updateByPrimaryKey(TbMerchantThirdApply record);
}
}

View File

@@ -10,8 +10,6 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.List;
@Mapper
@Component
public interface TbOrderDetailMapper {
int deleteByPrimaryKey(Integer id);
@@ -43,4 +41,4 @@ public interface TbOrderDetailMapper {
int batchInsert(@Param("list") List<TbOrderDetail> list,@Param("orderId") String orderId);
TbOrderDetail selectByOrderIdAndSkuId(@Param("orderId") int orderId, @Param("skuId") Integer skuId);
}
}

View File

@@ -12,8 +12,6 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
@Component
@Mapper
public interface TbOrderInfoMapper {
int deleteByPrimaryKey(Integer id);

View File

@@ -7,12 +7,10 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbOrderOutNumberMapper {
int insert(TbOrderOutNumber record);
int insertSelective(TbOrderOutNumber record);
List<TbOrderOutNumber> selectAll(@Param("shopId") String shopId);
}
}

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.TbOrderPayment;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbOrderPaymentMapper {
int deleteByPrimaryKey(Integer id);
@@ -20,4 +18,4 @@ public interface TbOrderPaymentMapper {
int updateByPrimaryKey(TbOrderPayment record);
TbOrderPayment selectByOrderId(String orderId);
}
}

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbPlussShopStaffMapper {
int deleteByPrimaryKey(Integer id);
@@ -21,4 +19,4 @@ public interface TbPlussShopStaffMapper {
TbPlussShopStaff selectByAccount(String account);
TbPlussShopStaff selectByAccountAndShopId(String account,String shopId);
}
}

View File

@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbPrintMachineMapper {
int deleteByPrimaryKey(Integer id);
@@ -25,4 +23,4 @@ public interface TbPrintMachineMapper {
int updateByPrimaryKey(TbPrintMachine record);
List<TbPrintMachineWithBLOBs> selectByShopId(String shopId);
}
}

View File

@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbPrintPCMachineMapper {
/**

View File

@@ -11,8 +11,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbProductMapper {
int deleteByPrimaryKey(Integer id);

View File

@@ -11,8 +11,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbProductSkuMapper {
int deleteByPrimaryKey(Integer id);

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbProductSkuResultMapper {
int deleteByPrimaryKey(Integer id);
@@ -20,4 +18,4 @@ public interface TbProductSkuResultMapper {
int updateByPrimaryKeyWithBLOBs(TbProductSkuResult record);
int updateByPrimaryKey(TbProductSkuResult record);
}
}

View File

@@ -5,8 +5,6 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbProductSpecMapper {
int deleteByPrimaryKey(Integer id);
@@ -22,4 +20,4 @@ public interface TbProductSpecMapper {
int updateByPrimaryKey(TbProductSpec record);
}
}

View File

@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbProskuConMapper {
int deleteByPrimaryKey(Integer id);

View File

@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbQuickPayMapper {
int deleteByPrimaryKey(Integer id);
@@ -25,4 +23,4 @@ public interface TbQuickPayMapper {
List<TbQuickPay> selectByShopIdAndStaffId(@Param("shopId") Integer shopId,@Param("staffId") Integer staffId);
TbQuickPay selectByOrderNo(String orderNo);
}
}

View File

@@ -6,8 +6,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbShopAreaMapper {
int deleteByPrimaryKey(Integer id);
@@ -24,4 +22,4 @@ public interface TbShopAreaMapper {
int updateByPrimaryKey(TbShopArea record);
List<TbShopArea> selectByShopId(String shopId);
}
}

View File

@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbShopCategoryMapper {
int deleteByPrimaryKey(Integer id);
@@ -24,4 +22,4 @@ public interface TbShopCategoryMapper {
List<TbShopCategory> selectByAll(String shopId);
List<ShopCategoryVo> queryAllCategory(String shopId);
}
}

View File

@@ -6,8 +6,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbShopInfoMapper {
int deleteByPrimaryKey(Integer id);
@@ -29,4 +27,4 @@ public interface TbShopInfoMapper {
}
}

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.TbShopOnline;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbShopOnlineMapper {
int deleteByPrimaryKey(Integer shopId);
@@ -18,4 +16,4 @@ public interface TbShopOnlineMapper {
int updateByPrimaryKeySelective(TbShopOnline record);
int updateByPrimaryKey(TbShopOnline record);
}
}

View File

@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbShopPayTypeMapper {
int deleteByPrimaryKey(Integer id);
@@ -27,4 +25,4 @@ public interface TbShopPayTypeMapper {
int countSelectByShopIdAndPayType(@Param("shopId") String shopId, @Param("payType") String payType );
}
}

View File

@@ -8,8 +8,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbShopTableMapper {
int deleteByPrimaryKey(Integer id);

View File

@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
@Component
@Mapper
public interface TbShopUserFlowMapper {
int deleteByPrimaryKey(Integer id);
@@ -23,4 +21,4 @@ public interface TbShopUserFlowMapper {
int updateByPrimaryKey(TbShopUserFlow record);
List<Map<String,Object>> selectByMemberAccountFlow(String memberId);
}
}

View File

@@ -7,8 +7,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbShopUserMapper {
int deleteByPrimaryKey(Integer id);
@@ -30,4 +28,4 @@ public interface TbShopUserMapper {
TbShopUser selectByUserIdAndShopId(@Param("userId") String userId,@Param("shopId") String shopId);
TbShopUser selectByShopIdAndDdynamicCode(@Param("shopId") String shopId,@Param("memberAccount") String memberAccount);
}
}

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.TbToken;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbTokenMapper {
int deleteByPrimaryKey(Integer id);
@@ -20,4 +18,4 @@ public interface TbTokenMapper {
int updateByPrimaryKey(TbToken record);
TbToken selectByToken(String token);
}
}

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbUserInfoMapper {
int deleteByPrimaryKey(Integer id);
@@ -23,4 +21,4 @@ public interface TbUserInfoMapper {
TbUserInfo selectByPhone(String phone);
int selectCountByPhone(String phone);
}
}

View File

@@ -8,8 +8,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbUserShopMsgMapper {
int deleteByPrimaryKey(Integer id);
@@ -28,4 +26,4 @@ public interface TbUserShopMsgMapper {
List<TbUserShopMsg> selectAllByShopId(@Param("shopId") Integer shopId);
}
}

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbmerchantAccountMapper {
int deleteByPrimaryKey(Integer id);
@@ -23,4 +21,4 @@ public interface TbmerchantAccountMapper {
TbmerchantAccount selectByAccount(String account);
}
}

View File

@@ -4,8 +4,6 @@ import com.chaozhanggui.system.cashierservice.entity.tbHandover;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface tbHandoverMapper {
int deleteByPrimaryKey(Integer id);
@@ -18,4 +16,4 @@ public interface tbHandoverMapper {
int updateByPrimaryKeySelective(tbHandover record);
int updateByPrimaryKey(tbHandover record);
}
}

View File

@@ -17,6 +17,7 @@ spring:
database: 0
# redis服务器地址默认为localhost
host: 101.37.12.135
# host: 127.0.0.1
# redis端口默认为6379
port: 6379
# redis访问密码默认为空
@@ -47,8 +48,7 @@ pagehelper:
mybatis:
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath:mapper/*.xml
subscribe:
message:

View File

@@ -1,4 +1,6 @@
spring:
jmx:
enabled: false
profiles:
active: dev
server:
@@ -7,11 +9,12 @@ server:
# 日志配置
logging:
level:
# web日志
org.springframework.web: debug
# mybatis日志
mybits: DEBUG
org.apache.ibatis: DEBUG
root: info
org:
springframework:
web:
filter:
CommonsRequestLoggingFilter: debug
charset:
# 输出控制台编码
console: UTF-8
@@ -60,13 +63,18 @@ wx:
appId: wxd88fffa983758a30
secrete: a34a61adc0602118b49400baa8812454
warnMsgTmpId: AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ
mini:
page:
call: https://cashier.sxczgkj.cn/make?shopId={}&queueId={}
ali:
appId: 2021004174605036
privateKey: MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQD48HaUoV7OH7os+9L01kHgxzwIhJick4OkFq4aHsntsXEJJ3gedhuEZtV8oHKZ30DPW12IJ4S8NXtpr8OWaqrAPFonf4wVaRY1d0yIAea57kfLEn9oOEEy4FzARgMNDkyxC+/3OUdGbLHpTjfVX3gusXsEhUDy1/WewihAkoNYF37+W3W/uVLzeWoPq0EcUbRv/G/t/p6gL69ltsMAiVFG4Q/Yk24YAN6lYgBPNLXUEwQ1Q+T+1omjfavHgvarKOp33z3JOUH+aGOmDsJ5Y9gyGtJzOCipAd8Zcv+T1ygsEzZYO1/gzcbPnfO1ShqStCHzssuw8FBVx2JdfQKXKMMNAgMBAAECggEAVTrO/pg5Q00titU1Jspsh67u6OOs9H605Ws2dI7yB8VmtAGlaJh7V1t14FN2qSP8poHbhhAxq9aLyGV7C3a9u09ud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C/PVB0gBv6vVM96cDpKUEy/UMpcn/T81vqj/Z+WEOODU8Ms6NiTTm+u9ldvpCjbu0u8M+9c0JeIyadJvSTFEQKBgQCsxmFyM3nq8YfpgU2qqNjfBeRH3faSVUy+nj1a/YZYjKS+A/i1BCnYUImeBVNN6chNV342ggvY4xxruDiU9Vcw8wd58O09Oi8BEIFSP6upL6cebUI6Fjo3xlegLJRiwV6INkNTJOYM5hD/mSxUACwXQFfkJipBINXBIgraWD1RLQKBgQCj49axWq0F6+WjZVOyPaD3uh37p9trRUxRhWTxw3fB23WdktaKMgbCqHOmwzP4bRLSEVQtf2dOz1gMqu14b8HqJvgAf/F/11YJ9hz09LEhmjZVjE68HZfqT7uK2W5OX8/lfXmK7TFcj6SjG5YB96lZMhTZ0WnufEd6QkdKDZYXIQKBgQD9GDTcIMbFwbEaKHnfZaTD3f876EGRgsgrCxwdEk7LBCRPwWo7yI929M4psIlpNwNeiyjBkBunWIVkpznp6qPtJqagIPUYesU4f5v6/okq5wcpaNKSkWbIvWVLaLGOiA1aeGJtbpMpyClbSr52puHpRRdvAiIEQ74yYh0JX8q96g==
publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiQkrz+emAuS1mB3KKDOMmAZRd/BlPbh7fAIHAqAj1+QCZNcV3o2BTLIIqnuKpSlFXDG3uDzp2VsBxcizXuBbFyPGylnD9CgCj5abyh3+FIHPAZ2IM3TtpqImZ0TSPGXrMli4Nir7MvZktgccCqQKCC4o6iaDGz+UwWwJUIPna8fm2tiTZ+KH150CZbKVj4ZGNpBh5XSV/1dRgyQIV9D/EwSbkZ0n6VgKQLJBi0C2UE3QB17aL1Ir6+gDXIDbknN8O7GUD3aMGdThYdSRUb5wp9CZ5qfV7vCS/CgaRo38nhH3NOzkTL+7v0m1ZDHPmqEkn9VzZN6sCQdL7PoAOjHOCwIDAQAB
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
id-type: auto