package com.cool.store.controller.webc;

import com.cool.store.enums.PosAndOrderEnum;
import com.cool.store.response.PosAndOrderResponse;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.PosAndOrderInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;

import javax.annotation.Resource;

/**
 * @Author: WangShuo
 * @Date: 2024/10/09/下午5:44
 * @Version 1.0
 * @注释:
 */
@Api("mini订货系统")
@RestController
@RequestMapping("/mini/OrderSys")
public class miniOrderSysController {

    @Resource
    private PosAndOrderInfoService posAndOrderInfoService;


    @ApiOperation("获取")
    @GetMapping("/get")
    public ResponseResult<PosAndOrderResponse> get(@RequestParam("shopId") Long shopId){
        return ResponseResult.success(posAndOrderInfoService.get(shopId,PosAndOrderEnum.ORDER.getCode()));
    }
}
