|
@@ -1,11 +1,14 @@
|
|
|
package com.kxs.system.biz.controller.kxsapp;
|
|
package com.kxs.system.biz.controller.kxsapp;
|
|
|
|
|
|
|
|
|
|
+import com.kxs.common.core.constant.CacheConstants;
|
|
|
import com.kxs.common.core.util.R;
|
|
import com.kxs.common.core.util.R;
|
|
|
import com.kxs.system.api.vo.kxsapp.banner.BannerListVO;
|
|
import com.kxs.system.api.vo.kxsapp.banner.BannerListVO;
|
|
|
import com.kxs.system.biz.service.KxsBannerService;
|
|
import com.kxs.system.biz.service.KxsBannerService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
+import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -27,14 +30,15 @@ public class BannerController {
|
|
|
private final KxsBannerService kxsBannerService;
|
|
private final KxsBannerService kxsBannerService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 广告-广告管理
|
|
|
|
|
|
|
+ * 首页-广告管理
|
|
|
*
|
|
*
|
|
|
- * @return 广告-广告管理
|
|
|
|
|
|
|
+ * @return 首页-广告管理
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping("/list")
|
|
|
|
|
- public R<List<BannerListVO>> list() {
|
|
|
|
|
|
|
+ @GetMapping("/home")
|
|
|
|
|
+// @Cacheable(value = CacheConstants.BANNER_LIST, key = "#colId", unless = "#result.data.isEmpty()")
|
|
|
|
|
+ public R<List<BannerListVO>> home(@RequestParam("colId") String colId) {
|
|
|
|
|
|
|
|
- return R.ok(kxsBannerService.getBylist());
|
|
|
|
|
|
|
+ return R.ok(kxsBannerService.homeData(colId));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|