package com.mzl.flower.web.v2.configParam; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.mzl.flower.base.BaseController; import com.mzl.flower.base.R; import com.mzl.flower.base.ReturnDataDTO; import com.mzl.flower.dto.request.configParam.CreateConfigParamGroupDTO; import com.mzl.flower.dto.request.configParam.QueryConfigParamDTO; import com.mzl.flower.dto.response.configParam.ConfigParamVO; import com.mzl.flower.service.ConfigParamGroupService; import com.mzl.flower.service.ConfigParamService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.validation.constraints.Positive; /** * @author @TaoJie * @since 2024-12-02 */ @RestController @RequestMapping("/v2/config-param-group") @Api(value = "系统配置-分组", tags = "系统配置-分组") public class ConfigParamGroupController extends BaseController { @Autowired private ConfigParamGroupService configParamGroupService; @PostMapping("") @ApiOperation(value = "新增", notes = "新增") public ResponseEntity create(@Validated @RequestBody CreateConfigParamGroupDTO dto) { return returnData(R.SUCCESS.getCode(), null); } @PutMapping("/{id}") @ApiOperation(value = "修改", notes = "修改") public ResponseEntity update(@PathVariable Integer id,@Validated @RequestBody CreateConfigParamGroupDTO dto) { return returnData(R.SUCCESS.getCode(), null); } @DeleteMapping("/{id}") @ApiOperation(value = "删除", notes = "删除") public ResponseEntity delete(Integer id) { return returnData(R.SUCCESS.getCode(), null); } @GetMapping("/{id}") @ApiOperation(value = "详情", notes = "详情") public ResponseEntity get(@PathVariable(value = "id") @Positive(message = "{id.positive}") Integer id) { return returnData(R.SUCCESS.getCode(), null); } @GetMapping("/page") @ApiOperation(value = "查询-分页", notes = "查询-分页") public ResponseEntity>> page(Page page, QueryConfigParamDTO dto) { return returnData(R.SUCCESS.getCode(), null); } @GetMapping("/list") @ApiOperation(value = "查询-列表", notes = "查询-列表") public ResponseEntity>> list(QueryConfigParamDTO dto) { return returnData(R.SUCCESS.getCode(), configParamGroupService.getList(dto)); } }