mitao
2024-05-25 dc194f523a082b7830445a3dcdff1bec9a09eea9
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSkuController.java
File was renamed from ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/GoodsSkuController.java
@@ -1,11 +1,14 @@
package com.ruoyi.goods.controller;
package com.ruoyi.goods.controller.inner;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.annotation.InnerAuth;
import com.ruoyi.goods.service.IGoodsSkuService;
import javax.annotation.Resource;
import com.ruoyi.system.api.domain.GoodsSku;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -47,4 +50,15 @@
    }
    /**
     * 根据商品名称查询商品SKU列表。
     *
     * @param goodsSkuName 商品名称
     * @return List<GoodsSku>商品SKU列表
     */
    @InnerAuth
    @GetMapping("/goods-sku/name/{goodsSkuName}")
    R<List<GoodsSku>> getGoodsByName(@PathVariable("goodsSkuName") String goodsSkuName) {
        return R.ok(iGoodsSkuService.getGoodsByName(goodsSkuName));
    }
}