限时折扣商品
This commit is contained in:
@@ -170,6 +170,11 @@ public class OrderInfoDTO implements Serializable {
|
||||
*/
|
||||
private String discountInfo;
|
||||
|
||||
/**
|
||||
* 限时折扣信息 json
|
||||
*/
|
||||
private String limitRate;
|
||||
|
||||
/**
|
||||
* 是否支持退款,1支持退单, 0不支持退单
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.czg.order.entity;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.order.dto.LimitRateDTO;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
@@ -189,6 +190,15 @@ public class OrderInfo implements Serializable {
|
||||
* 折扣信息 json
|
||||
*/
|
||||
private String discountInfo;
|
||||
/**
|
||||
* 限时折扣信息 json
|
||||
*/
|
||||
private String limitRateJson;
|
||||
/**
|
||||
* 限时折扣信息 json
|
||||
*/
|
||||
@Column(ignore = true)
|
||||
private LimitRateDTO limitRate;
|
||||
|
||||
/**
|
||||
* 是否支持退款,1支持退单, 0不支持退单
|
||||
|
||||
@@ -7,6 +7,7 @@ import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.exceptions.ValidateException;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.*;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.czg.account.dto.shopuser.ShopUserMoneyEditDTO;
|
||||
@@ -240,6 +241,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
if (historyOrderVo == null || historyOrderVo.getId() == null) {
|
||||
return null;
|
||||
}
|
||||
if (StrUtil.isNotBlank(historyOrderVo.getLimitRateJson())) {
|
||||
historyOrderVo.setLimitRate(JSONUtil.toBean(historyOrderVo.getLimitRateJson(), LimitRateDTO.class));
|
||||
}
|
||||
List<OrderDetail> orderDetails = orderDetailService.queryChain().select()
|
||||
.eq(OrderDetail::getOrderId, historyOrderVo.getId())
|
||||
.list();
|
||||
@@ -1276,6 +1280,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
orderInfo.setIsWaitCall(param.isWaitCall() ? 1 : 0);
|
||||
orderInfo.setCreditBuyerId(param.getCreditBuyerId());
|
||||
orderInfo.setIsDel(0);
|
||||
if (param.getLimitRate() != null) {
|
||||
orderInfo.setLimitRateJson(JSONObject.toJSONString(param.getLimitRate()));
|
||||
}
|
||||
//取餐码 多端一致
|
||||
orderInfo.setTakeCode(getCode(shopInfo.getId()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user