Merge branch 'liwenlong-jingquan'
# Conflicts: # fys-admin/src/main/java/com/fuyuanshen/app/controller/AppAuthController.java # fys-admin/src/main/java/com/fuyuanshen/web/service/device/DeviceBizService.java # fys-modules/fys-equipment/src/main/resources/mapper/equipment/DeviceAlarmMapper.xml # fys-modules/fys-equipment/src/main/resources/mapper/equipment/DeviceMapper.xml
This commit is contained in:
@ -26,9 +26,11 @@ import com.fuyuanshen.common.satoken.utils.LoginHelper;
|
||||
import com.fuyuanshen.common.tenant.helper.TenantHelper;
|
||||
import com.fuyuanshen.system.domain.bo.SysTenantBo;
|
||||
import com.fuyuanshen.system.domain.vo.SysClientVo;
|
||||
import com.fuyuanshen.system.domain.vo.SysDictDataVo;
|
||||
import com.fuyuanshen.system.domain.vo.SysTenantVo;
|
||||
import com.fuyuanshen.system.service.ISysClientService;
|
||||
import com.fuyuanshen.system.service.ISysConfigService;
|
||||
import com.fuyuanshen.system.service.ISysDictTypeService;
|
||||
import com.fuyuanshen.system.service.ISysTenantService;
|
||||
import com.fuyuanshen.web.domain.vo.LoginTenantVo;
|
||||
import com.fuyuanshen.web.domain.vo.LoginVo;
|
||||
@ -48,6 +50,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.net.URL;
|
||||
import java.time.Duration;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.fuyuanshen.common.core.constant.GlobalConstants.DEVICE_SHARE_CODES_KEY;
|
||||
@ -69,6 +72,7 @@ public class AppAuthController {
|
||||
private final ISysConfigService configService;
|
||||
private final ISysTenantService tenantService;
|
||||
private final ISysClientService clientService;
|
||||
private final ISysDictTypeService dictTypeService;
|
||||
|
||||
|
||||
/**
|
||||
@ -252,4 +256,26 @@ public class AppAuthController {
|
||||
SmsResponse smsResponse = smsBlend.sendMessage("18656573389", "123");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取app版本
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/version")
|
||||
public R<List<SysDictDataVo>> getAppVersion() {
|
||||
List<SysDictDataVo> list = dictTypeService.selectDictDataByType("app_version");
|
||||
list.forEach(d -> {
|
||||
String[] arr = d.getRemark().split("\\|");
|
||||
d.setDictLabel(d.getDictLabel()); // ios/android
|
||||
d.setDictValue(arr[0]); // 版本号
|
||||
d.setRemark(arr[1]); // 下载地址
|
||||
});
|
||||
// 只保留方法体:筛选 label=ios 且版本号 ≥ 2.5.0 的列表
|
||||
// List<SysDictDataVo> result = list.stream()
|
||||
// .peek(d -> { String[] a = d.getRemark().split("\\|"); d.setDictValue(a[0]); d.setRemark(a[1]); })
|
||||
// .filter(d -> "ios".equalsIgnoreCase(d.getDictLabel()))
|
||||
// .filter(d -> VersionComparator.INSTANCE.compare(d.getDictValue(), "2.5.0") >= 0)
|
||||
// .toList();
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user