Browse Source

查询商品所有图片接口、预付款列表接口优化、预付款支付接口

liyuan 7 months ago
parent
commit
e2d41ead1e
16 changed files with 443 additions and 191 deletions
  1. 11 1
      blade-common/src/main/java/org/springblade/common/enums/CommonEnum.java
  2. 1 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsDescMapper.xml
  3. 20 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/enums/FinalMap.java
  4. 11 16
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/mapper/GoodsDescMapper.java
  5. 25 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/mapper/GoodsDescMapper.xml
  6. 10 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/service/IGoodsDescService.java
  7. 6 16
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/service/impl/GoodsDescServiceImpl.java
  8. 31 67
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/controller/OrderController.java
  9. 21 6
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/service/impl/OrderServiceImpl.java
  10. 4 34
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/shopping/service/impl/ShoppingMallDetailServiceImpl.java
  11. 6 18
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/shoppingCart/controller/ShoppingCartController.java
  12. 10 17
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/shoppingCart/service/IShoppingCartService.java
  13. 62 16
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/shoppingCart/service/impl/ShoppingCartServiceImpl.java
  14. 29 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/util/PageHelperUtil.java
  15. 45 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/util/UserUtils.java
  16. 151 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/util/WxParamUtil.java

+ 11 - 1
blade-common/src/main/java/org/springblade/common/enums/CommonEnum.java

@@ -61,7 +61,17 @@ public enum CommonEnum {
 	/**
 	 * 是否同步提单号
 	 */
-	OPEN_ZR_TRANSMIT("open.zr.transmit");
+	OPEN_ZR_TRANSMIT("open.zr.transmit"),
+
+	/**
+	 * 分隔符
+	 */
+	SPLIT_SYMBOL(","),
+
+	/**
+	 * 中文分隔符号
+	 */
+	CHINESE_WORDS_SPLIT_SYMBOL("[^一-龥]");
 
 	CommonEnum(String info){
 		this.info = info;

+ 1 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsDescMapper.xml

@@ -34,6 +34,7 @@
         <result column="file_path" property="filePath"/>
         <result column="longitude" property="longitude"/>
         <result column="dimension" property="dimension"/>
+        <result column="resource_warehouse" property="resourceWarehouse"/>
     </resultMap>
     <insert id="insertCorps" parameterType="org.springblade.salesPart.entity.PjCorpsDesc" useGeneratedKeys="true" keyProperty="id">
         insert into pjpf_corps_desc

+ 20 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/enums/FinalMap.java

@@ -0,0 +1,20 @@
+package org.springblade.salesPart.enums;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author Rain
+ */
+public class FinalMap {
+
+
+	public static final List<String> PAY_TYPE_LIST;
+
+
+
+	static {
+		PAY_TYPE_LIST = Arrays.asList("W01", "A01", "U01", "S01");
+	}
+
+}

+ 11 - 16
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/mapper/GoodsDescMapper.java

@@ -1,19 +1,3 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
 package org.springblade.salesPart.goods.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -22,6 +6,7 @@ import feign.Param;
 import org.springblade.core.tenant.annotation.TenantIgnore;
 import org.springblade.salesPart.entity.PjGoodsDesc;
 import org.springblade.salesPart.vo.GoodsDescVO;
+import org.springblade.salesPart.vo.GoodsImgVo;
 
 import java.util.List;
 
@@ -57,4 +42,14 @@ public interface GoodsDescMapper extends BaseMapper<PjGoodsDesc> {
 	 * @return 结果
 	 */
 	List<PjGoodsDesc> selectGoodsListBySaleSizeDetail(@Param("tenantId") String tenantId, @Param("goodsIds") List<Long> goodsIds);
+
+
+	/**
+	 * 根据商品id查询商品图片信息
+	 *
+	 * @param tenantId 商品id
+	 * @param goodsIds 商品id
+	 * @return 结果
+	 */
+	List<GoodsImgVo> selectGoodsImgVoList( @Param("tenantId") String tenantId, @Param("goodsIds") List<Long> goodsIds);
 }

+ 25 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/mapper/GoodsDescMapper.xml

@@ -69,5 +69,30 @@
             </foreach>
         </if>
     </select>
+    <select id="selectGoodsImgVoList" resultType="org.springblade.salesPart.vo.GoodsImgVo">
+        SELECT
+        gd.id AS goodsId,
+        pgl.id AS productId,
+        MAX(pgf.url) AS goodsImgUrl,
+        MAX(pglf.url) AS productImgUrl,
+        MAX(bf.url) AS brandImgUrl,
+        MAX(bfs.url) AS brandFigureImgUrl
+        FROM
+        pjpf_goods_desc gd
+        LEFT JOIN pjpf_goods_files pgf ON gd.id = pgf.pid
+        LEFT JOIN pjpf_product_launch pgl ON gd.id = pgl.goods_id
+        LEFT JOIN pjpf_product_launch_files pglf ON pgl.id = pglf.pid
+        LEFT JOIN pjpf_brand_files bf ON gd.brand_id = bf.pid
+        LEFT JOIN pjpf_brand_figure bfs ON gd.brand_id = bfs.pid
+        WHERE
+        gd.tenant_id = #{tenantId}
+        AND gd.id in
+        <foreach collection="goodsIds" open="(" close=")" item="goodsId" separator=",">
+            #{goodsId}
+        </foreach>
+        GROUP BY
+        gd.id,
+        pgl.id
+    </select>
 
 </mapper>

+ 10 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/service/IGoodsDescService.java

@@ -23,6 +23,7 @@ import org.springblade.salesPart.excel.GoodsPointsExcel;
 import org.springblade.salesPart.vo.GoodsDescVO;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.salesPart.vo.GoodsImgVo;
 
 import java.util.List;
 
@@ -106,4 +107,13 @@ public interface IGoodsDescService extends IService<PjGoodsDesc> {
 	 * @return 结果
 	 */
 	List<PjGoodsDesc> selectGoodsListBySaleSizeDetail(String tenantId, List<Long> goodsIds);
+
+	/**
+	 * 根据商品id查询商品所有图片
+	 *
+	 * @param tenantId 租户
+	 * @param goodsIds 商品id
+	 * @return 结果
+	 */
+	List<GoodsImgVo> selectGoodsImgVoList(String tenantId, List<Long> goodsIds);
 }

+ 6 - 16
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/service/impl/GoodsDescServiceImpl.java

@@ -1,19 +1,3 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
 package org.springblade.salesPart.goods.service.impl;
 
 import com.alibaba.csp.sentinel.util.StringUtil;
@@ -44,6 +28,7 @@ import org.springblade.salesPart.goods.service.IGoodsFilesService;
 import org.springblade.salesPart.productLaunch.service.IProductLaunchService;
 import org.springblade.salesPart.stock.service.IStockDescService;
 import org.springblade.salesPart.vo.GoodsDescVO;
+import org.springblade.salesPart.vo.GoodsImgVo;
 import org.springblade.system.entity.Dept;
 import org.springblade.system.feign.ISysClient;
 import org.springframework.stereotype.Service;
@@ -816,6 +801,11 @@ public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, PjGoodsDe
 		return baseMapper.selectGoodsListBySaleSizeDetail(tenantId, goodsIds);
 	}
 
+	@Override
+	public List<GoodsImgVo> selectGoodsImgVoList(String tenantId, List<Long> goodsIds) {
+		return baseMapper.selectGoodsImgVoList(tenantId, goodsIds);
+	}
+
 	/**
 	 * 校验商品唯一性
 	 *

+ 31 - 67
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/controller/OrderController.java

@@ -1,19 +1,3 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
 package org.springblade.salesPart.order.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -43,10 +27,14 @@ import org.springblade.salesPart.corps.service.ICorpsDescService;
 import org.springblade.salesPart.entity.*;
 import org.springblade.salesPart.enums.OrderTypeEnum;
 import org.springblade.salesPart.excel.*;
+import org.springblade.salesPart.goods.service.IGoodsDescService;
 import org.springblade.salesPart.goods.service.IGoodsFilesService;
+import org.springblade.salesPart.goods.service.impl.GoodsDescServiceImpl;
 import org.springblade.salesPart.order.service.IOrderItemsService;
 import org.springblade.salesPart.order.service.IOrderService;
 import org.springblade.salesPart.ship.service.IShipService;
+import org.springblade.salesPart.util.UserUtils;
+import org.springblade.salesPart.vo.GoodsImgVo;
 import org.springblade.salesPart.vo.OrderStatistics;
 import org.springblade.salesPart.vo.OrderVO;
 import org.springblade.salesPart.vo.PjOrderStatisticsWeb;
@@ -75,15 +63,21 @@ import java.util.stream.Collectors;
 public class OrderController extends BladeController {
 
 	private final IOrderService orderService;
+
 	private final IOrderItemsService orderItemsService;
-	//获取用户信息
+
 	private final IUserClient iUserClient;
+
 	private final ICorpsAttnService corpsAttnService;
+
 	private final ICorpsDescService corpsDescService;
-	private final IGoodsFilesService goodsFilesService;
-	private final IBrandFilesService brandFilesService;
+
 	private final IShipService shipService;
 
+	private final IGoodsDescService goodsDescService;
+
+
+
 	/**
 	 * 销售详情
 	 */
@@ -760,13 +754,7 @@ public class OrderController extends BladeController {
 	@ApiOperation(value = "购物车列表不分页查询", notes = "传入shoppingCart")
 	public R<List<Map<String, Object>>> listAll() {
 		BladeUser user = AuthUtil.getUser();
-		PjCorpsAttn pjCorpsAttn = corpsAttnService.getOne(new LambdaQueryWrapper<PjCorpsAttn>()
-			.eq(PjCorpsAttn::getTenantId, user.getTenantId())
-			.eq(PjCorpsAttn::getIsDeleted, 0)
-			.eq(PjCorpsAttn::getUserId, user.getUserId()));
-		if (ObjectUtils.isNull(pjCorpsAttn)) {
-			throw new RuntimeException("未找到用户信息");
-		}
+		PjCorpsAttn pjCorpsAttn = UserUtils.getUserCorpsAttn();
 		LambdaQueryWrapper<PjOrder> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(PjOrder::getTenantId, user.getTenantId())
 			.eq(PjOrder::getIsDeleted, 0)
@@ -783,55 +771,31 @@ public class OrderController extends BladeController {
 		List<Long> orderIds = list.stream().map(PjOrder::getId).distinct().collect(Collectors.toList());
 		List<PjOrderItems> pjOrderItemsList = orderItemsService.list(new LambdaQueryWrapper<PjOrderItems>().in(PjOrderItems::getPid, orderIds));
 		List<Long> goodsIds = pjOrderItemsList.stream().map(PjOrderItems::getGoodsId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
-		List<PjGoodsFiles> pjGoodsFiles = goodsFilesService.list(new LambdaQueryWrapper<PjGoodsFiles>()
-			.eq(PjGoodsFiles::getTenantId, user.getTenantId())
-			.eq(PjGoodsFiles::getIsDeleted, 0)
-			.in(PjGoodsFiles::getPid, goodsIds)
-			.eq(PjGoodsFiles::getMainImage, 0));
-		List<Long> brandIds = pjOrderItemsList.stream().map(PjOrderItems::getBrandId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
-		List<PjBrandFiles> brandFilesList = null;
-		if (!brandIds.isEmpty()) {
-			brandFilesList = brandFilesService.list(new LambdaQueryWrapper<PjBrandFiles>()
-				.eq(PjBrandFiles::getMainImage, 0)
-				.eq(PjBrandFiles::getTenantId, user.getTenantId())
-				.eq(PjBrandFiles::getIsDeleted, 0)
-				.in(PjBrandFiles::getPid, brandIds)
-			);
-		}
-		//按照所属公司分组
+		// 查找goods、product、brand、brandFigure 中的图片,每个类型只取一条
+		List<GoodsImgVo> goodsImgVoList = goodsDescService.selectGoodsImgVoList(user.getTenantId(), goodsIds);
+		// 按照src 编码分组
 		Map<String, List<PjOrder>> map = list.stream().filter(item -> com.alibaba.cloud.commons.lang.StringUtils.isNotBlank(item.getSrcOrdNo()))
 			.collect(Collectors.groupingBy(PjOrder::getSrcOrdNo));
 		List<Map<String, Object>> mapList = new ArrayList<>(map.size());
 		for (Map.Entry<String, List<PjOrder>> orderMap : map.entrySet()) {
-			Map<String, Object> objectMap = new HashMap<>(2);
-			objectMap.put("name", orderMap.getKey());
-			mapList.add(objectMap);
 			if (orderMap.getValue().isEmpty()) {
-				objectMap.put("list", Collections.EMPTY_LIST);
 				continue;
 			}
-			List<PjOrder> nowOrderList  = orderMap.getValue().stream().sorted(Comparator.comparing(PjOrder::getCreateTime).reversed()).collect(Collectors.toList());
-			objectMap.put("list", nowOrderList);
-			for (PjOrder order : nowOrderList) {
-				List<PjOrderItems> nowOrderItemList = pjOrderItemsList.stream().filter(item -> order.getId().equals(item.getPid())).collect(Collectors.toList());
-				order.setOrderItemsList(nowOrderItemList);
-				for (PjOrderItems item : nowOrderItemList) {
-					PjGoodsFiles goodsFiles = pjGoodsFiles.stream().filter(goods -> goods.getPid().equals(item.getGoodsId())).findFirst().orElse(null);
-					if (goodsFiles != null) {
-						item.setUrl(goodsFiles.getUrl());
-						continue;
-					}
-					if (brandFilesList == null) {
-						continue;
-					}
-					PjBrandFiles brandFiles = brandFilesList.stream().filter(brand -> brand.getPid().equals(item.getBrandId())).findFirst().orElse(null);
-					if (brandFiles == null) {
-						continue;
-					}
-					item.setUrl(brandFiles.getUrl());
-				}
-			}
+			PjOrder nowOrder  = orderMap.getValue().stream().max(Comparator.comparing(PjOrder::getCreateTime)).orElse(null);
+			Map<String, Object> objectMap = new HashMap<>(3);
+			mapList.add(objectMap);
+			objectMap.put("name", orderMap.getKey());
+			List<Long> nowOrderIds = orderMap.getValue().stream().map(PjOrder::getId).distinct().collect(Collectors.toList());
+			List<PjOrderItems> nowOrderItemList = pjOrderItemsList.stream().filter(item -> nowOrderIds.contains(item.getPid())).collect(Collectors.toList());
+			nowOrderItemList.forEach(o -> {
+				GoodsImgVo goodsImgVo = goodsImgVoList.stream().filter(e1 -> e1.getGoodsId().equals(o.getGoodsId())).findFirst().orElse(null);
+				o.setUrl(goodsImgVo == null ? null : goodsImgVo.getFirstNonEmptyUrl());
+			});
+			nowOrder.setOrderItemsList(nowOrderItemList);
+			objectMap.put("data", nowOrder);
+			objectMap.put("sort", nowOrder.getCreateTime());
 		}
+		mapList.sort(Comparator.nullsLast(Comparator.comparing((Map<String, Object> m) -> (Date) m.get("sort"), Comparator.nullsFirst(Comparator.naturalOrder())).reversed()));
 		return R.data(mapList);
 	}
 

+ 21 - 6
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/service/impl/OrderServiceImpl.java

@@ -76,12 +76,11 @@ import org.springblade.salesPart.share.service.IShareSalesItemsService;
 import org.springblade.salesPart.ship.mapper.ShipMapper;
 import org.springblade.salesPart.ship.service.IShipItemsRecordService;
 import org.springblade.salesPart.ship.service.IShipItemsService;
+import org.springblade.salesPart.shopping.mapper.ShoppingMallDetailMapper;
 import org.springblade.salesPart.stock.service.IStockDescService;
 import org.springblade.salesPart.storage.mapper.StorageDescMapper;
-import org.springblade.salesPart.vo.OrderRecordVO;
-import org.springblade.salesPart.vo.OrderStatistics;
-import org.springblade.salesPart.vo.OrderVO;
-import org.springblade.salesPart.vo.PjOrderStatisticsWeb;
+import org.springblade.salesPart.util.WxParamUtil;
+import org.springblade.salesPart.vo.*;
 import org.springblade.system.entity.Dept;
 import org.springblade.system.feign.ISysClient;
 import org.springblade.system.user.entity.User;
@@ -182,6 +181,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 
 	private final OrderMapper orderMapper;
 
+	private final ShoppingMallDetailMapper shoppingMallDetailMapper;
+
 
 	/**
 	 * 获取销售订单详情
@@ -4710,8 +4711,22 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 		if (itemsList.isEmpty()) {
 			return pages;
 		}
+		List<Long> goodsIds = itemsList.stream().map(PjOrderItems::getGoodsId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
 		BladeUser user = AuthUtil.getUser();
-		// 从商品中获取图片
+		// 查找goods、product、brand、brandFigure 中的图片,每个类型只取一条
+		List<GoodsImgVo> goodsImgVoList = goodsDescMapper.selectGoodsImgVoList(user.getTenantId(), goodsIds);
+		if (goodsImgVoList.isEmpty()) {
+			return pages;
+		}
+		for (PjOrder e : pages.getRecords()) {
+			List<PjOrderItems> nowOrderItems = itemsList.stream().filter(e1 -> e1.getPid().equals(e.getId())).collect(Collectors.toList());
+			nowOrderItems.forEach(o -> {
+				GoodsImgVo goodsImgVo = goodsImgVoList.stream().filter(e1 -> e1.getGoodsId().equals(o.getGoodsId())).findFirst().orElse(null);
+				o.setUrl(goodsImgVo == null ? null : goodsImgVo.getFirstNonEmptyUrl());
+			});
+			e.setOrderItemsList(nowOrderItems);
+		}
+/*		// 从商品中获取图片
 		List<Long> goodsIds = itemsList.stream().map(PjOrderItems::getGoodsId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
 		List<PjGoodsFiles> pjGoodsFiles = goodsFilesService.list(new LambdaQueryWrapper<PjGoodsFiles>()
 			.eq(PjGoodsFiles::getTenantId, user.getTenantId())
@@ -4764,7 +4779,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 				}
 				item.setUrl(brandFiles.getUrl());
 			}
-		}
+		}*/
 		return pages;
 	}
 

+ 4 - 34
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/shopping/service/impl/ShoppingMallDetailServiceImpl.java

@@ -1,29 +1,11 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
 package org.springblade.salesPart.shopping.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
 import lombok.AllArgsConstructor;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.BladeUser;
@@ -44,6 +26,8 @@ import org.springblade.salesPart.shopping.mapper.ShoppingMallDetailMapper;
 import org.springblade.salesPart.shopping.service.IShoppingMallDetailService;
 import org.springblade.salesPart.shopping.vo.ShoppingMallDetailVO;
 import org.springblade.salesPart.stock.mapper.StockDescMapper;
+import org.springblade.salesPart.util.PageHelperUtil;
+import org.springblade.salesPart.util.UserUtils;
 import org.springblade.salesPart.vo.WxAppGoodsImgVo;
 import org.springblade.salesPart.vo.WxAppGoodsParamsVo;
 import org.springblade.system.feign.ISysClient;
@@ -242,14 +226,7 @@ public class ShoppingMallDetailServiceImpl extends ServiceImpl<ShoppingMallDetai
 	@Override
 	public R<IPage<ShoppingMallDetail>> selectWxAppGoodsPageList(PjProductLaunch productLaunch, Query query) {
 		BladeUser bladeUser = AuthUtil.getUser();
-		PjCorpsAttn corpsAttn = corpsAttnService.getAttn(bladeUser.getUserId());
-		if (ObjectUtil.isEmpty(corpsAttn)) {
-			throw new RuntimeException("未查到用户信息");
-		}
-		PjCorpsDesc corpsDesc = corpsDescService.getCorpsDesc(corpsAttn.getPid());
-		if (ObjectUtil.isEmpty(corpsDesc)) {
-			throw new RuntimeException("未查到用户信息");
-		}
+		PjCorpsDesc corpsDesc = UserUtils.getUserCorpsDesc();
 		WxAppGoodsParamsVo wxAppGoodsParamsVo = new WxAppGoodsParamsVo();
 		wxAppGoodsParamsVo.setTenantId(bladeUser.getTenantId());
 		wxAppGoodsParamsVo.setSalesCompanyId(bladeUser.getDeptId());
@@ -335,14 +312,7 @@ public class ShoppingMallDetailServiceImpl extends ServiceImpl<ShoppingMallDetai
 				item.setUrl(wxAppGoodsImgVo.getUrl());
 			}
 		}
-		// TODO: 此处可优化
-		PageInfo<ShoppingMallDetail> pageInfo = new PageInfo<>(shoppingMallDetailList);
-		IPage<ShoppingMallDetail> page = new Page<>();
-		page.setRecords(pageInfo.getList());
-		page.setTotal(pageInfo.getTotal());
-		page.setCurrent(pageInfo.getPageNum());
-		page.setSize(pageInfo.getPageSize());
-		return R.data(page);
+		return R.data(PageHelperUtil.getPageInfo(shoppingMallDetailList));
 	}
 
 }

+ 6 - 18
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/shoppingCart/controller/ShoppingCartController.java

@@ -1,19 +1,3 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
 package org.springblade.salesPart.shoppingCart.controller;
 
 import com.alibaba.cloud.commons.lang.StringUtils;
@@ -35,10 +19,9 @@ import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.ObjectUtil;
 import org.springblade.pay.tonglianPayment.entity.Parameters;
 import org.springblade.pay.tonglianPayment.fegin.IPaymentClient;
-import org.springblade.salesPart.entity.PjProductLaunch;
+import org.springblade.salesPart.entity.PjOrder;
 import org.springblade.salesPart.entity.PjProductLaunchFiles;
 import org.springblade.salesPart.entity.PjShoppingCart;
-import org.springblade.salesPart.payMethod.PayService;
 import org.springblade.salesPart.productLaunch.service.IProductLaunchFilesService;
 import org.springblade.salesPart.shoppingCart.service.IShoppingCartService;
 import org.springblade.salesPart.vo.ShoppingCartVO;
@@ -249,4 +232,9 @@ public class ShoppingCartController extends BladeController {
 		return R.data(parametersR.getData().getPayType());
 	}
 
+	@PostMapping("/getPaymentByOrder")
+	public R<Map<Object, Object>> getPaymentByOrder(@RequestBody PjOrder order) {
+		return shoppingCartService.getPaymentByOrder(order);
+	}
+
 }

+ 10 - 17
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/shoppingCart/service/IShoppingCartService.java

@@ -1,25 +1,10 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
 package org.springblade.salesPart.shoppingCart.service;
 
 
-import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
 import org.springblade.core.tool.api.R;
+import org.springblade.salesPart.entity.PjOrder;
 import org.springblade.salesPart.entity.PjShoppingCart;
 import org.springblade.salesPart.vo.ShoppingCartVO;
 
@@ -68,4 +53,12 @@ public interface IShoppingCartService extends IService<PjShoppingCart> {
 	R generateOrderPoints(String address, List<Map<String, Object>> list, String payType);
 
 	R generateOrderShare(String address, List<PjShoppingCart> list, String payType);
+
+	/**
+	 * 待付款支付
+	 *
+	 * @param order 参数
+	 * @return 结果
+	 */
+	R<Map<Object, Object>> getPaymentByOrder(PjOrder order);
 }

+ 62 - 16
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/shoppingCart/service/impl/ShoppingCartServiceImpl.java

@@ -1,24 +1,9 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
 package org.springblade.salesPart.shoppingCart.service.impl;
 
 import com.alibaba.csp.sentinel.util.StringUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -30,9 +15,12 @@ import org.springblade.client.feign.IMessageClient;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.pay.tonglianPayment.entity.Parameters;
+import org.springblade.pay.tonglianPayment.fegin.IPaymentClient;
 import org.springblade.salesPart.corps.service.ICorpsAttnService;
 import org.springblade.salesPart.corps.service.ICorpsDescService;
 import org.springblade.salesPart.entity.*;
+import org.springblade.salesPart.enums.FinalMap;
 import org.springblade.salesPart.enums.OrderTypeEnum;
 import org.springblade.salesPart.goods.mapper.GoodsDescMapper;
 import org.springblade.salesPart.order.mapper.OrderItemsMapper;
@@ -89,6 +77,8 @@ public class ShoppingCartServiceImpl extends ServiceImpl<ShoppingCartMapper, PjS
 
 	private final SharePutOnShelvesMapper sharePutOnShelvesMapper;
 
+	private final IPaymentClient paymentClient;
+
 
 	/**
 	 * 保存修改购物车信息
@@ -1362,6 +1352,62 @@ public class ShoppingCartServiceImpl extends ServiceImpl<ShoppingCartMapper, PjS
 		}
 	}
 
+	@Override
+	public R<Map<Object, Object>> getPaymentByOrder(PjOrder order) {
+		R<Parameters> parametersR = paymentClient.getByTenantId(AuthUtil.getTenantId());
+		if (!parametersR.isSuccess()) {
+			return R.fail("未查到支付类型");
+		}
+		if (ObjectUtil.isEmpty(parametersR.getData())) {
+			return R.fail("未查到支付类型数据");
+		}
+		String payType = parametersR.getData().getPayType();
+		PjOrder srcOrder = orderService.getById(order.getId());
+		if (org.springframework.util.ObjectUtils.isEmpty(srcOrder) || srcOrder.getIsDeleted() == 1) {
+			return R.fail("该订单无效,请重新下单");
+		}
+		List<PjOrder> orderAllList = new ArrayList<>();
+		orderAllList.add(srcOrder);
+		String billNo = srcOrder.getOrdNo();
+		if (org.springframework.util.StringUtils.hasText(srcOrder.getSrcOrdNo())) {
+			List<PjOrder> orderList = orderService.list(new LambdaQueryWrapper<PjOrder>().eq(PjOrder::getSrcOrdNo, srcOrder.getSrcOrdNo())
+				.eq(PjOrder::getTenantId, AuthUtil.getTenantId()).ne(PjOrder::getId, srcOrder.getId()));
+			orderAllList.addAll(orderList);
+			billNo = srcOrder.getSrcOrdNo();
+		}
+		List<Long> orderIds = orderAllList.stream().map(PjOrder::getId).collect(Collectors.toList());
+		List<PjOrderItems> orderItemsList = orderItemsMapper.selectList(new LambdaQueryWrapper<PjOrderItems>().in(PjOrderItems::getPid, orderIds)
+			.eq(PjOrderItems::getTenantId, AuthUtil.getTenantId()).eq(PjOrderItems::getIsDeleted, 0));
+		if (org.springframework.util.CollectionUtils.isEmpty(orderItemsList)) {
+			return R.fail("该订单商品数据已全部无效,请重新下单");
+		}
+		List<PjProductLaunch> pjProductLaunchList = productLaunchMapper.selectList(new LambdaQueryWrapper<PjProductLaunch>().eq(PjProductLaunch::getTenantId, AuthUtil.getTenantId())
+			.eq(PjProductLaunch::getIsDeleted, 0).eq(PjProductLaunch::getUpAndDownShelves, 1));
+		if (org.springframework.util.CollectionUtils.isEmpty(pjProductLaunchList)) {
+			return R.fail("该订单商品数据已全部下架,请重新下单");
+		}
+		for (PjOrderItems item : orderItemsList) {
+			PjProductLaunch productLaunch = pjProductLaunchList.stream().filter(x -> x.getGoodsId().equals(item.getGoodsId())).findFirst().orElse(null);
+			if (productLaunch == null) {
+				return R.fail("该订单商品-“" + item.getGoodsName() + "”-已下架,请重新下单");
+			}
+			if (productLaunch.getInventory().compareTo(item.getGoodsNum()) < 0) {
+				return R.fail("该订单商品-“" + item.getGoodsName() + "”-库存不足,请重新下单");
+			}
+		}
+		String orderIdsStr = orderIds.stream().map(String::valueOf).collect(Collectors.joining(","));
+		String orderGoodsNameStr = orderItemsList.stream().map(PjOrderItems::getGoodsName).collect(Collectors.joining(","));
+		BigDecimal amount = orderAllList.stream().map(PjOrder::getTotalMoney).filter(Objects::nonNull).reduce(BigDecimal.ZERO,BigDecimal::add);
+
+		R<Map<Object, Object>> payResult = payService.payPrepay(orderIdsStr, amount, billNo, 0, orderGoodsNameStr, payType);
+		if (FinalMap.PAY_TYPE_LIST.contains(payType)) {
+			String payUrl = payResult.getData().get("url").toString();
+			orderAllList.forEach(item -> item.setPayUrl(payUrl));
+			orderService.updateBatchById(orderAllList);
+		}
+		return payResult;
+	}
+
 	public R generateOrderLimitShare(String address, List<PjShoppingCart> list, String payType, PjCorpsDesc corpsDesc, PjCorpsAttn corpsAttn) {
 		// 获取系统编号
 		String billNo = serialService.getBillNo("WB", "WB", "WB");

+ 29 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/util/PageHelperUtil.java

@@ -0,0 +1,29 @@
+package org.springblade.salesPart.util;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.pagehelper.PageInfo;
+
+import java.util.List;
+
+/**
+ * @author Rain
+ */
+public class PageHelperUtil {
+
+
+	/**
+	 * 注意,传输的list必须是经过 pagehelper 处理过的list
+	 */
+	public static <T> IPage<T> getPageInfo(List<T> list) {
+		PageInfo<T> pageInfo = new PageInfo<>(list);
+		IPage<T> page = new Page<>();
+		page.setRecords(pageInfo.getList());
+		page.setTotal(pageInfo.getTotal());
+		page.setCurrent(pageInfo.getPageNum());
+		page.setSize(pageInfo.getPageSize());
+		return page;
+	}
+
+
+}

+ 45 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/util/UserUtils.java

@@ -0,0 +1,45 @@
+package org.springblade.salesPart.util;
+
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.core.tool.utils.SpringUtil;
+import org.springblade.salesPart.corps.service.ICorpsAttnService;
+import org.springblade.salesPart.corps.service.ICorpsDescService;
+import org.springblade.salesPart.entity.PjCorpsAttn;
+import org.springblade.salesPart.entity.PjCorpsDesc;
+
+/**
+ * @author Rain
+ */
+public class UserUtils {
+
+	private static final ICorpsAttnService corpsAttnService;
+
+	private static final ICorpsDescService corpsDescService;
+
+	static {
+		corpsAttnService = SpringUtil.getBean(ICorpsAttnService.class);
+		corpsDescService = SpringUtil.getBean(ICorpsDescService.class);
+	}
+
+
+	public static PjCorpsAttn getUserCorpsAttn() {
+		PjCorpsAttn corpsAttn = corpsAttnService.getAttn(AuthUtil.getUserId());
+		if (ObjectUtil.isEmpty(corpsAttn)) {
+			throw new RuntimeException("未查到联系人信息");
+		}
+		return corpsAttn;
+	}
+
+
+	public static PjCorpsDesc getUserCorpsDesc() {
+		PjCorpsAttn corpsAttn = getUserCorpsAttn();
+		PjCorpsDesc corpsDesc = corpsDescService.getCorpsDesc(corpsAttn.getPid());
+		if (ObjectUtil.isEmpty(corpsDesc)) {
+			throw new RuntimeException("未查到用户信息");
+		}
+		return corpsDesc;
+	}
+
+}

+ 151 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/util/WxParamUtil.java

@@ -0,0 +1,151 @@
+package org.springblade.salesPart.util;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import org.springblade.common.enums.CommonEnum;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.core.tool.utils.SpringUtil;
+import org.springblade.salesPart.brand.service.IBrandDescService;
+import org.springblade.salesPart.corps.service.ICorpsAttnService;
+import org.springblade.salesPart.corps.service.ICorpsDescService;
+import org.springblade.salesPart.entity.*;
+import org.springblade.salesPart.enums.ProductLaunchPriceSystem;
+import org.springblade.salesPart.stock.service.IStockDescService;
+import org.springblade.salesPart.vo.ResourceWarehouseVo;
+import org.springblade.salesPart.vo.WxAppGoodsImgVo;
+import org.springblade.salesPart.vo.WxAppGoodsParamsVo;
+import org.springblade.system.feign.ISysClient;
+import org.springframework.util.StringUtils;
+
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 小程序查询参数转换
+ *
+ * @author Rain
+ */
+public class WxParamUtil {
+
+	private static final IBrandDescService brandDescService;
+
+	private static final IStockDescService stockDescService;
+
+	static {
+		brandDescService = SpringUtil.getBean(IBrandDescService.class);
+		stockDescService = SpringUtil.getBean(IStockDescService.class);
+	}
+
+
+	public static WxAppGoodsParamsVo parseWxAppGoodsParamsVoByProductLaunch(PjProductLaunch productLaunch, BladeUser bladeUser,
+																			PjCorpsDesc corpsDesc, ISysClient iSysClient) {
+		WxAppGoodsParamsVo wxAppGoodsParamsVo = new WxAppGoodsParamsVo();
+		wxAppGoodsParamsVo.setTenantId(bladeUser.getTenantId());
+		wxAppGoodsParamsVo.setSalesCompanyId(bladeUser.getDeptId());
+		wxAppGoodsParamsVo.setBrandId(productLaunch.getBrandId());
+		brandIf:
+		if (ObjectUtils.isNull(productLaunch.getBrandId())) {
+			// 如果
+			List<PjBrandDesc> pjBrandDescList = brandDescService.list(new LambdaQueryWrapper<PjBrandDesc>()
+				.eq(PjBrandDesc::getTenantId, AuthUtil.getTenantId())
+				.eq(PjBrandDesc::getIsDeleted, 0)
+				.eq(PjBrandDesc::getType, "PP")
+				.eq(PjBrandDesc::getEnableOrNot, 1)
+				.apply("find_in_set(id,'" + corpsDesc.getBrandId() + "')"));
+			if (pjBrandDescList.isEmpty()) {
+				break brandIf;
+			}
+			wxAppGoodsParamsVo.setUserBrandIdList(pjBrandDescList.stream().map(PjBrandDesc::getId).distinct().collect(Collectors.toList()));
+		}
+		wxAppGoodsParamsVo.setExplosionProof(productLaunch.getExplosionProof());
+		wxAppGoodsParamsVo.setOriginalFactory(productLaunch.getOriginalFactory());
+		wxAppGoodsParamsVo.setSelfRecovery(productLaunch.getSelfRecovery());
+		cNameIf:
+		if (ObjectUtil.isNotEmpty(productLaunch.getCname())) {
+			if (productLaunch.getCname().contains(CommonEnum.SPLIT_SYMBOL.info)) {
+				int index = productLaunch.getCname().indexOf(CommonEnum.SPLIT_SYMBOL.info);
+				String brandName = productLaunch.getCname().substring(0, index);
+				String cname = productLaunch.getCname().substring(index + 1);
+				wxAppGoodsParamsVo.setCname(cname);
+				wxAppGoodsParamsVo.setBrandName(brandName);
+				wxAppGoodsParamsVo.setCnameStatus(1);
+				break cNameIf;
+			}
+			String[] chineseWords = productLaunch.getCname().split(CommonEnum.CHINESE_WORDS_SPLIT_SYMBOL.info);
+			if (chineseWords.length > 0) {
+				String cname = productLaunch.getCname().substring(chineseWords[0].length());
+				wxAppGoodsParamsVo.setCname(ObjectUtils.isNotNull(cname) ? cname : productLaunch.getCname());
+				wxAppGoodsParamsVo.setBrandName(chineseWords[0]);
+				wxAppGoodsParamsVo.setCnameStatus(ObjectUtils.isNotNull(cname) ? 1 : 2);
+				break cNameIf;
+			}
+			wxAppGoodsParamsVo.setCname(productLaunch.getCname());
+			wxAppGoodsParamsVo.setCnameStatus(3);
+		}
+		wxAppGoodsParamsVo.setWhetherIntegral(productLaunch.getWhetherIntegral());
+		if (!CommonEnum.ONE.info.equals(productLaunch.getWhetherIntegral())) {
+			String status = iSysClient.getParamService(CommonEnum.WHETHER_BRANCH_MANAGEMENT.info);
+			managementIf:
+			if (CommonEnum.ONE.info.equals(status) && ObjectUtils.isNotNull(corpsDesc.getDeliveryWarehouseId())) {
+				List<PjStockDesc> stockDescList = stockDescService.list(new LambdaQueryWrapper<PjStockDesc>()
+					.eq(PjStockDesc::getTenantId, bladeUser.getTenantId())
+					.eq(PjStockDesc::getIsDeleted, 0)
+					.eq(PjStockDesc::getStorageId, corpsDesc.getDeliveryWarehouseId()));
+				if (stockDescList.isEmpty()) {
+					break managementIf;
+				}
+				wxAppGoodsParamsVo.setGoodsIds(stockDescList.stream().map(PjStockDesc::getGoodsId).collect(Collectors.toList()));
+			}
+		}
+		String inventoryStatus = iSysClient.getParamService(CommonEnum.WHETHER_ZERO_INVENTORY.info);
+		if (ObjectUtils.isNull(inventoryStatus) || CommonEnum.ZERO.info.equals(inventoryStatus)) {
+			wxAppGoodsParamsVo.setInventoryStatus(0);
+		}
+		return wxAppGoodsParamsVo;
+	}
+
+
+	public static void findGoodsImg(List<PjProductLaunch> pjProductLaunchList, List<WxAppGoodsImgVo> wxAppGoodsImgVoList, String priceSystemStr){
+		for (PjProductLaunch item : pjProductLaunchList) {
+			ProductLaunchPriceSystem priceSystem = ProductLaunchPriceSystem.fromValue(priceSystemStr);
+			priceSystem.setMallPrice(item);
+			WxAppGoodsImgVo wxAppGoodsImgVo = wxAppGoodsImgVoList.stream().filter(wxImg ->
+				1 == wxImg.getType() && wxImg.getPid().equals(item.getId()) ||
+					2 == wxImg.getType() && wxImg.getPid().equals(item.getBrandId()) && StringUtils.hasText(wxImg.getBrandItem()) && wxImg.getBrandItem().equals(item.getBrandItem()) ||
+					3 == wxImg.getType() && wxImg.getPid().equals(item.getBrandId())
+			).min(Comparator.comparing(WxAppGoodsImgVo::getType)).orElse(null);
+			if (wxAppGoodsImgVo == null) {
+				continue;
+			}
+			item.setUrl(wxAppGoodsImgVo.getUrl());
+		}
+	}
+
+	public static void findResourceWarehouseImg(List<ResourceWarehouseVo> resourceWarehouseVoList, List<WxAppGoodsImgVo> wxAppGoodsImgVoList, String priceSystemStr){
+		PjProductLaunch pjProductLaunch = new PjProductLaunch();
+		for (ResourceWarehouseVo item : resourceWarehouseVoList) {
+			pjProductLaunch.setPriceOne(item.getPriceOne());
+			pjProductLaunch.setPriceTwo(item.getPriceTwo());
+			pjProductLaunch.setPriceThree(item.getPriceThree());
+			pjProductLaunch.setPriceFour(item.getPriceFour());
+			ProductLaunchPriceSystem priceSystem = ProductLaunchPriceSystem.fromValue(priceSystemStr);
+			priceSystem.setMallPrice(pjProductLaunch);
+			item.setMallPrice(pjProductLaunch.getMallPrice());
+			WxAppGoodsImgVo wxAppGoodsImgVo = wxAppGoodsImgVoList.stream().filter(wxImg ->
+				1 == wxImg.getType() && wxImg.getPid().equals(item.getId()) ||
+					2 == wxImg.getType() && wxImg.getPid().equals(item.getBrandId()) && StringUtils.hasText(wxImg.getBrandItem()) && wxImg.getBrandItem().equals(item.getBrandItem()) ||
+					3 == wxImg.getType() && wxImg.getPid().equals(item.getBrandId())
+			).min(Comparator.comparing(WxAppGoodsImgVo::getType)).orElse(null);
+			if (wxAppGoodsImgVo == null) {
+				continue;
+			}
+			item.setUrl(wxAppGoodsImgVo.getUrl());
+		}
+	}
+
+
+
+}