|
@@ -1,8 +1,5 @@
|
|
|
package com.ym.mec.cms.controller;
|
|
|
|
|
|
-import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
-import com.ym.mec.auth.api.entity.SysUser;
|
|
|
-
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -19,10 +16,13 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
+import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.cms.controller.queryinfo.NewsInformationQueryInfo;
|
|
|
import com.ym.mec.cms.dal.dao.SysNewsInformationDao;
|
|
|
import com.ym.mec.cms.dal.entity.SysNewsInformation;
|
|
|
import com.ym.mec.cms.service.SysNewsInformationService;
|
|
|
+import com.ym.mec.cms.service.SysNewsTypeService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.yonge.log.model.AuditLogAnnotation;
|
|
@@ -36,6 +36,9 @@ public class NewsController extends BaseController {
|
|
|
private SysNewsInformationService sysNewsInformationService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private SysNewsTypeService sysNewsTypeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private SysNewsInformationDao sysNewsInformationDao;
|
|
|
|
|
|
@Autowired
|
|
@@ -57,6 +60,12 @@ public class NewsController extends BaseController {
|
|
|
return succeed(sysNewsInformationService.queryPage(queryInfo));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("资讯类型列表查询")
|
|
|
+ @GetMapping(value = "/typeList")
|
|
|
+ public Object getTypeList(Integer parentId) {
|
|
|
+ return succeed(sysNewsTypeService.queryByParentId(parentId));
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("资讯列表分页查询")
|
|
|
@GetMapping(value = "/homeList")
|
|
|
public Object getHomeList(NewsInformationQueryInfo queryInfo) {
|
|
@@ -70,7 +79,7 @@ public class NewsController extends BaseController {
|
|
|
@GetMapping(value = "/query")
|
|
|
public Object query(Long id) {
|
|
|
|
|
|
- return succeed(sysNewsInformationService.get(id));
|
|
|
+ return succeed(sysNewsInformationService.queryById(id));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("新增资讯")
|