Authored by hugufei

拼团列表增加返回字段

... ... @@ -55,9 +55,13 @@ public class CollageActivityIndexBaseService extends BaseService {
private Map<String, Object> getCollageActivityInfo(Map<String, Object> esMap) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("activity_id", MapUtils.getIntValue(esMap, "activityId", 0));
map.put("people_num", MapUtils.getIntValue(esMap, "peopleNum", 0));
map.put("begin_time", MapUtils.getIntValue(esMap, "beginTime", 0));
map.put("end_time", MapUtils.getIntValue(esMap, "endTime", 0));
map.put("people_num", MapUtils.getIntValue(esMap, "peopleNum", 0));
map.put("join_limit", MapUtils.getIntValue(esMap, "joinLimit", 0));
map.put("open_limit", MapUtils.getIntValue(esMap, "openLimit", 0));
map.put("product_limit", MapUtils.getIntValue(esMap, "productLimit", 0));
map.put("pay_limit", MapUtils.getIntValue(esMap, "payLimit", 0));
return map;
}
... ...
... ... @@ -32,18 +32,19 @@ public class CollageProductIndexBaseService {
Integer activity_id = MapUtils.getIntValue(esMap, "activityId", 0);
map.put("activity_id", activity_id);
map.put("collage_price", MapUtils.getDoubleValue(esMap, "collagePrice", 0));
map.put("activity_begin_time", 0);
map.put("activity_end_time", 0);
Map<String, Object> activityInfo = validateActivitys.get(activity_id);
if (activityInfo != null) {
map.put("activity_begin_time", MapUtils.getIntValue(activityInfo, "begin_time", 0));
map.put("activity_end_time", MapUtils.getIntValue(activityInfo, "end_time", 0));
}else{
map.put("activity_begin_time", 0);
map.put("activity_end_time", 0);
}
return map;
}
/**
* 根据参数查询正在生效的活动信息
* 查询砍价商品信息
*
* @return
*/
... ...
... ... @@ -170,11 +170,19 @@ public class CollagePageService extends AbstractPageSceneService {
productIterator.remove();
continue;
}
//from activityInfo
product.put("activity_id", activityId);
product.put("people_num", MapUtils.getIntValue(activityInfo, "people_num", 0));
product.put("join_limit", MapUtils.getIntValue(activityInfo, "join_limit", 0));
product.put("open_limit", MapUtils.getIntValue(activityInfo, "open_limit", 0));
product.put("product_limit", MapUtils.getIntValue(activityInfo, "product_limit", 0));
product.put("pay_limit", MapUtils.getIntValue(activityInfo, "pay_limit", 0));
//from collageProductInfo
product.put("collage_price", MapUtils.getDoubleValue(collageProductInfo, "collage_price", 0));
product.put("activity_begin_time", MapUtils.getLongValue(collageProductInfo, "activity_begin_time", 0));
product.put("activity_end_time", MapUtils.getLongValue(collageProductInfo, "activity_end_time", 0));
}
//10.构造返回结果
... ...