| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package com.dk.mdm.controller.mst;
- import com.dk.common.model.pojo.PageList;
- import com.dk.common.response.ResponseResultVO;
- import com.dk.mdm.model.pojo.mst.SaleChannel;
- import com.dk.common.service.BaseService;
- import com.dk.mdm.model.query.mst.SaleChannelQuery;
- import com.dk.mdm.model.response.mst.WarehouseResponse;
- import com.dk.mdm.model.vo.mst.SaleChannelVO;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.beans.factory.annotation.Autowired;
- import io.swagger.annotations.Api;
- import com.dk.mdm.service.mst.SaleChannelService;
- @Api(tags = "销售渠道API接口")
- @RestController
- @RequestMapping("/mst/saleChannel")
- public class SaleChannelController{
- public BaseService<SaleChannel> getService() {
- return saleChannelService;
- }
- @Autowired
- private SaleChannelService saleChannelService;
- /**
- * @desc : 条件查询
- * @author : 于继渤
- * @date : 2024/2/26 10:36
- */
- @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
- @PostMapping({"list_by"})
- public ResponseResultVO<PageList<WarehouseResponse>> selectByCond(@RequestBody SaleChannelQuery saleChannelQuery) {
- return saleChannelService.selectByCond(saleChannelQuery);
- }
- /**
- * @desc : 新建
- * @author : 于继渤
- * @date : 2023/1/5 9:39
- */
- @ApiOperation(value = "新建", notes = "新建")
- @PostMapping({"insert"})
- public ResponseResultVO<?> insert(@RequestBody SaleChannelVO saleChannelVO) {
- return saleChannelService.insert(saleChannelVO);
- }
- /**
- * @desc : 编辑
- * @author : 于继渤
- * @date : 2023/1/5 9:39
- */
- @ApiOperation( value = "编辑", notes = "编辑" )
- @PostMapping({"update"})
- public ResponseResultVO<?> update(@RequestBody SaleChannelVO saleChannelVO) {
- return saleChannelService.update(saleChannelVO);
- }
- /**
- * @desc : 停用
- * @author : 于继渤
- * @date : 2023/1/4 9:39
- */
- @PostMapping("disable/{id}")
- public ResponseResultVO<Boolean> disable(@PathVariable String id) {
- return this.getService().disable(id);
- }
- /**
- * @desc : 启用
- * @author : 于继渤
- * @date : 2023/1/4 9:39
- */
- @PostMapping("enable/{id}")
- public ResponseResultVO<Boolean> enable(@PathVariable String id) {
- return this.getService().enable(id);
- }
- }
|