| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | |
| | | @OperationLog("添加机构") |
| | | @PostMapping("/host/save") |
| | | public R save(@RequestBody Host host) { |
| | | host.setCreateTime(new Date()); |
| | | host.setUpdateTime(new Date()); |
| | | if (!hostService.save(host)) { |
| | | return R.error("添加失败"); |
| | | } |
| | |
| | | @OperationLog("修改机构") |
| | | @PostMapping("/host/update") |
| | | public R update(@RequestBody Host host) { |
| | | host.setUpdateTime(new Date()); |
| | | if (!hostService.updateById(host)) { |
| | | return R.error("修改失败"); |
| | | } |