You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.1 KiB
33 lines
1.1 KiB
|
3 years ago
|
package com.cyl.h5.controller;
|
||
|
|
|
||
|
|
import com.cyl.h5.pojo.vo.HomeConfigVO;
|
||
|
|
import com.cyl.pms.service.ProductCategoryService;
|
||
|
|
import com.ruoyi.system.service.ISysConfigService;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.http.ResponseEntity;
|
||
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/no-auth/home")
|
||
|
|
public class HomeController {
|
||
|
|
@Autowired
|
||
|
|
private ISysConfigService sysConfigService;
|
||
|
|
@Autowired
|
||
|
|
private ProductCategoryService categoryService;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 首页配置
|
||
|
|
*
|
||
|
|
* @return 首页配置
|
||
|
|
*/
|
||
|
|
@GetMapping("/home-cfg")
|
||
|
|
public ResponseEntity<HomeConfigVO> getHomeConfig() {
|
||
|
|
HomeConfigVO res = new HomeConfigVO();
|
||
|
|
res.setBanners(sysConfigService.selectConfigByKey("h5.home.banner"));
|
||
|
|
res.setCategoryList(categoryService.queryCategoryWithProductsForH5());
|
||
|
|
return ResponseEntity.ok(res);
|
||
|
|
}
|
||
|
|
}
|