|
@@ -4,6 +4,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.dto.Result;
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
|
|
+import com.cyksj.mapper.vip.VipOrderDonMapper;
|
|
|
import com.cyksj.model.entity.Channel;
|
|
import com.cyksj.model.entity.Channel;
|
|
|
import com.cyksj.model.entity.ChannelPopularize;
|
|
import com.cyksj.model.entity.ChannelPopularize;
|
|
|
import com.cyksj.model.views.ChannelView;
|
|
import com.cyksj.model.views.ChannelView;
|
|
@@ -42,6 +43,8 @@ public class CmsChannelController {
|
|
|
|
|
|
|
|
private final HttpServletRequest request;
|
|
private final HttpServletRequest request;
|
|
|
|
|
|
|
|
|
|
+ private final VipOrderDonMapper vipOrderDonMapper;
|
|
|
|
|
+
|
|
|
@GetMapping
|
|
@GetMapping
|
|
|
public Result<SearchResult<ChannelView>> get(String startTime, String endTime) {
|
|
public Result<SearchResult<ChannelView>> get(String startTime, String endTime) {
|
|
|
String timeSql = StringUtils.EMPTY;
|
|
String timeSql = StringUtils.EMPTY;
|
|
@@ -59,6 +62,13 @@ public class CmsChannelController {
|
|
|
}
|
|
}
|
|
|
SearchResult<ChannelView> searchResult = beanSearcher.search(ChannelView.class,
|
|
SearchResult<ChannelView> searchResult = beanSearcher.search(ChannelView.class,
|
|
|
builder.put("time", timeSql).build());
|
|
builder.put("time", timeSql).build());
|
|
|
|
|
+ searchResult.getDataList().forEach(data->{
|
|
|
|
|
+ //AI会员订单数据
|
|
|
|
|
+ Long channelId = data.getId();
|
|
|
|
|
+ ChannelView vipView = vipOrderDonMapper.getOrderDataByCid(channelId, startTime, endTime);
|
|
|
|
|
+ data.setOrderCount(data.getOrderCount() + vipView.getOrderCount());
|
|
|
|
|
+ data.setOrderMoney(data.getOrderMoney().add(vipView.getOrderMoney()));
|
|
|
|
|
+ });
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(searchResult);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(searchResult);
|
|
|
}
|
|
}
|
|
|
|
|
|