|
@@ -1,10 +1,10 @@
|
|
|
package com.jeeplus.modules.api.hpslide;
|
|
package com.jeeplus.modules.api.hpslide;
|
|
|
|
|
|
|
|
-import com.google.common.collect.Lists;
|
|
|
|
|
-import com.jeeplus.common.config.Global;
|
|
|
|
|
import com.jeeplus.modules.api.sys.BaseAppController;
|
|
import com.jeeplus.modules.api.sys.BaseAppController;
|
|
|
|
|
+import com.jeeplus.modules.hpadvertisement.service.HpAdvBannerService;
|
|
|
import com.jeeplus.modules.utils.ErrorCode;
|
|
import com.jeeplus.modules.utils.ErrorCode;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
@@ -15,17 +15,15 @@ import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@Api(value = "开心工作轮播图相关API", description = "岗位请求")
|
|
@Api(value = "开心工作轮播图相关API", description = "岗位请求")
|
|
|
@Controller
|
|
@Controller
|
|
|
@RequestMapping("${frontPath}/api/slide")
|
|
@RequestMapping("${frontPath}/api/slide")
|
|
|
public class HpSlideControllerAPI extends BaseAppController {
|
|
public class HpSlideControllerAPI extends BaseAppController {
|
|
|
- private static final String BANNER1 = "/uploadfiles/banner/banner1/banner1.jpg";
|
|
|
|
|
- private static final String BANNER2 = "/uploadfiles/banner/banner2/banner2.jpg";
|
|
|
|
|
- private static final String BANNER3 = "/uploadfiles/banner/banner3/banner3.jpg";
|
|
|
|
|
- private static final String BANNER4 = "/uploadfiles/banner/banner4/banner4.jpg";
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private HpAdvBannerService hpAdvBannerService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 首页banner
|
|
* 首页banner
|
|
@@ -41,12 +39,7 @@ public class HpSlideControllerAPI extends BaseAppController {
|
|
|
Map<String, String> requestMap = findRequestMap(request);
|
|
Map<String, String> requestMap = findRequestMap(request);
|
|
|
Map<String, Object> obj = null;
|
|
Map<String, Object> obj = null;
|
|
|
try {
|
|
try {
|
|
|
- List list = Lists.newArrayList();
|
|
|
|
|
- list.add(Global.getAliyunUrl() + BANNER1);
|
|
|
|
|
- list.add(Global.getAliyunUrl() + BANNER2);
|
|
|
|
|
- list.add(Global.getAliyunUrl() + BANNER3);
|
|
|
|
|
- list.add(Global.getAliyunUrl() + BANNER4);
|
|
|
|
|
- returnMap.put("bannerList", list);
|
|
|
|
|
|
|
+ returnMap = hpAdvBannerService.findBannerList(requestMap);
|
|
|
obj = successResult(ErrorCode.code_1000, "", returnMap);
|
|
obj = successResult(ErrorCode.code_1000, "", returnMap);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
System.out.println("Exception e:" + e);
|
|
System.out.println("Exception e:" + e);
|