对比新文件 |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.Laboratory; |
| | | import com.ruoyi.basic.pojo.Seal; |
| | | import com.ruoyi.basic.service.SealService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 鍗扮珷绠$悊(SealController)琛ㄦ帶鍒跺眰 |
| | | */ |
| | | @Api(tags = "鍗扮珷绠$悊") |
| | | |
| | | @RestController |
| | | @RequestMapping("/sealScope") |
| | | public class SealController { |
| | | |
| | | @Resource |
| | | private SealService sealService; |
| | | |
| | | @ApiOperation(value = "娣诲姞鍗扮珷鍙傛暟") |
| | | @PostMapping("/addSeal") |
| | | public Result addSeal(@RequestBody Seal seal) { |
| | | int i = sealService.addSeal(seal); |
| | | if(i>0){ |
| | | Integer labId = seal.getLabId(); |
| | | List<Laboratory> laboratory = sealService.Laboratory(labId); |
| | | return Result.success(laboratory); |
| | | }else{ |
| | | return Result.fail(); |
| | | } |
| | | |
| | | } |
| | | @ApiOperation(value="鏌ヨ鍗扮珷鍒楄〃") |
| | | @PostMapping("/selectSeal") |
| | | public Result selectSeal(Page page,Seal seal) { |
| | | return Result.success(sealService.selectSeal(page,seal)); |
| | | } |
| | | } |