Commit f6080e74cf65c4114205d63bab27b70cb603d21e

Authored by louyao
1 parent be734459
Exists in master

统计bug

src/main/java/com/sincere/wechatbusiness/controller/ChannelController.java
... ... @@ -525,7 +525,7 @@ public class ChannelController {
525 525 order.setUsersList(orderList);
526 526 list.add(order);
527 527 Statistics statistics=new Statistics();
528   - statistics.setDiscountPackageList(channelService.getOrderList(channelId,type));
  528 + statistics.setDiscountPackageList(channelService.getOrderList(channelId,agentId,type));
529 529 list.add(statistics);
530 530 result.setData(list);
531 531 return result;
... ... @@ -561,7 +561,7 @@ public class ChannelController {
561 561 order.setDiscountPackageList(channelService.getOrderDetailList(channelId,agentId,type,0));
562 562 list.add(order);
563 563 Statistics statistics=new Statistics();
564   - statistics.setDiscountPackageList(channelService.getOrderList(channelId,type));
  564 + statistics.setDiscountPackageList(channelService.getOrderList(channelId,agentId,type));
565 565 list.add(statistics);
566 566 result.setData(list);
567 567 return result;
... ...
src/main/java/com/sincere/wechatbusiness/mapper/ChannelMapper.java
... ... @@ -43,7 +43,7 @@ public interface ChannelMapper {
43 43  
44 44 Users getChannelOrder(@Param("channelId") int channelId,@Param("type") int type,@Param("state") int state);
45 45  
46   - List<DiscountPackage> getOrderList(@Param("channelId") int channelId,@Param("type") int type,@Param("state") int state);
  46 + List<DiscountPackage> getOrderList(@Param("channelId") int channelId,@Param("agentId") int agentId,@Param("type") int type,@Param("state") int state);
47 47  
48 48 List<Users> getRegisterDetailList(@Param("channelId") int channelId,@Param("agentId") int agentId,@Param("type") int type);
49 49  
... ...
src/main/java/com/sincere/wechatbusiness/service/ChannelService.java
... ... @@ -38,7 +38,7 @@ public interface ChannelService {
38 38  
39 39 Users getChannelOrder(int channelId,int type);
40 40  
41   - List<DiscountPackage> getOrderList(int channelId,int type);
  41 + List<DiscountPackage> getOrderList(int channelId,int agentId,int type);
42 42  
43 43 List<Users> getRegisterDetailList(int channelId,int agentId,int type);
44 44  
... ...
src/main/java/com/sincere/wechatbusiness/service/impl/ChannelServiceImpl.java
... ... @@ -83,7 +83,7 @@ public class ChannelServiceImpl implements ChannelService {
83 83 public Users getChannelOrder(int channelId,int type){return channelMapper.getChannelOrder(channelId,type,1);}
84 84  
85 85 @Override
86   - public List<DiscountPackage> getOrderList(int channelId,int type){return channelMapper.getOrderList(channelId,type,1);}
  86 + public List<DiscountPackage> getOrderList(int channelId,int agentId,int type){return channelMapper.getOrderList(channelId,agentId,type,1);}
87 87  
88 88 @Override
89 89 public List<Users> getRegisterDetailList(int channelId,int agentId,int type){return channelMapper.getRegisterDetailList(channelId,agentId,type);}
... ...
src/main/resources/mapper/ChannelMapper.xml
... ... @@ -275,6 +275,9 @@
275 275 <if test="channelId>0">
276 276 and channelId=#{channelId}
277 277 </if>
  278 + <if test="agentId>0">
  279 + and agentId=#{agentId}
  280 + </if>
278 281 <if test="type==1">
279 282 and DateDiff(dd,intime,getdate())=0
280 283 </if>
... ...