| | |
| | | import com.xiaopeng.common.core.exception.ServiceException; |
| | | import com.xiaopeng.common.core.utils.bean.BeanUtils; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public class XpElectronicFenceManagementController { |
| | | |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @Resource |
| | | private XpElectronicClient xpElectronicClient; |
| | |
| | | @ApiOperation(value = "新增电子围栏") |
| | | @Transactional |
| | | public R add(@Validated @RequestBody ElectronicFenceAddDto dto) { |
| | | |
| | | return xpElectronicClient.add(dto); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 电子围栏详情 |
| | | */ |
| | | @GetMapping("/queryById") |
| | | @PostMapping("/queryById") |
| | | @ResponseBody |
| | | @ApiOperation(value = "电子围栏详情") |
| | | public R<ElectronicFenceDetailVo> queryById(Long id) { |
| | | public R<ElectronicFenceDetailVo> queryById(@RequestParam("id")Long id) { |
| | | return xpElectronicClient.queryById(id); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 复制电子围栏 |
| | | */ |
| | | @GetMapping("/copy") |
| | | @ResponseBody |
| | | @PostMapping("/copy") |
| | | @ApiOperation(value = "复制电子围栏") |
| | | @Transactional |
| | | public R copy(Integer id) { |
| | | public R<Long> copy(@RequestParam("id") Integer id) { |
| | | return xpElectronicClient.copy(id); |
| | | } |
| | | } |