| | |
| | | // @Transactional |
| | | // @ShardingSphereTransactionType(TransactionType.BASE) |
| | | public R add(@Validated @RequestBody PointAddDto pointAddDto) { |
| | | XpPoint xpPoint = new XpPoint(); |
| | | BeanUtils.copyProperties(pointAddDto, xpPoint); |
| | | xpPointService.save(xpPoint); |
| | | xpPointService.addPointWithGeneratedNumber(pointAddDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | public R enableDisable(@RequestBody XpPointEnableDisableDto dto) { |
| | | XpPoint xpPoint = xpPointService.getById(dto.getId()); |
| | | xpPoint.setOperationStatus(dto.getOperationStatus()); |
| | | xpPoint.setVerificationStatus(dto.getVerificationStatus()); |
| | | xpPoint.setElectronicAreaId(null); |
| | | xpPointService.updateById(xpPoint); |
| | | return R.ok(); |