Commit f6080e74cf65c4114205d63bab27b70cb603d21e
1 parent
be734459
Exists in
master
统计bug
Showing
5 changed files
with
8 additions
and
5 deletions
Show diff stats
src/main/java/com/sincere/wechatbusiness/controller/ChannelController.java
| @@ -525,7 +525,7 @@ public class ChannelController { | @@ -525,7 +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 | - statistics.setDiscountPackageList(channelService.getOrderList(channelId,type)); | 528 | + statistics.setDiscountPackageList(channelService.getOrderList(channelId,agentId,type)); |
| 529 | list.add(statistics); | 529 | list.add(statistics); |
| 530 | result.setData(list); | 530 | result.setData(list); |
| 531 | return result; | 531 | return result; |
| @@ -561,7 +561,7 @@ public class ChannelController { | @@ -561,7 +561,7 @@ public class ChannelController { | ||
| 561 | order.setDiscountPackageList(channelService.getOrderDetailList(channelId,agentId,type,0)); | 561 | order.setDiscountPackageList(channelService.getOrderDetailList(channelId,agentId,type,0)); |
| 562 | list.add(order); | 562 | list.add(order); |
| 563 | Statistics statistics=new Statistics(); | 563 | Statistics statistics=new Statistics(); |
| 564 | - statistics.setDiscountPackageList(channelService.getOrderList(channelId,type)); | 564 | + statistics.setDiscountPackageList(channelService.getOrderList(channelId,agentId,type)); |
| 565 | list.add(statistics); | 565 | list.add(statistics); |
| 566 | result.setData(list); | 566 | result.setData(list); |
| 567 | return result; | 567 | return result; |
src/main/java/com/sincere/wechatbusiness/mapper/ChannelMapper.java
| @@ -43,7 +43,7 @@ public interface ChannelMapper { | @@ -43,7 +43,7 @@ public interface ChannelMapper { | ||
| 43 | 43 | ||
| 44 | Users getChannelOrder(@Param("channelId") int channelId,@Param("type") int type,@Param("state") int state); | 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 | List<Users> getRegisterDetailList(@Param("channelId") int channelId,@Param("agentId") int agentId,@Param("type") int type); | 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,7 +38,7 @@ public interface ChannelService { | ||
| 38 | 38 | ||
| 39 | Users getChannelOrder(int channelId,int type); | 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 | List<Users> getRegisterDetailList(int channelId,int agentId,int type); | 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,7 +83,7 @@ public class ChannelServiceImpl implements ChannelService { | ||
| 83 | public Users getChannelOrder(int channelId,int type){return channelMapper.getChannelOrder(channelId,type,1);} | 83 | public Users getChannelOrder(int channelId,int type){return channelMapper.getChannelOrder(channelId,type,1);} |
| 84 | 84 | ||
| 85 | @Override | 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 | @Override | 88 | @Override |
| 89 | public List<Users> getRegisterDetailList(int channelId,int agentId,int type){return channelMapper.getRegisterDetailList(channelId,agentId,type);} | 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,6 +275,9 @@ | ||
| 275 | <if test="channelId>0"> | 275 | <if test="channelId>0"> |
| 276 | and channelId=#{channelId} | 276 | and channelId=#{channelId} |
| 277 | </if> | 277 | </if> |
| 278 | + <if test="agentId>0"> | ||
| 279 | + and agentId=#{agentId} | ||
| 280 | + </if> | ||
| 278 | <if test="type==1"> | 281 | <if test="type==1"> |
| 279 | and DateDiff(dd,intime,getdate())=0 | 282 | and DateDiff(dd,intime,getdate())=0 |
| 280 | </if> | 283 | </if> |