package com.sqx.modules.errand.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.errand.entity.ShopIllegalType;
import com.sqx.modules.errand.service.ShopIllegalTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/shopillegaltype")
@Api(value = "管理端-商户投诉类型", tags = {"管理端-商户投诉类型"})
public class AdminShopIllegalTypeController {

    @Autowired
    private ShopIllegalTypeService shopIllegalTypeService;

    @ApiOperation("查（不分页）")
    @GetMapping(value = "selectIllegalTypeList")
    public Result selectIllegalTypeList(){

        return shopIllegalTypeService.selectIllegalTypeList();
    }

    @ApiOperation("查（不分页）")
    @GetMapping(value = "selectIllegalTypePage")
    public Result selectIllegalTypePage(Integer page, Integer limit){

        return shopIllegalTypeService.selectIllegalTypePage(page, limit);
    }

    @ApiOperation("增")
    @PostMapping(value = "insertIllegalType")
    public Result insertIllegalType(@RequestBody ShopIllegalType illegalType){

        return shopIllegalTypeService.insertIllegalType(illegalType);
    }

    @ApiOperation("改")
    @PostMapping(value = "updateIllegalType")
    public Result updateIllegalType(@RequestBody ShopIllegalType illegalType){

        return shopIllegalTypeService.updateIllegalType(illegalType);
    }

    @ApiOperation("删")
    @GetMapping(value = "deleteIllegalType")
    public Result deleteIllegalType(Long id){

        return shopIllegalTypeService.deleteIllegalType(id);
    }

}
