同步 Boot 和 Cloud 代码的差异,保持一致性
This commit is contained in:
@@ -25,19 +25,18 @@ public interface ProductCommentMapper extends BaseMapperX<ProductCommentDO> {
|
||||
}
|
||||
|
||||
static void appendTabQuery(LambdaQueryWrapperX<ProductCommentDO> queryWrapper, Integer type) {
|
||||
LambdaQueryWrapperX<ProductCommentDO> queryWrapperX = new LambdaQueryWrapperX<>();
|
||||
// 构建好评查询语句:好评计算 总评 >= 4
|
||||
if (ObjectUtil.equal(type, AppCommentPageReqVO.GOOD_COMMENT)) {
|
||||
queryWrapperX.ge(ProductCommentDO::getScores, 4);
|
||||
queryWrapper.ge(ProductCommentDO::getScores, 4);
|
||||
}
|
||||
// 构建中评查询语句:中评计算 总评 >= 3 且 总评 < 4
|
||||
if (ObjectUtil.equal(type, AppCommentPageReqVO.MEDIOCRE_COMMENT)) {
|
||||
queryWrapperX.ge(ProductCommentDO::getScores, 3);
|
||||
queryWrapperX.lt(ProductCommentDO::getScores, 4);
|
||||
queryWrapper.ge(ProductCommentDO::getScores, 3);
|
||||
queryWrapper.lt(ProductCommentDO::getScores, 4);
|
||||
}
|
||||
// 构建差评查询语句:差评计算 总评 < 3
|
||||
if (ObjectUtil.equal(type, AppCommentPageReqVO.NEGATIVE_COMMENT)) {
|
||||
queryWrapperX.lt(ProductCommentDO::getScores, 3);
|
||||
queryWrapper.lt(ProductCommentDO::getScores, 3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,4 +57,4 @@ public interface ProductCommentMapper extends BaseMapperX<ProductCommentDO> {
|
||||
.eq(ProductCommentDO::getOrderItemId, orderItemId));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -194,9 +194,12 @@ public class CouponServiceImpl implements CouponService {
|
||||
|
||||
@Override
|
||||
public List<CouponDO> getMatchCouponList(Long userId, AppCouponMatchReqVO matchReqVO) {
|
||||
return couponMapper.selectListByUserIdAndStatusAndUsePriceLeAndProductScope(userId,
|
||||
List<CouponDO> list = couponMapper.selectListByUserIdAndStatusAndUsePriceLeAndProductScope(userId,
|
||||
CouponStatusEnum.UNUSED.getStatus(),
|
||||
matchReqVO.getPrice(), matchReqVO.getSpuIds(), matchReqVO.getCategoryIds());
|
||||
// 兜底逻辑:如果 CouponExpireJob 未执行,status 未变成 EXPIRE ,但是 validEndTime 已经过期了,需要进行过滤
|
||||
list.removeIf(coupon -> !LocalDateTimeUtils.isBetween(coupon.getValidStartTime(), coupon.getValidEndTime()));
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -139,6 +139,9 @@ public class AppTradeOrderDetailRespVO {
|
||||
@Schema(description = "积分抵扣的金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
||||
private Integer pointPrice;
|
||||
|
||||
@Schema(description = "VIP 减免金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "888")
|
||||
private Integer vipPrice;
|
||||
|
||||
/**
|
||||
* 订单项数组
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.iocoder.yudao.module.trade.convert.brokerage;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.dict.core.DictFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||
import cn.iocoder.yudao.module.trade.controller.admin.brokerage.vo.withdraw.BrokerageWithdrawPageReqVO;
|
||||
import cn.iocoder.yudao.module.trade.controller.admin.brokerage.vo.withdraw.BrokerageWithdrawRespVO;
|
||||
|
||||
@@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||
import cn.iocoder.yudao.framework.common.util.string.StrUtils;
|
||||
import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.dict.core.DictFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils;
|
||||
import cn.iocoder.yudao.module.member.api.address.dto.MemberAddressRespDTO;
|
||||
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||
|
||||
@@ -245,7 +245,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
|
||||
@AfterSaleLog(operateType = AfterSaleOperateTypeEnum.MEMBER_DELIVERY)
|
||||
public void deliveryAfterSale(Long userId, AppAfterSaleDeliveryReqVO deliveryReqVO) {
|
||||
// 校验售后单存在,并状态未退货
|
||||
AfterSaleDO afterSale = tradeAfterSaleMapper.selectById(deliveryReqVO.getId());
|
||||
AfterSaleDO afterSale = tradeAfterSaleMapper.selectByIdAndUserId(deliveryReqVO.getId(), userId);
|
||||
if (afterSale == null) {
|
||||
throw exception(AFTER_SALE_NOT_FOUND);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user