5 Commits
Author SHA1 Message Date
hello-hao 3fce125334 📝 2023-05-23 10:04:38 +08:00
hello-hao 062823ae53 feat:支持查询图像,自动检测新版本 2023-05-19 18:58:57 +08:00
hello-hao 349845e6f1 📝 2023-05-19 18:50:25 +08:00
hello-hao f40f4177f7 📝 2023-05-19 18:41:58 +08:00
hello-hao 17c49157c2 📝 2023-05-19 18:39:22 +08:00
2 changed files with 58 additions and 9 deletions
+8 -9
View File
@@ -28,14 +28,12 @@
[Core版](https://hellohao.cn):开源版的基础上增加`Backblaze(B2)` 并且可同个对象存储商家可开多个存储源(可添加至90+存储源)
### 更新日志 `20230320`
### 更新日志 `20230519`
- 修复了修改/保存存储源时,状态不能及时更新
- 优化移动端后台状态栏遮罩关闭异常的情况
- 修复百度图像鉴别不能使用的情况,鉴别违规图像不自动删除的情况
- 优化图像鉴别线程池配置
- 适配移动端页面首页状态栏
- 新增支持Docker-compose方式部署程序
- 优化了上传页面的上传逻辑
- 添加了自动检测新版本
- 新增了图像搜索功能,可通过名称/链接进行模糊查询
- 修复多个页面问题
[^_^]: 程序宣传视频:[自制宣传视频](https://www.bilibili.com/video/BV11r4y1y7mH/)
@@ -97,7 +95,8 @@
version: "3"
services:
tbed-free:
image: hellohao/tbed-free:20230320
# 具体版本号需要填写目前发行的最新版本
image: hellohao/tbed-free:2023xxxx
networks:
hellohao_network:
ports:
@@ -154,7 +153,7 @@
### 系统预览
![首页](https://upload.cc/i1/2022/02/11/t2wCEF.png)
![首页](https://upload.cc/i1/2023/05/23/Lsdivj.png)
![控制台详情](https://upload.cc/i1/2022/02/11/Al8UrH.png)
@@ -4,7 +4,9 @@ import cn.hellohao.pojo.*;
import cn.hellohao.service.*;
import cn.hellohao.service.impl.*;
import cn.hellohao.utils.NewSendEmail;
import cn.hellohao.utils.Print;
import cn.hellohao.utils.SetFiles;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@@ -19,6 +21,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
@Controller
@@ -392,5 +397,50 @@ public class AdminRootController {
return msg;
}
@PostMapping("/sysVersion")
@ResponseBody
public Msg sysupdate(@RequestParam(value = "data", defaultValue = "") String data) {
final Msg msg = new Msg();
JSONObject jsonObj = JSONObject.parseObject(data);
String dates = jsonObj.getString("dates");
HashMap<String, Object> paramMap = new HashMap<>();
String urls = "http://check.hellohao.cn:8090/getNoticeText";
JSONObject jsonObject =null;
try {
URL u = new URL(urls);
HttpURLConnection uConnection = (HttpURLConnection) u.openConnection();
uConnection.connect();
if(uConnection.getResponseCode()==200){
jsonObject =JSONObject.parseObject(HttpUtil.get(urls));
String openv = jsonObject.getString("openv");
String opentext = jsonObject.getString("opentext");
JSONObject versionJson = new JSONObject();
if(Double.valueOf(openv)>Double.valueOf(dates)){
versionJson.put("code","110200");
versionJson.put("newVersion",openv);
versionJson.put("versionMsg",opentext);
msg.setCode("110200");
msg.setData(versionJson);
}else{
versionJson.put("code","110300");
versionJson.put("newVersion",openv);
versionJson.put("versionMsg","当前已是最新版本");
msg.setCode("110300");
msg.setData(versionJson);
}
}else{
msg.setCode("110500");
msg.setData("未获取到更新状态");
}
uConnection.disconnect();
} catch (Exception e) {
e.printStackTrace();
Print.warning("connect failed");
msg.setCode("110500");
msg.setData("未获取到更新状态");
}
return msg;
}
}