Browse Source

bug修改

dev
wangfukang 2 years ago
parent
commit
13455ffd89
  1. 1
      hiver-admin/src/main/resources/application.yml
  2. 14
      hiver-admin/test-output/test-report.html
  3. 4
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java
  4. 7
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java
  5. 5
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetail.java
  6. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Share.java
  7. 4
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/purchaseocr/controller/PurchaseOcrPictureController.java
  8. 2
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/purchaseocr/service/PurchaseOcrPictureService.java
  9. 41
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/purchaseocr/service/impl/PurchaseOcrPictureServiceImpl.java
  10. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SaleService.java
  11. 6
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java
  12. 32
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/SaleServiceImpl.java
  13. 6
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/utils/AliOcrUtil.java
  14. 6
      hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml
  15. 2
      hiver-modules/hiver-mall/src/main/resources/mapper/SaleMapper.xml

1
hiver-admin/src/main/resources/application.yml

@ -341,6 +341,7 @@ ignored:
- /hiver/app/productCategory/listByShopId
# 获取微信二维码
- /hiver/order/ow/getWechatQrcode
- /app/shop/getShopInfoById
# 临时增加
- /hiver/app/logisticsOrder/addLogisticsOrder

14
hiver-admin/test-output/test-report.html

@ -35,7 +35,7 @@
<a href="#"><span class="badge badge-primary">Hiver</span></a>
</li>
<li class="m-r-10">
<a href="#"><span class="badge badge-primary">九月 27, 2024 09:25:36</span></a>
<a href="#"><span class="badge badge-primary">九月 30, 2024 00:39:10</span></a>
</li>
</ul>
</div>
@ -84,7 +84,7 @@
<div class="test-detail">
<span class="meta text-white badge badge-sm"></span>
<p class="name">passTest</p>
<p class="text-sm"><span>09:25:36 上午</span> / <span>0.016 secs</span></p>
<p class="text-sm"><span>00:39:10 上午</span> / <span>0.016 secs</span></p>
</div>
<div class="test-contents d-none">
<div class="detail-head">
@ -92,8 +92,8 @@
<div class="info">
<div class='float-right'><span class='badge badge-default'>#test-id=1</span></div>
<h5 class="test-status text-pass">passTest</h5>
<span class='badge badge-success'>09.27.2024 09:25:36</span>
<span class='badge badge-danger'>09.27.2024 09:25:36</span>
<span class='badge badge-success'>09.30.2024 00:39:10</span>
<span class='badge badge-danger'>09.30.2024 00:39:10</span>
<span class='badge badge-default'>0.016 secs</span>
</div>
<div class="m-t-10 m-l-5"></div>
@ -104,7 +104,7 @@
<tbody>
<tr class="event-row">
<td><span class="badge log pass-bg">Pass</span></td>
<td>9:25:36</td>
<td>0:39:10</td>
<td>
Test passed
</td>
@ -128,13 +128,13 @@
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Started</p>
<h3>九月 27, 2024 09:25:36</h3>
<h3>九月 30, 2024 00:39:10</h3>
</div></div>
</div>
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Ended</p>
<h3>九月 27, 2024 09:25:36</h3>
<h3>九月 30, 2024 00:39:10</h3>
</div></div>
</div>
<div class="col-md-3">

4
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java

@ -1171,12 +1171,12 @@ public class SaleController {
@RequestMapping(value = "/buyAi", method = RequestMethod.POST)
@ApiOperation("同步步Ai开单")
public Result buyAi(String aiMsg, String customerId) {
public Result buyAi(String aiMsg, String customerId,String productId) {
if (StringUtils.isEmpty(aiMsg)) {
ResultUtil.error("指令不能为空!");
}
JSONObject jsonObject = saleService.buyAi(aiMsg, customerId, productId);
final JSONObject jsonObject = saleService.buyAi(aiMsg, customerId);
return new ResultUtil<JSONObject>().setData(jsonObject);
}

7
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java

@ -295,8 +295,11 @@ public class DebtServiceImpl extends ServiceImpl<DebtMapper, Debt> implements De
if(debt != null){
// 获取客户信息
final Customer customer = customerService.getById(userId);
debt.setCategoryId(customer.getCategoryId());
debt.setCategoryName(customer.getCategoryName());
// 可能传供应商的id,查不到,就不放了。
if(customer != null){
debt.setCategoryId(customer.getCategoryId());
debt.setCategoryName(customer.getCategoryName());
}
}
return debt == null ? new Debt() : debt;
}

5
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetail.java

@ -117,5 +117,10 @@ public class PurchaseDetail extends HiverBaseEntity {
@ApiModelProperty(value = "客户分类价格规则")
private String customerCategoryRule;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "客户购买次数")
private Integer buyCount;
private static final long serialVersionUID = 1L;
}

3
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Share.java

@ -85,4 +85,7 @@ public class Share extends HiverBaseEntity {
@ApiModelProperty(value = "价格类型:0:零售价;1:批发价")
private String priceType;
@ApiModelProperty(value = "微信小程序码参数")
private String scene;
}

4
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/purchaseocr/controller/PurchaseOcrPictureController.java

@ -49,8 +49,8 @@ public class PurchaseOcrPictureController {
*/
@RequestMapping(value = "/callWithMessageOfPurchase", method = RequestMethod.POST)
@ApiOperation("AI语音入库")
public Result callWithMessageOfPurchase(String questionMsg) throws NoApiKeyException, InputRequiredException {
final JSONObject jsonObject = purchaseOcrPictureService.callWithMessageOfPurchase(questionMsg);
public Result callWithMessageOfPurchase(String questionMsg, String customerId, String productId) throws NoApiKeyException, InputRequiredException {
final JSONObject jsonObject = purchaseOcrPictureService.callWithMessageOfPurchase(questionMsg, customerId, productId);
return new ResultUtil<JSONObject>().setData(jsonObject);
}

2
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/purchaseocr/service/PurchaseOcrPictureService.java

@ -24,7 +24,7 @@ public interface PurchaseOcrPictureService {
List<PurchaseOcrCountVo> getOcrCount();
JSONObject callWithMessageOfPurchase(String questionMsg) throws NoApiKeyException, InputRequiredException;
JSONObject callWithMessageOfPurchase(String questionMsg, String customerId, String productId) throws NoApiKeyException, InputRequiredException;
JSONObject getCustomInfoOfAi(String questionMsg);

41
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/purchaseocr/service/impl/PurchaseOcrPictureServiceImpl.java

@ -7,10 +7,7 @@ import cc.hiver.mall.common.constant.PurchaseConstant;
import cc.hiver.mall.config.thread.AiPurchaseThread;
import cc.hiver.mall.config.thread.ThreadPoolConfiguration;
import cc.hiver.mall.entity.*;
import cc.hiver.mall.pojo.vo.ProductAttributeOfAddVo;
import cc.hiver.mall.pojo.vo.ProductAttributeValueVo;
import cc.hiver.mall.pojo.vo.ProductCategoryVo;
import cc.hiver.mall.pojo.vo.PurchaseVo;
import cc.hiver.mall.pojo.vo.*;
import cc.hiver.mall.purchaseocr.entity.PurchaseOcrPicture;
import cc.hiver.mall.purchaseocr.mapper.PurchaseOcrPictureMapper;
import cc.hiver.mall.purchaseocr.service.PurchaseOcrPictureService;
@ -77,6 +74,9 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService
@Autowired
private ProductCategoryService productCategoryService;
@Autowired
private SaleService saleService;
@Override
public JSONObject batchSave(PurchaseOciPictureAddVo purchaseOciPictureAddVo) {
@ -180,7 +180,7 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService
}
@Override
public JSONObject callWithMessageOfPurchase(String questionMsg) throws NoApiKeyException, InputRequiredException {
public JSONObject callWithMessageOfPurchase(String questionMsg, String customerId, String singleProductId) throws NoApiKeyException, InputRequiredException {
final JSONObject returnJsonObject = new JSONObject();
final StopWatch stopWatch = new StopWatch("Ai入库计时:");
@ -210,7 +210,8 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService
final JSONObject jsonObject = AliOcrUtil.callWithMessageOfPurchase(saleAiMsg.getAiMsg());
final String resultContent = jsonObject.get("resultContent").toString();
final JSONArray json = JSON.parseArray(resultContent);
// 旧商品的id集合
List<String> oldProductIdList = new ArrayList<>();
for (int i = 0; i < json.size(); i++) {
final JSONObject object = json.getJSONObject(i);
String productSn = object.getString("productSn");
@ -242,10 +243,18 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService
final JSONArray attributeListJsonArray = JSON.parseArray(attributeList);
// 根据货号去查询商品,如果
final List<Product> byProductSn = productService.getByProductSn(productSn, shopId,"");
if (byProductSn != null && !byProductSn.isEmpty()) {
if (StringUtils.isNotEmpty(singleProductId) || (byProductSn != null && !byProductSn.isEmpty())) {
// 原则上一个店铺一个货号对应一个商品,这里如果查到了,直接拿第一个。
final Product product = byProductSn.get(0);
final String productId = product.getId();
Product product = new Product();
if(!byProductSn.isEmpty()){
product = byProductSn.get(0);
}
if(StringUtils.isNotEmpty(singleProductId)){
// 20240928 app/sale/buyAi接口加个参数productId,如果传值了,查规格库存数的时候就查这款商品的
product = productService.getById(singleProductId);
}
String productId = product.getId();
oldProductIdList.add(productId);
// 查询商品所有的库存
final List<Stock> stockList = stockService.getProductStock(productId);
final Map<String, Integer> stockMap = new HashMap<>();
@ -385,6 +394,19 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService
stockLogList.add(stockLog);
}
// 如果客户id不为空,那么就查询商品的购买记录
if(StringUtils.isNotEmpty(customerId)){
// 获取客户的购买次数
final List<BuyCountVo> buyCount = saleService.buyCount(customerId,oldProductIdList);
// 封装为Map
final Map<String, Integer> buyCountMap = new HashMap<>();
for (BuyCountVo buyCountVo : buyCount) {
buyCountMap.put(buyCountVo.getProductId(), buyCountVo.getBuyCount());
}
// 回填数据
final String thisProductId = purchaseDetail.getProductId();
purchaseDetail.setBuyCount(buyCountMap.getOrDefault(thisProductId, 0));
}
// 判断是否存在改货号,如果不存在,新增,存在,则追加stockLogList
if (purchaseDetailMap.containsKey(productSn)) {
final PurchaseDetail addPurchaseDetail = purchaseDetailMap.get(productSn);
@ -450,6 +472,7 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService
}
}
}
} catch (NoApiKeyException e) {
throw new RuntimeException(e);
} catch (InputRequiredException e) {

3
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SaleService.java

@ -57,7 +57,7 @@ public interface SaleService extends IService<Sale> {
void buyAiSync(String aiMsg, String saleId);
JSONObject buyAi(String aiMsg, String customerId);
JSONObject buyAi(String aiMsg, String customerId,String singleProductId);
void updateAiFlag(String id, Integer status);
@ -158,4 +158,5 @@ public interface SaleService extends IService<Sale> {
* @date 2024/9/26
*/
List<BuyCountVo> buyCount(String customerId, List<String> productIdList);
}

6
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java

@ -155,7 +155,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
public CopyOnWriteArrayList<Product> getByProductSn(String productSn, String shopId, String customerId) {
final CopyOnWriteArrayList<Product> byProductSn = baseMapper.getByProductSn(productSn, shopId);
// 如果客户id不为空,查询客户的购买次数
if (StringUtils.isNotEmpty(customerId)) {
if (StringUtils.isNotEmpty(customerId) && !byProductSn.isEmpty()) {
// 理论上来说一个货号在一个店铺中只会查询到一个商品信息
final List<String> productIdList = new ArrayList<>();
@ -186,7 +186,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
public Product getByIdOrBrcode(String id, String customerId) {
final Product byIdOrBrcode = baseMapper.getByIdOrBrcode(id);
// 如果客户id不为空,查询客户的购买次数
if (StringUtils.isNotEmpty(customerId)) {
if (StringUtils.isNotEmpty(customerId) && byIdOrBrcode != null) {
final List<String> productIdList = new ArrayList<>();
productIdList.add(byIdOrBrcode.getId());
final List<BuyCountVo> buyCount = saleService.buyCount(customerId, productIdList);
@ -440,7 +440,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
}
sizeStr.append('"' + value + '"');
// 判断该商品是否已包含该尺码,不包含,则需要新增
if (!colorList.contains(value)) {
if (!sizeList.contains(value)) {
final ProductAttributeValue productAttributeValue = new ProductAttributeValue();
final String attributeId = productAttributeOfAddVoMap.get("尺码").getAttributeId();
productAttributeValue.setAttributeId(attributeId);

32
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/SaleServiceImpl.java

@ -174,7 +174,6 @@ public class SaleServiceImpl extends ServiceImpl<SaleMapper, Sale> implements Sa
}
final Page<Sale> saleList = saleMapper.queryPage(page, saleVO);
// 获取订单详情信息
List<String> productIdList = new ArrayList<>();
for (Sale sale : saleList.getRecords()) {
final QueryWrapper<SaleDetail> querySaleDetailWrapper = new QueryWrapper<>();
querySaleDetailWrapper.select("product_id")
@ -182,7 +181,6 @@ public class SaleServiceImpl extends ServiceImpl<SaleMapper, Sale> implements Sa
.groupBy("product_id");
final List<String> list = saleDetailService.selectByCondition1(querySaleDetailWrapper);
if (!list.isEmpty()) {
productIdList.addAll(list);
final List<SaleDetailDTO> saleDetailDTOS = new ArrayList<>();
final Map<String, Product> productMap = new HashMap<>();
// 获取商品信息
@ -247,22 +245,18 @@ public class SaleServiceImpl extends ServiceImpl<SaleMapper, Sale> implements Sa
}
sale.setSaleDetailDTOList(saleDetailDTOS);
}
}
// 如果客户id不为空,查询客户的购买次数
if (StringUtils.isNotEmpty(saleVO.getCustomerId())) {
final List<BuyCountVo> buyCount = saleService.buyCount(saleVO.getCustomerId(), productIdList);
final List<BuyCountVo> buyCount = saleService.buyCount(sale.getUserId(), list);
// 封装为Map
final Map<String, Integer> buyCountMap = new HashMap<>();
for (BuyCountVo buyCountVo : buyCount) {
buyCountMap.put(buyCountVo.getProductId(), buyCountVo.getBuyCount());
}
for (Sale saleListRecord : saleList.getRecords()) {
for (SaleDetailDTO saleDetailDTO : saleListRecord.getSaleDetailDTOList()) {
String productId = saleDetailDTO.getProductId();
saleDetailDTO.setBuyCount(buyCountMap.getOrDefault(productId, 0));
}
for (SaleDetailDTO saleDetailDTO : sale.getSaleDetailDTOList()) {
String productId = saleDetailDTO.getProductId();
saleDetailDTO.setBuyCount(buyCountMap.getOrDefault(productId, 0));
}
}
return saleList;
}
@ -659,7 +653,7 @@ public class SaleServiceImpl extends ServiceImpl<SaleMapper, Sale> implements Sa
}
@Override
public JSONObject buyAi(String aiMsg, String customerId) {
public JSONObject buyAi(String aiMsg, String customerId,String singleProductId) {
final JSONObject returnJsonObject = new JSONObject();
// 叉转X 文本纠错 使用正则表达式替换单个或多个连续的“叉”字符
aiMsg = replaceAllX(aiMsg);
@ -694,9 +688,16 @@ public class SaleServiceImpl extends ServiceImpl<SaleMapper, Sale> implements Sa
final Map<String, PurchaseDetail> purchaseDetailMap = new HashMap<>();
// 根据货号去查询商品,如果
final List<Product> byProductSn = productService.getByProductSn(productSn, shopId,"");
if (byProductSn != null && !byProductSn.isEmpty()) {
if (StringUtils.isNotEmpty(singleProductId) || (byProductSn != null && !byProductSn.isEmpty())) {
// 原则上一个店铺一个货号对应一个商品,这里如果查到了,直接拿第一个。
final Product product = byProductSn.get(0);
Product product = new Product();
if(!byProductSn.isEmpty()){
product = byProductSn.get(0);
}
if(StringUtils.isNotEmpty(singleProductId)){
// 20240928 app/sale/buyAi接口加个参数productId,如果传值了,查规格库存数的时候就查这款商品的
product = productService.getById(singleProductId);
}
final String productId = product.getId();
oldProductIdList.add(productId);
// 查询商品所有的库存
@ -1308,6 +1309,9 @@ public class SaleServiceImpl extends ServiceImpl<SaleMapper, Sale> implements Sa
*/
@Override
public List<BuyCountVo> buyCount(String customerId, List<String> productIdList) {
if(StringUtils.isEmpty(customerId) || productIdList.isEmpty()){
return new ArrayList<>();
}
return saleMapper.buyCount(customerId,productIdList);
}

6
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/utils/AliOcrUtil.java

@ -842,7 +842,7 @@ public class AliOcrUtil {
"2.如果识别到多种颜色,按不同颜色拆分返回。如果没有识别到\"color\"的内容,则\"color\"赋值“均色”。如果没有识别到\"size\"的内容,则\"size\"赋值“均码”,返回1条JSON数据即可。\n" +
"3.如果指令内容中有\"SYYS色\"则\"color\"字段返回“SYYS色”即可,如果指令内容中有\"SYCM码\"则\"size\"字段返回“SYCM码”即可,没有则忽略。\n" +
"4.如果指令中有“各N件”,则每个尺码数量返回N。\n" +
"5.如果指令中尺码是?码到?码,请完整返回跨度内所有尺码JSON。\n" +
"5.如果指令中尺码是?码到?码,请完整返回跨度内所有尺码JSON、不要省略中间的尺码。(常见的尺码顺序:S码-M码-L码-XL码-2XL码-3XL码-4XL码-5XL码-6XL码-7XL码......)。\n" +
"6.如果没有识别到\"wholesalePrice\"的内容,则\"wholesalePrice\"赋值\"0\"。\n" +
"7.只输出JSON数据即可,禁止返回除JSON数据外的任何内容!" +
"8.返回的JSON数据不用换行,以最快的速度返回!";
@ -896,7 +896,7 @@ public class AliOcrUtil {
"3.如果没有识别到\"productName\"的内容,则\"productName\"使用\"productSn\"的值填充。\n" +
"4.如果识别到多种颜色,按不同颜色拆分返回。如果没有识别到\"color\"的内容,则\"color\"赋值“均色”,如果没有识别到\"size\"的内容,则\"size\"赋值“均码”,返回一条JSON数据即可。\n" +
"5.如果指令中有“各N件”,则每个尺码数量返回N。\n" +
"6.如果指令中尺码是?码到?码,请结合服装鞋帽尺码规则完整返回跨度内所有尺码JSON。\n" +
"6.如果指令中尺码是?码到?码,请完整返回跨度内所有尺码JSON、不要省略中间的尺码。(常见的尺码顺序:S码-M码-L码-XL码-2XL码-3XL码-4XL码-5XL码-6XL码-7XL码......)。\n" +
"7.返回的JSON数据不用换行,以最快的速度返回!\n" +
"8.只输出JSON数据即可,禁止返回除JSON数据外的任何内容!";
final Message userMsg = Message.builder().role(Role.USER.getValue()).content(questionMsg).build();
@ -938,7 +938,7 @@ public class AliOcrUtil {
"2.如果没有识别到\"color\"的内容,则\"color\"赋值“均色”。如果没有识别到\"size\"的内容,则\"size\"赋值“均码”,返回1条JSON数据即可。\n" +
"3.如果指令内容中有\"SYYS色\"则\"color\"字段返回“SYYS色”即可,如果指令内容中有\"SYCM码\"则\"size\"字段返回“SYCM码”即可,没有则忽略。\n" +
"4.如果指令中有“各N件”,则每个尺码数量返回N。\n" +
"5.如果指令中尺码是?码到?码,请完整返回跨度内所有尺码JSON。\n" +
"5.如果指令中尺码是?码到?码,请完整返回跨度内所有尺码JSON、不要省略中间的尺码。(常见的尺码顺序:S码-M码-L码-XL码-2XL码-3XL码-4XL码-5XL码-6XL码-7XL码......)。\n" +
"6.只输出JSON数据即可,禁止返回除JSON数据外的任何内容!";
final Message userMsg = Message.builder().role(Role.USER.getValue()).content(questionMsg).build();
msgManager.add(systemMsg);

6
hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml

@ -575,6 +575,7 @@
t.tail_warn,
t.in_storage_status,
t.customer_category_rule,
COALESCE(ss.total_stock_count, 0) AS total_stock_count,
COALESCE(ss.stock_count, 0) AS stock_count,
COALESCE(ss.minus_stock_count, 0) AS minus_stock_count
<if test='queryParams.startDate !=null and queryParams.startDate.trim() neq "" and queryParams.endDate !=null and queryParams.endDate.trim() neq ""'>
@ -583,6 +584,7 @@
FROM t_product t
LEFT JOIN (
SELECT
sum( s.stock_count ) AS total_stock_count,
sum( CASE WHEN s.stock_count &lt; 0 THEN 0 ELSE s.stock_count END ) AS stock_count,
sum( CASE WHEN s.stock_count > 0 THEN 0 ELSE s.stock_count END ) AS minus_stock_count,
shop_id,
@ -663,6 +665,10 @@
sd.total_sold desc,
</if>
</if>
<!-- 如果sort字段为stockCount,则按照total_stock_count库存数排序 -->
<if test='queryParams.sort !=null and queryParams.sort.trim() eq "stockCount"'>
total_stock_count #{queryParams.order} ,
</if>
t.in_storage_status asc, t.del_flag desc,t.create_time desc, id
</select>

2
hiver-modules/hiver-mall/src/main/resources/mapper/SaleMapper.xml

@ -1378,7 +1378,7 @@ GROUP BY
WHERE
ts.user_id = #{customerId}
and status = '4'
AND tsd.product_id
AND tsd.product_id in
<foreach item="item" index="index" collection="productIdList" open="(" close=")" separator=",">
#{item}
</foreach>

Loading…
Cancel
Save