package {{ package.Controller }}; //VUE 固定引入 CommonEnums import {{ package.Entity }}.CommonEnums; import {{ package.Service }}.{{ table.entity }}Service; import {{ package.Common }}.vo.Result; //--- import 固定引入 ---// import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.Valid; import java.util.List; //--- import 固定引入 ---// /** *
* 后台枚举 前端控制器 *
* * @author tiger * @since 2026-03-17 */ @Api(tags = "公共方法对外接口") @RestController @RequestMapping("/model/common") public class CommonController { @Resource private {{ table.entity }}Service {{table.lowerEntity}}Service; @ApiOperation(value = "枚举列表查询", response = {{ table.entity }}.class) @PostMapping(value = "/optionList") public Result> optionList(@Valid @RequestBody {{ table.entity }} param, @RequestHeader("token") String token, @RequestHeader(value = "version", defaultValue = "1.0") String version) { List<{{ table.entity }}> list = {{table.lowerEntity}}Service.list(param); if (list == null) { return Result.error("无数据"); } List