diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxDeviceScreenAdController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxDeviceScreenAdController.java index 096a250dc..afc554af7 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/WxDeviceScreenAdController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxDeviceScreenAdController.java @@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.*; import java.util.Date; import java.util.List; +import java.util.Map; @RestController @RequestMapping("wxDeviceScreenAd") @@ -85,14 +86,14 @@ public class WxDeviceScreenAdController extends BaseController { @ApiOperation("心跳") @PostMapping("heartbeat") - public Result heartbeat(@RequestParam String deviceId,@RequestBody String version) { + public Result heartbeat(@RequestParam String deviceId,@RequestBody Map paramMap) { WxDevice wxDevice = findDevice(deviceId); if (wxDevice == null) return new ResultData(ErrorCode.DEVICE_NOT_FOUND); if (wxDevice.getFirstHbTime() == null) wxDevice.setFirstHbTime(new Date()); wxDevice.setLastHbTime(new Date()); - wxDevice.setVersion(version); + wxDevice.setVersion(paramMap.get("version")); wxDeviceService.saveOrUpdate(wxDevice); return new ResultData(wxDevice); }