This commit is contained in:
sjm 2023-12-27 19:19:28 +08:00
parent b693354748
commit 79c3d2bff8
3 changed files with 19 additions and 1 deletions

View File

@ -131,4 +131,19 @@ public class UrlListController {
return map;
}
@RequestMapping("/admin/weblist/update")
public HashMap<String, Object> Update(UrlList urlList){
int x = urlListService.update(urlList);
HashMap<String, Object> result = new HashMap<>();
if(x == 1){
result.put("code", 200);
result.put("msg", "更新成功");
return result;
}else{
result.put("code", 500);
result.put("msg", "更新失败");
return result;
}
}
}

View File

@ -25,4 +25,7 @@ public interface UrlListService {
public List<UrlList> latestEight();
public int update(UrlList urlList);
}

View File

@ -109,6 +109,6 @@ public class UrlLiserServiceImpl implements UrlListService {
public List<UrlList> latestEight(){return urlListDao.latestEight(); }
public int update(UrlList urlList){return urlListDao.updateByPrimaryKeySelective(urlList);}
}