init
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.app.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.PageDomain;
|
||||
import com.ruoyi.common.core.page.TableSupport;
|
||||
import com.ruoyi.office.domain.TtArticles;
|
||||
import com.ruoyi.office.service.ITtArticlesService;
|
||||
import com.ruoyi.office.service.ITtProjectInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* app非权限信息接口
|
||||
* qs
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/open/article")
|
||||
public class AppOpenController extends BaseController {
|
||||
@Autowired
|
||||
private ITtArticlesService ttArticlesService;
|
||||
@Autowired
|
||||
private ITtProjectInfoService ttProjectInfoService;
|
||||
|
||||
@GetMapping("/lastUpdate")
|
||||
public AjaxResult lastUpdate() {
|
||||
startPage();
|
||||
return success(ttArticlesService.lastUpdateList(""));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
public AjaxResult page(String searchKey) {
|
||||
startPage();
|
||||
return success(getDataTable(ttArticlesService.lastUpdateList(searchKey)));
|
||||
}
|
||||
|
||||
@GetMapping("/projectPage")
|
||||
public AjaxResult projectPage(String searchKey) {
|
||||
startPage();
|
||||
return success(getDataTable(ttProjectInfoService.lastUpdateList(searchKey)));
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
public AjaxResult detail(Integer id) {
|
||||
return success(ttArticlesService.selectTtArticlesById(id));
|
||||
}
|
||||
|
||||
@GetMapping("/views")
|
||||
public void views(Integer id) {
|
||||
TtArticles ttArticles = ttArticlesService.selectTtArticlesById(id);
|
||||
ttArticles.setViews(ttArticles.getViews() + 1);
|
||||
ttArticlesService.updateTtArticles(ttArticles);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.app.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.office.domain.TtCarousel;
|
||||
import com.ruoyi.office.service.ITtCarouselService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/app/sys")
|
||||
public class AppSysController extends BaseController {
|
||||
@Autowired
|
||||
private ITtCarouselService carouselService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list()
|
||||
{
|
||||
return success(carouselService.selectTtCarouselList(new TtCarousel()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user