From 537ef419330fcb98e67e7baf3ed5a66d2d1431e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Mon, 29 Jul 2024 11:09:03 +0800 Subject: [PATCH] debug --- .../service/impl/DeviceServiceImpl.java | 19 +------------------ .../service/impl/RefundConverterImpl.java | 2 +- .../controller/app/AppAccountController.java | 1 + 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java index aca53d44..1d9584a6 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java @@ -166,17 +166,6 @@ public class DeviceServiceImpl implements DeviceService Integer result = transactionTemplate.execute(status -> { int insert = deviceMapper.insertSmDevice(data); ServiceUtil.assertion(insert != 1, "新增设备失败"); - - DeviceQuery snQuery = new DeviceQuery(); - snQuery.setDeviceNo(data.getDeviceNo()); - int snCount = selectCount(snQuery); - ServiceUtil.assertion(snCount != 1, "SN重复"); - - DeviceQuery macQuery = new DeviceQuery(); - macQuery.setMac(data.getMac()); - int macCount = selectCount(macQuery); - ServiceUtil.assertion(macCount != 1, "MAC重复"); - return insert; }); return result == null ? 0 : result; @@ -666,13 +655,7 @@ public class DeviceServiceImpl implements DeviceService if (StringUtils.isBlank(mac)) { return null; } - DeviceQuery dto = new DeviceQuery(); - dto.setMac(mac); - List list = deviceMapper.selectSmDeviceList(dto); - if (CollectionUtils.isEmpty(list)) { - return null; - } - return list.get(0); + return deviceMapper.selectSimpleSmDeviceByMac(mac); } @Override diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/refund/service/impl/RefundConverterImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/refund/service/impl/RefundConverterImpl.java index 12c9e2f8..5499feec 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/refund/service/impl/RefundConverterImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/refund/service/impl/RefundConverterImpl.java @@ -41,7 +41,7 @@ public class RefundConverterImpl implements RefundConverter { refund.setBillId(dto.getBillId()); refund.setAmount(dto.getRefundAmount()); refund.setStatus(RefundStatus.REFUNDING.getStatus()); - refund.setReason(String.format("充值订单%s退款", bill.getBillNo())); + refund.setReason(String.format("套餐订单%s退款", bill.getBillNo())); refund.setMchAmount(refundMchAmount); refund.setServiceAmount(refundServiceAmount); refund.setUserType(dto.getUserType()); diff --git a/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppAccountController.java b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppAccountController.java index a9bdf272..f83eefa5 100644 --- a/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppAccountController.java +++ b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppAccountController.java @@ -39,6 +39,7 @@ public class AppAccountController extends BaseController { @ApiOperation("修改收款账户") @PutMapping public AjaxResult updateAccount(@RequestBody @Validated({ValidGroup.FrontUpdate.class}) Account data) { + data.setUserId(getUserId()); return success(accountService.updateSmAccount(data)); }