|
@@ -348,17 +348,14 @@ public class CmBaikeProductController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "recommend/form")
|
|
|
public String recommendForm(CmBaikeProduct cmBaikeProduct, Model model) {
|
|
|
- List<CmBaikeProductRecommend> manualRecommendList = new ArrayList<>();
|
|
|
- List<CmBaikeProductRecommend> autoRecommendList;
|
|
|
CmBaikeProductRecommend recommend = new CmBaikeProductRecommend();
|
|
|
recommend.setProductId(Integer.parseInt(cmBaikeProduct.getId()));
|
|
|
recommend.setRecommendType(cmBaikeProduct.getRecommendType());
|
|
|
recommend.setProductTypeId(cmBaikeProduct.getTypeId());
|
|
|
- // 查询推荐列表
|
|
|
- if (1 == cmBaikeProduct.getRecommendType()) {
|
|
|
- manualRecommendList = cmBaikeProductRecommendDao.findList(recommend);
|
|
|
- }
|
|
|
- autoRecommendList = cmBaikeProductRecommendDao.findAutoRecommendList(recommend);
|
|
|
+ // 手动推荐列表
|
|
|
+ List<CmBaikeProductRecommend> manualRecommendList = cmBaikeProductRecommendDao.findList(recommend);
|
|
|
+ // 自动推荐
|
|
|
+ List<CmBaikeProductRecommend> autoRecommendList = cmBaikeProductRecommendDao.findAutoRecommendList(recommend);
|
|
|
// 商品类型
|
|
|
String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
|
|
|
model.addAttribute("commodityType", commodityType);
|
|
@@ -383,6 +380,7 @@ public class CmBaikeProductController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping("/recommend/products")
|
|
|
public String findProductPage(CmBaikeProduct cmBaikeProduct, Model model, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ cmBaikeProduct.setPublishSource(1);
|
|
|
Page<CmBaikeProduct> page = cmBaikeProductService.findPage(new Page<CmBaikeProduct>(request, response), cmBaikeProduct);
|
|
|
model.addAttribute("page", page);
|
|
|
// 商品类型
|