Commit e49c8b60 by hanghang.wang

Merge branch 'feature/20201231_ID1020975C端购物车日志优化_wanghanghang' into qa

# Conflicts:
#	assortment-ordercenter-sdk/pom.xml
#	assortment-ordercenter-sdk/readme.md
#	assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/response/payment/OrderPayResponse.java
#	call-back-service/pom.xml
#	order-application-service/pom.xml
#	order-management/pom.xml
#	ordercenter-sdk/pom.xml
#	ordercenter-sdk/readme.md
#	shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
#	shopping-cart-application-service/src/test/java/cn.freemud/service/CouponServiceTest.java
parents a24ac6c5 0d5434d5
...@@ -93,4 +93,6 @@ ...@@ -93,4 +93,6 @@
| 2.1.10-RELEASE | coco | 刘鹏飞 | 2020-12-17 | | 2.1.10-RELEASE | coco | 刘鹏飞 | 2020-12-17 |
| 2.1.11-RELEASE | 农工商添加设备号 | 梁崇福 | 2020-12-17 | | 2.1.11-RELEASE | 农工商添加设备号 | 梁崇福 | 2020-12-17 |
| 2.1.12-RELEASE | coco定制优惠券核销 | 刘鹏飞 | 2020-12-24 | | 2.1.12-RELEASE | coco定制优惠券核销 | 刘鹏飞 | 2020-12-24 |
| 2.1.13-RELEASE | B端管理平台查询拼单订单 | 缪晖 | 2020-12-28 |
| 2.1.14-RELEASE | 支付添加抖音渠道 | 张志恒 | 2020-12-29 |
| 2.1.19-SNAPSHOT | 增加配送类型字段 | 王航航 | 2020-12-22 | | 2.1.19-SNAPSHOT | 增加配送类型字段 | 王航航 | 2020-12-22 |
...@@ -90,5 +90,10 @@ ...@@ -90,5 +90,10 @@
| 1.3.21.RELEASE | 混支付 | 徐康 | 2020-11-26 | | 1.3.21.RELEASE | 混支付 | 徐康 | 2020-11-26 |
| 1.7.3-SNAPSHOT| 抖音支付新增抖音单号和openId | 张志恒 | 2020-12-4 | | 1.7.3-SNAPSHOT| 抖音支付新增抖音单号和openId | 张志恒 | 2020-12-4 |
| 1.3.22.RELEASE | 农工商撤单 | 张志恒 | 2020-12-07 | | 1.3.22.RELEASE | 农工商撤单 | 张志恒 | 2020-12-07 |
| 1.3.23.RELEASE | 拼单 | 缪晖 | 2020-12-10 |
| 1.3.24.RELEASE | coco | 刘鹏飞 | 2020-12-17 |
| 1.3.25.RELEASE | 农工商添加设备号 | 梁崇福 | 2020-12-21 |
| 1.3.26.RELEASE | B端管理平台查询拼单订单 | 缪晖 | 2020-12-28 |
| 1.3.27.RELEASE | 支付添加抖音渠道 | 张志恒 | 2020-12-29 |
| 1.7.5-SNAPSHOT| 抖音支付 | 张志恒 | 2020-12-11 | | 1.7.5-SNAPSHOT| 抖音支付 | 张志恒 | 2020-12-11 |
package cn.freemud.aop;
import com.alibaba.fastjson.JSON;
import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare;
import com.freemud.application.sdk.api.exception.IgnoreErrorAnnotation;
import com.freemud.application.sdk.api.log.*;
import com.freemud.application.sdk.api.service.EmailAlertService;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanUtils;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
@Aspect
@Component
@Slf4j
public class ControllerLogAop implements Ordered {
@Autowired
private EmailAlertService emailAlertService;
/**
* 是否打印响应报文日志,默认是false,若为true会覆盖注解里面的{@link LogIgnore}配置,输出响应报文里面所有的信息
*/
@Value("${print-response-body-log-shop-cart:false}")
private volatile boolean printResponseBodyLogForShopCart = false;
/**
* 即使printResponseBodyLog设置为true, 该参数中包含的url也会被过滤且不打印日志
*/
@Value("${exclude-print-body-log-methods:findNearPickUpStores,getMenuCategory}")
private volatile List<String> excludePrintBodyLogMethods = Lists.newArrayList();
@Pointcut("@annotation(cn.freemud.aop.LogIgnore)")
public void pointcut() {
}
@Around("pointcut()")
public Object doAroundAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
long startTime = System.currentTimeMillis();
StringBuilder logMethod = new StringBuilder(joinPoint.getSignature().getDeclaringTypeName());
logMethod.append(".");
logMethod.append(joinPoint.getSignature().getName());
Signature sig = joinPoint.getSignature();
MethodSignature msig = null;
if (!(sig instanceof MethodSignature)) {
throw new IllegalArgumentException("非法参数使用 ");
} else {
msig = (MethodSignature) sig;
Object target = joinPoint.getTarget();
Method currentMethod = target.getClass().getMethod(msig.getName(), msig.getParameterTypes());
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
if (ApiLog.isDebugEnabled()) {
ApiLog.debug("获取tracking的值====>{}", new Object[]{request.getHeader("x-transaction-id")});
}
LogThreadLocal.setTrackingNo(StringUtils.isEmpty(request.getHeader("x-transaction-id")) ? UUID.randomUUID().toString().replaceAll("-", "") : request.getHeader("x-transaction-id"));
List logArgs = this.getLogArgs(currentMethod, joinPoint);
String requestData = JSON.toJSONString(logArgs);
LogIgnore logIgnore = currentMethod.getAnnotation(LogIgnore.class);
// log.info("startTime={}-->TrackingNo={}-->logMessage= {}-->url={}-->requestData={} ::start",startTime,LogThreadLocal.getTrackingNo(),logIgnore.logMessage(),logMethod,requestData);
Object object = joinPoint.proceed();
Object logObj = object;
if (logIgnore != null && logIgnore.printLog()) {
if (!this.printResponseBodyLogForShopCart || excludePrintBodyLogMethods.contains(logIgnore.logMessage())) {
String statusCodeValue = BeanUtils.getProperty(object, logIgnore.statusCodeFieldName());
String messageValue = BeanUtils.getProperty(object, logIgnore.messageFieldName());
String[] excludeStatusCodes = logIgnore.excludeStatusCodes();
//todo 当排除了这个状态码不打印响应的具体内容只会打印状态码和状态描述信息
//当返回code在不打印的范围,则将打印信息变更为只打印code和message
if (this.containStatusCode(excludeStatusCodes, statusCodeValue)) {
logObj = object.getClass().newInstance();
BeanUtils.setProperty(logObj, logIgnore.statusCodeFieldName(), statusCodeValue);
BeanUtils.setProperty(logObj, logIgnore.messageFieldName(), messageValue);
}
}
}
ApiLog.infoConvertJson(logMethod.toString(), logIgnore.logMessage(), request, startTime, System.currentTimeMillis(), requestData, logObj);
LogThreadLocal.removeTrackingNo();
return object;
}
}
/**
* 过滤feign返参code是否在excludeStatusCodes存在
*
* @param excludeStatusCodes
* @param statusCodeValue
* @return
*/
private boolean containStatusCode(String[] excludeStatusCodes, String statusCodeValue) {
if (excludeStatusCodes == null || excludeStatusCodes.length == 0) {
return false;
}
for (int i = 0; i < excludeStatusCodes.length; i++) {
if (excludeStatusCodes[i].equals(statusCodeValue)) {
return true;
}
}
return false;
}
/**
* 系统异常时,AfterThrowing在ApiAnnotation注解中已经处理。
* 此处先注释,暂不删除,代码保留
*
* @param joinPoint
* @return
*/
@AfterThrowing(
pointcut = "pointcut()",
throwing = "e"
)
public void doAfterThrowing(JoinPoint joinPoint, Exception e) {
long startTime = System.currentTimeMillis();
Signature sig = joinPoint.getSignature();
Method currentMethod = null;
MethodSignature msig = null;
if (!(sig instanceof MethodSignature)) {
throw new IllegalArgumentException("非法参数使用");
} else {
msig = (MethodSignature) sig;
Object target = joinPoint.getTarget();
try {
currentMethod = target.getClass().getMethod(msig.getName(), msig.getParameterTypes());
} catch (NoSuchMethodException var19) {
var19.printStackTrace();
}
StringBuilder logMethod = new StringBuilder(joinPoint.getSignature().getDeclaringTypeName());
logMethod.append(".");
logMethod.append(joinPoint.getSignature().getName());
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
try {
Class<?> clz = e.getClass();
boolean clzHasAnno = clz.isAnnotationPresent(IgnoreErrorAnnotation.class);
if (!clzHasAnno) {
this.emailAlertService.sendEmailAlert("系统全局异常", e);
}
} catch (Exception var17) {
ErrorLog.errorConvertJson(SDKCommonBaseContextWare.getAppName(), logMethod.toString(), "出错:" + e.getMessage(), request, startTime, System.currentTimeMillis(), this.getLogArgs(currentMethod, joinPoint), var17);
} finally {
ErrorLog.errorConvertJson(SDKCommonBaseContextWare.getAppName(), logMethod.toString(), "出错:" + e.getMessage(), request, startTime, System.currentTimeMillis(), this.getLogArgs(currentMethod, joinPoint), e);
LogThreadLocal.removeTrackingNo();
}
}
}
private List getLogArgs(Method method, JoinPoint joinPoint) {
if (method == null) {
return null;
} else {
Object[] args = joinPoint.getArgs();
if (args != null && args.length != 0) {
List logArgs = new ArrayList();
Parameter[] parameters = method.getParameters();
for (int j = 0; j < parameters.length; ++j) {
Parameter parameter = parameters[j];
LogParams logParams = (LogParams) parameter.getAnnotation(LogParams.class);
if (logParams != null) {
logArgs.add(args[j]);
}
}
return logArgs;
} else {
return null;
}
}
}
@Override
public int getOrder() {
return 0;
}
}
package cn.freemud.aop;
import java.lang.annotation.*;
/**
* @author freemud
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(value = {ElementType.METHOD})
@Documented
@Inherited
public @interface IgnoreFeignLogAnnotation {
/**
* 是否打印日志,true打印,false不打印,注意设置成false状态码和状态码信息都不会打印
* @return
*/
boolean printLog() default true;
/**
* printLog 设置成true的时候,可以排除哪些状态码的响应不用打印响应报文,只会打印状态码
*
* @return
*/
String[] excludeStatusCodes() default "100";
String statusCodeFieldName() default "code";
String messageFieldName() default "message";
}
package cn.freemud.aop;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* @author
*/
@Retention(RetentionPolicy.RUNTIME)
public @interface LogIgnore {
/**
* 是否打印日志,true打印,false不打印,注意设置成false状态码和状态码信息都不会打印
*
* @return
*/
boolean printLog() default true;
/**
* printLog 设置成true的时候,可以排除哪些状态码的响应不用打印响应报文,只会打印状态码
* 默认成功100
* @return
*/
String[] excludeStatusCodes() default "100";
/**
* statusCodeFieldName 默认返回状态码字段为code
*
* @return
*/
String statusCodeFieldName() default "code";
/**
* statusCodeFieldName 默认返回状态码字段为message
*
* @return
*/
String messageFieldName() default "message";
/**
* logMessage 日志打印
* @return
*/
String logMessage() default "";
}
...@@ -21,10 +21,22 @@ import java.util.Set; ...@@ -21,10 +21,22 @@ import java.util.Set;
public class ResponseCodeKeyConstant { public class ResponseCodeKeyConstant {
public final static String CODE = "code"; public final static String CODE = "code";
public final static String ERR_CODE = "errcode"; public final static String MESSAGE = "message";
public final static String STATUS_CODE = "statusCode"; public final static String STATUS_CODE = "statusCode";
public static final String MEG = "meg";
public static final String MSG = "msg";
//code名称来源根据 ProductInfosDto
public final static String ERR_CODE = "errcode";
//errmsg名称来源根据 ProductInfosDto
public static final String ERR_MSG = "errmsg";
private final static Set<String> responseCodeKeySet = new HashSet<>(); private final static Set<String> responseCodeKeySet = new HashSet<>();
...@@ -43,4 +55,6 @@ public class ResponseCodeKeyConstant { ...@@ -43,4 +55,6 @@ public class ResponseCodeKeyConstant {
} }
return o; return o;
} }
} }
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
package cn.freemud.controller; package cn.freemud.controller;
import cn.freemud.aop.LogIgnore;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.vo.*; import cn.freemud.entities.vo.*;
import cn.freemud.enums.ResponseResult; import cn.freemud.enums.ResponseResult;
...@@ -39,8 +40,8 @@ public class ShoppingCartCollageController { ...@@ -39,8 +40,8 @@ public class ShoppingCartCollageController {
/** /**
* 向拼单购物车中添加商品 * 向拼单购物车中添加商品
*/ */
@ApiAnnotation(logMessage = "addGoods")
@PostMapping(value = "/addGoods") @PostMapping(value = "/addGoods")
@LogIgnore(logMessage = "addGoods")
public BaseResponse addGoods(@Validated @LogParams @RequestBody AddShoppingCartGoodsRequestVo request) { public BaseResponse addGoods(@Validated @LogParams @RequestBody AddShoppingCartGoodsRequestVo request) {
return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).addGoods(request); return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).addGoods(request);
} }
...@@ -48,7 +49,7 @@ public class ShoppingCartCollageController { ...@@ -48,7 +49,7 @@ public class ShoppingCartCollageController {
/** /**
* 修改拼单购物车中商品数量 * 修改拼单购物车中商品数量
*/ */
@ApiAnnotation(logMessage = "updateGoodsQty") @LogIgnore(logMessage = "updateGoodsQty")
@PostMapping(value = "/updateGoodsQty") @PostMapping(value = "/updateGoodsQty")
public BaseResponse updateGoodsQty(@Validated @LogParams @RequestBody UpdateShoppingCartGoodsQtyRequestVo request) { public BaseResponse updateGoodsQty(@Validated @LogParams @RequestBody UpdateShoppingCartGoodsQtyRequestVo request) {
return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).updateGoodsQty(request); return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).updateGoodsQty(request);
...@@ -57,7 +58,7 @@ public class ShoppingCartCollageController { ...@@ -57,7 +58,7 @@ public class ShoppingCartCollageController {
/** /**
* 查询购物车信息 * 查询购物车信息
*/ */
@ApiAnnotation(logMessage = "listCartGoods") @LogIgnore(logMessage = "listCartGoods")
@PostMapping(value = "/listCartGoods") @PostMapping(value = "/listCartGoods")
public BaseResponse listCartGoods(@Validated @LogParams @RequestBody ShoppingCartInfoRequestVo request) { public BaseResponse listCartGoods(@Validated @LogParams @RequestBody ShoppingCartInfoRequestVo request) {
return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).getGoodsList(request); return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).getGoodsList(request);
...@@ -66,7 +67,7 @@ public class ShoppingCartCollageController { ...@@ -66,7 +67,7 @@ public class ShoppingCartCollageController {
/** /**
* 清空自己的购物车 * 清空自己的购物车
*/ */
@ApiAnnotation(logMessage = "clearPartCartGoods") @LogIgnore(logMessage = "clearPartCartGoods")
@PostMapping(value = "/clearPartCartGoods") @PostMapping(value = "/clearPartCartGoods")
public BaseResponse clearPartCartGoods(@Validated @LogParams @RequestBody ShoppingCartCollageClearRequestVo request) { public BaseResponse clearPartCartGoods(@Validated @LogParams @RequestBody ShoppingCartCollageClearRequestVo request) {
return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).clearPartCarGoods(request); return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).clearPartCarGoods(request);
...@@ -75,7 +76,7 @@ public class ShoppingCartCollageController { ...@@ -75,7 +76,7 @@ public class ShoppingCartCollageController {
/** /**
* 清空购物车 * 清空购物车
*/ */
@ApiAnnotation(logMessage = "clearCartGoods") @LogIgnore(logMessage = "clearCartGoods")
@PostMapping(value = "/clearCartGoods") @PostMapping(value = "/clearCartGoods")
public BaseResponse clearCartGoods(@Validated @LogParams @RequestBody ShoppingCartClearRequestVo request) { public BaseResponse clearCartGoods(@Validated @LogParams @RequestBody ShoppingCartClearRequestVo request) {
return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).clear(request); return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).clear(request);
...@@ -87,7 +88,7 @@ public class ShoppingCartCollageController { ...@@ -87,7 +88,7 @@ public class ShoppingCartCollageController {
* @param getShoppingCartGoodsApportionRequestVo * @param getShoppingCartGoodsApportionRequestVo
* @return * @return
*/ */
@ApiAnnotation(logMessage = "getShoppingCartGoodsApportion") @LogIgnore(logMessage = "getShoppingCartGoodsApportion")
@PostMapping(value = "/getShoppingCartGoodsApportion") @PostMapping(value = "/getShoppingCartGoodsApportion")
public BaseResponse getShoppingCartGoodsApportion(@Validated @LogParams @RequestBody GetShoppingCartGoodsApportionRequestVo getShoppingCartGoodsApportionRequestVo) { public BaseResponse getShoppingCartGoodsApportion(@Validated @LogParams @RequestBody GetShoppingCartGoodsApportionRequestVo getShoppingCartGoodsApportionRequestVo) {
if (getShoppingCartGoodsApportionRequestVo == null || getShoppingCartGoodsApportionRequestVo.getShoppingCartInfoRequestVo() == null) { if (getShoppingCartGoodsApportionRequestVo == null || getShoppingCartGoodsApportionRequestVo.getShoppingCartInfoRequestVo() == null) {
...@@ -111,7 +112,7 @@ public class ShoppingCartCollageController { ...@@ -111,7 +112,7 @@ public class ShoppingCartCollageController {
* 查询购车信息无配送费 * 查询购车信息无配送费
* SVC卡支付check,check购物车金额加配送费小于储值卡金额 * SVC卡支付check,check购物车金额加配送费小于储值卡金额
*/ */
@ApiAnnotation(logMessage = "listCartGoodsCheck") @LogIgnore(logMessage = "listCartGoodsCheck")
@PostMapping(value = "/listCartGoodsCheck") @PostMapping(value = "/listCartGoodsCheck")
public BaseResponse listCartGoodsCheck(@Validated @LogParams @RequestBody ShoppingCartInfoRequestVo request) { public BaseResponse listCartGoodsCheck(@Validated @LogParams @RequestBody ShoppingCartInfoRequestVo request) {
return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).getGoodsListCheck(request); return SDKCommonBaseContextWare.getBean(ShoppingCartCollageServiceImpl.class).getGoodsListCheck(request);
......
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
*/ */
package cn.freemud.controller; package cn.freemud.controller;
import cn.freemud.aop.LogIgnore;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.entities.dto.GetMemberInfoRequestDto; import cn.freemud.entities.dto.GetMemberInfoRequestDto;
import cn.freemud.entities.vo.*; import cn.freemud.entities.vo.*;
import cn.freemud.enums.OrderChannelType; import cn.freemud.enums.OrderChannelType;
...@@ -52,8 +54,8 @@ public class ShoppingCartController { ...@@ -52,8 +54,8 @@ public class ShoppingCartController {
/** /**
* 从微信卡券向购物车中添加商品 * 从微信卡券向购物车中添加商品
*/ */
@ApiAnnotation(logMessage = "addGoodsByCard")
@PostMapping(value = "/addGoodsByCard") @PostMapping(value = "/addGoodsByCard")
@LogIgnore(logMessage = "addGoodsByCard")
public BaseResponse addGoodsByCard(@Validated @LogParams @RequestBody AddGoodsByWeixinCardRequestVo request) { public BaseResponse addGoodsByCard(@Validated @LogParams @RequestBody AddGoodsByWeixinCardRequestVo request) {
return getInstanceByRequest(request).addGoodsByCard(request); return getInstanceByRequest(request).addGoodsByCard(request);
} }
...@@ -61,8 +63,8 @@ public class ShoppingCartController { ...@@ -61,8 +63,8 @@ public class ShoppingCartController {
/** /**
* 向购物车中添加商品 * 向购物车中添加商品
*/ */
@ApiAnnotation(logMessage = "addGoods")
@PostMapping(value = "/addGoods") @PostMapping(value = "/addGoods")
@LogIgnore(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},logMessage = "addGoods")
public BaseResponse addGoods(@Validated @LogParams @RequestBody AddShoppingCartGoodsRequestVo request) { public BaseResponse addGoods(@Validated @LogParams @RequestBody AddShoppingCartGoodsRequestVo request) {
return getInstanceByRequest(request).addGoods(request); return getInstanceByRequest(request).addGoods(request);
} }
...@@ -70,8 +72,8 @@ public class ShoppingCartController { ...@@ -70,8 +72,8 @@ public class ShoppingCartController {
/** /**
* 修改购物车中商品数量 * 修改购物车中商品数量
*/ */
@ApiAnnotation(logMessage = "updateGoodsQty")
@PostMapping(value = "/updateGoodsQty") @PostMapping(value = "/updateGoodsQty")
@LogIgnore(logMessage = "updateGoodsQty")
public BaseResponse updateGoodsQty(@Validated @LogParams @RequestBody UpdateShoppingCartGoodsQtyRequestVo request) { public BaseResponse updateGoodsQty(@Validated @LogParams @RequestBody UpdateShoppingCartGoodsQtyRequestVo request) {
return getInstanceByRequest(request).updateGoodsQty(request); return getInstanceByRequest(request).updateGoodsQty(request);
} }
...@@ -79,8 +81,8 @@ public class ShoppingCartController { ...@@ -79,8 +81,8 @@ public class ShoppingCartController {
/** /**
* 查询购物车信息 * 查询购物车信息
*/ */
@ApiAnnotation(logMessage = "listCartGoods")
@PostMapping(value = "/listCartGoods") @PostMapping(value = "/listCartGoods")
@LogIgnore(logMessage = "listCartGoods")
public BaseResponse listCartGoods(@Validated @LogParams @RequestBody ShoppingCartInfoRequestVo request) { public BaseResponse listCartGoods(@Validated @LogParams @RequestBody ShoppingCartInfoRequestVo request) {
return getInstanceByRequest(request).getGoodsList(request); return getInstanceByRequest(request).getGoodsList(request);
} }
...@@ -89,8 +91,8 @@ public class ShoppingCartController { ...@@ -89,8 +91,8 @@ public class ShoppingCartController {
* 查询购车信息无配送费 * 查询购车信息无配送费
* SVC卡支付check,check购物车金额加配送费小于储值卡金额 * SVC卡支付check,check购物车金额加配送费小于储值卡金额
*/ */
@ApiAnnotation(logMessage = "listCartGoodsCheck")
@PostMapping(value = "/listCartGoodsCheck") @PostMapping(value = "/listCartGoodsCheck")
@LogIgnore(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},logMessage = "listCartGoodsCheck")
public BaseResponse listCartGoodsCheck(@Validated @LogParams @RequestBody ShoppingCartInfoRequestVo request) { public BaseResponse listCartGoodsCheck(@Validated @LogParams @RequestBody ShoppingCartInfoRequestVo request) {
return getInstanceByRequest(request).getGoodsListCheck(request); return getInstanceByRequest(request).getGoodsListCheck(request);
} }
...@@ -106,14 +108,14 @@ public class ShoppingCartController { ...@@ -106,14 +108,14 @@ public class ShoppingCartController {
/** /**
* 清空购物车 * 清空购物车
*/ */
@ApiAnnotation(logMessage = "clearCartGoods")
@PostMapping(value = "/clearCartGoods") @PostMapping(value = "/clearCartGoods")
@LogIgnore(logMessage = "clearCartGoods")
public BaseResponse clearCartGoods(@Validated @LogParams @RequestBody ShoppingCartClearRequestVo request) { public BaseResponse clearCartGoods(@Validated @LogParams @RequestBody ShoppingCartClearRequestVo request) {
String sessionId = request.getSessionId(); String sessionId = request.getSessionId();
if(StringUtils.isEmpty(sessionId)){ if (StringUtils.isEmpty(sessionId)) {
String tableNumber = request.getTableNumber(); String tableNumber = request.getTableNumber();
if(StringUtils.isEmpty(tableNumber)){ if (StringUtils.isEmpty(tableNumber)) {
return ResponseUtil.error(ResponseResult.PARAMETER_MISSING,"sessionId和tableNumber不能同时为空"); return ResponseUtil.error(ResponseResult.PARAMETER_MISSING, "sessionId和tableNumber不能同时为空");
} }
return getInstanceByIAppId(IappIdType.WC_XCX.getCode()).clear(request); return getInstanceByIAppId(IappIdType.WC_XCX.getCode()).clear(request);
} }
...@@ -127,8 +129,8 @@ public class ShoppingCartController { ...@@ -127,8 +129,8 @@ public class ShoppingCartController {
* @param getShoppingCartGoodsApportionRequestVo * @param getShoppingCartGoodsApportionRequestVo
* @return * @return
*/ */
@ApiAnnotation(logMessage = "getShoppingCartGoodsApportion")
@PostMapping(value = "/getShoppingCartGoodsApportion") @PostMapping(value = "/getShoppingCartGoodsApportion")
@LogIgnore(logMessage = "getShoppingCartGoodsApportion")
public BaseResponse getShoppingCartGoodsApportion(@Validated @LogParams @RequestBody GetShoppingCartGoodsApportionRequestVo getShoppingCartGoodsApportionRequestVo) { public BaseResponse getShoppingCartGoodsApportion(@Validated @LogParams @RequestBody GetShoppingCartGoodsApportionRequestVo getShoppingCartGoodsApportionRequestVo) {
if (getShoppingCartGoodsApportionRequestVo == null || getShoppingCartGoodsApportionRequestVo.getShoppingCartInfoRequestVo() == null) { if (getShoppingCartGoodsApportionRequestVo == null || getShoppingCartGoodsApportionRequestVo.getShoppingCartInfoRequestVo() == null) {
return ResponseUtil.error(ResponseResult.NOT_LOGIN); return ResponseUtil.error(ResponseResult.NOT_LOGIN);
...@@ -141,7 +143,7 @@ public class ShoppingCartController { ...@@ -141,7 +143,7 @@ public class ShoppingCartController {
private ShoppingCartNewService getInstanceByRequest(BaseRequestVo requestVo) { private ShoppingCartNewService getInstanceByRequest(BaseRequestVo requestVo) {
if(requestVo.getChannelType() != null && OrderChannelType.SAASMALL.getCode().equals(requestVo.getChannelType())) { if (requestVo.getChannelType() != null && OrderChannelType.SAASMALL.getCode().equals(requestVo.getChannelType())) {
return SDKCommonBaseContextWare.getBean(ShoppingCartMallServiceImpl.class); return SDKCommonBaseContextWare.getBean(ShoppingCartMallServiceImpl.class);
} else { } else {
return getInstanceBySessionId(requestVo.getSessionId()); return getInstanceBySessionId(requestVo.getSessionId());
...@@ -179,8 +181,8 @@ public class ShoppingCartController { ...@@ -179,8 +181,8 @@ public class ShoppingCartController {
/** /**
* 线下订单查询接口 * 线下订单查询接口
*/ */
@ApiAnnotation(logMessage = "/getMemberInfo")
@PostMapping(value = "/getMemberInfo") @PostMapping(value = "/getMemberInfo")
@LogIgnore(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},logMessage = "/getMemberInfo")
public BaseResponse getMemberInfo(@LogParams @RequestBody GetMemberInfoRequestDto request) { public BaseResponse getMemberInfo(@LogParams @RequestBody GetMemberInfoRequestDto request) {
return SDKCommonBaseContextWare.getBean(ShoppingCartNewServiceImpl.class).getMemberInfo(request); return SDKCommonBaseContextWare.getBean(ShoppingCartNewServiceImpl.class).getMemberInfo(request);
} }
......
...@@ -110,7 +110,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -110,7 +110,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
private boolean storeDeliveryUseOld; private boolean storeDeliveryUseOld;
@Autowired @Autowired
private ActivityAdapter activityAdapter; private ActivityAdapter activityAdapter;
@Autowired @Autowired
private StoreItemClient storeItemClient; private StoreItemClient storeItemClient;
...@@ -383,6 +382,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -383,6 +382,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if (calculationDiscountResult != null && CollectionUtils.isNotEmpty(calculationDiscountResult.getSendGoods())) { if (calculationDiscountResult != null && CollectionUtils.isNotEmpty(calculationDiscountResult.getSendGoods())) {
sendGoodsQtyCheck(productsCount, appId, partnerId, userId, storeId, tableNumber, oldCartGoodsList, shoppingCartBaseService, calculationDiscountResult.getSendGoods()); sendGoodsQtyCheck(productsCount, appId, partnerId, userId, storeId, tableNumber, oldCartGoodsList, shoppingCartBaseService, calculationDiscountResult.getSendGoods());
} }
// 当商品数量被设为0时
if (Objects.equals(cartGoods.getQty(), 0)) {
assortmentSdkService.updateGoodsQtyBySdk(partnerId, userId, storeId, cartGoods.getCartGoodsUid(), 0, "", shoppingCartBaseService);
}
// 促销活动的优惠金额计算 // 促销活动的优惠金额计算
updateShoppingCartGoodsDiscount(null, activityQueryDto, calculationDiscountResult, allCartGoodsList, shoppingCartGoodsResponseVo, null, userLoginInfoDto, addShoppingCartGoodsRequestVo.getMenuType(), deliveryAmount); updateShoppingCartGoodsDiscount(null, activityQueryDto, calculationDiscountResult, allCartGoodsList, shoppingCartGoodsResponseVo, null, userLoginInfoDto, addShoppingCartGoodsRequestVo.getMenuType(), deliveryAmount);
clearMsg(shoppingCartGoodsResponseVo, cartGoods.getCartGoodsUid()); clearMsg(shoppingCartGoodsResponseVo, cartGoods.getCartGoodsUid());
...@@ -467,7 +470,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -467,7 +470,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, updateShoppingCartGoodsQtyRequestVo.getSessionId(), "", shoppingCartBaseService); assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, updateShoppingCartGoodsQtyRequestVo.getSessionId(), "", shoppingCartBaseService);
Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo,updateShoppingCartGoodsQtyRequestVo.getOrderType()); Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo,updateShoppingCartGoodsQtyRequestVo.getOrderType());
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, updateShoppingCartGoodsQtyRequestVo.getOrderType()); ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, updateShoppingCartGoodsQtyRequestVo.getOrderType());
if (grayPush(partnerId,storeId,"2")) { if (grayPush(partnerId,storeId,"2")) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null; CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null;
...@@ -2396,6 +2398,20 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -2396,6 +2398,20 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return false; return false;
} }
} }
/**
* 设置总的优惠信息和商品优惠信息
* @param shoppingCartGoodsResponseVo
* @param discountResult
*/
private void buildShoppingCartGoodsResponse(ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo,
CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult,
Integer flag,
String partnerId) {
ShoppingCartRelationService shoppingCartRelationService = shoppingCartRelationFactory.getBuildShoppingCartGoodsResponseService(partnerId);
shoppingCartRelationService.buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,discountResult,flag);
}
private List<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> buildCoupons(List<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> oldCoupons, List<ShoppingCartInfoRequestVo.couponCode> coupons){ private List<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> buildCoupons(List<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> oldCoupons, List<ShoppingCartInfoRequestVo.couponCode> coupons){
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
*/ */
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.aop.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.*; import cn.freemud.entities.dto.*;
import cn.freemud.entities.dto.activity.ActivityQueryResponseDto; import cn.freemud.entities.dto.activity.ActivityQueryResponseDto;
import com.freemud.application.sdk.api.base.BaseResponse; import com.freemud.application.sdk.api.base.BaseResponse;
...@@ -29,12 +32,14 @@ public interface ActivityClient { ...@@ -29,12 +32,14 @@ public interface ActivityClient {
* 统一活动查询接口 * 统一活动查询接口
*/ */
@PostMapping("/activity/query") @PostMapping("/activity/query")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
ActivityQueryResponseDto query(ActivityQueryRequestDto activityQueryRequestDto); ActivityQueryResponseDto query(ActivityQueryRequestDto activityQueryRequestDto);
/** /**
* 优惠金额计算 * 优惠金额计算
*/ */
@PostMapping("/calculation/discount") @PostMapping("/calculation/discount")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
ActivityCalculationDiscountResponseDto calculationDiscount(ActivityCalculationDiscountRequestDto activityCalculationDiscountRequestDto); ActivityCalculationDiscountResponseDto calculationDiscount(ActivityCalculationDiscountRequestDto activityCalculationDiscountRequestDto);
/** /**
...@@ -57,5 +62,6 @@ public interface ActivityClient { ...@@ -57,5 +62,6 @@ public interface ActivityClient {
* @return * @return
*/ */
@PostMapping("/calculation/discount/sharing") @PostMapping("/calculation/discount/sharing")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
ActivityCalculationDiscountResponseDto calculationDiscountSharing(ActivityCalculationDiscountRequestDto activityCalculationDiscountRequestDto); ActivityCalculationDiscountResponseDto calculationDiscountSharing(ActivityCalculationDiscountRequestDto activityCalculationDiscountRequestDto);
} }
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.aop.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.BuryingPointBigDto; import cn.freemud.entities.dto.BuryingPointBigDto;
import cn.freemud.entities.dto.BuryingPointResDto; import cn.freemud.entities.dto.BuryingPointResDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.netflix.feign.FeignClient;
......
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.aop.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.calculate.CalculationSharingDiscountRequestDto; import cn.freemud.entities.dto.calculate.CalculationSharingDiscountRequestDto;
import cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto; import cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.netflix.feign.FeignClient;
...@@ -13,5 +16,6 @@ public interface CalculationClient { ...@@ -13,5 +16,6 @@ public interface CalculationClient {
* 促销新的算价对接 * 促销新的算价对接
*/ */
@PostMapping("/promotioncenter/calculateservice/discount/sharing") @PostMapping("/promotioncenter/calculateservice/discount/sharing")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
CalculationSharingDiscountResponseDto calculationSharingDiscount(CalculationSharingDiscountRequestDto shareDiscountRequestDto); CalculationSharingDiscountResponseDto calculationSharingDiscount(CalculationSharingDiscountRequestDto shareDiscountRequestDto);
} }
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.aop.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.BatchQueryActivityInfoRequestDto; import cn.freemud.entities.dto.BatchQueryActivityInfoRequestDto;
import cn.freemud.entities.dto.BatchQueryActivityInfoResponseDto; import cn.freemud.entities.dto.BatchQueryActivityInfoResponseDto;
import cn.freemud.entities.dto.GetAppKeyRequestDto; import cn.freemud.entities.dto.GetAppKeyRequestDto;
...@@ -18,6 +21,7 @@ public interface CardBinClient { ...@@ -18,6 +21,7 @@ public interface CardBinClient {
* @return * @return
*/ */
@PostMapping("/getAppKey") @PostMapping("/getAppKey")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
GetAppKeyResponseDto getAppKey(GetAppKeyRequestDto requestDto); GetAppKeyResponseDto getAppKey(GetAppKeyRequestDto requestDto);
/** /**
...@@ -26,6 +30,7 @@ public interface CardBinClient { ...@@ -26,6 +30,7 @@ public interface CardBinClient {
* @return * @return
*/ */
@PostMapping(value = "/batchQueryActivityInfo") @PostMapping(value = "/batchQueryActivityInfo")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
BatchQueryActivityInfoResponseDto batchQueryActivityInfo(BatchQueryActivityInfoRequestDto requestDto); BatchQueryActivityInfoResponseDto batchQueryActivityInfo(BatchQueryActivityInfoRequestDto requestDto);
......
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.aop.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.user.GetUserScoreUseDetailRequest; import cn.freemud.entities.dto.user.GetUserScoreUseDetailRequest;
import cn.freemud.entities.dto.user.GetUserScoreUserDetailResponse; import cn.freemud.entities.dto.user.GetUserScoreUserDetailResponse;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.netflix.feign.FeignClient;
...@@ -26,5 +29,6 @@ public interface CustomScoreClient { ...@@ -26,5 +29,6 @@ public interface CustomScoreClient {
* 用户可用积分 * 用户可用积分
*/ */
@PostMapping(value = "/user/scoreUseDetail") @PostMapping(value = "/user/scoreUseDetail")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.CODE,messageFieldName=ResponseCodeKeyConstant.MESSAGE)
GetUserScoreUserDetailResponse getUserScoreUseDetail(@RequestBody GetUserScoreUseDetailRequest getUserScoreUseDetailRequest); GetUserScoreUserDetailResponse getUserScoreUseDetail(@RequestBody GetUserScoreUseDetailRequest getUserScoreUseDetailRequest);
} }
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.aop.IgnoreFeignLogAnnotation;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.entities.dto.GetPaidRuleRequestDto; import cn.freemud.entities.dto.GetPaidRuleRequestDto;
import cn.freemud.entities.dto.GetPaidRuleResponseDto; import cn.freemud.entities.dto.GetPaidRuleResponseDto;
import cn.freemud.entities.dto.user.GetSessionUserInfoDto; import cn.freemud.entities.dto.user.GetSessionUserInfoDto;
...@@ -28,5 +30,6 @@ public interface CustomerApplicationClient { ...@@ -28,5 +30,6 @@ public interface CustomerApplicationClient {
BaseResponse<GetPaidRuleResponseDto> getPaidRule(GetPaidRuleRequestDto getPaidRuleRequestDto); BaseResponse<GetPaidRuleResponseDto> getPaidRule(GetPaidRuleRequestDto getPaidRuleRequestDto);
@PostMapping(value = "/user/getSessionUserInfo") @PostMapping(value = "/user/getSessionUserInfo")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR})
BaseResponse<CustomerInfoVo>getSessionUserInfo(GetSessionUserInfoDto getSessionUserInfoDto); BaseResponse<CustomerInfoVo>getSessionUserInfo(GetSessionUserInfoDto getSessionUserInfoDto);
} }
...@@ -12,7 +12,10 @@ ...@@ -12,7 +12,10 @@
*/ */
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.aop.IgnoreFeignLogAnnotation;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.GetProductStockRequestDto; import cn.freemud.entities.dto.GetProductStockRequestDto;
import cn.freemud.entities.dto.GetProductStockResponseDto; import cn.freemud.entities.dto.GetProductStockResponseDto;
import cn.freemud.entities.dto.UpdateProductStockRequestDto; import cn.freemud.entities.dto.UpdateProductStockRequestDto;
...@@ -29,6 +32,7 @@ public interface StockClient { ...@@ -29,6 +32,7 @@ public interface StockClient {
* 前端查询多个商品库存信息 * 前端查询多个商品库存信息
*/ */
@PostMapping("/getAvailableStocks") @PostMapping("/getAvailableStocks")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.CODE,messageFieldName=ResponseCodeKeyConstant.MESSAGE)
GetProductStockResponseDto getAvailableStocks(@RequestBody GetProductStockRequestDto requestDto); GetProductStockResponseDto getAvailableStocks(@RequestBody GetProductStockRequestDto requestDto);
/** /**
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
*/ */
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.aop.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.*; import cn.freemud.entities.dto.*;
import com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductRequest; import com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductRequest;
import com.freemud.application.sdk.api.productcenter.response.ProductResponseDTO; import com.freemud.application.sdk.api.productcenter.response.ProductResponseDTO;
...@@ -42,6 +45,9 @@ public interface StoreItemClient { ...@@ -42,6 +45,9 @@ public interface StoreItemClient {
* 获取商品的详细信息 * 获取商品的详细信息
*/ */
@PostMapping("/Shop/ListProductInfoByIdList") @PostMapping("/Shop/ListProductInfoByIdList")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductInfosDto listProductInfos(@RequestBody GetProductInfoDto getProductInfoDto); ProductInfosDto listProductInfos(@RequestBody GetProductInfoDto getProductInfoDto);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment