feat: 1.增加商品单位列表接口
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.service.TbShopUnitService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/unit")
|
||||
public class ShopUnitController {
|
||||
private final TbShopUnitService shopUnitService;
|
||||
|
||||
public ShopUnitController(TbShopUnitService shopUnitService) {
|
||||
this.shopUnitService = shopUnitService;
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
public Result getShopUnit(@RequestParam Integer shopId, @RequestParam(defaultValue = "1") Integer page,
|
||||
@RequestParam(defaultValue = "20") Integer size, @RequestParam(required = false) String name) {
|
||||
return Result.success(CodeEnum.SUCCESS, shopUnitService.getShopUnit(shopId, page, size, name));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user