Commit 565f89f6 authored by liwei's avatar liwei

新增了app端动态查询和话题查询接口

parent 12a2fbef
package org.rcisoft.app.appArticle.controller;
/*固定导入*/
import io.swagger.v3.oas.annotations.Operation;
import org.rcisoft.business.opmArticle.entity.OpmArticle;
import org.rcisoft.business.opmArticle.service.OpmArticleService;
import org.rcisoft.core.anno.CyOpeLogAnno;
import org.rcisoft.core.controller.CyPaginationController;
import org.rcisoft.core.model.CyGridModel;
import org.rcisoft.core.operlog.enums.CyLogTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
/**
* Created by cy on 2024年3月30日 下午1:51:15.
*/
@RestController
@RequestMapping("/app")
public class AppOpmArticleController extends CyPaginationController<OpmArticle> {
@Autowired
private OpmArticleService opmArticleServiceImpl;
/**
* 动态-动态列表
*/
@PreAuthorize("@cyPerm.hasPerm('app:article:list')")
@CyOpeLogAnno(title = "system-动态管理-查询动态列表", businessType = CyLogTypeEnum.QUERY)
@Operation(summary="分页查询动态列表集合", description="分页查询动态列表集合")
@GetMapping(value = "/open/opmArticle/queryArticleByPagination")
public CyGridModel listByPagination(OpmArticle opmArticle) {
opmArticleServiceImpl.findAllByPagination(getPaginationUtility(), opmArticle);
return getGridModelResponse();
}
}
......@@ -4,14 +4,11 @@ package org.rcisoft.app.appOpmTopic.controller;
/*固定导入*/
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import org.rcisoft.business.opmTopic.entity.OpmTopic;
import org.rcisoft.business.opmTopic.service.OpmTopicService;
import org.rcisoft.core.anno.CyOpeLogAnno;
import org.rcisoft.core.constant.CyMessCons;
import org.rcisoft.core.controller.CyPaginationController;
import org.rcisoft.core.model.CyGridModel;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.operlog.enums.CyLogTypeEnum;
import org.rcisoft.core.result.CyResult;
......@@ -20,30 +17,26 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
/**
* @author cy
* @date 2024年3月25日 下午1:42:40
*/
@RestController
@RequestMapping("/app")
public class AppOpmTopicController extends CyPaginationController<OpmTopic> {
public class appOpmTopicController extends CyPaginationController<OpmTopic> {
@Autowired
private OpmTopicService opmTopicServiceImpl;
@PreAuthorize("@cyPerm.hasPerm('app:topic:detial')")
@CyOpeLogAnno(title = "system-公告管理-查询公告", businessType = CyLogTypeEnum.QUERY)
@Operation(summary = "查询单一公告", description = "查询单一公告")
@Parameters({@Parameter(name = "businessId", description = "businessId", required = true)})
@GetMapping("/open/opmTopic/detail/{businessId:\\w+}")
public CyResult detail(@PathVariable Integer businessId) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
opmTopicServiceImpl.findById(businessId));
}
@PreAuthorize("@cyPerm.hasPerm('app:topic:query')")
@CyOpeLogAnno(title = "system-话题管理-查询话题", businessType = CyLogTypeEnum.QUERY)
@Operation(summary = "分页查询话题集合", description = "分页查询话题集合")
@GetMapping(value = "/open/opmTopic/queryOpmTopicByPagination")
public CyGridModel listByPagination(OpmTopic opmTopic) {
opmTopicServiceImpl.findAllByPagination(getPaginationUtility(), opmTopic);
return getGridModelResponse();
@Operation(summary = "查询话题集合", description = "查询话题集合")
@GetMapping(value = "/open/opmTopic/queryAllOpmTopic")
public CyResult queryAllTopicList(OpmTopic opmTopic) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
opmTopicServiceImpl.findAll(opmTopic));
}
}
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