Commit fc11dd32 by huangjy

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

parents 07d9b697 7e16cf35
......@@ -41,6 +41,8 @@ public class PlatElderChildrenInfoUserLoginWechatServiceImpl implements PlatElde
childrenInfo.setPhone(userInfo.getPhoneNumber());
childrenInfo.setAvatar(userInfo.getAvatarUrl());
platElderChildrenInfoService.saveOrUpdate(childrenInfo);
WechatUserInfo wechatUserVo = BeanDtoVoUtils.convert(childrenInfo, WechatUserInfo.class);
FileUtil.convert(Arrays.asList(wechatUserVo), WechatUserInfo::getAvatar, (u, f) -> {
......
......@@ -5,6 +5,7 @@ import com.makeit.entity.platform.device.PlatDevice;
import com.makeit.entity.saas.PlatTenant;
import com.makeit.enums.redis.RedisConst;
import com.makeit.global.aspect.tenant.TenantIdIgnore;
import com.makeit.global.aspect.tenant.TenantIdIgnoreUtil;
import com.makeit.module.iot.enums.DeviceState;
import com.makeit.service.platform.device.PlatDeviceService;
import com.makeit.service.saas.PlatTenantService;
......@@ -26,12 +27,15 @@ public class DeviceCacheUtil implements ApplicationRunner {
@Autowired
private PlatTenantService platTenantService;
public List<PlatDevice> getAll() {
List<PlatDevice> list = platDeviceService.list(new LambdaQueryWrapper<PlatDevice>().eq(PlatDevice::getStatus,DeviceState.online.getValue()));
list.stream().forEach(vo -> {
put(vo);
return TenantIdIgnoreUtil.execute(()->{
List<PlatDevice> list = platDeviceService.list(new LambdaQueryWrapper<PlatDevice>().eq(PlatDevice::getStatus,DeviceState.online.getValue()));
list.stream().forEach(vo -> {
put(vo);
});
return list;
});
return list;
}
public void put(PlatDevice platDevice) {
......
......@@ -37,6 +37,7 @@ public class MqttPushClient {
* @param keepalive
*/
public void connect(String host, String clientId, String username, String password, int timeout, int keepalive) {
MqttClient client;
try {
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