mirror of
https://github.com/Hello-hao/Tbed.git
synced 2024-04-21 12:32:10 +00:00
:bug:修复部分场景下出现的错误
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user