|
|
@@ -954,22 +954,23 @@ public class TsfGoodsController extends TsfBaseController {
|
|
|
Goods goods = new Goods();
|
|
|
|
|
|
String ckGoodsCds = GagaCookieUtil.getCookie(TsfSession.getHttpServletRequest(), TsfConstants.CK_PREFIX + "_today_goodsCd");
|
|
|
- String[] arrGoodsCds = ckGoodsCds.split("\\,");
|
|
|
- StringBuilder sql = new StringBuilder();
|
|
|
- if (arrGoodsCds.length > 0) {
|
|
|
- int idx = 1;
|
|
|
- for (String goodsCd : arrGoodsCds) {
|
|
|
- if (!StringUtils.isBlank(goodsCd)) {
|
|
|
- if (idx > 1) {
|
|
|
- sql.append("UNION ALL ");
|
|
|
+ if (StringUtils.isNotBlank(ckGoodsCds)) {
|
|
|
+ String[] arrGoodsCds = ckGoodsCds.split("\\,");
|
|
|
+ StringBuilder sql = new StringBuilder();
|
|
|
+ if (arrGoodsCds.length > 0) {
|
|
|
+ int idx = 1;
|
|
|
+ for (String goodsCd : arrGoodsCds) {
|
|
|
+ if (!StringUtils.isBlank(goodsCd)) {
|
|
|
+ if (idx > 1) {
|
|
|
+ sql.append("UNION ALL ");
|
|
|
+ }
|
|
|
+ sql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
|
|
|
}
|
|
|
- sql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
|
|
|
}
|
|
|
+ goods.setTodayGoodsSql(sql.toString());
|
|
|
+ recentlyGoodsList = goodsService.getRecentlyGoodsList(goods);
|
|
|
}
|
|
|
- goods.setTodayGoodsSql(sql.toString());
|
|
|
- recentlyGoodsList = goodsService.getRecentlyGoodsList(goods);
|
|
|
}
|
|
|
-
|
|
|
return recentlyGoodsList;
|
|
|
}
|
|
|
|