fix:硬件核销流程

This commit is contained in:
dzc committed 2025-01-15 10:54:15 +08:00
1 parent eca9919674
commit 93add403c7
19 files changed
+146 -70

No files matched your search

@@ -58,5 +58,5 @@ public interface RemoteMqttEventService {
*/
@NoToken
@GetMapping("/mqtt/send-face-change-msg")
R<Boolean> sendFaceChangeMsg(@RequestParam List<Long> parentDeptList, @RequestParam Long userId, @RequestParam(required = false) Boolean isGlobalFace);
R<Boolean> sendFaceChangeMsg(@RequestParam Long userDeptId, @RequestParam Long userId, @RequestParam(required = false) Boolean isGlobalFace);
}
@@ -6,6 +6,9 @@ import lombok.Data;
@Data
public class MqttBaseDto<T extends MqttHardBaseMsg> {
// 硬件分组id
private Long hardGroupId;
// 商户id
private Long merchantDeptId;
@@ -18,16 +21,15 @@ public class MqttBaseDto<T extends MqttHardBaseMsg> {
private T data;
public Boolean isExistMchDeptId() {
return ObjectUtil.isNotEmpty(merchantDeptId);
}
public String getTopic() {
if (ObjectUtil.isAllNotEmpty(merchantDeptId, hardwareId)) {
if (ObjectUtil.isAllNotEmpty(hardGroupId, merchantDeptId, hardwareId)) {
return String.format("topic/android/%s/%s/%s", hardGroupId, merchantDeptId, hardwareId);
}
if (ObjectUtil.isAllNotEmpty(hardGroupId, merchantDeptId)) {
return String.format("topic/android/%s/%s", merchantDeptId, hardwareId);
}
if (ObjectUtil.isAllNotEmpty(merchantDeptId)) {
return String.format("topic/android/%s", merchantDeptId);
if (ObjectUtil.isAllNotEmpty(hardGroupId)) {
return String.format("topic/android/%s", hardGroupId);
}
return "topic/android";
}