耗材关联问题
小程序 商品 问题
This commit is contained in:
@@ -2,17 +2,15 @@ package com.czg.controller.user;
|
||||
|
||||
import com.czg.constants.SystemConstants;
|
||||
import com.czg.product.param.ShopProductSkuParam;
|
||||
import com.czg.product.service.ConsInfoService;
|
||||
import com.czg.product.service.UProductService;
|
||||
import com.czg.product.vo.ShopGroupProductVo;
|
||||
import com.czg.product.vo.ShopProductInfoVo;
|
||||
import com.czg.product.vo.ShopProductSkuInfoVo;
|
||||
import com.czg.product.vo.ShopProductVo;
|
||||
import com.czg.product.vo.*;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.czg.validator.ValidatorUtil;
|
||||
import com.czg.validator.group.DefaultGroup;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -27,11 +25,13 @@ import java.util.List;
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 1.0 2025-02-16
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/user/product")
|
||||
public class UProductController {
|
||||
private final UProductService uProductService;
|
||||
@Resource
|
||||
private UProductService uProductService;
|
||||
@Resource
|
||||
private ConsInfoService consInfoService;
|
||||
|
||||
/**
|
||||
* 小程序点餐-热销商品列表
|
||||
@@ -40,9 +40,9 @@ public class UProductController {
|
||||
public CzgResult<List<ShopProductVo>> queryHotsProductList() {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
List<ShopProductVo> list = uProductService.queryHotsProductList(shopId);
|
||||
list.forEach(prod -> {
|
||||
prod.setIsSaleTime(uProductService.calcIsSaleTime(prod.getDays(), prod.getStartTime(), prod.getEndTime()));
|
||||
});
|
||||
// list.forEach(prod -> {
|
||||
// prod.setIsSaleTime(uProductService.calcIsSaleTime(prod.getDays(), prod.getStartTime(), prod.getEndTime()));
|
||||
// });
|
||||
return CzgResult.success(list);
|
||||
}
|
||||
|
||||
@@ -66,6 +66,14 @@ public class UProductController {
|
||||
return CzgResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@GetMapping("consStock")
|
||||
public CzgResult<List<ConsStockRecord>> getConsStockList(Long shopId) {
|
||||
return CzgResult.success(consInfoService.getConsStockList(shopId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序点餐-商品详情
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user