mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-10 08:11:52 +08:00
1. 会员用户,增加 point 积分字段
2. 增加获得优惠劵、收藏数量的 API 接口
This commit is contained in:
@@ -50,6 +50,12 @@ public class AppTradeAfterSaleController {
|
||||
return success(TradeAfterSaleConvert.INSTANCE.convert(afterSaleService.getAfterSale(getLoginUserId(), id)));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/get-applying-count")
|
||||
@Operation(summary = "获得进行中的售后订单数量")
|
||||
public CommonResult<Long> getApplyingAfterSaleCount() {
|
||||
return success(afterSaleService.getApplyingAfterSaleCount(getLoginUserId()));
|
||||
}
|
||||
|
||||
// TODO 芋艿:待实现
|
||||
@GetMapping(value = "/get-reason-list")
|
||||
@Operation(summary = "获得售后原因")
|
||||
|
@@ -9,6 +9,8 @@ import cn.iocoder.yudao.module.trade.dal.dataobject.aftersale.TradeAfterSaleDO;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@Mapper
|
||||
public interface TradeAfterSaleMapper extends BaseMapperX<TradeAfterSaleDO> {
|
||||
|
||||
@@ -40,4 +42,10 @@ public interface TradeAfterSaleMapper extends BaseMapperX<TradeAfterSaleDO> {
|
||||
TradeAfterSaleDO::getUserId, userId);
|
||||
}
|
||||
|
||||
default Long selectCountByUserIdAndStatus(Long userId, Collection<Integer> statuses) {
|
||||
return selectCount(new LambdaQueryWrapperX<TradeAfterSaleDO>()
|
||||
.eq(TradeAfterSaleDO::getUserId, userId)
|
||||
.in(TradeAfterSaleDO::getStatus, statuses));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -108,4 +108,12 @@ public interface TradeAfterSaleService {
|
||||
*/
|
||||
void cancelAfterSale(Long userId, Long id);
|
||||
|
||||
/**
|
||||
* 【会员】获得正在进行中的售后订单数量
|
||||
*
|
||||
* @param userId
|
||||
* @return 数量
|
||||
*/
|
||||
Long getApplyingAfterSaleCount(Long userId);
|
||||
|
||||
}
|
||||
|
@@ -398,6 +398,11 @@ public class TradeAfterSaleServiceImpl implements TradeAfterSaleService, AfterSa
|
||||
TradeOrderItemAfterSaleStatusEnum.APPLY.getStatus(), TradeOrderItemAfterSaleStatusEnum.NONE.getStatus());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getApplyingAfterSaleCount(Long userId) {
|
||||
return tradeAfterSaleMapper.selectCountByUserIdAndStatus(userId, TradeAfterSaleStatusEnum.APPLYING_STATUSES);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private void createAfterSaleLog(Long userId, Integer userType, TradeAfterSaleDO afterSale,
|
||||
Integer beforeStatus, Integer afterStatus) {
|
||||
|
Reference in New Issue
Block a user