|
@@ -144,7 +144,7 @@ public class MercMiniDeviceController {
|
|
|
return R.fail("机器未授权给商户");
|
|
|
}
|
|
|
//机器是否冻结
|
|
|
- if (deviceInfo.getFreezeStatus().equals(Integer.valueOf(DictSonEnum.DEVICE_FREEZE_STATUS_2.getKey()))) {
|
|
|
+ if (deviceInfo.getFreezeStatus().equals(Integer.valueOf(DictsSonEnum.DEVICE_FREEZE_STATUS_2.getKey()))) {
|
|
|
return R.fail("机器已冻结");
|
|
|
}
|
|
|
return R.ok();
|
|
@@ -156,7 +156,7 @@ public class MercMiniDeviceController {
|
|
|
DeviceInfo deviceInfo = deviceInfoService.getById(active.getDeviceId());
|
|
|
R checkR = this.checkDeviceByMerc(deviceInfo);
|
|
|
if (checkR.getCode() == R.Enum.SUCCESS.getCode()) {
|
|
|
- if (!deviceInfo.getActiveState().equals(Integer.valueOf(DictSonEnum.DEVICE_ACTIVE_STATUS_1.getKey()))) {
|
|
|
+ if (!deviceInfo.getActiveState().equals(Integer.valueOf(DictsSonEnum.DEVICE_ACTIVE_STATUS_1.getKey()))) {
|
|
|
return R.fail("机器未激活");
|
|
|
}
|
|
|
return R.ok();
|
|
@@ -170,7 +170,7 @@ public class MercMiniDeviceController {
|
|
|
DeviceInfo deviceInfo = deviceInfoService.getById(active.getDeviceId());
|
|
|
R checkR = this.checkDeviceByMerc(deviceInfo);
|
|
|
if (checkR.getCode() == R.Enum.SUCCESS.getCode()) {
|
|
|
- if (deviceInfo.getActiveState().equals(Integer.valueOf(DictSonEnum.DEVICE_ACTIVE_STATUS_1.getKey()))) {
|
|
|
+ if (deviceInfo.getActiveState().equals(Integer.valueOf(DictsSonEnum.DEVICE_ACTIVE_STATUS_1.getKey()))) {
|
|
|
return R.fail("机器已激活");
|
|
|
}
|
|
|
return R.ok();
|
|
@@ -188,15 +188,15 @@ public class MercMiniDeviceController {
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
DeviceInfo updateDeviceInfo = new DeviceInfo()
|
|
|
.setDeviceId(active.getDeviceId())
|
|
|
- .setActiveState(Integer.valueOf(DictSonEnum.DEVICE_ACTIVE_STATUS_1.getKey()))
|
|
|
- .setBusyState(Integer.valueOf(DictSonEnum.DEVICE_BUSY_STATUS_1.getKey()))
|
|
|
+ .setActiveState(Integer.valueOf(DictsSonEnum.DEVICE_ACTIVE_STATUS_1.getKey()))
|
|
|
+ .setBusyState(Integer.valueOf(DictsSonEnum.DEVICE_BUSY_STATUS_1.getKey()))
|
|
|
.setActiveTime(now)
|
|
|
.setShowStatus(true);
|
|
|
deviceInfoService.updateById(updateDeviceInfo);
|
|
|
//首次激活可试用x天
|
|
|
DeviceCharging deviceCharging = deviceChargingService.getById(active.getDeviceId());
|
|
|
if (deviceCharging == null) {
|
|
|
- SysDictRedis sysDictRedis = SysDictUtils.get(DictEnum.DEVICE_CHARGING.getKey(), DictSonEnum.DEVICE_CHARGING_X.getKey());
|
|
|
+ SysDictRedis sysDictRedis = SysDictUtils.get(DictsEnum.DEVICE_CHARGING.getKey(), DictsSonEnum.DEVICE_CHARGING_X.getKey());
|
|
|
deviceChargingService.save(new DeviceCharging()
|
|
|
.setDeviceId(active.getDeviceId())
|
|
|
.setChargingX(Integer.valueOf(sysDictRedis.getValue()))
|