diff --git a/research-admin/src/main/java/com/research/web/controller/client/res/ResResearchIntegrityController.java b/research-admin/src/main/java/com/research/web/controller/client/res/ResResearchIntegrityController.java new file mode 100644 index 00000000..84d65a84 --- /dev/null +++ b/research-admin/src/main/java/com/research/web/controller/client/res/ResResearchIntegrityController.java @@ -0,0 +1,72 @@ +package com.research.web.controller.client.res; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.research.common.core.domain.BaseDto; +import com.research.common.core.domain.JsonResponse; +import com.research.system.domain.dto.CommonDto; +import com.research.system.domain.dto.ResResearchIntegrityDto; +import com.research.system.domain.vo.ResResearchIntegrityVo; +import com.research.system.service.ResResearchIntegrityService; +import io.swagger.annotations.Api; +import liquibase.pro.packaged.J; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +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 javax.annotation.Resource; + +/** + * @Author zzc + * @Package com.research.web.controller.client.res + * @Date 2025/8/16 17:24 + * @description: + */ +@Slf4j +@Api(tags = "科研诚信承诺") +@RestController +@RequestMapping("/commitmentLetter") +public class ResResearchIntegrityController { + @Resource + private ResResearchIntegrityService resResearchIntegrityService; + + @PostMapping("/query") + public JsonResponse> query(@RequestBody @Validated BaseDto dto){ + if (dto.getPageNum() > 0) { + PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); + } + return JsonResponse.ok(new PageInfo<>(resResearchIntegrityService.query(dto.getParam()))); + } + + @PostMapping("/add") + public JsonResponse add(@RequestBody @Validated ResResearchIntegrityDto.Add dto){ + return JsonResponse.ok(resResearchIntegrityService.add(dto)); + } + + @PostMapping("/del") + public JsonResponse del(@RequestBody @Validated CommonDto.DelDto dto){ + return JsonResponse.ok(resResearchIntegrityService.del(dto)); + } + + @PostMapping("/template/query") + public JsonResponse> queryTemplate(@RequestBody @Validated BaseDto dto){ + if (dto.getPageNum() > 0) { + PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); + } + return JsonResponse.ok(new PageInfo<>(resResearchIntegrityService.queryTemplate(dto.getParam()))); + } + + @PostMapping("/template/add") + public JsonResponse addTemplate(@RequestBody @Validated ResResearchIntegrityDto.TemplateAdd dto){ + return JsonResponse.ok(resResearchIntegrityService.addTemplate(dto)); + } + + @PostMapping("/template/del") + public JsonResponse delTemplate(@RequestBody @Validated CommonDto.DelDto dto){ + return JsonResponse.ok(resResearchIntegrityService.delTemplate(dto)); + } + + +} diff --git a/research-admin/src/main/java/com/research/web/controller/client/shs/ShsCkwxController.java b/research-admin/src/main/java/com/research/web/controller/client/shs/ShsCkwxController.java index 711ea5b4..a4cdf498 100644 --- a/research-admin/src/main/java/com/research/web/controller/client/shs/ShsCkwxController.java +++ b/research-admin/src/main/java/com/research/web/controller/client/shs/ShsCkwxController.java @@ -9,7 +9,10 @@ import com.research.system.domain.vo.ShsCkwxVo; import com.research.system.service.ShsCkwxService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; @@ -33,37 +36,37 @@ public class ShsCkwxController { @ApiOperation(value = "查询平台") @RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> queryList(BaseDto query){ + public JsonResponse> queryList(@ApiParam @Validated @RequestBody BaseDto query){ return JsonResponse.ok(new PageInfo<>(service.queryList(query.getParam(), query.getPageNum(), query.getPageSize()))); } @ApiOperation(value = "查询平台") @RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse add(ShsCkwxDto.Add dto){ + public JsonResponse add(@ApiParam @Validated @RequestBody ShsCkwxDto.Add dto){ return JsonResponse.ok(service.add(dto)); } @ApiOperation(value = "查询平台") @RequestMapping(value = "/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse del(CommonDto.DelDto dto){ + public JsonResponse del(@ApiParam @Validated @RequestBody CommonDto.DelDto dto){ return JsonResponse.ok(service.del(dto)); } @ApiOperation(value = "查询平台") @RequestMapping(value = "/classify/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> queryCategoryList(BaseDto query){ + public JsonResponse> queryCategoryList(@ApiParam @Validated @RequestBody BaseDto query){ return JsonResponse.ok(new PageInfo<>(service.queryCategoryList(query.getParam(), query.getPageNum(), query.getPageSize()))); } @ApiOperation(value = "查询平台") @RequestMapping(value = "/classify/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse addCategory(ShsCkwxDto.CategoryAdd dto){ + public JsonResponse addCategory(@ApiParam @Validated @RequestBody ShsCkwxDto.CategoryAdd dto){ return JsonResponse.ok(service.addCategory(dto)); } @ApiOperation(value = "查询平台") @RequestMapping(value = "/classify/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse delCategory(CommonDto.DelDto dto){ + public JsonResponse delCategory(@ApiParam @Validated @RequestBody CommonDto.DelDto dto){ return JsonResponse.ok(service.delCategory(dto)); } diff --git a/research-generator/src/main/resources/mbg.xml b/research-generator/src/main/resources/mbg.xml index 8650af4c..9628473f 100644 --- a/research-generator/src/main/resources/mbg.xml +++ b/research-generator/src/main/resources/mbg.xml @@ -74,12 +74,14 @@ - + +
+