Commit 331848d2 by hanghang.wang

购物车成功之后去掉返回日志,缩小线上日志量

parent 91b6c184
......@@ -275,7 +275,6 @@ public class CouponServiceImpl implements CouponService {
@Override
public GetCouponDetailResponseDto getMemberCoupon(GetMemberCouponRequestVo requestVo) {
ApiLog.debug("getMemberCoupon:" + gson.toJson(requestVo));
//TODO 券详情查券服务
Map<String, String> map = new TreeMap<String, String>();
if (StringUtils.isBlank(requestVo.getPartnerId()) || StringUtils.isBlank(requestVo.getCouponCode())) {
......@@ -292,7 +291,6 @@ public class CouponServiceImpl implements CouponService {
String sign = SignUtil.createMD5Sign(map, appSecret);
map.put(Finals.SIGN, sign);
GetCouponDetailResponseDto responseDto = couponOnlineClient.getCouponDetails(map);
LogUtil.info("couponOnlineClient.getCouponDetails****", map, gson.toJson(responseDto));
if (ResponseCodeConstant.RESPONSE_SUCCESS_1.equals(responseDto.getResult())) {
return responseDto;
}
......@@ -906,7 +904,7 @@ public class CouponServiceImpl implements CouponService {
*/
@Override
public CheckSpqInfoResponseDto checkSpqInfo(CheckSpqInfoRequestDto requestDto, String goodsId) {
ApiLog.debug("checkSpqInfo****" + gson.toJson(requestDto));
// ApiLog.debug("checkSpqInfo****" + gson.toJson(requestDto));
String partnerId = requestDto.getPartnerId();
String couponCode = requestDto.getCouponCode();
String storeId = requestDto.getStoreId();
......@@ -1002,7 +1000,6 @@ public class CouponServiceImpl implements CouponService {
dto.setStockLimit(ObjectUtils.equals(1, productsVo.getStockLimit()));
dto.setExtras(productsVo.getExtra());
dto.setCouponType(couponType);
ApiLog.debug("dto***" + dto);
return dto;
}
......@@ -1055,7 +1052,6 @@ public class CouponServiceImpl implements CouponService {
*/
@Override
public GetProductsVo getSpqProductInfo(CheckSpqInfoRequestDto requestDto, String goodsId) {
ApiLog.debug("checkSpqInfo****" + gson.toJson(requestDto));
String partnerId = requestDto.getPartnerId();
String couponCode = requestDto.getCouponCode();
String storeId = requestDto.getStoreId();
......@@ -1065,7 +1061,6 @@ public class CouponServiceImpl implements CouponService {
requestVo.setCouponCode(couponCode);
requestVo.setStoreId(requestDto.getStoreId());
GetCouponDetailResponseDto couponDetailResponseDto = couponService.getMemberCoupon(requestVo);
LogUtil.info("couponService.getMemberCoupon", gson.toJson(requestVo), gson.toJson(couponDetailResponseDto));
if (couponDetailResponseDto == null || !couponDetailResponseDto.getResult().equals(ResponseCodeConstant.RESPONSE_SUCCESS_1) || CollectionUtils.isEmpty(couponDetailResponseDto.getDetails())) {
return null;
}
......
......@@ -83,8 +83,6 @@ public class ItemServiceImpl implements ItemService {
GetProductInfoDto getProductInfoDto = storeItemAdapter.convert2ProductInfoDto(partnerId, shopId, ProductInfoType.ALL.getCode(), productIds,menuType);
ProductInfosDto productInfosDto = storeItemClient.listProductInfos(getProductInfoDto);
if (!RESPONSE_SUCCESS_CODE.equals(productInfosDto.getErrcode()) || CollectionUtils.isEmpty(productInfosDto.getData().getProducts())) {
log.error("getShoppingCartInfo checkProductValidate is error , getProductValidateDto:{} , productCheckVaildDto:{}",
gson.toJson(getProductValidateDto), gson.toJson(productInfosDto));
return ResponseUtil.error(ResponseResult.STORE_ITEM_QUERY_ERROR);
}
List<String> productInfoIds = productInfosDto.getData().getProducts().stream()
......
......@@ -332,7 +332,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
// 获取商品详细信息
List<ProductBean> productBeanListSpuClass = assortmentSdkService.getProductsInfo(partnerId, storeId
, Collections.singletonList(spuId2),addShoppingCartGoodsRequestVo.getMenuType(), this.shoppingCartBaseService);
LogUtil.info("productBeanListSpuClass", spuId2,JSON.toJSONString(productBeanListSpuClass));
// LogUtil.info("productBeanListSpuClass", spuId2,JSON.toJSONString(productBeanListSpuClass));
// 没有查到商品
if(productBeanListSpuClass == null || productBeanListSpuClass.isEmpty()){
......@@ -677,7 +677,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
buildCoupons(coupons,shoppingCartInfoRequestVo.getCouponCodes());
List<ShoppingCartInfoRequestVo.SendGoods> sendGoodsList = shoppingCartInfoRequestVo.getSendGoods();
List<ShoppingCartInfoRequestVo.SendGoods> sendGoods = new ArrayList<>();
if (CollectionUtils.isNotEmpty(sendGoodsList)) {
......@@ -1418,7 +1417,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
activityCalculationDiscountRequestDto.setProductChannel(BusinessTypeEnum.SAAS_DELIVERY.getCode());
}
try {
ApiLog.debug("activityClient discount :{}", JSON.toJSONString(activityCalculationDiscountRequestDto));
activityCalculationDiscountResponseDto = activityClient.calculationDiscount(activityCalculationDiscountRequestDto);
} catch (Exception ex) {
ErrorLog.printErrorLog("calculation_discount_error", "/calculation/discount", activityCalculationDiscountRequestDto, ex);
......@@ -1898,9 +1896,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
private void addProductGoods(AddShoppingCartGoodsRequestVo addShoppingCartGoodsRequestVo
, CartGoods cartGoods, String spuId2, String userId, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo, String spuId
, List<CartGoods> allCartGoodsList, List<ProductBean> productBeanListSpuClass, CouponProductDto couponProductDto, String couponCode, Integer todayAvailableTimes) {
// 设置商品类型为商品券
if (CouponTypeEnum.TYPE_4.getCode().equals(couponProductDto.getType())) {
cartGoods.setGoodsType(GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType());
......
......@@ -134,7 +134,6 @@ public class CalculationSharingDiscountService {
CalculationSharingDiscountRequestDto.CalculationDiscountCoupon coupon = new CalculationSharingDiscountRequestDto.CalculationDiscountCoupon();
coupon.setCode(checkSpqInfo.getCouponCode());
coupon.setActivityCode(checkSpqInfo.getActiveCode());
ApiLog.debug("coupons={},coupon={}", JSON.toJSONString(coupons), JSON.toJSONString(coupon));
CalculationSharingDiscountRequestDto.CalculationDiscountCoupon calculationDiscountCoupon = coupons.stream().filter(p -> coupon.getActivityCode().equals(p.getActivityCode()) && coupon.getCode().equals(p.getCode())).findFirst().orElse(null);
if (calculationDiscountCoupon == null){
coupons.add(coupon);
......@@ -149,7 +148,6 @@ public class CalculationSharingDiscountService {
}
}
if (GoodsTypeEnum.SET_MEAL_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
if (CollectionUtils.isEmpty(cartGoods.getProductGroupList()) && CollectionUtils.isEmpty(cartGoods.getProductComboList())) {
cartGoodsList.remove(i);
......@@ -194,22 +192,17 @@ public class CalculationSharingDiscountService {
calculationSharingDiscountRequestDto.setOrgIds(commonService.getOrgIds(partnerId,storeId));
calculationSharingDiscountRequestDto.setDistributionFee(deliveryAmount);
calculationSharingDiscountRequestDto.setIsMember(isMember);
CalculationSharingDiscountResponseDto sharingDiscountResponseDto;
// 构建买一送一寄杯活动用户选择信息
ActiveService activeService = activeFactory.getBuildChooseGoodsService(partnerId);
activeService.buildChooseGoodsService(calculationSharingDiscountRequestDto,shoppingCartInfoRequestVo == null ? null : shoppingCartInfoRequestVo.getChooseGoods());
try {
ApiLog.debug("start sharing discount dto={}", JSON.toJSONString(calculationSharingDiscountRequestDto));
sharingDiscountResponseDto = calculationClient.calculationSharingDiscount(calculationSharingDiscountRequestDto);
}
catch (Exception e) {
ErrorLog.printErrorLog("calculation_discount_error", "/calculation/discount/sharing", calculationSharingDiscountRequestDto, e);
throw new ServiceException(ResponseResult.OPERATE_TOO_OFTEN);
}
// 返回成功
if (sharingDiscountResponseDto != null && StringUtils.equals(sharingDiscountResponseDto.getStatusCode(), ResponseCodeConstant.RESPONSE_SUCCESS_STR)) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult result = sharingDiscountResponseDto.getResult();
......
......@@ -157,7 +157,6 @@ public class CalculationServiceImpl {
try {
activityCalculationDiscountResponseDto = activityClient.calculationDiscountSharing(discountRequest);
} catch (Exception ex) {
ErrorLog.printErrorLog("calculation_discount_error", "/calculation/discount/sharding", discountRequest, ex);
throw new ServiceException(ResponseResult.OPERATE_TOO_OFTEN);
}
//优惠券互斥
......
......@@ -2,6 +2,9 @@ package cn.freemud.service.thirdparty;
//import cn.freemud.constant.IgnoreFeignLogAnnotation;
import cn.freemud.annotations.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.GetCouponDetailResponseDto;
import cn.freemud.interceptor.FormSupportConfig;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -18,6 +21,7 @@ public interface CouponOnlineClient {
/**
* 查询券详情
*/
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE)
@PostMapping(value = "/code_v4", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE}
)
......
......@@ -32,6 +32,6 @@ public interface CustomScoreClient {
* 用户可用积分
*/
@PostMapping(value = "/user/scoreUseDetail")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.CODE,messageFieldName=ResponseCodeKeyConstant.MESSAGE)
@IgnoreFeignLogAnnotation
GetUserScoreUserDetailResponse getUserScoreUseDetail(@RequestBody GetUserScoreUseDetailRequest getUserScoreUseDetailRequest);
}
......@@ -29,8 +29,10 @@ public interface CustomerApplicationClient {
@PostMapping(value = "/membercard/getPaidRule")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR})
BaseResponse<GetPaidRuleResponseDto> getPaidRule(GetPaidRuleRequestDto getPaidRuleRequestDto);
@PostMapping(value = "/user/getSessionUserInfo")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR})
BaseResponse<CustomerInfoVo>getSessionUserInfo(GetSessionUserInfoDto getSessionUserInfoDto);
......
......@@ -13,6 +13,9 @@
package cn.freemud.service.thirdparty;
import cn.freemud.annotations.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.GetMemberCouponListRequestDto;
import cn.freemud.entities.dto.GetMemberCouponListResponseDto;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -26,6 +29,7 @@ public interface CustomerExtendClient {
/**
* 会员优惠券列表
*/
@IgnoreFeignLogAnnotation()
@PostMapping(value = "/customerextendservice/coupon/getCoupons")
GetMemberCouponListResponseDto getMemberCouponListRequestDto(@RequestBody GetMemberCouponListRequestDto getMemberCouponListRequestDto);
}
package cn.freemud.service.thirdparty;
import cn.freemud.annotations.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.GetMemberListRequestDto;
import cn.freemud.entities.dto.GetMemberListResponseDto;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -17,6 +20,7 @@ public interface MemberToolsClient {
/**
* 根据会员手机号和商户获取会员信息
*/
@IgnoreFeignLogAnnotation
@PostMapping(value = "/customerservice/getMembers")
GetMemberListResponseDto getMemberList(@RequestBody GetMemberListRequestDto getMemberListRequestDto);
}
package cn.freemud.service.thirdparty;
import cn.freemud.annotations.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.ProductBaseResponse;
import cn.freemud.entities.dto.RequiredProductRequest;
import cn.freemud.entities.dto.product.ValiadShopProductResponse;
......@@ -29,10 +32,12 @@ import java.util.List;
public interface ProductClient {
@PostMapping({"/Shop/ListMenuMustProduct"})
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName = ResponseCodeKeyConstant.ERR_MSG)
ProductBaseResponse<List<String>> getRequiredProductList(@RequestBody RequiredProductRequest request);
@PostMapping({"/Shop/ValidateShopProduct/Reason"})
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName = ResponseCodeKeyConstant.ERR_MSG)
ProductBaseResponse<ValiadShopProductResponse> validateShopProductAboutReason(@RequestBody ValidateShopProductRequest request);
}
......@@ -32,7 +32,7 @@ public interface StockClient {
* 前端查询多个商品库存信息
*/
@PostMapping("/getAvailableStocks")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.CODE,messageFieldName=ResponseCodeKeyConstant.MESSAGE)
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR})
GetProductStockResponseDto getAvailableStocks(@RequestBody GetProductStockRequestDto requestDto);
/**
......
......@@ -42,35 +42,35 @@ public interface StoreItemClient {
* 根据商品id查询门店特定时间段菜单
*/
@PostMapping(value = "/Menu/GetMenuByIds")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
GetMenuByIdsResponseDto getMenuCategoryByIds(@RequestBody GetMenuCategoryByIdsDto getMenuCategoryByIdsDto);
/**
* 获取商品的详细信息
*/
@PostMapping("/Shop/ListProductInfoByIdList")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductInfosDto listProductInfos(@RequestBody GetProductInfoDto getProductInfoDto);
/**
* 根据skuid查询spu信息
* @return
*/
@PostMapping("/Product/GetSpectionProductBySkuId")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductListDto getSpuIdsBySkuIds(@RequestBody GetSpuIdsBySkuIdsDto requestDto);
/**
* 校验商品可用性
*/
@PostMapping("Shop/ValidateShopProduct")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductResponseDTO<ValiadShopProductResponse> validateShopProduct(@RequestBody ValidateShopProductRequest request);
/**
* 校验商品在当前门店是否可售
*/
@PostMapping("/Shop/validateShopContainProduct")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ValidateProductInfosDto validateShopContainProduct(@RequestBody GetValidateProductInfoDto 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