package com.neusoft.smart.pos.gateway.controller;

import com.neusoft.smart.pos.framework.dto.ResponseData;
import com.neusoft.smart.pos.gateway.service.GoodsService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(path = "/unionService/goods")
@Validated
public class GoodsController {
    @Autowired
    GoodsService goodsService;

    @ApiOperation(value = "pos端获取集团行业属性rest接口")
    @GetMapping("/industry/pos/{snCode}")
    public ResponseData<String> getIndustry(@PathVariable String snCode) {
        return new ResponseData<>(goodsService.getIndustryBySnCode(snCode));
    }
}
