master:系统表增加索引,serviceImpl优化;
parent
596edf3e5a
commit
d009c0f48d
|
|
@ -38,7 +38,7 @@
|
|||
END AS refundRate
|
||||
FROM
|
||||
daily_sale_customer dsc
|
||||
JOIN store_customer sc ON dsc.store_cus_id = sc.id
|
||||
JOIN store_customer sc ON dsc.store_cus_id = sc.id
|
||||
WHERE
|
||||
dsc.store_id = #{storeId}
|
||||
AND dsc.del_flag = 0
|
||||
|
|
|
|||
|
|
@ -116,7 +116,9 @@ CREATE TABLE `advert_round`
|
|||
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_advert_round_pay_pos`(`advert_id`, `round_id`, `pay_price`, `position`) USING BTREE
|
||||
INDEX `idx_advert_round_pay_pos`(`advert_id`, `round_id`, `pay_price`, `position`) USING BTREE,
|
||||
INDEX `idx_del_flag_launch_status_type_id`(`del_flag`, `launch_status`, `type_id`) USING BTREE,
|
||||
INDEX `idx_del_flag_launch_status_round_id`(`del_flag`, `launch_status`, `round_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '推广营销轮次位置' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
|
|
@ -157,7 +159,9 @@ CREATE TABLE `advert_round_record`
|
|||
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_advert_store`(`advert_round_id`, `store_id`) USING BTREE
|
||||
INDEX `idx_del_flag_store_id_advert_round_id_voucher_date_type_id`(`del_flag`, `store_id`, `advert_round_id`, `voucher_date`, `type_id`) USING BTREE,
|
||||
INDEX `idx_del_flag_type_id_round_id_voucher_date_position`(`del_flag`, `type_id`, `round_id`, `voucher_date`, `position`) USING BTREE,
|
||||
INDEX `idx_del_flag_store_id_voucher_date`(`del_flag`, `store_id`, `voucher_date`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '推广营销轮次位置' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
|
|
@ -230,7 +234,7 @@ CREATE TABLE `daily_sale`
|
|||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '每天档口销量统计' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
CREATE INDEX idx_daily_sale_store_del_date ON daily_sale(store_id, del_flag, voucher_date);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for daily_sale_customer
|
||||
|
|
@ -254,6 +258,8 @@ CREATE TABLE `daily_sale_customer`
|
|||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '每天档口客户销量统计' ROW_FORMAT = DYNAMIC;
|
||||
CREATE INDEX idx_dsc_store_del_date_cus_sale ON daily_sale_customer ( store_id, del_flag, voucher_date, store_cus_id, sale_amount );
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for daily_sale_product
|
||||
|
|
@ -278,6 +284,8 @@ CREATE TABLE `daily_sale_product`
|
|||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口商品销量统计' ROW_FORMAT = DYNAMIC;
|
||||
CREATE INDEX idx_dsp_store_del_date ON daily_sale_product(store_id, del_flag, voucher_date, store_prod_id);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for daily_store_tag
|
||||
|
|
@ -3266,7 +3274,7 @@ CREATE TABLE `store_customer`
|
|||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口客户' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
CREATE INDEX idx_sc_id_cus_name ON store_customer(id, cus_name);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for store_customer_product_discount
|
||||
|
|
@ -3289,6 +3297,8 @@ CREATE TABLE `store_customer_product_discount`
|
|||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口客户优惠' ROW_FORMAT = DYNAMIC;
|
||||
CREATE INDEX idx_scpd_store_del_cus_color ON store_customer_product_discount(store_id, del_flag, store_cus_id, store_prod_color_id);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for store_factory
|
||||
|
|
@ -3497,6 +3507,9 @@ CREATE TABLE `store_product_color`
|
|||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_spc_prodid_colorid_del`(`store_prod_id`, `store_color_id`, `del_flag`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口当前商品颜色' ROW_FORMAT = DYNAMIC;
|
||||
CREATE INDEX idx_spc_store_prod_del ON store_product_color(store_prod_id, del_flag, store_id);
|
||||
CREATE INDEX idx_spc_prod_status_del ON store_product_color(prod_status, del_flag);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for store_product_color_size
|
||||
|
|
@ -3520,13 +3533,10 @@ CREATE TABLE `store_product_color_size`
|
|||
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_spcs_del_snprefix`(`del_flag`, `sn_prefix`) USING BTREE,
|
||||
INDEX `idx_spcs_del_othersnprefix`(`del_flag`, `other_sn_prefix`) USING BTREE,
|
||||
INDEX `idx_snprefix`(`sn_prefix`) USING BTREE,
|
||||
INDEX `idx_othersnprefix`(`other_sn_prefix`) USING BTREE
|
||||
INDEX `idx_spcs_del_snprefix`(`sn_prefix`,`del_flag`) USING BTREE,
|
||||
INDEX `idx_spcs_del_othersnprefix`(`other_sn_prefix`,`del_flag`) USING BTREE,
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口商品颜色的尺码' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
|
||||
CREATE INDEX idx_spcs_store_prod_color_del ON store_product_color_size(store_prod_id, store_color_id, del_flag);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for store_product_demand
|
||||
|
|
@ -3632,8 +3642,7 @@ CREATE TABLE `store_product_file`
|
|||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口商品文件' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
|
||||
CREATE INDEX idx_spf_store_prod_file_type ON store_product_file(store_prod_id, file_type);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for store_product_process
|
||||
|
|
@ -3756,6 +3765,8 @@ CREATE TABLE `store_product_stock`
|
|||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口商品库存' ROW_FORMAT = DYNAMIC;
|
||||
CREATE INDEX idx_sps_store_prod_color_del ON store_product_stock(store_prod_id, store_prod_color_id, del_flag);
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
|
|
@ -3782,6 +3793,7 @@ CREATE TABLE `store_product_storage`
|
|||
`voucher_date` date NOT NULL COMMENT '单据日期',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口商品入库' ROW_FORMAT = DYNAMIC;
|
||||
CREATE INDEX idx_sps_code_store_del ON store_product_storage(code, store_id, del_flag);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
|
|
@ -3807,7 +3819,7 @@ CREATE TABLE `store_product_storage_demand_deduct`
|
|||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口商品入库抵扣需求' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
CREATE INDEX idx_spsdd_del_storage_detail_id ON store_product_storage_demand_deduct(del_flag, store_prod_storage_detail_id);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
|
|
@ -3882,6 +3894,8 @@ CREATE TABLE `store_sale`
|
|||
`refund_quantity` int NULL DEFAULT NULL COMMENT '退货数量',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档口销售出库' ROW_FORMAT = DYNAMIC;
|
||||
CREATE INDEX idx_ss_store_del_cus ON store_sale(store_id, del_flag, store_cus_id);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for store_sale_detail
|
||||
|
|
|
|||
|
|
@ -15,53 +15,6 @@ import java.util.List;
|
|||
*/
|
||||
@Repository
|
||||
public interface StoreColorMapper extends BaseMapper<StoreColor> {
|
||||
/**
|
||||
* 查询档口所有颜色
|
||||
*
|
||||
* @param id 档口所有颜色主键
|
||||
* @return 档口所有颜色
|
||||
*/
|
||||
public StoreColor selectStoreColorByStoreColorId(Long id);
|
||||
|
||||
/**
|
||||
* 查询档口所有颜色列表
|
||||
*
|
||||
* @param storeColor 档口所有颜色
|
||||
* @return 档口所有颜色集合
|
||||
*/
|
||||
public List<StoreColor> selectStoreColorList(StoreColor storeColor);
|
||||
|
||||
/**
|
||||
* 新增档口所有颜色
|
||||
*
|
||||
* @param storeColor 档口所有颜色
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStoreColor(StoreColor storeColor);
|
||||
|
||||
/**
|
||||
* 修改档口所有颜色
|
||||
*
|
||||
* @param storeColor 档口所有颜色
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStoreColor(StoreColor storeColor);
|
||||
|
||||
/**
|
||||
* 删除档口所有颜色
|
||||
*
|
||||
* @param id 档口所有颜色主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreColorByStoreColorId(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除档口所有颜色
|
||||
*
|
||||
* @param storeColorIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreColorByStoreColorIds(Long[] storeColorIds);
|
||||
|
||||
List<StoreColorDTO> selectListByStoreProdId(Long storeId);
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService {
|
|||
Arrays.asList(AdLaunchStatus.LAUNCHING.getValue(), AdLaunchStatus.UN_LAUNCH.getValue());
|
||||
// 推广轮次 未出价 及 已出价
|
||||
private static final List<Integer> BIDDING_STATUS_LIST =
|
||||
Arrays.asList(AdBiddingStatus.BIDDING.getValue(), AdBiddingStatus.UN_BIDDING.getValue());
|
||||
Arrays.asList(AdBiddingStatus.BIDDING.getValue(), AdBiddingStatus.UN_BIDDING.getValue());
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
|
|||
|
|
@ -213,19 +213,19 @@ public class FinanceBillServiceImpl implements IFinanceBillService {
|
|||
Map<Long, FinanceBillDetail> refundPaymentBillDetailMap;
|
||||
if (CollUtil.isNotEmpty(afterSaleBillUks)) {
|
||||
refundPaymentBillMap = financeBillMapper.selectList(
|
||||
Wrappers.lambdaQuery(FinanceBill.class)
|
||||
.in(FinanceBill::getBusinessUniqueKey, afterSaleBillUks)
|
||||
.eq(FinanceBill::getBillType, EFinBillType.PAYMENT.getValue())
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED))
|
||||
Wrappers.lambdaQuery(FinanceBill.class)
|
||||
.in(FinanceBill::getBusinessUniqueKey, afterSaleBillUks)
|
||||
.eq(FinanceBill::getBillType, EFinBillType.PAYMENT.getValue())
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED))
|
||||
.stream()
|
||||
.collect(Collectors.toMap(SimpleEntity::getId, Function.identity()));
|
||||
if (MapUtil.isEmpty(refundPaymentBillMap)) {
|
||||
refundPaymentBillDetailMap = MapUtil.empty();
|
||||
} else {
|
||||
refundPaymentBillDetailMap = financeBillDetailMapper.selectList(
|
||||
Wrappers.lambdaQuery(FinanceBillDetail.class)
|
||||
.in(FinanceBillDetail::getFinanceBillId, refundPaymentBillMap.keySet())
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED)).stream()
|
||||
Wrappers.lambdaQuery(FinanceBillDetail.class)
|
||||
.in(FinanceBillDetail::getFinanceBillId, refundPaymentBillMap.keySet())
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED)).stream()
|
||||
.collect(Collectors.toMap(FinanceBillDetail::getRelId, Function.identity()));
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -313,8 +313,8 @@ public class ShoppingCartServiceImpl implements IShoppingCartService {
|
|||
/**
|
||||
* 获取档口商品颜色尺码的库存
|
||||
*
|
||||
* @param stockList 库存数量
|
||||
* @param standardSizeList 当前商品的标准尺码
|
||||
* @param stockList 库存数量
|
||||
* @param standardSizeList 当前商品的标准尺码
|
||||
* @param standardSizePriceMap 颜色尺码对应的价格
|
||||
* @return Map<Long, Map < Integer, Integer>>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -47,11 +47,8 @@ public class StoreCertificateServiceImpl implements IStoreCertificateService {
|
|||
final StoreMapper storeMapper;
|
||||
final RedisCache redisCache;
|
||||
final IAssetService assetService;
|
||||
final DailySaleMapper dailySaleMapper;
|
||||
final DailySaleCustomerMapper dailySaleCusMapper;
|
||||
final StoreSaleDetailMapper saleDetailMapper;
|
||||
final StoreProductMapper storeProdMapper;
|
||||
final DailySaleProductMapper dailySaleProdMapper;
|
||||
final ISysUserService userService;
|
||||
final VoucherSequenceMapper vsMapper;
|
||||
final StoreCustomerMapper storeCusMapper;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class StoreCustomerProductDiscountServiceImpl implements IStoreCustomerPr
|
|||
StoreCustomer storeCus = CollectionUtils.isNotEmpty(storeCusList) ? storeCusList.get(0) : this.createStoreCustomer(cusProdDisDTO);
|
||||
// 获取当前档口客户已有的优惠
|
||||
List<StoreCustomerProductDiscount> cusProdDiscList = Optional.ofNullable(cusProdDiscMapper.selectList(new LambdaQueryWrapper<StoreCustomerProductDiscount>()
|
||||
.eq(StoreCustomerProductDiscount::getStoreCusName, cusProdDisDTO.getStoreCusName()).eq(StoreCustomerProductDiscount::getDelFlag, Constants.UNDELETED)
|
||||
.eq(StoreCustomerProductDiscount::getStoreCusId, cusProdDisDTO.getStoreCusId()).eq(StoreCustomerProductDiscount::getDelFlag, Constants.UNDELETED)
|
||||
.eq(StoreCustomerProductDiscount::getStoreId, cusProdDisDTO.getStoreId()))).orElse(new ArrayList<>());
|
||||
// 已存在优惠但优惠额度低于当前优惠,则更新该部分优惠
|
||||
List<StoreCustomerProductDiscount> updateList = cusProdDiscList.stream()
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ public class StoreCustomerServiceImpl implements IStoreCustomerService {
|
|||
final StoreCustomerMapper storeCusMapper;
|
||||
final StoreSaleMapper storeSaleMapper;
|
||||
final StoreSaleDetailMapper saleDetailMapper;
|
||||
final StoreCustomerProductDiscountMapper cusProdDiscMapper;
|
||||
final StoreSaleRefundRecordMapper saleRefundRecordMapper;
|
||||
final StoreSaleRefundRecordDetailMapper saleRefundRecordDetailMapper;
|
||||
|
||||
|
|
@ -163,9 +162,10 @@ public class StoreCustomerServiceImpl implements IStoreCustomerService {
|
|||
|
||||
/**
|
||||
* 更新关联表的客户名称
|
||||
* @param cusName 最新的客户名臣
|
||||
*
|
||||
* @param cusName 最新的客户名臣
|
||||
* @param storeCusId 档口客户ID
|
||||
* @param storeId 档口ID
|
||||
* @param storeId 档口ID
|
||||
*/
|
||||
private void updateRelatedCusName(String cusName, Long storeCusId, Long storeId) {
|
||||
// 档口销售表
|
||||
|
|
|
|||
|
|
@ -44,8 +44,6 @@ public class StoreHomepageServiceImpl implements IStoreHomepageService {
|
|||
final StoreMapper storeMapper;
|
||||
final StoreProductMapper storeProdMapper;
|
||||
final StoreProductDetailMapper prodDetailMapper;
|
||||
final StoreProductColorSizeMapper prodColorSizeMapper;
|
||||
final StoreProductStockMapper prodStockMapper;
|
||||
final StoreProductFileMapper prodFileMapper;
|
||||
final StoreProductCategoryAttributeMapper prodCateAttrMapper;
|
||||
final StoreCertificateMapper storeCertMapper;
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
List<Long> spIds = detailInfos.stream().map(StoreOrderDetailInfoDTO::getStoreProdId).distinct()
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, String> mainPicMap = storeProductFileMapper.selectMainPicByStoreProdIdList(spIds,
|
||||
FileType.MAIN_PIC.getValue(), ORDER_NUM_1).stream()
|
||||
FileType.MAIN_PIC.getValue(), ORDER_NUM_1).stream()
|
||||
.collect(Collectors.toMap(StoreProdMainPicDTO::getStoreProdId, StoreProdMainPicDTO::getFileUrl,
|
||||
(o, n) -> n));
|
||||
for (StoreOrderDetailInfoDTO detailInfo : detailInfos) {
|
||||
|
|
@ -444,8 +444,8 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
return ListUtil.empty();
|
||||
}
|
||||
Map<String, Date> printTimeMap = expressShippingLabelMapper.selectList(Wrappers
|
||||
.lambdaQuery(ExpressShippingLabel.class)
|
||||
.in(ExpressShippingLabel::getExpressWaybillNo, expressWaybillNos))
|
||||
.lambdaQuery(ExpressShippingLabel.class)
|
||||
.in(ExpressShippingLabel::getExpressWaybillNo, expressWaybillNos))
|
||||
.stream()
|
||||
.collect(Collectors.toMap(ExpressShippingLabel::getExpressWaybillNo,
|
||||
ExpressShippingLabel::getLastPrintTime));
|
||||
|
|
@ -484,9 +484,9 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
//物流信息
|
||||
Map<Long, String> expressNameMap = expressService.getAllExpressNameMap();
|
||||
Map<String, List<StoreOrderDetail>> expressWaybillGroupMap = storeOrderDetailMapper.selectList(Wrappers
|
||||
.lambdaQuery(StoreOrderDetail.class)
|
||||
.eq(StoreOrderDetail::getStoreOrderId, storeOrderId)
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED))
|
||||
.lambdaQuery(StoreOrderDetail.class)
|
||||
.eq(StoreOrderDetail::getStoreOrderId, storeOrderId)
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED))
|
||||
.stream()
|
||||
.filter(o -> StrUtil.isNotEmpty(o.getExpressWaybillNo()))
|
||||
.collect(Collectors.groupingBy(StoreOrderDetail::getExpressWaybillNo));
|
||||
|
|
@ -557,7 +557,7 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
List<Long> spIds = orderDetailList.stream().map(StoreOrderDetailInfoDTO::getStoreProdId).distinct()
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, String> mainPicMap = storeProductFileMapper.selectMainPicByStoreProdIdList(spIds,
|
||||
FileType.MAIN_PIC.getValue(), ORDER_NUM_1).stream()
|
||||
FileType.MAIN_PIC.getValue(), ORDER_NUM_1).stream()
|
||||
.collect(Collectors.toMap(StoreProdMainPicDTO::getStoreProdId, StoreProdMainPicDTO::getFileUrl,
|
||||
(o, n) -> n));
|
||||
Map<Long, List<StoreOrderDetailInfoDTO>> orderDetailGroup = orderDetailList
|
||||
|
|
@ -1130,9 +1130,9 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
List<Long> afterSaleOrderIds = afterSaleOrderList.stream().map(SimpleEntity::getId)
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, List<StoreOrderDetail>> afterSaleOrderDetailGroupMap = storeOrderDetailMapper.selectList(
|
||||
Wrappers.lambdaQuery(StoreOrderDetail.class)
|
||||
.in(StoreOrderDetail::getStoreOrderId, afterSaleOrderIds)
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED))
|
||||
Wrappers.lambdaQuery(StoreOrderDetail.class)
|
||||
.in(StoreOrderDetail::getStoreOrderId, afterSaleOrderIds)
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED))
|
||||
.stream()
|
||||
.filter(o -> {
|
||||
if (!EOrderStatus.AFTER_SALE_COMPLETED.getValue().equals(o.getDetailStatus())) {
|
||||
|
|
@ -1499,9 +1499,9 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
public void refundSuccess(Long storeOrderId, List<Long> storeOrderDetailIds, Long operatorId) {
|
||||
StoreOrder order = getAndBaseCheck(storeOrderId);
|
||||
Map<Long, StoreOrderDetail> orderDetailMap = storeOrderDetailMapper.selectList(Wrappers
|
||||
.lambdaQuery(StoreOrderDetail.class)
|
||||
.eq(StoreOrderDetail::getStoreOrderId, order.getId())
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED))
|
||||
.lambdaQuery(StoreOrderDetail.class)
|
||||
.eq(StoreOrderDetail::getStoreOrderId, order.getId())
|
||||
.eq(SimpleEntity::getDelFlag, Constants.UNDELETED))
|
||||
.stream()
|
||||
.collect(Collectors.toMap(SimpleEntity::getId, Function.identity()));
|
||||
for (Long storeOrderDetailId : storeOrderDetailIds) {
|
||||
|
|
@ -1881,8 +1881,8 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
.collect(Collectors.toMap(StoreProductColorSize::getId, o -> o));
|
||||
//下单商品档口颜色
|
||||
Map<Long, StoreColor> scMap = storeColorMapper.selectByIds(spcsMap.values().stream()
|
||||
.map(StoreProductColorSize::getStoreColorId)
|
||||
.collect(Collectors.toSet())).stream()
|
||||
.map(StoreProductColorSize::getStoreColorId)
|
||||
.collect(Collectors.toSet())).stream()
|
||||
.collect(Collectors.toMap(StoreColor::getId, Function.identity()));
|
||||
//下单商品
|
||||
List<Long> spIdList = spcsMap.values().stream()
|
||||
|
|
|
|||
|
|
@ -1,15 +1,7 @@
|
|||
package com.ruoyi.xkt.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.xkt.domain.StoreProductBarcodeMatch;
|
||||
import com.ruoyi.xkt.dto.storeProdBarcodeMatch.BarcodeMatchDTO;
|
||||
import com.ruoyi.xkt.mapper.StoreProductBarcodeMatchMapper;
|
||||
import com.ruoyi.xkt.service.IStoreProductBarcodeMatchService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 档口条形码和第三方系统条形码匹配结果Service业务层处理
|
||||
|
|
|
|||
|
|
@ -412,6 +412,7 @@ public class StoreProductColorSizeServiceImpl implements IStoreProductColorSizeS
|
|||
|
||||
/**
|
||||
* 获取未设置条码的商品列表
|
||||
*
|
||||
* @param storeId 档口ID
|
||||
* @return StoreUnsetSnDTO
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
final StoreMapper storeMapper;
|
||||
final EsClientWrapper esClientWrapper;
|
||||
final SysProductCategoryMapper prodCateMapper;
|
||||
final DailyProdTagMapper prodTagMapper;
|
||||
final StoreProductStockMapper prodStockMapper;
|
||||
final StoreCustomerMapper storeCusMapper;
|
||||
final StoreCustomerProductDiscountMapper storeCusProdDiscMapper;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService {
|
|||
final StoreProductStockMapper storeProdStockMapper;
|
||||
final StoreProductFileMapper storeProdFileMapper;
|
||||
final SysFileMapper fileMapper;
|
||||
final StoreCustomerProductDiscountMapper storeCusProdDiscMapper;
|
||||
final StoreProductMapper storeProdMapper;
|
||||
final StoreProductColorSizeMapper prodColorSizeMapper;
|
||||
final StoreColorMapper storeColorMapper;
|
||||
|
|
|
|||
|
|
@ -178,8 +178,7 @@ public class UserFavoritesServiceImpl implements IUserFavoritesService {
|
|||
// 找到当前商品的标准码
|
||||
List<StoreProductColorSize> colorSizeList = this.prodColorSizeMapper.selectList(new LambdaQueryWrapper<StoreProductColorSize>()
|
||||
.in(StoreProductColorSize::getStoreProdId, notAddList.stream().map(UserFavBatchAddToShopCartDTO.BatchDTO::getStoreProdId).collect(Collectors.toList()))
|
||||
.eq(StoreProductColorSize::getDelFlag, Constants.UNDELETED)
|
||||
.eq(StoreProductColorSize::getStandard, ProductSizeStatus.STANDARD.getValue()));
|
||||
.eq(StoreProductColorSize::getDelFlag, Constants.UNDELETED).eq(StoreProductColorSize::getStandard, ProductSizeStatus.STANDARD.getValue()));
|
||||
// key:storeProdId+storeColorId 并取最小的标准尺码
|
||||
Map<String, StoreProductColorSize> minSizeMap = colorSizeList.stream().collect(Collectors
|
||||
.groupingBy(x -> x.getStoreProdId().toString() + x.getStoreColorId().toString(), Collectors
|
||||
|
|
|
|||
|
|
@ -74,14 +74,9 @@ public class WebsiteAPPServiceImpl implements IWebsiteAPPService {
|
|||
final RedisCache redisCache;
|
||||
final AdvertRoundMapper advertRoundMapper;
|
||||
final SysFileMapper fileMapper;
|
||||
final AdvertStoreFileMapper advertStoreFileMapper;
|
||||
final StoreProductFileMapper prodFileMapper;
|
||||
final DailySaleProductMapper dailySaleProdMapper;
|
||||
final DailyProdTagMapper dailyProdTagMapper;
|
||||
final StoreProductMapper storeProdMapper;
|
||||
final DailyStoreTagMapper dailyStoreTagMapper;
|
||||
final StoreMapper storeMapper;
|
||||
final StoreProductStatisticsMapper prodStatsMapper;
|
||||
final UserSubscriptionsMapper userSubMapper;
|
||||
final UserFavoritesMapper userFavMapper;
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ public class WebsitePCServiceImpl implements IWebsitePCService {
|
|||
final AdvertStoreFileMapper advertStoreFileMapper;
|
||||
final StoreProductFileMapper prodFileMapper;
|
||||
final DailySaleProductMapper dailySaleProdMapper;
|
||||
final DailyProdTagMapper dailyProdTagMapper;
|
||||
final StoreProductMapper storeProdMapper;
|
||||
final DailyStoreTagMapper dailyStoreTagMapper;
|
||||
final StoreMapper storeMapper;
|
||||
|
|
|
|||
Loading…
Reference in New Issue