package com.backendsys.modules.b2c.good.controller;

import com.backendsys.modules.b2c.good.service.GoodUnitService;
import com.backendsys.modules.common.config.security.annotations.Anonymous;
import com.backendsys.modules.common.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Validated
@RestController
@Tag(name = "商品单位管理")
public class GoodUnitController {

    @Autowired
    private GoodUnitService goodUnitService;

    @Anonymous
    @Operation(summary = "获取商品单位列表")
    @GetMapping("/api/b2c/good/getGoodUnitList")
    public Result selectGoodUnitList(String unit_category) {
        return Result.success().put("data", goodUnitService.selectGoodUnitList(unit_category));
    }

}
