提交 7eba3dd6 编写于 作者: xiaonannet's avatar xiaonannet

表字段调整

上级 8efb6223
......@@ -27,7 +27,7 @@ private ProductCommandsService productCommandsService;
* @return 单条数据
*/
@GetMapping("selectOne")
public ProductCommands selectOne(Integer id) {
public ProductCommands selectOne(Long id) {
return productCommandsService.selectByPrimaryKey(id);
}
......
......@@ -27,7 +27,7 @@ private ProductCommandsRequestsService productCommandsRequestsService;
* @return 单条数据
*/
@GetMapping("selectOne")
public ProductCommandsRequests selectOne(Integer id) {
public ProductCommandsRequests selectOne(Long id) {
return productCommandsRequestsService.selectByPrimaryKey(id);
}
......
......@@ -27,7 +27,7 @@ private ProductCommandsResponseService productCommandsResponseService;
* @return 单条数据
*/
@GetMapping("selectOne")
public ProductCommandsResponse selectOne(Integer id) {
public ProductCommandsResponse selectOne(Long id) {
return productCommandsResponseService.selectByPrimaryKey(id);
}
......
......@@ -27,7 +27,7 @@ private ProductService productService;
* @return 单条数据
*/
@GetMapping("selectOne")
public Product selectOne(Integer id) {
public Product selectOne(Long id) {
return productService.selectByPrimaryKey(id);
}
......
......@@ -27,7 +27,7 @@ private ProductPropertiesService productPropertiesService;
* @return 单条数据
*/
@GetMapping("selectOne")
public ProductProperties selectOne(Integer id) {
public ProductProperties selectOne(Long id) {
return productPropertiesService.selectByPrimaryKey(id);
}
......
......@@ -27,7 +27,7 @@ private ProductServicesService productServicesService;
* @return 单条数据
*/
@GetMapping("selectOne")
public ProductServices selectOne(Integer id) {
public ProductServices selectOne(Long id) {
return productServicesService.selectByPrimaryKey(id);
}
......
......@@ -27,7 +27,7 @@ private ProductTemplateService productTemplateService;
* @return 单条数据
*/
@GetMapping("selectOne")
public ProductTemplate selectOne(Integer id) {
public ProductTemplate selectOne(Long id) {
return productTemplateService.selectByPrimaryKey(id);
}
......
......@@ -110,11 +110,11 @@ public class DeviceActionServiceImpl implements DeviceActionService{
Map<String, Object> map = new HashMap<>();
map = gson.fromJson(thinglinksMessage, map.getClass());
DeviceAction deviceAction = new DeviceAction();
deviceAction.setDevice_identification(String.valueOf(map.get("clientIdentifier")));
deviceAction.setAction_type(String.valueOf(map.get("channelStatus")));
deviceAction.setDeviceIdentification(String.valueOf(map.get("clientIdentifier")));
deviceAction.setActionType(String.valueOf(map.get("channelStatus")));
deviceAction.setStatus("success");
deviceAction.setMessage("Device Connection");
deviceAction.setCreate_time(LocalDateTimeUtil.now());
deviceAction.setCreateTime(LocalDateTimeUtil.now());
deviceActionMapper.insertOrUpdate(deviceAction);
}
......@@ -128,13 +128,13 @@ public class DeviceActionServiceImpl implements DeviceActionService{
Gson gson = new Gson();
Map<String, Object> map = new HashMap<>();
map = gson.fromJson(thinglinksMessage, map.getClass());
int i = deviceService.updateConnect_statusByClient_id("OFFLINE", String.valueOf(map.get("clientIdentifier")));
int i = deviceService.updateConnectStatusByClientId("OFFLINE", String.valueOf(map.get("clientIdentifier")));
DeviceAction deviceAction = new DeviceAction();
deviceAction.setDevice_identification(String.valueOf(map.get("clientIdentifier")));
deviceAction.setAction_type(String.valueOf(map.get("channelStatus")));
deviceAction.setDeviceIdentification(String.valueOf(map.get("clientIdentifier")));
deviceAction.setActionType(String.valueOf(map.get("channelStatus")));
deviceAction.setStatus(i!=0?"success":"failure");
deviceAction.setMessage("Device Disconnection");
deviceAction.setCreate_time(LocalDateTimeUtil.now());
deviceAction.setCreateTime(LocalDateTimeUtil.now());
deviceActionMapper.insertOrUpdate(deviceAction);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册