Commit 431dd8a5 by 吴迪

【新增】修改接口

parent e5f4cfdf
...@@ -36,6 +36,8 @@ import io.office.common.utils.R; ...@@ -36,6 +36,8 @@ import io.office.common.utils.R;
public class NewsController extends AbstractController { public class NewsController extends AbstractController {
@Autowired @Autowired
private NewsService newsService; private NewsService newsService;
@Autowired
private NewsclassService newsclassService;
/** /**
* 列表 * 列表
...@@ -59,6 +61,16 @@ public class NewsController extends AbstractController { ...@@ -59,6 +61,16 @@ public class NewsController extends AbstractController {
NewsEntity news = newsService.getById(id); NewsEntity news = newsService.getById(id);
String name = this.newsService.selectClassName(news.getClassid()); String name = this.newsService.selectClassName(news.getClassid());
news.setClassName(name); news.setClassName(name);
//根据classid查询有没有父级id
NewsclassEntity newsclassEntity = newsclassService.getById(news.getClassid());
if(newsclassEntity!=null) {
if(newsclassEntity.getPId()!=null &&newsclassEntity.getPId()!=0) {
news.setClassid(newsclassEntity.getId());
news.setClassName(newsclassEntity.getName());
news.setCclassid(news.getClassid());
news.setClassName(news.getClassName());
}
}
return R.ok().put("news", news); return R.ok().put("news", news);
} }
......
...@@ -35,11 +35,13 @@ public class UserFunctionBindingController extends AbstractController { ...@@ -35,11 +35,13 @@ public class UserFunctionBindingController extends AbstractController {
*/ */
@RequestMapping("/authApi/find") @RequestMapping("/authApi/find")
public R find(){ public R find(){
Object[] functionids = null;
Integer id=getUserId().intValue(); Integer id=getUserId().intValue();
if(id==null){ if(id==null){
return R.error("用户信息有误"); //未登录
return R.ok().put("functionids", functionids);
} }
Object[] functionids = userFunctionBindingService.queryList(id); functionids = userFunctionBindingService.queryList(id);
return R.ok().put("functionids", functionids); return R.ok().put("functionids", functionids);
} }
/** /**
......
...@@ -101,6 +101,9 @@ public class NewsEntity implements Serializable { ...@@ -101,6 +101,9 @@ public class NewsEntity implements Serializable {
private Integer classid; private Integer classid;
@TableField(exist = false) @TableField(exist = false)
private Integer cclassid; private Integer cclassid;
@TableField(exist = false)
private String cclassName;
/** /**
* 出版时间 * 出版时间
*/ */
......
...@@ -3,6 +3,7 @@ package io.office.modules.manage.service.impl; ...@@ -3,6 +3,7 @@ package io.office.modules.manage.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.utils.R; import io.office.common.utils.R;
import io.office.modules.manage.dao.NewsclassDao;
import io.office.modules.manage.entity.*; import io.office.modules.manage.entity.*;
import io.office.modules.manage.entity.dto.NewsParams; import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.vo.response.SearchVo; import io.office.modules.manage.vo.response.SearchVo;
......
...@@ -503,11 +503,8 @@ public class TransferController { ...@@ -503,11 +503,8 @@ public class TransferController {
if (newsEntity.getContent().indexOf("LeaguerService.aspx") > -1) { if (newsEntity.getContent().indexOf("LeaguerService.aspx") > -1) {
newsEntityDB.setContent(newsEntity.getContent().replaceAll("LeaguerService.aspx", "Member")); newsEntityDB.setContent(newsEntity.getContent().replaceAll("LeaguerService.aspx", "Member"));
} }
} }
if (StringUtils.isNotBlank(newsEntity.getContent())) { if (StringUtils.isNotBlank(newsEntity.getContent())) {
// if (newsEntity.getContent().indexOf("<img src=\"/UserFiles/") > -1) {//官网的链接 // if (newsEntity.getContent().indexOf("<img src=\"/UserFiles/") > -1) {//官网的链接
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment