Authored by LUOXC

Merge branch 'test6.9.13' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.13

... ... @@ -11,6 +11,7 @@ public interface SaleCategoryMapper {
SaleCategory selectByPrimaryKey(Integer id);
List<SaleCategory> selectValid();
List<SaleCategory> selectXianyuLevel1();
List<SaleCategory> selectByPidList(@Param("pidList") List<Integer> pidList);
}
\ No newline at end of file
... ...
... ... @@ -30,6 +30,13 @@
from sale_category where status=0 and level=1
order by order_by desc
</select>
<select id="selectXianyuLevel1" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sale_category where status=0 and level=1 and show_in_xianyu='show'
order by order_by desc
</select>
<select id="selectByPidList" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
... ...
... ... @@ -105,6 +105,7 @@ public class DepositServiceImpl implements DepositService {
@Autowired
private AppraiseOrderMapper appraiseOrderMapper;
@Autowired
private ConfigReader configReader;
... ...
... ... @@ -22,9 +22,6 @@ public class GuessLikeResourceParse implements IResourceParse {
public static final String TEMPLATE_NAME="guessLike";
@javax.annotation.Resource
private MakeUrlService makeUrlService;
@Override
public Serializable parse(Resource resource) {
try {
... ... @@ -46,11 +43,29 @@ public class GuessLikeResourceParse implements IResourceParse {
JSONObject list = data.getJSONObject("data").getJSONObject("list");
for (String key : list.keySet()) {
JSONObject value = list.getJSONObject(key);
// 用query的json 代替原来的k=1&v=2
value.put("query",getQueryArray(value.getString("query")));
value.put("tab_name", value.getString("tab_name"));
value.put("url", makeUrlService.makeUrl(value.getJSONObject("url"), resource.getClientType()));
}
return data;
}
private JSONArray getQueryArray(String queryParam) {
if (StringUtils.isBlank(queryParam)){
return new JSONArray();
}
JSONArray queryArray = new JSONArray();
// k1=v1&k2=v2
String[] kys = queryParam.split("&");
for (String ky : kys){
JSONObject queryObj = new JSONObject();
String[] kvItem = ky.split("=");
queryObj.put(kvItem[0], kvItem[1]);
queryArray.add(queryObj);
}
return queryArray;
}
}
... ...
package com.yohoufo.resource.service.impl.resource;
import com.alibaba.fastjson.JSONObject;
import com.yohoufo.resource.helper.MakeUrlService;
import com.yohoufo.resource.service.IResourceParse;
import com.yohoufo.resource.service.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yohoufo.resource.service.IResourceParse;
import com.yohoufo.resource.helper.MakeUrlService;
import com.yohoufo.resource.service.Resource;
... ...