|
@@ -78,8 +78,11 @@ public class OpenDeviceFactoryImpl implements DeviceFactory {
|
|
|
private DeviceFaultMonitorConfigServiceImpl deviceFaultMonitorConfigService;
|
|
|
|
|
|
private MercService mercService;
|
|
|
+
|
|
|
private AlipayDeviceService alipayDeviceService;
|
|
|
|
|
|
+ private MercDeviceCostConfigService mercDeviceCostConfigService;
|
|
|
+
|
|
|
@Override
|
|
|
public R save(DeviceRegisterDto.Save save) {
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
@@ -159,8 +162,16 @@ public class OpenDeviceFactoryImpl implements DeviceFactory {
|
|
|
if (count > 0) {
|
|
|
return R.fail("机器已激活");
|
|
|
}
|
|
|
- //提现模式商户无需算法费
|
|
|
DeviceInfo deviceInfo = deviceInfoService.getById(deviceIds.get(0));
|
|
|
+ //分账服务费模式无法自主激活
|
|
|
+ MercDeviceCostConfigDto.Vo mercDeviceCostConfig = mercDeviceCostConfigService.query(new MercDeviceCostConfigDto.Query()
|
|
|
+ .setMercId(deviceInfo.getMercId())
|
|
|
+ .setType(1)
|
|
|
+ ).getData();
|
|
|
+ if (mercDeviceCostConfig != null) {
|
|
|
+ return R.fail("分账服务费模式商家无需付款激活,请联系运营人员免费激活");
|
|
|
+ }
|
|
|
+ //提现模式商户无需算法费
|
|
|
Boolean isDraw = mercService.isDraw(new MercDto.IsDraw().setMercId(deviceInfo.getMercId())).getData();
|
|
|
if (isDraw) {
|
|
|
active.setIsDeviceAlgorithmCharging(false);
|