|
|
|
@ -74,58 +74,35 @@ public class CmsContentController { |
|
|
|
|
|
|
|
|
|
List<JdGoodsModel> goodsMsgs = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
if ( cmsContent.getShowType() != null && cmsContent.getShowType() == 1) { |
|
|
|
|
|
|
|
|
|
if (cmsContent.getAutomatic() == 1) { |
|
|
|
|
goodsMap.put("goodsType", cmsContent.getShowDataId()); |
|
|
|
|
if (cmsContent.getShowDataId() != null) { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId()); |
|
|
|
|
goodsMap.put("automaticCode" , cmsContent.getId()); |
|
|
|
|
} |
|
|
|
|
goodsMap.put("limit" , 2); |
|
|
|
|
goodsMsgs = goodsMsgService.getListCrest(goodsMap); |
|
|
|
|
} |
|
|
|
|
if (cmsContent.getShowType() != null && cmsContent.getShowType() == 2) { |
|
|
|
|
if (cmsContent.getAutomatic() == 1) { |
|
|
|
|
goodsMap.put("goodsType", cmsContent.getShowDataId()); |
|
|
|
|
if (cmsContent.getShowDataId() != null) { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId()); |
|
|
|
|
goodsMap.put("automaticCode" , cmsContent.getId()); |
|
|
|
|
} |
|
|
|
|
goodsMap.put("limit" , 4); |
|
|
|
|
goodsMap.put("saleNum" , 2); |
|
|
|
|
|
|
|
|
|
goodsMsgs = goodsMsgService.getListCrest(goodsMap); |
|
|
|
|
} |
|
|
|
|
if (cmsContent.getShowType() != null && cmsContent.getShowType() == 3) { |
|
|
|
|
if (cmsContent.getAutomatic() == 1) { |
|
|
|
|
goodsMap.put("goodsType", cmsContent.getShowDataId()); |
|
|
|
|
if (cmsContent.getShowDataId() != null) { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId()); |
|
|
|
|
goodsMap.put("automaticCode" , cmsContent.getId()); |
|
|
|
|
} |
|
|
|
|
goodsMap.put("limit" , 10); |
|
|
|
|
goodsMap.put("type" , 1); |
|
|
|
|
goodsMsgs = goodsMsgService.getListCrest(goodsMap); |
|
|
|
|
} |
|
|
|
|
if (cmsContent.getAutomatic() == 1) { |
|
|
|
|
goodsMap.put("goodsType", cmsContent.getShowDataId()); |
|
|
|
|
if (cmsContent.getShowDataId() != null) { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId()); |
|
|
|
|
goodsMap.put("automaticCode" , cmsContent.getId()); |
|
|
|
|
if (cmsContent.getAutomatic() == 1) { |
|
|
|
|
goodsMap.put("goodsType", cmsContent.getShowDataId()); |
|
|
|
|
if (cmsContent.getShowDataId() != null) { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId()); |
|
|
|
|
goodsMap.put("automaticCode" , cmsContent.getId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ( cmsContent.getShowType() != null && cmsContent.getShowType() == 1) { |
|
|
|
|
|
|
|
|
|
goodsMap.put("limit" , 2); |
|
|
|
|
goodsMsgs = goodsMsgService.getListCrest(goodsMap); |
|
|
|
|
} |
|
|
|
|
if (cmsContent.getShowType() != null && cmsContent.getShowType() == 2) { |
|
|
|
|
|
|
|
|
|
goodsMap.put("limit" , 4); |
|
|
|
|
goodsMap.put("saleNum" , 2); |
|
|
|
|
|
|
|
|
|
goodsMsgs = goodsMsgService.getListCrest(goodsMap); |
|
|
|
|
} |
|
|
|
|
if (cmsContent.getShowType() != null && cmsContent.getShowType() == 3) { |
|
|
|
|
|
|
|
|
|
goodsMap.put("limit" , 10); |
|
|
|
|
goodsMap.put("type" , 1); |
|
|
|
|
goodsMsgs = goodsMsgService.getListCrest(goodsMap); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
goodsModels.addAll(goodsMsgs); |
|
|
|
|
|
|
|
|
|