debug
This commit is contained in:
parent
7afc60db82
commit
537ef41933
|
@ -166,17 +166,6 @@ public class DeviceServiceImpl implements DeviceService
|
||||||
Integer result = transactionTemplate.execute(status -> {
|
Integer result = transactionTemplate.execute(status -> {
|
||||||
int insert = deviceMapper.insertSmDevice(data);
|
int insert = deviceMapper.insertSmDevice(data);
|
||||||
ServiceUtil.assertion(insert != 1, "新增设备失败");
|
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 insert;
|
||||||
});
|
});
|
||||||
return result == null ? 0 : result;
|
return result == null ? 0 : result;
|
||||||
|
@ -666,13 +655,7 @@ public class DeviceServiceImpl implements DeviceService
|
||||||
if (StringUtils.isBlank(mac)) {
|
if (StringUtils.isBlank(mac)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
DeviceQuery dto = new DeviceQuery();
|
return deviceMapper.selectSimpleSmDeviceByMac(mac);
|
||||||
dto.setMac(mac);
|
|
||||||
List<DeviceVO> list = deviceMapper.selectSmDeviceList(dto);
|
|
||||||
if (CollectionUtils.isEmpty(list)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return list.get(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class RefundConverterImpl implements RefundConverter {
|
||||||
refund.setBillId(dto.getBillId());
|
refund.setBillId(dto.getBillId());
|
||||||
refund.setAmount(dto.getRefundAmount());
|
refund.setAmount(dto.getRefundAmount());
|
||||||
refund.setStatus(RefundStatus.REFUNDING.getStatus());
|
refund.setStatus(RefundStatus.REFUNDING.getStatus());
|
||||||
refund.setReason(String.format("充值订单%s退款", bill.getBillNo()));
|
refund.setReason(String.format("套餐订单%s退款", bill.getBillNo()));
|
||||||
refund.setMchAmount(refundMchAmount);
|
refund.setMchAmount(refundMchAmount);
|
||||||
refund.setServiceAmount(refundServiceAmount);
|
refund.setServiceAmount(refundServiceAmount);
|
||||||
refund.setUserType(dto.getUserType());
|
refund.setUserType(dto.getUserType());
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class AppAccountController extends BaseController {
|
||||||
@ApiOperation("修改收款账户")
|
@ApiOperation("修改收款账户")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult updateAccount(@RequestBody @Validated({ValidGroup.FrontUpdate.class}) Account data) {
|
public AjaxResult updateAccount(@RequestBody @Validated({ValidGroup.FrontUpdate.class}) Account data) {
|
||||||
|
data.setUserId(getUserId());
|
||||||
return success(accountService.updateSmAccount(data));
|
return success(accountService.updateSmAccount(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user