New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.AutomessagePolicyDocuments; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IAutomessagePolicyDocumentsService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = {"获取法律法规政策文件小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/AutomessagePolicyDocumentsController") |
| | | public class AutomessagePolicyDocumentsAppletsController extends BaseController { |
| | | |
| | | @Resource |
| | | private IAutomessagePolicyDocumentsService iAutomessagePolicyDocumentsService; |
| | | |
| | | |
| | | /** |
| | | * 获取法律法规政策文件列表(不分页) |
| | | * @param name |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取法律法规政策文件列表(不分页)",response = AutomessagePolicyDocuments.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "类型(1.法律法规2.政策文件)", required = true, dataType = "String", paramType = "query") |
| | | }) |
| | | @GetMapping("/selectList") |
| | | public ResultData selectConfigList(@RequestParam(value = "name",required = false) String name, |
| | | @RequestParam(value = "type",required = false) String type, |
| | | @RequestParam(value = "departmentId",required = false) Integer departmentId){ |
| | | List<AutomessagePolicyDocuments> list = iAutomessagePolicyDocumentsService.selectConfigList(name,type,departmentId); |
| | | return ResultData.success(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取法律法规政策文件数据 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = " 根据id获取法律法规政策文件数据 ",response = AutomessagePolicyDocuments.class) |
| | | @GetMapping("/selectAutomessagePolicyDocumentById") |
| | | public ResultData selectAutomessagePolicyDocumentById(@RequestParam(value = "id") Integer id){ |
| | | AutomessagePolicyDocuments automessagePolicyDocuments = iAutomessagePolicyDocumentsService.selectAutomessagePolicyDocumentById(id); |
| | | if (automessagePolicyDocuments!=null){ |
| | | return ResultData.success(automessagePolicyDocuments); |
| | | }else { |
| | | return ResultData.error("查找失败"); |
| | | } |
| | | } |
| | | } |