|
@@ -12,11 +12,11 @@ import cn.newfeifan.mall.module.distri.service.integral.IntegralService;
|
|
import cn.newfeifan.mall.module.pay.api.refund.PayRefundApi;
|
|
import cn.newfeifan.mall.module.pay.api.refund.PayRefundApi;
|
|
import cn.newfeifan.mall.module.pay.api.refund.dto.PayRefundCreateReqDTO;
|
|
import cn.newfeifan.mall.module.pay.api.refund.dto.PayRefundCreateReqDTO;
|
|
import cn.newfeifan.mall.module.system.controller.admin.user.vo.user.UserShopDetailsVO;
|
|
import cn.newfeifan.mall.module.system.controller.admin.user.vo.user.UserShopDetailsVO;
|
|
|
|
+import cn.newfeifan.mall.module.system.dal.mysql.user.AdminUserMapper;
|
|
import cn.newfeifan.mall.module.system.service.user.AdminUserService;
|
|
import cn.newfeifan.mall.module.system.service.user.AdminUserService;
|
|
import cn.newfeifan.mall.module.trade.controller.admin.aftersale.vo.AfterSaleDisagreeReqVO;
|
|
import cn.newfeifan.mall.module.trade.controller.admin.aftersale.vo.AfterSaleDisagreeReqVO;
|
|
import cn.newfeifan.mall.module.trade.controller.admin.aftersale.vo.AfterSalePageReqVO;
|
|
import cn.newfeifan.mall.module.trade.controller.admin.aftersale.vo.AfterSalePageReqVO;
|
|
import cn.newfeifan.mall.module.trade.controller.admin.aftersale.vo.AfterSaleRefuseReqVO;
|
|
import cn.newfeifan.mall.module.trade.controller.admin.aftersale.vo.AfterSaleRefuseReqVO;
|
|
-import cn.newfeifan.mall.module.trade.controller.admin.delivery.vo.expresstemplate.ShopBO;
|
|
|
|
import cn.newfeifan.mall.module.trade.controller.app.aftersale.vo.AppAfterSaleCreateReqVO;
|
|
import cn.newfeifan.mall.module.trade.controller.app.aftersale.vo.AppAfterSaleCreateReqVO;
|
|
import cn.newfeifan.mall.module.trade.controller.app.aftersale.vo.AppAfterSaleDeliveryReqVO;
|
|
import cn.newfeifan.mall.module.trade.controller.app.aftersale.vo.AppAfterSaleDeliveryReqVO;
|
|
import cn.newfeifan.mall.module.trade.convert.aftersale.AfterSaleConvert;
|
|
import cn.newfeifan.mall.module.trade.convert.aftersale.AfterSaleConvert;
|
|
@@ -25,6 +25,8 @@ import cn.newfeifan.mall.module.trade.dal.dataobject.delivery.DeliveryExpressDO;
|
|
import cn.newfeifan.mall.module.trade.dal.dataobject.order.TradeOrderDO;
|
|
import cn.newfeifan.mall.module.trade.dal.dataobject.order.TradeOrderDO;
|
|
import cn.newfeifan.mall.module.trade.dal.dataobject.order.TradeOrderItemDO;
|
|
import cn.newfeifan.mall.module.trade.dal.dataobject.order.TradeOrderItemDO;
|
|
import cn.newfeifan.mall.module.trade.dal.mysql.aftersale.AfterSaleMapper;
|
|
import cn.newfeifan.mall.module.trade.dal.mysql.aftersale.AfterSaleMapper;
|
|
|
|
+import cn.newfeifan.mall.module.trade.dal.mysql.order.TradeOrderItemMapper;
|
|
|
|
+import cn.newfeifan.mall.module.trade.dal.mysql.order.TradeOrderMapper;
|
|
import cn.newfeifan.mall.module.trade.dal.redis.no.TradeNoRedisDAO;
|
|
import cn.newfeifan.mall.module.trade.dal.redis.no.TradeNoRedisDAO;
|
|
import cn.newfeifan.mall.module.trade.enums.aftersale.AfterSaleOperateTypeEnum;
|
|
import cn.newfeifan.mall.module.trade.enums.aftersale.AfterSaleOperateTypeEnum;
|
|
import cn.newfeifan.mall.module.trade.enums.aftersale.AfterSaleStatusEnum;
|
|
import cn.newfeifan.mall.module.trade.enums.aftersale.AfterSaleStatusEnum;
|
|
@@ -38,11 +40,8 @@ import cn.newfeifan.mall.module.trade.framework.order.config.TradeOrderPropertie
|
|
import cn.newfeifan.mall.module.trade.service.delivery.DeliveryExpressService;
|
|
import cn.newfeifan.mall.module.trade.service.delivery.DeliveryExpressService;
|
|
import cn.newfeifan.mall.module.trade.service.order.TradeOrderQueryService;
|
|
import cn.newfeifan.mall.module.trade.service.order.TradeOrderQueryService;
|
|
import cn.newfeifan.mall.module.trade.service.order.TradeOrderUpdateService;
|
|
import cn.newfeifan.mall.module.trade.service.order.TradeOrderUpdateService;
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
-import org.slf4j.Logger;
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -55,7 +54,6 @@ import java.time.LocalDateTime;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
-import static cn.newfeifan.mall.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
|
|
|
import static cn.newfeifan.mall.module.trade.enums.ErrorCodeConstants.*;
|
|
import static cn.newfeifan.mall.module.trade.enums.ErrorCodeConstants.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -88,9 +86,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private AdminUserService userService;
|
|
private AdminUserService userService;
|
|
- private StringRedisTemplate stringRedisTemplate;
|
|
|
|
- @Resource
|
|
|
|
- private AdminUserMapper userMapper;
|
|
|
|
|
|
+
|
|
@Resource
|
|
@Resource
|
|
private TradeOrderMapper tradeOrderMapper;
|
|
private TradeOrderMapper tradeOrderMapper;
|
|
@Resource
|
|
@Resource
|
|
@@ -497,20 +493,5 @@ public class AfterSaleServiceImpl implements AfterSaleService {
|
|
.eq(AfterSaleDO::getMerchantId, userShopDetails.getMerchantId()));
|
|
.eq(AfterSaleDO::getMerchantId, userShopDetails.getMerchantId()));
|
|
}
|
|
}
|
|
|
|
|
|
- public static ShopBO getShopBO(StringRedisTemplate stringRedisTemplate, AdminUserMapper userMapper, Logger log) {
|
|
|
|
- Long loginUserId = getLoginUserId();
|
|
|
|
- String s = stringRedisTemplate.opsForValue().get("shop:" + loginUserId);
|
|
|
|
- if (StringUtils.isEmpty(s)) {
|
|
|
|
- AdminUserDO adminUserDO = userMapper.selectById(loginUserId);
|
|
|
|
- ShopBO shop = new ShopBO();
|
|
|
|
- shop.setShopId(adminUserDO.getShopId());
|
|
|
|
- shop.setMerId(adminUserDO.getMerchantId());
|
|
|
|
- log.info("====shop:{}", shop);
|
|
|
|
- return shop;
|
|
|
|
- } else {
|
|
|
|
- log.info("====shop:{}", s);
|
|
|
|
- return JSONObject.parseObject(s, ShopBO.class);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
}
|
|
}
|