Compare commits

..

No commits in common. "69aea9f0bdfef1bbca8dc00b88ccdda6c6f071de" and "a3c6f9d21837dd2d461a0ec3e8d5377d6ca6db5d" have entirely different histories.

3 changed files with 13 additions and 18 deletions

View File

@ -5,8 +5,6 @@ import com.bonus.canteen.core.android.dto.AppDTO;
import com.bonus.canteen.core.android.service.DeviceService;
import com.bonus.canteen.core.android.vo.CookRecipeCompressVO;
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.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
@ -28,8 +26,7 @@ import java.util.Map;
public class DeviceController extends BaseController {
@Resource
private DeviceService deviceService;
@Resource
private IDeviceInfoService deviceInfoService;
@ApiOperation("获取设备信息")
@ -72,14 +69,4 @@ public class DeviceController extends BaseController {
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();
}
}

View File

@ -1,7 +1,6 @@
package com.bonus.canteen.core.device.controller;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.util.ObjectUtil;
@ -35,7 +34,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
@RestController
@RequestMapping("/device_info")
public class DeviceInfoController extends BaseController {
@Resource
@Autowired
private IDeviceInfoService deviceInfoService;
/**
@ -108,5 +107,14 @@ public class DeviceInfoController extends BaseController {
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();
}
}

View File

@ -39,8 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
r.user_id as userId
from( select
user_id,
IF(wallet_type = 1,wallet_bal,0) as personalWalletBalance,
IF(wallet_type = 2,wallet_bal,0) as subsidiesBalance,
IF(wallet_id = 1,wallet_bal,0) as personalWalletBalance,
IF(wallet_id = 2,wallet_bal,0) as subsidiesBalance,
wallet_bal
from account_wallet_info)r
GROUP BY r.user_id