## 商品订单添加加购条件;

This commit is contained in:
cabbage 2025-08-11 14:54:30 +08:00
parent 7bb2b0c01c
commit bfc02d048e
11 changed files with 131 additions and 208 deletions

View File

@ -5,7 +5,6 @@ import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hzs.common.core.annotation.AccessPermissions; import com.hzs.common.core.annotation.AccessPermissions;
import com.hzs.common.core.annotation.Log; import com.hzs.common.core.annotation.Log;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import com.hzs.common.core.enums.*; import com.hzs.common.core.enums.*;
import com.hzs.common.core.utils.DateUtils; import com.hzs.common.core.utils.DateUtils;
import com.hzs.common.core.utils.StringUtils; import com.hzs.common.core.utils.StringUtils;
@ -15,7 +14,6 @@ import com.hzs.common.core.web.page.TableDataInfo;
import com.hzs.common.domain.sale.ext.SaOrderItemsExt; import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
import com.hzs.common.domain.sale.order.SaOrderRemarks; import com.hzs.common.domain.sale.order.SaOrderRemarks;
import com.hzs.common.security.utils.SecurityUtils; import com.hzs.common.security.utils.SecurityUtils;
import com.hzs.common.service.ITransactionCommonService;
import com.hzs.sale.order.controller.ParentOrderController; import com.hzs.sale.order.controller.ParentOrderController;
import com.hzs.sale.order.dto.OrderBusinessTemplate; import com.hzs.sale.order.dto.OrderBusinessTemplate;
import com.hzs.sale.order.param.*; import com.hzs.sale.order.param.*;
@ -47,8 +45,6 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
public class SaOrderController extends ParentOrderController { public class SaOrderController extends ParentOrderController {
@Autowired
private ITransactionCommonService iTransactionCommonService;
@Autowired @Autowired
private ISaOrderService iSaOrderService; private ISaOrderService iSaOrderService;
@Autowired @Autowired
@ -109,50 +105,18 @@ public class SaOrderController extends ParentOrderController {
if (waresOrderVo.getRecCountry() != null) { if (waresOrderVo.getRecCountry() != null) {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry())); waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
} }
// 发货方式
if (null != waresOrderVo.getDeliveryWay()) {
EDelivery eDelivery = EDelivery.getDelivery(waresOrderVo.getDeliveryWay());
if (null != eDelivery) {
waresOrderVo.setDeliveryWayStr(eDelivery.getLabel());
}
}
// 运输方式
if (waresOrderVo.getTranType() != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
// 预售状态
if (waresOrderVo.getPreSaleStatus() != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
// 订单状态
if (waresOrderVo.getOrderStatus() != null) {
EOrderStatus orderStatusEnum = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
if (orderStatusEnum != null) {
waresOrderVo.setOrderStatusStr(orderStatusEnum.getLabel());
}
}
// 支付方式
if (waresOrderVo.getPayType() != null) {
EOrderPayType eOrderPayType = EOrderPayType.getEnumByValue(waresOrderVo.getPayType());
if (null != eOrderPayType) {
waresOrderVo.setPayTypeStr(eOrderPayType.getLabel());
}
}
// 订单类型 // 订单类型
if (waresOrderVo.getOrderType() != null) { waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
EOrderType eOrderType = EOrderType.getEnumByValue(waresOrderVo.getOrderType()); // 发货方式
if (null != eOrderType) { waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
waresOrderVo.setOrderTypeStr(eOrderType.getLabel()); // 运输方式
} waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
} // 预售状态
// 供应方式 waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) { // 订单状态
ESupplyWay eSupplyWay = ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())); waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
if (null != eSupplyWay) { // 支付方式
waresOrderVo.setOperateScope(eSupplyWay.getLabel()); waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
}
}
} }
return getDataTable(resultList); return getDataTable(resultList);
} }
@ -187,8 +151,6 @@ public class SaOrderController extends ParentOrderController {
waresOrderParam.setTeamList(userAuthorityDTO.getUserTeamList()); waresOrderParam.setTeamList(userAuthorityDTO.getUserTeamList());
List<WaresOrderVo> resultList = iSaOrderService.selectByOrderInfoList(waresOrderParam); List<WaresOrderVo> resultList = iSaOrderService.selectByOrderInfoList(waresOrderParam);
// 获取需要翻译的枚举翻译
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EOrderType.values(), EShippingChannel.values());
for (WaresOrderVo waresOrderVo : resultList) { for (WaresOrderVo waresOrderVo : resultList) {
// //
if (waresOrderVo.getRecProvince() != null) { if (waresOrderVo.getRecProvince() != null) {
@ -202,39 +164,18 @@ public class SaOrderController extends ParentOrderController {
if (waresOrderVo.getRecCountry() != null) { if (waresOrderVo.getRecCountry() != null) {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry())); waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
} }
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getDelivery(waresOrderVo.getDeliveryWay()).getLabel());
// 运输方式
if (waresOrderVo.getTranType() != null && ETransportType.getETransportType(waresOrderVo.getTranType()) != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
// 预售状态
if (waresOrderVo.getPreSaleStatus() != null && EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()) != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
// 订单状态
if (waresOrderVo.getOrderStatus() != null) {
EOrderStatus orderStatusEnum = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
if (orderStatusEnum != null) {
waresOrderVo.setOrderStatusStr(orderStatusEnum.getLabel());
}
}
// 支付方式
if (waresOrderVo.getPayType() != null) {
waresOrderVo.setPayTypeStr(EOrderPayType.getEnumByValue(waresOrderVo.getPayType()).getLabel());
}
// 订单类型 // 订单类型
if (waresOrderVo.getOrderType() != null) { waresOrderVo.setOrderTypeVal(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
waresOrderVo.setOrderTypeVal(transactionMap.get(EnumsPrefixConstants.ORDER_TYPE + waresOrderVo.getOrderType())); // 发货方式
} waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
// 供应方式 // 运输方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope()) && ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())) != null) { waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel()); // 预售状态
} waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
// 发货类型 // 订单状态
waresOrderVo.setShippingChannelVal(transactionMap.get(EnumsPrefixConstants.E_SHIPPING_CHANNEL + waresOrderVo.getShippingChannel())); waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
waresOrderVo.setLogisticsCode(waresOrderVo.getLogisticsCode()); // 支付方式
waresOrderVo.setLogisticsCompany(waresOrderVo.getLogisticsCompany()); waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
} }
ExcelUtil<WaresOrderVo> util = new ExcelUtil<>(WaresOrderVo.class, iMenuColumnServiceApi.queryMenuColumn("Commodity", SecurityUtils.getUserId()).getData()); ExcelUtil<WaresOrderVo> util = new ExcelUtil<>(WaresOrderVo.class, iMenuColumnServiceApi.queryMenuColumn("Commodity", SecurityUtils.getUserId()).getData());
util.exportExcel(response, resultList, "商品订单导出"); util.exportExcel(response, resultList, "商品订单导出");
@ -261,8 +202,6 @@ public class SaOrderController extends ParentOrderController {
waresOrderParam.setEndCreateDate(DateUtils.getEndTime(waresOrderParam.getEndCreateDate())); waresOrderParam.setEndCreateDate(DateUtils.getEndTime(waresOrderParam.getEndCreateDate()));
} }
// 获取需要翻译的枚举翻译
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EDelivery.values(), ESupplyWay.values());
Map<Integer, String> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData(); Map<Integer, String> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData();
startPage(); startPage();
@ -281,42 +220,23 @@ public class SaOrderController extends ParentOrderController {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry())); waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
} }
// 发货方式 // 发货方式
if (null != waresOrderVo.getDeliveryWay()) { waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
waresOrderVo.setDeliveryWayStr(transactionMap.get(EnumsPrefixConstants.DELIVERY + waresOrderVo.getDeliveryWay()));
}
// 运输方式 // 运输方式
if (waresOrderVo.getTranType() != null) { waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
// 预售状态 // 预售状态
if (waresOrderVo.getPreSaleStatus() != null) { waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
// 订单状态 // 订单状态
if (waresOrderVo.getOrderStatus() != null) { waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
waresOrderVo.setOrderStatusStr(EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus()).getLabel());
}
// 支付方式 // 支付方式
if (waresOrderVo.getPayType() != null) { waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
waresOrderVo.setPayTypeStr(EOrderPayType.getEnumByValue(waresOrderVo.getPayType()).getLabel());
}
// 订单类型 // 订单类型
if (waresOrderVo.getOrderType() != null) { waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
waresOrderVo.setOrderTypeStr(EOrderType.getEnumByValue(waresOrderVo.getOrderType()).getLabel());
}
// 供应方式 // 供应方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) { if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel()); waresOrderVo.setOperateScope(ESupplyWay.getLabelByVal(Integer.parseInt(waresOrderVo.getOperateScope())));
}
// 计算汇率
if (null != waresOrderVo.getInExchangeRate()) {
waresOrderVo.setOrderAchieve(waresOrderVo.getInExchangeRate().multiply(waresOrderVo.getOrderAchieve()));
} }
// 发货类型 // 发货类型
if (waresOrderVo.getShippingChannel() != null) { waresOrderVo.setShippingChannelStr(EShippingChannel.getLabelByValue(waresOrderVo.getShippingChannel()));
waresOrderVo.setShippingChannelStr(EShippingChannel.getEnumByValue(waresOrderVo.getShippingChannel()).getLabel());
}
// 计算产品总计 // 计算产品总计
waresOrderVo.setProductPriceTotal(waresOrderVo.getProductPrice().multiply(BigDecimal.valueOf(waresOrderVo.getQuantity()))); waresOrderVo.setProductPriceTotal(waresOrderVo.getProductPrice().multiply(BigDecimal.valueOf(waresOrderVo.getQuantity())));
} }
@ -348,8 +268,6 @@ public class SaOrderController extends ParentOrderController {
} }
Map<Integer, String> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData(); Map<Integer, String> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData();
// 获取需要翻译的枚举翻译
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EDelivery.values(), ESupplyWay.values());
List<WaresOrderVo> resultList = iSaOrderItemsService.selectByInvestmentList(waresOrderParam); List<WaresOrderVo> resultList = iSaOrderItemsService.selectByInvestmentList(waresOrderParam);
for (WaresOrderVo waresOrderVo : resultList) { for (WaresOrderVo waresOrderVo : resultList) {
@ -366,56 +284,23 @@ public class SaOrderController extends ParentOrderController {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry())); waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
} }
// 发货方式 // 发货方式
if (waresOrderVo.getDeliveryWay() != null) { waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
waresOrderVo.setDeliveryWayStr(transactionMap.get(EnumsPrefixConstants.DELIVERY + waresOrderVo.getDeliveryWay()));
}
// 运输方式 // 运输方式
if (waresOrderVo.getTranType() != null) { waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
ETransportType transportType = ETransportType.getETransportType(waresOrderVo.getTranType());
if (transportType != null) {
waresOrderVo.setTranTypeStr(transportType.getLabel());
}
}
// 预售状态 // 预售状态
if (waresOrderVo.getPreSaleStatus() != null) { waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
EPresaleStatus presaleStatus = EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus());
if (presaleStatus != null) {
waresOrderVo.setPreSaleStatusStr(presaleStatus.getLabel());
}
}
// 订单状态 // 订单状态
if (waresOrderVo.getOrderStatus() != null) { waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
EOrderStatus orderStatus = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
if (orderStatus != null) {
waresOrderVo.setOrderStatusStr(orderStatus.getLabel());
}
}
// 支付方式 // 支付方式
if (waresOrderVo.getPayType() != null) { waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
EOrderPayType orderPayType = EOrderPayType.getEnumByValue(waresOrderVo.getPayType());
if (orderPayType != null) {
waresOrderVo.setPayTypeStr(orderPayType.getLabel());
}
}
// 订单类型 // 订单类型
if (waresOrderVo.getOrderType() != null) { waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
EOrderType orderType = EOrderType.getEnumByValue(waresOrderVo.getOrderType());
if (orderType != null) {
waresOrderVo.setOrderTypeStr(orderType.getLabel());
}
}
// 供应方式 // 供应方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope()) && ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())) != null) { if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel()); waresOrderVo.setOperateScope(ESupplyWay.getLabelByVal(Integer.parseInt(waresOrderVo.getOperateScope())));
} }
// 计算汇率
waresOrderVo.setOrderAchieve(waresOrderVo.getInExchangeRate().multiply(waresOrderVo.getOrderAchieve()));
// 发货类型 // 发货类型
if (waresOrderVo.getShippingChannel() != null) { waresOrderVo.setShippingChannelStr(EShippingChannel.getLabelByValue(waresOrderVo.getShippingChannel()));
waresOrderVo.setShippingChannelStr(EShippingChannel.getEnumByValue(waresOrderVo.getShippingChannel()).getLabel());
}
} }
List<WaresOrderInfoVo> waresOrderInfoList = resultList.stream().map(a -> { List<WaresOrderInfoVo> waresOrderInfoList = resultList.stream().map(a -> {
WaresOrderInfoVo waresOrderInfoVo = BeanUtil.copyProperties(a, WaresOrderInfoVo.class); WaresOrderInfoVo waresOrderInfoVo = BeanUtil.copyProperties(a, WaresOrderInfoVo.class);
@ -627,7 +512,6 @@ public class SaOrderController extends ParentOrderController {
*/ */
@PostMapping("/single-item-stat-export") @PostMapping("/single-item-stat-export")
public void singleItemStatExport(SingleItemStatParam singleItemStatParam, HttpServletResponse response) { public void singleItemStatExport(SingleItemStatParam singleItemStatParam, HttpServletResponse response) {
if (StringUtils.isBlank(singleItemStatParam.getSkuCode()) if (StringUtils.isBlank(singleItemStatParam.getSkuCode())
&& StringUtils.isBlank(singleItemStatParam.getProductName()) && StringUtils.isBlank(singleItemStatParam.getProductName())
&& singleItemStatParam.getOrderType() == null && singleItemStatParam.getOrderType() == null

View File

@ -149,13 +149,11 @@ public class WaresOrderParam extends BaseAuthorityEntity {
/** /**
* 购买人编号 * 购买人编号
*/ */
private String buyMemberCode; private String buyMemberCode;
/** /**
* 购买人姓名 * 购买人姓名
*/ */
private String buyMemberName; private String buyMemberName;
/** /**
* 商品编号 * 商品编号
@ -170,4 +168,10 @@ public class WaresOrderParam extends BaseAuthorityEntity {
* 隶属体系 * 隶属体系
*/ */
private Integer vertexId; private Integer vertexId;
/**
* 是否加购商品
*/
private Integer addPurchaseFlag;
} }

View File

@ -38,6 +38,7 @@ public class WaresOrderInfoVo implements Serializable {
/** /**
* 重量 * 重量
*/ */
@BigDecimalFormat
@Excel(name = "重量(KG)") @Excel(name = "重量(KG)")
private BigDecimal weight; private BigDecimal weight;
/** /**
@ -157,7 +158,7 @@ public class WaresOrderInfoVo implements Serializable {
/** /**
* 省名称 * 省名称
*/ */
@Excel(name = "名称") @Excel(name = "")
private String recProvinceName; private String recProvinceName;
/** /**
* 市外键 * 市外键
@ -167,7 +168,7 @@ public class WaresOrderInfoVo implements Serializable {
/** /**
* 市名称 * 市名称
*/ */
@Excel(name = "名称") @Excel(name = "")
private String recCityName; private String recCityName;
/** /**
@ -178,7 +179,7 @@ public class WaresOrderInfoVo implements Serializable {
/** /**
* 县名称 * 县名称
*/ */
@Excel(name = "名称") @Excel(name = "")
private String recCountryName; private String recCountryName;
/** /**
* 详细地址 * 详细地址
@ -289,7 +290,6 @@ public class WaresOrderInfoVo implements Serializable {
/** /**
* 系统类型0=会员系统1=海圣优选 * 系统类型0=会员系统1=海圣优选
*/ */
@Excel(name = "系统类型", readConverterExp = "0=会员系统,1=海圣优选")
private Integer systemType; private Integer systemType;
/** /**

View File

@ -89,12 +89,12 @@ public class WaresOrderVo implements Serializable {
*/ */
@Excel(name = "会员姓名") @Excel(name = "会员姓名")
private String memberName; private String memberName;
/** /**
* 隶属体系 * 隶属体系
*/ */
@Excel(name = "隶属体系") @Excel(name = "隶属体系")
private String vertexName; private String vertexName;
/** /**
* 联系电话 * 联系电话
*/ */
@ -302,13 +302,10 @@ public class WaresOrderVo implements Serializable {
/** /**
* 重量 * 重量
*/ */
@BigDecimalFormat
private BigDecimal weight; private BigDecimal weight;
/** /**
* 展示汇率 * 产品订单明细列表
*/
private BigDecimal inExchangeRate;
/**
* 产品订单明细列表
*/ */
private List<MyOrderItemsVO> productList; private List<MyOrderItemsVO> productList;
/** /**

View File

@ -746,7 +746,6 @@
oi.SPECS_NAME specsName, oi.SPECS_NAME specsName,
bp.WEIGHT weight, bp.WEIGHT weight,
bp.SHIPPING_CHANNEL shippingChannel, bp.SHIPPING_CHANNEL shippingChannel,
bc.IN_EXCHANGE_RATE inExchangeRate,
oi.LOGISTICS_CODE logisticsCode, oi.LOGISTICS_CODE logisticsCode,
oi.LOGISTICS_COMPANY logisticsCompany, oi.LOGISTICS_COMPANY logisticsCompany,
m.MEMBER_CODE buyMemberCode, m.MEMBER_CODE buyMemberCode,
@ -760,14 +759,21 @@
ver.VERTEX_NAME vertexName ver.VERTEX_NAME vertexName
from sa_order_items oi from sa_order_items oi
left join sa_order so on oi.PK_ORDER = so.PK_ID left join sa_order so on oi.PK_ORDER = so.PK_ID
left join BD_CURRENCY bc on bc.PK_ID = so.PK_RATE left join cu_member m on m.PK_ID = so.PK_CREATOR
left join CU_MEMBER cm on cm.PK_ID = so.PK_MEMBER left join cu_member cm on cm.PK_ID = so.PK_MEMBER
left join BD_WARES_EXTEND we on we.PK_WARES = oi.PK_WARES left join bd_vertex ver on ver.PK_ID = cm.PK_VERTEX
left join BD_WARES bw on bw.PK_ID = we.PK_WARES left join bd_wares_extend we on we.PK_WARES = oi.PK_WARES
left join BD_PRODUCT bp on bp.PK_ID = oi.PK_PRODUCT left join bd_wares bw on bw.PK_ID = we.PK_WARES
left join CU_MEMBER m on m.PK_ID = so.PK_CREATOR left join bd_product bp on bp.PK_ID = oi.PK_PRODUCT
left join BD_VERTEX ver on ver.PK_ID = cm.PK_VERTEX where oi.del_flag = 0 and so.del_flag = 0 and ver.del_flag = 0
where oi.del_flag = 0 and so.del_flag=0 and ver.del_flag=0 <if test="addPurchaseFlag != null and addPurchaseFlag == 0">
and oi.pk_order in (
select distinct soi.pk_order
from sa_order_items soi
where soi.is_maker_gift = 3
and soi.del_flag = 0
)
</if>
<if test="buyMemberCode != null and buyMemberCode != ''"> <if test="buyMemberCode != null and buyMemberCode != ''">
and m.MEMBER_CODE like #{buyMemberCode}||'%' and m.MEMBER_CODE like #{buyMemberCode}||'%'
</if> </if>

View File

@ -661,6 +661,14 @@
left join BD_VERTEX ver on ver.PK_ID = cm.PK_VERTEX left join BD_VERTEX ver on ver.PK_ID = cm.PK_VERTEX
where so.DEL_FLAG = 0 where so.DEL_FLAG = 0
and ver.DEL_FLAG = 0 and ver.DEL_FLAG = 0
<if test="addPurchaseFlag != null and addPurchaseFlag == 0">
and oi.pk_order in (
select distinct soi.pk_order
from sa_order_items soi
where soi.is_maker_gift = 3
and soi.del_flag = 0
)
</if>
<if test="pkCountry != null"> <if test="pkCountry != null">
and so.PK_COUNTRY = #{pkCountry} and so.PK_COUNTRY = #{pkCountry}
</if> </if>

View File

@ -48,4 +48,17 @@ public enum EDelivery {
} }
return null; return null;
} }
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EDelivery enums : EDelivery.values()) {
if (enums.getValue() == value) {
return enums.getLabel();
}
}
return "";
}
} }

View File

@ -41,18 +41,16 @@ public enum EOrderPayType {
private final String key; private final String key;
/** public static String getLabelByValue(Integer value) {
* 根据值获取枚举 if (null == value) {
* return "";
* @param value }
* @return
*/
public static EOrderPayType getEnumByValue(int value) {
for (EOrderPayType enums : EOrderPayType.values()) { for (EOrderPayType enums : EOrderPayType.values()) {
if (enums.getValue() == value) { if (enums.value == value) {
return enums; return enums.getLabel();
} }
} }
return null; return "";
} }
} }

View File

@ -68,22 +68,6 @@ public enum EOrderStatus {
*/ */
private static List<EOrderStatus> apiList; private static List<EOrderStatus> apiList;
/**
* 获取会员前端列表
*
* @return
*/
public static List<EOrderStatus> getApiList() {
if (null == apiList) {
apiList = new ArrayList<>();
apiList.add(WAIT_PAY);
apiList.add(PAY);
apiList.add(DELIVERED);
apiList.add(RECEIVED);
}
return apiList;
}
public static EOrderStatus getEOrderStatus(int value) { public static EOrderStatus getEOrderStatus(int value) {
for (EOrderStatus eOrderStatus : EOrderStatus.values()) { for (EOrderStatus eOrderStatus : EOrderStatus.values()) {
if (eOrderStatus.value == value) { if (eOrderStatus.value == value) {
@ -93,4 +77,16 @@ public enum EOrderStatus {
return null; return null;
} }
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EOrderStatus enums : EOrderStatus.values()) {
if (enums.value == value) {
return enums.getLabel();
}
}
return "";
}
} }

View File

@ -5,7 +5,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
/** /**
* @Description: 产品发货渠道 * 产品发货渠道
*/ */
@AllArgsConstructor @AllArgsConstructor
@Getter @Getter
@ -44,4 +44,17 @@ public enum EShippingChannel {
} }
return TOTAL_WAREHOUSE; return TOTAL_WAREHOUSE;
} }
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EShippingChannel enums : EShippingChannel.values()) {
if (enums.value == value) {
return enums.getLabel();
}
}
return "";
}
} }

View File

@ -44,12 +44,16 @@ public enum ETransportType {
private final String key; private final String key;
public static ETransportType getETransportType(int value) { public static String getLabelByValue(Integer value) {
for (ETransportType eTransportType : ETransportType.values()) { if (null == value) {
if (eTransportType.getValue() == value) { return "";
return eTransportType; }
for (ETransportType enums : ETransportType.values()) {
if (enums.value == value) {
return enums.getLabel();
} }
} }
return null; return "";
} }
} }