双屏机获取余额等内容修改、更新设备在线状态位置变更
This commit is contained in:
parent
cd6ec9e759
commit
dd5053d395
|
|
@ -5,6 +5,8 @@ import com.bonus.canteen.core.android.dto.AppDTO;
|
||||||
import com.bonus.canteen.core.android.service.DeviceService;
|
import com.bonus.canteen.core.android.service.DeviceService;
|
||||||
import com.bonus.canteen.core.android.vo.CookRecipeCompressVO;
|
import com.bonus.canteen.core.android.vo.CookRecipeCompressVO;
|
||||||
import com.bonus.canteen.core.android.vo.DeviceTimeIntervalVO;
|
import com.bonus.canteen.core.android.vo.DeviceTimeIntervalVO;
|
||||||
|
import com.bonus.canteen.core.device.domain.DeviceSearchDTO;
|
||||||
|
import com.bonus.canteen.core.device.service.IDeviceInfoService;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.web.controller.BaseController;
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
|
@ -26,7 +28,8 @@ import java.util.Map;
|
||||||
public class DeviceController extends BaseController {
|
public class DeviceController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private DeviceService deviceService;
|
private DeviceService deviceService;
|
||||||
|
@Resource
|
||||||
|
private IDeviceInfoService deviceInfoService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("获取设备信息")
|
@ApiOperation("获取设备信息")
|
||||||
|
|
@ -69,4 +72,14 @@ public class DeviceController extends BaseController {
|
||||||
return this.deviceService.intervalConfig(HeaderFetchUtil.getMachineSn(headers));
|
return this.deviceService.intervalConfig(HeaderFetchUtil.getMachineSn(headers));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "更新设备在线状态")
|
||||||
|
@PostMapping({"/updateTimeBySn"})
|
||||||
|
public AjaxResult updateTimeBySn(@RequestBody DeviceSearchDTO dto) {
|
||||||
|
if (ObjectUtil.isEmpty(dto.getDeviceSn())) {
|
||||||
|
throw new ServiceException("设备sn不能为空");
|
||||||
|
}
|
||||||
|
this.deviceInfoService.updateTimeBySn(dto.getDeviceSn());
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.canteen.core.device.controller;
|
package com.bonus.canteen.core.device.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
|
@ -34,7 +35,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/device_info")
|
@RequestMapping("/device_info")
|
||||||
public class DeviceInfoController extends BaseController {
|
public class DeviceInfoController extends BaseController {
|
||||||
@Autowired
|
@Resource
|
||||||
private IDeviceInfoService deviceInfoService;
|
private IDeviceInfoService deviceInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -107,14 +108,5 @@ public class DeviceInfoController extends BaseController {
|
||||||
return toAjax(deviceInfoService.deleteDeviceInfoByDeviceIds(deviceIds));
|
return toAjax(deviceInfoService.deleteDeviceInfoByDeviceIds(deviceIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "更新设备在线状态")
|
|
||||||
@PostMapping({"/updateTimeBySn"})
|
|
||||||
public AjaxResult updateTimeBySn(@RequestBody DeviceSearchDTO dto) {
|
|
||||||
if (ObjectUtil.isEmpty(dto.getDeviceSn())) {
|
|
||||||
throw new ServiceException("设备sn不能为空");
|
|
||||||
}
|
|
||||||
this.deviceInfoService.updateTimeBySn(dto.getDeviceSn());
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
r.user_id as userId
|
r.user_id as userId
|
||||||
from( select
|
from( select
|
||||||
user_id,
|
user_id,
|
||||||
IF(wallet_id = 1,wallet_bal,0) as personalWalletBalance,
|
IF(wallet_type = 1,wallet_bal,0) as personalWalletBalance,
|
||||||
IF(wallet_id = 2,wallet_bal,0) as subsidiesBalance,
|
IF(wallet_type = 2,wallet_bal,0) as subsidiesBalance,
|
||||||
wallet_bal
|
wallet_bal
|
||||||
from account_wallet_info)r
|
from account_wallet_info)r
|
||||||
GROUP BY r.user_id
|
GROUP BY r.user_id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue