DrawLotGroupDictController.java 2.29 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.model.DrawLotGroupDictDO;
import com.subsidy.service.DrawLotGroupDictService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Tuyp
 * @since 2025-12-10
 */
@RestController
@Api(tags = "组别")
@RequestMapping("/drawLotGroupDict")
public class DrawLotGroupDictController {

    @Autowired
    private DrawLotGroupDictService drawLotGroupDictService;

    @PostMapping("allGroups")
    @ApiOperation("所有组别  sceneId ")
    public ResponseVO allGroups(@RequestBody DrawLotGroupDictDO drawLotGroupDictDO) {
        return ResponseData.generateCreatedResponse(0,drawLotGroupDictService.allGroups(drawLotGroupDictDO));
    }

    @PostMapping("addGroup")
    @ApiOperation("新建组别   sceneId  projectCnt  fieldCnt teachCnt")
    public ResponseVO addGroup(@RequestBody DrawLotGroupDictDO drawLotGroupDictDO){
        return ResponseData.generateCreatedResponse(0,drawLotGroupDictService.addGroup(drawLotGroupDictDO));
    }

    @PostMapping("updateGroup")
    @ApiOperation("修改组别  id  sceneId projectCnt  fieldCnt teachCnt")
    public ResponseVO updateGroup(@RequestBody DrawLotGroupDictDO drawLotGroupDictDO){
        return ResponseData.generateCreatedResponse(0,drawLotGroupDictService.updateGroup(drawLotGroupDictDO));
    }

    @PostMapping("deleteGroup")
    @ApiOperation("移除组别  id")
    public ResponseVO deleteGroup(@RequestBody DrawLotGroupDictDO drawLotGroupDictDO){
        return ResponseData.generateCreatedResponse(0,drawLotGroupDictService.deleteGroup(drawLotGroupDictDO));
    }

    @PostMapping("sceneGroups")
    @ApiOperation("查看某现场的组别  sceneId")
    public ResponseVO sceneGroups(@RequestBody DrawLotGroupDictDO drawLotGroupDictDO){
        return ResponseData.generateCreatedResponse(0,drawLotGroupDictService.sceneGroups(drawLotGroupDictDO));
    }

}