| | |
| | | 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.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | import com.xiaopeng.map.constant.I18nKeyConstant; |
| | | import com.xiaopeng.map.service.*; |
| | | import com.xiaopeng.map.utils.OperationStrategyIndex; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "新增电子围栏") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.TEST_ELECTRONIC_FENCE, |
| | | operationType = AdminOperationType.ADD, |
| | | content = "新增测试demo电子围栏", |
| | | appendRequestData = true |
| | | ) |
| | | public R add(@Validated @RequestBody TestElectronicFenceAddDto dto) { |
| | | validateFenceTime(dto.getStatus(), dto.getEffectType(), dto.getEffectTime(), dto.getFailureType(), dto.getFailureTime()); |
| | | return xpElectronicFenceService.addElectronic(dto); |
| | |
| | | @PostMapping("/updateStatus") |
| | | @ResponseBody |
| | | @ApiOperation(value = "修改状态") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.TEST_ELECTRONIC_FENCE, |
| | | operationType = AdminOperationType.EDIT, |
| | | content = "修改测试demo电子围栏状态", |
| | | appendRequestData = true |
| | | ) |
| | | public R updateStatus(@RequestBody ElectronicFenceAreaUpdateStatusDto dto) { |
| | | XpTestElectronicFenceArea electronicFenceArea = xpElectronicFenceAreaService.getById(dto.getId()); |
| | | if (electronicFenceArea == null) { |
| | |
| | | */ |
| | | @PostMapping("/edit") |
| | | @ApiOperation(value = "编辑电子围栏") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.TEST_ELECTRONIC_FENCE, |
| | | operationType = AdminOperationType.EDIT, |
| | | content = "编辑测试demo电子围栏", |
| | | appendRequestData = true |
| | | ) |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | | public R edit(@Validated @RequestBody TestElectronicFenceUpdateDto dto) { |
| | |
| | | */ |
| | | @PostMapping("/copy") |
| | | @ApiOperation(value = "复制电子围栏") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.TEST_ELECTRONIC_FENCE, |
| | | operationType = AdminOperationType.ADD, |
| | | content = "复制测试demo电子围栏", |
| | | appendRequestData = true |
| | | ) |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | | public R<Long> copy(@RequestParam("id") Integer id) { |