mirror of
https://github.com/Hello-hao/Tbed.git
synced 2024-04-21 12:32:10 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95889c42ef | ||
|
|
9a6ce4d5eb | ||
|
|
fdfd8391e3 | ||
|
|
276d329276 | ||
|
|
2997d9ee72 | ||
|
|
c754825b93 | ||
|
|
723a9c15ab | ||
|
|
4c6a19a4ab | ||
|
|
d09b5c2656 | ||
|
|
68f175679f |
@@ -19,37 +19,35 @@
|
||||
|
||||
**存储源支持:**
|
||||
|
||||
开源版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,`U-File`,`FTP`
|
||||
开源版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,~~`U-File`~~,`FTP`
|
||||
|
||||
Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,`U-File`,`FTP`,`Backblaze(B2)`,`百度云BOS`,`青云Qingstor`,`Ucloud US3`,`Minio`,`AWS S3`
|
||||
Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,~~`U-File`~~,`FTP`,`Backblaze(B2)`,`百度云BOS`,`青云Qingstor`,`Ucloud US3`,`Minio`,`AWS S3`
|
||||
|
||||
|
||||
### 更新日志 `20220216`
|
||||
|
||||
- **紧急修复** 修复部分环境下,多个存储源对接后无法使用的问题。
|
||||
|
||||
### 更新日志 `20220328`
|
||||
- **修复** 修复部分情况下开启图像查重后,出现上传失败的问题
|
||||
- **修复** 部分场景下操作图片时出现的异常错误
|
||||
- **优化** 多个页面显示
|
||||
|
||||
### 引导
|
||||
|
||||
> 目前`*.hellohao.cn`在国内多个省被运营商劫持,部分省市打不开,恢复时间尚不明确。
|
||||
> 迫于无奈,我已经准备了备用域名,后续陆续添加备用域名。
|
||||
> 如:`xxx.hellohao.cn`打不开,请尝试访问`xxx.wwery.com`
|
||||
|
||||
程序宣传视频:[自制宣传视频](https://www.bilibili.com/video/BV11r4y1y7mH/)
|
||||
|
||||
开源版编译包下载: [下载开源版程序包](https://github.com/Hello-hao/Tbed/releases/)
|
||||
|
||||
官网(含Core版):[https://tbed.hellohao.cn](https://tbed.hellohao.cn)
|
||||
[^_^]:官网(含Core版):[https://tbed.hellohao.cn](https://tbed.hellohao.cn)
|
||||
|
||||
前端源码:[https://github.com/Hello-hao/tbed-web](https://github.com/Hello-hao/tbed-web)
|
||||
[^_^]:前端源码:[https://github.com/Hello-hao/tbed-web](https://github.com/Hello-hao/tbed-web)
|
||||
|
||||
文档地址:[https://doc.hellohao.cn](https://doc.hellohao.cn)
|
||||
[^_^]:文档地址:[https://doc.hellohao.cn](https://doc.hellohao.cn)
|
||||
|
||||
程序展示:[https://tc.hellohao.cn](https://tc.hellohao.cn)
|
||||
[^_^]:程序展示:[https://tc.hellohao.cn](https://tc.hellohao.cn)
|
||||
|
||||
作者博客:[https://www.hellohao.cn](https://www.hellohao.cn)
|
||||
[^_^]:作者博客:[https://www.hellohao.cn](https://www.hellohao.cn)
|
||||
|
||||
--- **备用地址** ---
|
||||
域名`hellohao.cn`目前正在转移备案,请使用一下备用地址进行访问
|
||||
|
||||
--- **备用地址** ---
|
||||
|
||||
官网(含Core版)(备用):[http://tbed.wwery.com](http://tbed.wwery.com)
|
||||
|
||||
@@ -57,7 +55,7 @@ Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,
|
||||
|
||||
程序展示(备用):[http://tc.wwery.com](http://tc.wwery.com)
|
||||
|
||||
作者博客(备用):[http://www.wwery.com](http://www.wwery.com)
|
||||
[^_^]:作者博客(备用):[http://www.wwery.com](http://www.wwery.com)
|
||||
|
||||
|
||||
|
||||
@@ -68,7 +66,11 @@ Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,
|
||||
|
||||
- 个人相册浏览,图像详细资料展示卡片
|
||||
|
||||
- 支持 图片拖拽、截图直接(Ctrl+V)和URL地址上传
|
||||
- 支持 图片拖拽、截图直接(Ctrl+V)
|
||||
|
||||
- 支持URL地址批量上传
|
||||
|
||||
- 一键复制嵌入式链接代码,也可以自定义嵌入式代码格式
|
||||
|
||||
- 对接邮箱服务,注册/找回密码等功能
|
||||
|
||||
@@ -158,10 +160,12 @@ Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,
|
||||
初始密码`admin`
|
||||
|
||||
### 微信小程序
|
||||
> 目前开发中,开发进度的快慢要根据作者的工作压力、心情状况等自身情况进行评估。
|
||||
> 目前已有测试版,更多功能开发中,开发进度的快慢要根据作者的工作压力、心情状况等自身情况进行评估。
|
||||
> 暂时无法给出具体发布小程序的时间。大家期待吧。
|
||||
|
||||

|
||||

|
||||
|
||||
[^_^]: 
|
||||
|
||||
### 声明
|
||||
|
||||
|
||||
@@ -96,10 +96,10 @@ public class AdminController {
|
||||
if(user.getLevel()>1){
|
||||
ok = "true";
|
||||
//管理员
|
||||
jsonObject.put("imgTotal", imgService.counts(null) ); //admin 站点图片数
|
||||
jsonObject.put("userTotal", userService.getUserTotal()); //admin 用户个数
|
||||
jsonObject.put("ViolationImgTotal", imgreview.getCount()); //admin 非法图片
|
||||
jsonObject.put("ViolationSwitch", isImgreviewOK==null?0:isImgreviewOK.getId()); //admin 非法图片开关
|
||||
jsonObject.put("imgTotal", imgService.counts(null) ); //站点图片数
|
||||
jsonObject.put("userTotal", userService.getUserTotal());
|
||||
jsonObject.put("ViolationImgTotal", imgreview.getCount()); //非法图片
|
||||
jsonObject.put("ViolationSwitch", isImgreviewOK==null?0:isImgreviewOK.getId()); //非法图片开关
|
||||
jsonObject.put("VisitorUpload", uploadConfig.getIsupdate());//是否禁用了游客上传
|
||||
jsonObject.put("VisitorMemory", SetFiles.readableFileSize(Long.valueOf(uploadConfig.getVisitormemory())));//访客共大小
|
||||
if(uploadConfig.getIsupdate()!=1){
|
||||
@@ -130,7 +130,6 @@ public class AdminController {
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "/SpaceExpansion")//new
|
||||
@ResponseBody
|
||||
public Msg SpaceExpansion(@RequestParam(value = "data", defaultValue = "") String data) {
|
||||
@@ -167,7 +166,6 @@ public class AdminController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getRecently")//new
|
||||
@ResponseBody
|
||||
public Msg getRecently(@RequestParam(value = "data", defaultValue = "") String data) {
|
||||
@@ -276,12 +274,12 @@ public class AdminController {
|
||||
JSONObject jsonObj = JSONObject.parseObject(data);
|
||||
Integer pageNum = jsonObj.getInteger("pageNum");
|
||||
Integer pageSize = jsonObj.getInteger("pageSize");
|
||||
String username = jsonObj.getString("username");
|
||||
Integer source = jsonObj.getInteger("source");
|
||||
String starttime = jsonObj.getString("starttime");
|
||||
String stoptime = jsonObj.getString("stoptime");
|
||||
String selectUserType = jsonObj.getString("selectUserType");//me/all
|
||||
String username = jsonObj.getString("username");
|
||||
Integer selecttype = jsonObj.getInteger("selecttype");
|
||||
String classifuids = jsonObj.getString("classifuids");
|
||||
boolean violation = jsonObj.getBoolean("violation");
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
if(starttime!=null){
|
||||
@@ -307,17 +305,18 @@ public class AdminController {
|
||||
if(violation){
|
||||
img.setViolation("true");
|
||||
}
|
||||
img.setUsername(username);
|
||||
img.setSource(source);
|
||||
img.setSelecttype(selecttype);
|
||||
img.setStarttime(starttime);
|
||||
img.setStoptime(stoptime);
|
||||
if(classifuids!=null){
|
||||
String[] calssif = classifuids.split(",");
|
||||
img.setClassifuidlist(calssif);
|
||||
}
|
||||
if(subject.hasRole("admin")){
|
||||
img.setUserid(null);
|
||||
img.setSource(source);
|
||||
if(selectUserType.equals("me")){
|
||||
img.setUserid(user.getId());
|
||||
img.setUsername(null);
|
||||
img.setSelecttype(null);
|
||||
}else{
|
||||
img.setUsername(username);
|
||||
img.setSelecttype(selecttype);
|
||||
}
|
||||
}else{
|
||||
//普通用户
|
||||
img.setUserid(user.getId());
|
||||
@@ -415,7 +414,6 @@ public class AdminController {
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/deleImages") //new
|
||||
@ResponseBody
|
||||
public Msg deleImages(@RequestParam(value = "data", defaultValue = "") String data) {
|
||||
@@ -466,7 +464,7 @@ public class AdminController {
|
||||
}else if (key.getStorageType() == 8) {
|
||||
isDele = uFileImageupload.delUFile(key.getId(), imgname);
|
||||
}else {
|
||||
System.err.println("未获取到对象存储参数,删除失败。");
|
||||
System.err.println("未获取到对象存储参数,删除失败");
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
@@ -493,7 +491,6 @@ public class AdminController {
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
//工具函数
|
||||
private static String getChinaes(int v){
|
||||
String ch = "";
|
||||
|
||||
@@ -62,7 +62,6 @@ public class AdminRootController {
|
||||
map.put("count", rolePageInfo.getTotal());
|
||||
map.put("users", rolePageInfo.getList());
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +252,6 @@ public class AdminRootController {
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getSettingConfig") //new
|
||||
@ResponseBody
|
||||
public Msg getSettingConfig(@RequestParam(value = "data", defaultValue = "") String data) {
|
||||
@@ -376,7 +374,6 @@ public class AdminRootController {
|
||||
EmailConfig emailConfig = JSON.toJavaObject(jsonObj,EmailConfig.class);
|
||||
if(null==emailConfig.getEmails() || null==emailConfig.getEmailkey() || null==emailConfig.getEmailurl()
|
||||
|| null==emailConfig.getPort() || null==emailConfig.getEmailname() || null==tomail){
|
||||
// if(jsonObj.size()==0){
|
||||
msg.setCode("110400");
|
||||
msg.setInfo("邮箱配置参数不能为空");
|
||||
}else{
|
||||
|
||||
@@ -84,38 +84,54 @@ public class IndexController {
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "/upload")//upimg new
|
||||
@PostMapping(value = "/upload")// new
|
||||
@ResponseBody
|
||||
public Msg upimg(HttpServletRequest request,HttpSession httpSession
|
||||
, @RequestParam(value = "file", required = false) MultipartFile multipartFile,Integer day,
|
||||
@RequestParam(value = "classifications", defaultValue = "" ) String classifications) {
|
||||
final JSONArray jsonArray = new JSONArray();
|
||||
if(!classifications.equals("")){
|
||||
String[] calssif = classifications.split(",");
|
||||
for (int i = 0; i < calssif.length; i++) {
|
||||
jsonArray.add(calssif[i]);
|
||||
}
|
||||
}
|
||||
return uploadServicel.uploadForLoc(request,multipartFile,day,null,jsonArray);
|
||||
, @RequestParam(value = "file", required = false) MultipartFile multipartFile,Integer day) {
|
||||
return uploadServicel.uploadForLoc(request,multipartFile,day,null);
|
||||
}
|
||||
|
||||
//根据网络图片url上传
|
||||
@PostMapping(value = "/uploadForUrl") //new
|
||||
@ResponseBody
|
||||
public Msg upurlimg(HttpServletRequest request,@RequestParam(value = "data", defaultValue = "") String data) {
|
||||
JSONObject jsonObj = JSONObject.parseObject(data);
|
||||
final JSONArray jsonArray = new JSONArray();
|
||||
Integer setday = jsonObj.getInteger("day");
|
||||
String imgUrl = jsonObj.getString("imgUrl");
|
||||
String selectTreeListStr = jsonObj.getString("classifications");
|
||||
if(null != selectTreeListStr){
|
||||
String[] calssif = selectTreeListStr.split(",");
|
||||
for (int i = 0; i < calssif.length; i++) {
|
||||
jsonArray.add(calssif[i]);
|
||||
String[] URLArr = imgUrl.split("\n");
|
||||
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
User user = (User) subject.getPrincipal();
|
||||
UploadConfig updateConfig = uploadConfigService.getUpdateConfig();
|
||||
int syscounts = 0;
|
||||
if(null==user){
|
||||
syscounts = updateConfig.getImgcounttourists();
|
||||
}else{
|
||||
syscounts = updateConfig.getImgcountuser();
|
||||
}
|
||||
Msg retMsg = new Msg();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONArray retArray = new JSONArray();
|
||||
int errcounts = 0;
|
||||
int excess = 0;
|
||||
for (int i = 0; i < URLArr.length; i++) {
|
||||
int temp = i+1;
|
||||
if(syscounts>=temp){
|
||||
Msg msg = uploadServicel.uploadForLoc(request, null, setday, URLArr[i]);
|
||||
if(!msg.getCode().equals("200")){
|
||||
errcounts++;
|
||||
}else{
|
||||
retArray.add(msg);
|
||||
}
|
||||
}else{
|
||||
excess++;
|
||||
}
|
||||
}
|
||||
return uploadServicel.uploadForLoc(request,null,setday,imgUrl,jsonArray);
|
||||
jsonObject.put("counts",URLArr.length);
|
||||
jsonObject.put("errcounts",errcounts);
|
||||
jsonObject.put("excess",excess);
|
||||
jsonObject.put("urls",retArray);
|
||||
retMsg.setData(jsonObject);
|
||||
return retMsg;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getUploadInfo")//new
|
||||
@@ -136,6 +152,8 @@ public class IndexController {
|
||||
}else{
|
||||
jsonObject.put("filesize",Integer.valueOf(updateConfig.getFilesizeuser())/1024);
|
||||
jsonObject.put("imgcount",updateConfig.getImgcountuser());
|
||||
jsonObject.put("uploadSwitch",updateConfig.getUserclose());
|
||||
jsonObject.put("uploadInfo","系统暂时关闭了用户上传功能");
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
@@ -144,7 +162,6 @@ public class IndexController {
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/checkStatus")
|
||||
@ResponseBody
|
||||
public Msg checkStatus(HttpServletRequest request) {
|
||||
@@ -182,13 +199,10 @@ public class IndexController {
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/verifyCode")
|
||||
public void verifyCode(HttpServletRequest request, HttpServletResponse response,HttpSession httpSession) {
|
||||
IVerifyCodeGen iVerifyCodeGen = new SimpleCharVerifyCodeGenImpl();
|
||||
try {
|
||||
//登录页面验证码
|
||||
VerifyCode verifyCode = iVerifyCodeGen.generate(80, 38);
|
||||
String code = verifyCode.getCode();
|
||||
String userIP = GetIPS.getIpAddr(request);
|
||||
@@ -243,7 +257,6 @@ public class IndexController {
|
||||
}
|
||||
}
|
||||
|
||||
//删除图像
|
||||
@PostMapping("/deleImagesByUid") //new
|
||||
@ResponseBody
|
||||
public Msg deleImagesByUid(@RequestParam(value = "data", defaultValue = "") String data) {
|
||||
@@ -308,8 +321,6 @@ public class IndexController {
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
//没有权限
|
||||
@RequestMapping("/authError")
|
||||
@ResponseBody
|
||||
public Msg authError(HttpServletRequest request){
|
||||
@@ -319,7 +330,6 @@ public class IndexController {
|
||||
return msg;
|
||||
}
|
||||
|
||||
//认证失败
|
||||
@RequestMapping("/jurisError")
|
||||
@ResponseBody
|
||||
public Msg jurisError(HttpServletRequest request){
|
||||
|
||||
@@ -39,8 +39,6 @@ public class UserController {
|
||||
@Autowired
|
||||
private SysConfigService sysConfigService;
|
||||
@Autowired
|
||||
private UserGroupService userGroupService;
|
||||
@Autowired
|
||||
IRedisService iRedisService;
|
||||
|
||||
@PostMapping("/register")
|
||||
|
||||
@@ -36,7 +36,7 @@ public interface ImgMapper {
|
||||
|
||||
Integer md5Count(Images images);
|
||||
|
||||
Images selectImgUrlByMD5(@Param("md5key") String md5key);
|
||||
List<Images> selectImgUrlByMD5(@Param("md5key") String md5key);
|
||||
|
||||
List<Images> RecentlyUploaded(@Param("userid") Integer userid);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public interface ImgService {
|
||||
|
||||
Integer md5Count(Images images);
|
||||
|
||||
Images selectImgUrlByMD5(String md5key);
|
||||
List<Images> selectImgUrlByMD5(String md5key);
|
||||
|
||||
List<Images> RecentlyUploaded(Integer userid);
|
||||
|
||||
|
||||
@@ -153,10 +153,10 @@ public class ClientService {
|
||||
imaOBJ.setMd5key(md5key);
|
||||
imaOBJ.setUserid(u.getId());
|
||||
if (imgMapper.md5Count(imaOBJ) > 0) {
|
||||
Images images = imgMapper.selectImgUrlByMD5(md5key);
|
||||
jsonObject.put("url", images.getImgurl());
|
||||
List<Images> images = imgMapper.selectImgUrlByMD5(md5key);
|
||||
jsonObject.put("url", images.get(0).getImgurl());
|
||||
jsonObject.put("name", file.getName());
|
||||
jsonObject.put("size", images.getSizes());
|
||||
jsonObject.put("size", images.get(0).getSizes());
|
||||
msg.setData(jsonObject);
|
||||
return msg;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ public class ImgServiceImpl implements ImgService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Images selectImgUrlByMD5(String md5key) {
|
||||
public List<Images> selectImgUrlByMD5(String md5key) {
|
||||
return imgMapper.selectImgUrlByMD5(md5key);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class UploadServicel {
|
||||
|
||||
|
||||
public Msg uploadForLoc(HttpServletRequest request,
|
||||
MultipartFile multipartFile, Integer setday, String imgUrl, JSONArray selectTreeList) {
|
||||
MultipartFile multipartFile, Integer setday, String imgUrl) {
|
||||
Msg msg = new Msg();
|
||||
try{
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
@@ -127,10 +127,10 @@ public class UploadServicel {
|
||||
imaOBJ.setMd5key(md5key);
|
||||
imaOBJ.setUserid(u==null?0:u.getId());
|
||||
if(imgMapper.md5Count(imaOBJ)>0){
|
||||
Images images = imgMapper.selectImgUrlByMD5(md5key);
|
||||
jsonObject.put("url", images.getImgurl());
|
||||
List<Images> images = imgMapper.selectImgUrlByMD5(md5key);
|
||||
jsonObject.put("url", images.get(0).getImgurl());
|
||||
jsonObject.put("name",file.getName());
|
||||
jsonObject.put("imguid",images.getImguid());
|
||||
jsonObject.put("imguid",images.get(0).getImguid());
|
||||
// jsonObject.put("shortLink",images.getShortlink());
|
||||
msg.setData(jsonObject);
|
||||
return msg;
|
||||
@@ -220,10 +220,10 @@ public class UploadServicel {
|
||||
//先判断是不是有效链接
|
||||
// final boolean valid = ImgUrlUtil.isValid(imgurl);
|
||||
if(true){
|
||||
Long imgsize = null;
|
||||
Long imgsize = 0L;
|
||||
try {
|
||||
imgsize = ImgUrlUtil.getFileLength(imgurl);
|
||||
if(imgsize>0){
|
||||
// imgsize = ImgUrlUtil.getFileLength(imgurl);
|
||||
if(imgsize==0){
|
||||
// String uuid= UUID.randomUUID().toString().replace("-", "");
|
||||
String ShortUID = SetText.getShortUuid();
|
||||
String savePath = request.getSession().getServletContext().getRealPath("/")+File.separator+"hellohaotmp"+File.separator;
|
||||
@@ -245,7 +245,7 @@ public class UploadServicel {
|
||||
msg.setCode("500");
|
||||
msg.setInfo("获取资源失败");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
msg.setCode("500");
|
||||
msg.setInfo("获取资源失败");
|
||||
}
|
||||
@@ -253,10 +253,10 @@ public class UploadServicel {
|
||||
msg.setCode("500");
|
||||
msg.setInfo("该链接无效");
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
public static Group group; //上传用户或游客的所属分组
|
||||
public static Long memory;//上传用户或者游客的分配容量 memory
|
||||
public static Long TotleMemory;//用户或者游客下可使用的总容量 //maxsize
|
||||
|
||||
@@ -90,12 +90,11 @@ public class ImgUrlUtil {
|
||||
* @param savePath
|
||||
* @throws IOException
|
||||
*/
|
||||
public static Map<String ,Object> downLoadFromUrl(String urlStr, String fileName, String savePath){
|
||||
public static Map<String ,Object> downLoadFromUrl(String urlStr,String fileName,String savePath){
|
||||
|
||||
Map<String ,Object> resmap = new HashMap<>();
|
||||
Map<String ,String> map = checkURLStatusCode(urlStr);
|
||||
if(map.get("Check").equals("false")){
|
||||
// StatusCode
|
||||
if(map.size()==0 || map.get("Check").equals("false")){
|
||||
resmap.put("res",false);
|
||||
resmap.put("StatusCode",map.get("StatusCode"));
|
||||
return resmap;
|
||||
@@ -135,6 +134,7 @@ public class ImgUrlUtil {
|
||||
f.renameTo(new File(imgPath));
|
||||
resmap.put("res",true);
|
||||
resmap.put("imgPath",imgPath);
|
||||
resmap.put("imgsize",new File(imgPath).length());
|
||||
}else{
|
||||
new File(saveDir+File.separator+fileName).delete();
|
||||
resmap.put("res",false);
|
||||
|
||||
@@ -37,20 +37,35 @@
|
||||
and
|
||||
a.updatetime <= #{stoptime}
|
||||
</if>
|
||||
|
||||
<if test="userid != null">
|
||||
<choose>
|
||||
<when test="selecttype != null">
|
||||
and
|
||||
a.userid not in (#{userid})
|
||||
</when>
|
||||
<otherwise>
|
||||
and
|
||||
a.userid = #{userid}
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="violation == 'true'">
|
||||
and
|
||||
a.violation !=""
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test="userid!=null and userid!=''">
|
||||
and
|
||||
a.userid = #{userid}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="username != null and username != ''">
|
||||
<choose>
|
||||
<when test="selecttype==1">
|
||||
and
|
||||
a.userid in ( SELECT id from `user` where username LIKE '%${username}%')
|
||||
</when>
|
||||
<otherwise>
|
||||
and
|
||||
a.userid not in ( SELECT id from `user` where username LIKE '%${username}%')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="imguid != null">
|
||||
and
|
||||
a.imguid = #{imguid}
|
||||
</if>
|
||||
|
||||
order by a.id desc
|
||||
</select>
|
||||
|
||||
@@ -40,7 +40,10 @@
|
||||
`usermemory` = #{usermemory},
|
||||
</if>
|
||||
<if test="blacklist != null">
|
||||
`blacklist` = #{blacklist}
|
||||
`blacklist` = #{blacklist},
|
||||
</if>
|
||||
<if test="userclose != null">
|
||||
`userclose` = #{userclose}
|
||||
</if>
|
||||
|
||||
</set>
|
||||
|
||||
Reference in New Issue
Block a user