更多--修改--新增点赞信息添加未登录验证
This commit is contained in:
parent
870b096a25
commit
f21bbdae42
@ -1675,7 +1675,15 @@ public class AppSystemController extends BaseController {
|
||||
@Transactional
|
||||
public AjaxResult addLike(@PathVariable("workId") Long workId)
|
||||
{
|
||||
Long userId = getUserId();
|
||||
// 避免未登录点赞
|
||||
Long userId = null;
|
||||
try{
|
||||
userId = getUserId();
|
||||
}
|
||||
catch (Exception e){
|
||||
return error("请先登录");
|
||||
}
|
||||
|
||||
// 不支持重复点赞
|
||||
|
||||
// 新增点赞记录
|
||||
|
||||
Loading…
Reference in New Issue
Block a user