DrawLotGroupDictController.java 2.4 KB
package com.zhongzhi.controller;


import com.zhongzhi.common.utils.ResponseData;
import com.zhongzhi.model.DrawLotGroupDictDO;
import com.zhongzhi.model.DrawLotsGroupJudgesDO;
import com.zhongzhi.service.DrawLotGroupDictService;
import com.zhongzhi.service.DrawLotsGroupJudgesService;
import com.zhongzhi.vo.ResponseVO;
import io.swagger.annotations.Api;
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;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author DengMin
 * @since 2025-06-19
 */
@RestController
@RequestMapping("/drawLotGroupDict")
@Api("小组字典表")
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));
    }

}