Commit 4c27ae11 by 吕明尚

计算订单金额和用户优惠券接口放开

parent 9f10457d
package share.web.core.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
......@@ -56,6 +54,8 @@ public class WebConfig implements WebMvcConfigurer {
"/dict/type/**",
"/weixinpublic/**",
"/openInterface/**",
"/consumerCoupon/query",
"/order/computed/price",
"**"
).addPathPatterns("/**");
}
......
......@@ -8,8 +8,6 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.bouncycastle.util.Store;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -22,7 +20,6 @@ import share.common.core.redis.RedisUtil;
import share.common.enums.*;
import share.common.exception.base.BaseException;
import share.system.domain.*;
import share.system.domain.vo.TemplateMessageVo;
import share.system.service.*;
import java.util.*;
......@@ -250,6 +247,11 @@ public class OrderTask {
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单不存在");
return;
}
if (!byOrderNo.getStatus().equals(OrderStatusEnum.UNUSED.getCode())) {
redisUtil.delete(o);
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单状态异常");
return;
}
if (OrderStatusEnum.CANCEL.getCode().equals(byOrderNo.getStatus())) {
redisUtil.delete(o);
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单已取消");
......
......@@ -199,6 +199,9 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
@Override
public List<SConsumerCouponVo> availableCouponList(CouponRequest couponRequest) {
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
if (ObjectUtils.isEmpty(user)) {
return new ArrayList<>();
}
LambdaQueryWrapper<SConsumerCoupon> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SConsumerCoupon::getConsumerId, user.getId());
queryWrapper.eq(SConsumerCoupon::getUseStatus, ConsumerCouponUseStatusEnum.WAIT_USE.getCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment