dev^2
parent
1fea77bab2
commit
b9154f900d
|
|
@ -120,7 +120,7 @@ public class DeviceInfoController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 上报1
|
||||
* 上报1,识别时调用
|
||||
*/
|
||||
@PostMapping("/report1")
|
||||
public Map<String, Object> report1(@RequestBody JSONObject data) {
|
||||
|
|
@ -128,7 +128,7 @@ public class DeviceInfoController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 上报2
|
||||
* 上报2,称重完调用
|
||||
*/
|
||||
@PostMapping("/report2")
|
||||
public Map<String, Object> report2(@RequestBody JSONObject data) {
|
||||
|
|
|
|||
|
|
@ -202,10 +202,20 @@ public class DeviceInfoService extends ServiceImpl<DeviceInfoMapper, DeviceInfoE
|
|||
* @param pageParam 分页参数
|
||||
* @return PageResult<DeviceInfoEntity> 分页结果
|
||||
*/
|
||||
|
||||
public PageResult<DeviceInfoEntity> paging(PageParam pageParam, DeviceInfoEntity deviceInfoEntity) {
|
||||
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<DeviceInfoEntity>query(deviceInfoEntity)));
|
||||
}
|
||||
|
||||
private void open(String sn, String cid) {
|
||||
log.info("开门: {} {}", sn, cid);
|
||||
Mqtt.publish(cid + "/1/barrier", MapUtil.builder()
|
||||
.put("deviceNo", sn)
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> report1(JSONObject data) {
|
||||
MapBuilder<String, Object> resBuilder = MapUtil.<String, Object>builder()
|
||||
|
|
@ -336,13 +346,6 @@ public class DeviceInfoService extends ServiceImpl<DeviceInfoMapper, DeviceInfoE
|
|||
.build();
|
||||
}
|
||||
|
||||
private void open(String sn, String cid) {
|
||||
log.info("开门: {} {}", sn, cid);
|
||||
Mqtt.publish(cid + "/1/barrier", MapUtil.builder()
|
||||
.put("deviceNo", sn)
|
||||
.build());
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> report2(JSONObject data) {
|
||||
MapBuilder<String, Object> resBuilder = MapUtil.<String, Object>builder()
|
||||
|
|
@ -513,6 +516,7 @@ public class DeviceInfoService extends ServiceImpl<DeviceInfoMapper, DeviceInfoE
|
|||
.build();
|
||||
}
|
||||
|
||||
|
||||
private void playVoice(String sn, String cid, String content, Object... params) {
|
||||
String format = StrUtil.format(content, params);
|
||||
log.info("播语音: {} {} {}", sn, cid, format);
|
||||
|
|
|
|||
Loading…
Reference in New Issue