Commit 4582f838a70dfa6e0e675693e349c10ef9ad5c73

Authored by 陈杰
1 parent eca46c74
Exists in master

1

src/main/java/com/sincere/wechatbusiness/controller/ChannelController.java
@@ -525,15 +525,7 @@ public class ChannelController { @@ -525,15 +525,7 @@ public class ChannelController {
525 order.setUsersList(orderList); 525 order.setUsersList(orderList);
526 list.add(order); 526 list.add(order);
527 Statistics statistics=new Statistics(); 527 Statistics statistics=new Statistics();
528 - List<DiscountPackage> packageList = new ArrayList<>();  
529 - packageList.addAll(channelService.getOrderList(channelId,agentId,type));  
530 - if(agentId == 0){  
531 - List<Agent> agents = agentService.getList(channelId);  
532 - for(Agent agent : agents){  
533 - packageList.addAll(channelService.getOrderList(channelId,agent.getId(),type));  
534 - }  
535 - }  
536 - statistics.setDiscountPackageList(packageList); 528 + statistics.setDiscountPackageList(channelService.getOrderList(channelId,agentId,type));
537 list.add(statistics); 529 list.add(statistics);
538 result.setData(list); 530 result.setData(list);
539 return result; 531 return result;
@@ -551,7 +543,15 @@ public class ChannelController { @@ -551,7 +543,15 @@ public class ChannelController {
551 @ApiOperation(value = "获取订购详情") 543 @ApiOperation(value = "获取订购详情")
552 public BaseDto<List<DiscountPackage>> GetStatisticsOrderDetailList(int channelId,int agentId,int type,int productId){ 544 public BaseDto<List<DiscountPackage>> GetStatisticsOrderDetailList(int channelId,int agentId,int type,int productId){
553 BaseDto<List<DiscountPackage>> result=new BaseDto<>(); 545 BaseDto<List<DiscountPackage>> result=new BaseDto<>();
554 - result.setData(channelService.getOrderDetailList(channelId,agentId,type,productId)); 546 + List<DiscountPackage> packageList = new ArrayList<>();
  547 + packageList.addAll(channelService.getOrderDetailList(channelId,agentId,type,productId));
  548 + if(agentId == 0){
  549 + List<Agent> agents = agentService.getList(channelId);
  550 + for(Agent agent : agents){
  551 + packageList.addAll(channelService.getOrderDetailList(channelId,agent.getId(),type,productId));
  552 + }
  553 + }
  554 + result.setData(packageList);
555 return result; 555 return result;
556 } 556 }
557 557
src/main/resources/mapper/ChannelProductMapper.xml
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
39 <if test="promotionPrice!=null and promotionPrice!=''"> 39 <if test="promotionPrice!=null and promotionPrice!=''">
40 promotion_price=#{promotionPrice}, 40 promotion_price=#{promotionPrice},
41 </if> 41 </if>
42 - <if test="endTime!=null and endTime!=''"> 42 + <if test="endTime!=null">
43 end_time=#{endTime}, 43 end_time=#{endTime},
44 </if> 44 </if>
45 <if test="title!=null and title!=''"> 45 <if test="title!=null and title!=''">