| 
					
				 | 
			
			
				@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.framework.common.pojo.PageParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.framework.common.pojo.PageResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.framework.common.util.object.ObjectUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.pay.api.refund.PayRefundApi; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.pay.api.refund.dto.PayRefundCreateReqDTO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.system.dal.dataobject.user.AdminUserDO; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -37,7 +38,6 @@ import cn.newfeifan.mall.module.trade.service.order.TradeOrderQueryService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 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.extension.conditions.query.LambdaQueryChainWrapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import lombok.extern.slf4j.Slf4j; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.slf4j.Logger; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -430,12 +430,8 @@ public class AfterSaleServiceImpl implements AfterSaleService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public Long getApplyingAfterSaleCount(Long userId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return tradeAfterSaleMapper.selectCountByUserIdAndStatus(userId, AfterSaleStatusEnum.APPLYING_STATUSES); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Long getApplyingAfterSaleCount(Long userId, Long shopId, Long merId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return tradeAfterSaleMapper.selectCountByUserIdAndStatus(userId, shopId, merId, AfterSaleStatusEnum.APPLYING_STATUSES); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ShopBO shop = getShop(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return tradeAfterSaleMapper.selectCountByUserIdAndStatus(userId, shop.getShopId(),shop.getMerId(), AfterSaleStatusEnum.APPLYING_STATUSES); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -446,16 +442,20 @@ public class AfterSaleServiceImpl implements AfterSaleService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public List<AfterSaleDO> getAfterSaleByProId(Long spuId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return tradeAfterSaleMapper.selectList(new LambdaQueryWrapper<AfterSaleDO>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(AfterSaleDO::getSpuId, spuId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ShopBO shop = getShop(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return tradeAfterSaleMapper.selectList(new LambdaQueryWrapperX<AfterSaleDO>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .eq(AfterSaleDO::getSpuId, spuId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .eqIfPresent(AfterSaleDO::getShopId, shop.getShopId()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .eqIfPresent(AfterSaleDO::getMerchantId,shop.getMerId()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public List<AfterSaleDO> getAfterSaleByMerAndShop() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ShopBO shop = getShop(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return tradeAfterSaleMapper.selectList(new LambdaQueryWrapper<AfterSaleDO>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(AfterSaleDO::getShopId, shop.getShopId()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return tradeAfterSaleMapper.selectList(new LambdaQueryWrapperX<AfterSaleDO>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .eqIfPresent(AfterSaleDO::getShopId, shop.getShopId()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 .eq(AfterSaleDO::getMerchantId, shop.getMerId())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |