|
@@ -27,9 +27,11 @@ import com.zskk.shop.dao.entry.GoodAd;
|
|
|
import com.zskk.shop.dao.entry.GoodBase;
|
|
|
import com.zskk.shop.dao.entry.GoodDescribe;
|
|
|
import com.zskk.shop.dao.entry.GoodPrice;
|
|
|
+import com.zskk.shop.dao.entry.ShopConfig;
|
|
|
import com.zskk.shop.dao.entry.SysLabel;
|
|
|
import com.zskk.shop.service.BannerService;
|
|
|
import com.zskk.shop.service.GoodService;
|
|
|
+import com.zskk.shop.service.ShopConfigService;
|
|
|
import com.zskk.shop.service.SysLabelService;
|
|
|
import com.zskk.shop.service.TJCenterService;
|
|
|
|
|
@@ -49,6 +51,9 @@ public class H5IndexController extends AbstractController {
|
|
|
@Autowired
|
|
|
private BannerService bannerService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ShopConfigService shopConfigService;
|
|
|
+
|
|
|
@Value("${zskk.myhost}")
|
|
|
private String myhost;
|
|
|
|
|
@@ -63,10 +68,25 @@ public class H5IndexController extends AbstractController {
|
|
|
model.addAttribute("banners", banners);
|
|
|
search = search != null? search: "";
|
|
|
model.addAttribute("search", search);
|
|
|
+ ShopConfig picCheckLabelConfig = shopConfigService.getOnline(ShopConfigService.KEY_PIC_CHECK_LABEL);
|
|
|
+ model.addAttribute("picCheckLabel", picCheckLabelConfig != null? picCheckLabelConfig.getValue(): "");
|
|
|
|
|
|
return "/h5/indexv2";
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping("/search")
|
|
|
+ public String search(Model model, @RequestParam(name="search", required=false) String search, @RequestParam(name="label", required=false) Integer label){
|
|
|
+ List<GoodBean> beans = this.getGoodList(label, search);
|
|
|
+ List<SysLabel> labels = this.queryAllSysLabel();
|
|
|
+
|
|
|
+ model.addAttribute("beans", beans);
|
|
|
+ model.addAttribute("labels", labels);
|
|
|
+ search = search != null? search: "";
|
|
|
+ model.addAttribute("search", search);
|
|
|
+
|
|
|
+ return "/h5/search";
|
|
|
+ }
|
|
|
+
|
|
|
@RequestMapping("/detail/{gid}")
|
|
|
public String detail(Model model, @PathVariable("gid") Integer gid){
|
|
|
GoodBase base = goodService.queryOneGoodBase(gid);
|