mirror of
https://github.com/Hello-hao/Tbed.git
synced 2024-04-21 12:32:10 +00:00
:art:完善新功能
This commit is contained in:
@@ -473,7 +473,7 @@ public class AdminController {
|
||||
try {
|
||||
imgTempService.delImgAndExp(image.getImguid());
|
||||
imgService.deleimg(imgid);
|
||||
imgAndAlbumService.deleteImgAndAlbum(imgname);
|
||||
imgAndAlbumService.deleteImgAndAlbum(image.getImgurl());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
msg.setInfo("图片记录删除失败,请重试");
|
||||
@@ -484,7 +484,7 @@ public class AdminController {
|
||||
}else{
|
||||
imgTempService.delImgAndExp(image.getImguid());
|
||||
imgService.deleimg(imgid);
|
||||
imgAndAlbumService.deleteImgAndAlbum(imgname);
|
||||
imgAndAlbumService.deleteImgAndAlbum(image.getImgurl());
|
||||
msg.setInfo("图片记录已删除,但是图片源删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,25 @@ public class AlbumController {
|
||||
|
||||
}
|
||||
|
||||
//后台列表要修改时的查询表单
|
||||
@PostMapping("/admin/getAlbumListForKey") //new
|
||||
@ResponseBody
|
||||
public Msg getAlbumListForKey(@RequestParam(value = "data", defaultValue = "") String data){
|
||||
Msg msg = new Msg();
|
||||
try{
|
||||
JSONObject jsonObject = JSONObject.parseObject(data);
|
||||
String key = jsonObject.getString("key");
|
||||
List<Images> imagesList = imgAndAlbumService.selectImgForAlbumkey(key);
|
||||
msg.setData(imagesList);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
msg.setCode("500");
|
||||
msg.setInfo("获取画廊数据错误");
|
||||
}
|
||||
return msg;
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/getAlbumImgList") //new
|
||||
@ResponseBody
|
||||
public Msg getAlbumImgList(@RequestParam("data") String data) {
|
||||
|
||||
@@ -300,7 +300,7 @@ public class IndexController {
|
||||
//删除库
|
||||
if(isDele){
|
||||
try {
|
||||
imgAndAlbumService.deleteImgAndAlbum(imgname);
|
||||
imgAndAlbumService.deleteImgAndAlbum(image.getImgurl());
|
||||
imgTempService.delImgAndExp(image.getImguid());
|
||||
imgService.deleimg(image.getId());
|
||||
} catch (Exception e) {
|
||||
@@ -311,7 +311,7 @@ public class IndexController {
|
||||
}
|
||||
msg.setInfo("删除成功");
|
||||
}else{
|
||||
imgAndAlbumService.deleteImgAndAlbum(imgname);
|
||||
imgAndAlbumService.deleteImgAndAlbum(image.getImgurl());
|
||||
imgTempService.delImgAndExp(image.getImguid());
|
||||
imgService.deleimg(image.getId());
|
||||
msg.setInfo("图片记录已删除,但是图片源删除失败");
|
||||
|
||||
Reference in New Issue
Block a user