| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Solutions; |
| | | import com.doumee.service.business.SolutionsService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | | * @date 2024/01/15 15:07 |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "保险方案信息表") |
| | | @RestController |
| | |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("禁用启用") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("business:solutions:update") |
| | | public ApiResponse updateStatus(@RequestBody Solutions solutions) { |
| | | solutionsService.updateStatus(solutions); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("批量删除") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:solutions:delete") |
| | |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("分页查询") |
| | | @ApiOperation("【平台端】分页查询") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:solutions:query") |
| | | public ApiResponse<PageData<Solutions>> findPage (@RequestBody PageWrap<Solutions> pageWrap) { |
| | | return ApiResponse.success(solutionsService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("列表查询") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:solutions:query") |
| | | public ApiResponse<List<Solutions>> findList (Solutions solutions) { |
| | | Integer dateType = Constants.TWO; |
| | | if(!Objects.isNull(solutions)&&!Objects.isNull(solutions.getDataType())){ |
| | | dateType = solutions.getDataType(); |
| | | } |
| | | return ApiResponse.success(solutionsService.findListForCompany(dateType)); |
| | | } |
| | | |
| | | @ApiOperation("根据历史版本查询当前最新启用版本") |
| | | @GetMapping("/getNewVersion") |
| | | public ApiResponse<Solutions> getNewVersion (@RequestParam Integer solutionId) { |
| | | return ApiResponse.success(solutionsService.getNewVersion(solutionId)); |
| | | } |
| | | |
| | | |
| | | // @ApiOperation("列表查询") |
| | | // @PostMapping("/page") |
| | | // public ApiResponse<List<Solutions>> findPage (@RequestBody Solutions solutions) { |
| | | // return ApiResponse.success(solutionsService.findList(solutions)); |
| | | // } |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(solutionsService.findById(id)); |
| | | } |
| | | |
| | | } |