返回分类标签

This commit is contained in:
cyk 2023-12-24 16:08:48 +08:00
parent 7351b4c19f
commit 6268a5c374
3 changed files with 32 additions and 0 deletions

View File

@ -583,4 +583,29 @@ public class UrlAndCateController {
return JSONObject.toJSONString(result);
}
@RequestMapping("/insertCateByUser")
public String disposeBookmarkToJsonByUserId(UrlCateList urlCateList)
{
int flag = 0;
Date date = new Date();
urlCateList.setCreatetime(date.getTime());
urlCateList.setUrlNumber(Long.valueOf(0));
urlCateList.setRootCateId(0);
HashMap<String, Object> result = new HashMap<>();
flag = urlCateListService.insertSelective(urlCateList);
if(flag == 1)
{
result.put("code", 200);
result.put("msg", "处理成功");
result.put("data", result);
}else{
result.put("code", 500);
result.put("msg", "处理失败");
result.put("data", result);
}
return JSONObject.toJSONString(result);
}
}

View File

@ -17,4 +17,6 @@ public interface UrlCateListService {
public String selectUrListCateByUrlCateId(Integer cateId);
public UrlCateList selectByPrimaryKey(Integer id);
public int insertSelective(UrlCateList urlCateList);
}

View File

@ -62,6 +62,11 @@ public class UrlCateListServiceImpl implements UrlCateListService {
return urlCateListDao.selectUrListCateByUrlCateId(cateId);
}
public int insertSelective(UrlCateList urlCateList)
{
return urlCateListDao.insertSelective(urlCateList);
}
public UrlCateList selectByPrimaryKey(Integer id)
{
return urlCateListDao.selectByPrimaryKey(id);