Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/ruoyi-vue-pro
# Conflicts: # yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmHttpRequestUtils.java # yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java # yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java
This commit is contained in:
@@ -21,9 +21,8 @@ import java.util.Collection;
|
||||
public interface ProductBrowseHistoryMapper extends BaseMapperX<ProductBrowseHistoryDO> {
|
||||
|
||||
default ProductBrowseHistoryDO selectByUserIdAndSpuId(Long userId, Long spuId) {
|
||||
return selectOne(new LambdaQueryWrapperX<ProductBrowseHistoryDO>()
|
||||
.eq(ProductBrowseHistoryDO::getUserId, userId)
|
||||
.eq(ProductBrowseHistoryDO::getSpuId, spuId));
|
||||
return selectFirstOne(ProductBrowseHistoryDO::getUserId, userId,
|
||||
ProductBrowseHistoryDO::getSpuId, spuId);
|
||||
}
|
||||
|
||||
default PageResult<ProductBrowseHistoryDO> selectPage(ProductBrowseHistoryPageReqVO reqVO) {
|
||||
|
@@ -47,7 +47,7 @@ public interface CouponTemplateMapper extends BaseMapperX<CouponTemplateDO> {
|
||||
}
|
||||
|
||||
default List<CouponTemplateDO> selectListByTakeType(Integer takeType) {
|
||||
return selectList(CouponTemplateDO::getTakeType, takeType);
|
||||
return selectList(CouponTemplateDO::getTakeType, takeType, CouponTemplateDO::getStatus, CommonStatusEnum.ENABLE.getStatus());
|
||||
}
|
||||
|
||||
default List<CouponTemplateDO> selectList(List<Integer> canTakeTypes, Integer productScope, Long productScopeValue, Integer count) {
|
||||
|
@@ -56,6 +56,15 @@ public class TradeExpressProperties {
|
||||
@NotEmpty(message = "快递鸟 Api Key 配置项不能为空")
|
||||
private String apiKey;
|
||||
|
||||
/**
|
||||
* 接口指令
|
||||
*
|
||||
* 1. 1002:免费版(只能查询申通、圆通快递)
|
||||
* 2. 8001:付费版
|
||||
*/
|
||||
@NotEmpty(message = "RequestType 配置项不能为空")
|
||||
private String requestType = "1002";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -39,11 +39,6 @@ public class KdNiaoExpressClient implements ExpressClient {
|
||||
|
||||
private static final String REAL_TIME_QUERY_URL = "https://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx";
|
||||
|
||||
/**
|
||||
* 快递鸟即时查询免费版 RequestType
|
||||
*/
|
||||
private static final String REAL_TIME_FREE_REQ_TYPE = "1002";
|
||||
|
||||
private final RestTemplate restTemplate;
|
||||
private final TradeExpressProperties.KdNiaoConfig config;
|
||||
|
||||
@@ -67,7 +62,7 @@ public class KdNiaoExpressClient implements ExpressClient {
|
||||
&& StrUtil.length(reqDTO.getPhone()) >= 4) {
|
||||
requestDTO.setCustomerName(StrUtil.subSufByLength(reqDTO.getPhone(), 4));
|
||||
}
|
||||
KdNiaoExpressQueryRespDTO respDTO = httpRequest(REAL_TIME_QUERY_URL, REAL_TIME_FREE_REQ_TYPE,
|
||||
KdNiaoExpressQueryRespDTO respDTO = httpRequest(REAL_TIME_QUERY_URL, config.getRequestType(),
|
||||
requestDTO, KdNiaoExpressQueryRespDTO.class);
|
||||
|
||||
// 处理结果
|
||||
|
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.service.price.calculator;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.module.member.api.level.MemberLevelApi;
|
||||
import cn.iocoder.yudao.module.member.api.level.dto.MemberLevelRespDTO;
|
||||
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
||||
@@ -141,7 +142,9 @@ public class TradeDiscountActivityPriceCalculator implements TradePriceCalculato
|
||||
*/
|
||||
public Integer calculateVipPrice(MemberLevelRespDTO level,
|
||||
TradePriceCalculateRespBO.OrderItem orderItem) {
|
||||
if (level == null || level.getDiscountPercent() == null) {
|
||||
if (level == null
|
||||
|| CommonStatusEnum.isDisable(level.getStatus())
|
||||
|| level.getDiscountPercent() == null) {
|
||||
return 0;
|
||||
}
|
||||
Integer newPrice = calculateRatePrice(orderItem.getPayPrice(), level.getDiscountPercent().doubleValue());
|
||||
|
Reference in New Issue
Block a user