Commit fc11dd32 by huangjy

Merge remote-tracking branch 'origin/dev' into dev

parents 07d9b697 7e16cf35
...@@ -41,6 +41,8 @@ public class PlatElderChildrenInfoUserLoginWechatServiceImpl implements PlatElde ...@@ -41,6 +41,8 @@ public class PlatElderChildrenInfoUserLoginWechatServiceImpl implements PlatElde
childrenInfo.setPhone(userInfo.getPhoneNumber()); childrenInfo.setPhone(userInfo.getPhoneNumber());
childrenInfo.setAvatar(userInfo.getAvatarUrl()); childrenInfo.setAvatar(userInfo.getAvatarUrl());
platElderChildrenInfoService.saveOrUpdate(childrenInfo);
WechatUserInfo wechatUserVo = BeanDtoVoUtils.convert(childrenInfo, WechatUserInfo.class); WechatUserInfo wechatUserVo = BeanDtoVoUtils.convert(childrenInfo, WechatUserInfo.class);
FileUtil.convert(Arrays.asList(wechatUserVo), WechatUserInfo::getAvatar, (u, f) -> { FileUtil.convert(Arrays.asList(wechatUserVo), WechatUserInfo::getAvatar, (u, f) -> {
......
...@@ -5,6 +5,7 @@ import com.makeit.entity.platform.device.PlatDevice; ...@@ -5,6 +5,7 @@ import com.makeit.entity.platform.device.PlatDevice;
import com.makeit.entity.saas.PlatTenant; import com.makeit.entity.saas.PlatTenant;
import com.makeit.enums.redis.RedisConst; import com.makeit.enums.redis.RedisConst;
import com.makeit.global.aspect.tenant.TenantIdIgnore; import com.makeit.global.aspect.tenant.TenantIdIgnore;
import com.makeit.global.aspect.tenant.TenantIdIgnoreUtil;
import com.makeit.module.iot.enums.DeviceState; import com.makeit.module.iot.enums.DeviceState;
import com.makeit.service.platform.device.PlatDeviceService; import com.makeit.service.platform.device.PlatDeviceService;
import com.makeit.service.saas.PlatTenantService; import com.makeit.service.saas.PlatTenantService;
...@@ -26,12 +27,15 @@ public class DeviceCacheUtil implements ApplicationRunner { ...@@ -26,12 +27,15 @@ public class DeviceCacheUtil implements ApplicationRunner {
@Autowired @Autowired
private PlatTenantService platTenantService; private PlatTenantService platTenantService;
public List<PlatDevice> getAll() { public List<PlatDevice> getAll() {
List<PlatDevice> list = platDeviceService.list(new LambdaQueryWrapper<PlatDevice>().eq(PlatDevice::getStatus,DeviceState.online.getValue())); return TenantIdIgnoreUtil.execute(()->{
list.stream().forEach(vo -> { List<PlatDevice> list = platDeviceService.list(new LambdaQueryWrapper<PlatDevice>().eq(PlatDevice::getStatus,DeviceState.online.getValue()));
put(vo); list.stream().forEach(vo -> {
put(vo);
});
return list;
}); });
return list;
} }
public void put(PlatDevice platDevice) { public void put(PlatDevice platDevice) {
......
...@@ -37,6 +37,7 @@ public class MqttPushClient { ...@@ -37,6 +37,7 @@ public class MqttPushClient {
* @param keepalive * @param keepalive
*/ */
public void connect(String host, String clientId, String username, String password, int timeout, int keepalive) { public void connect(String host, String clientId, String username, String password, int timeout, int keepalive) {
MqttClient client; MqttClient client;
try { try {
client = new MqttClient(host, clientId, new MemoryPersistence()); client = new MqttClient(host, clientId, new MemoryPersistence());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment