|
@@ -80,15 +80,16 @@ public class CmsChannelPopularizeController {
|
|
|
public Result<List<ChannelPopularizeDetailView>> getById(@PathVariable Long id, String startTime, String endTime){
|
|
public Result<List<ChannelPopularizeDetailView>> getById(@PathVariable Long id, String startTime, String endTime){
|
|
|
String timeSql = StringUtils.EMPTY;
|
|
String timeSql = StringUtils.EMPTY;
|
|
|
if(StringUtils.isNotBlank(startTime)){
|
|
if(StringUtils.isNotBlank(startTime)){
|
|
|
- timeSql += " and o.created_time >= " + startTime;
|
|
|
|
|
|
|
+ timeSql += " o.created_time >= '" + startTime + "'";
|
|
|
}
|
|
}
|
|
|
if(StringUtils.isNotBlank(endTime)){
|
|
if(StringUtils.isNotBlank(endTime)){
|
|
|
- timeSql += " and o.created_time <= " + endTime;
|
|
|
|
|
|
|
+ timeSql += " and o.created_time <= '" + endTime + "'";
|
|
|
}
|
|
}
|
|
|
List<ChannelPopularizeDetailView> result = beanSearcher.searchAll(ChannelPopularizeDetailView.class,
|
|
List<ChannelPopularizeDetailView> result = beanSearcher.searchAll(ChannelPopularizeDetailView.class,
|
|
|
MapUtils.flatBuilder(request.getParameterMap())
|
|
MapUtils.flatBuilder(request.getParameterMap())
|
|
|
- .field(ChannelPopularizeDetailView::getPopularizeId,id)
|
|
|
|
|
- .field("time",timeSql)
|
|
|
|
|
|
|
+ .field(ChannelPopularizeDetailView::getPopularizeId, id)
|
|
|
|
|
+ .put("time", timeSql)
|
|
|
|
|
+ .orderBy(ChannelPopularizeDetailView::getGoodsId).asc()
|
|
|
.build());
|
|
.build());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(result);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(result);
|
|
|
}
|
|
}
|