Commit be7344590c0dad5185d4fbc239b7578f8822d95c
1 parent
9a842bee
Exists in
master
统计bug
Showing
3 changed files
with
7 additions
and
2 deletions
Show diff stats
src/main/java/com/sincere/wechatbusiness/mapper/ChannelMapper.java
... | ... | @@ -47,7 +47,7 @@ public interface ChannelMapper { |
47 | 47 | |
48 | 48 | List<Users> getRegisterDetailList(@Param("channelId") int channelId,@Param("agentId") int agentId,@Param("type") int type); |
49 | 49 | |
50 | - List<DiscountPackage> getOrderDetailList(@Param("channelId") int channelId,@Param("agentId") int agentId,@Param("type") int type,@Param("productId") int productId); | |
50 | + List<DiscountPackage> getOrderDetailList(@Param("channelId") int channelId,@Param("agentId") int agentId,@Param("type") int type,@Param("productId") int productId,@Param("state") int state); | |
51 | 51 | |
52 | 52 | int insertAccessToken(AccessToken accessToken); |
53 | 53 | |
... | ... |
src/main/java/com/sincere/wechatbusiness/service/impl/ChannelServiceImpl.java
... | ... | @@ -89,7 +89,7 @@ public class ChannelServiceImpl implements ChannelService { |
89 | 89 | public List<Users> getRegisterDetailList(int channelId,int agentId,int type){return channelMapper.getRegisterDetailList(channelId,agentId,type);} |
90 | 90 | |
91 | 91 | @Override |
92 | - public List<DiscountPackage> getOrderDetailList(int channelId,int agentId,int type,int productId){return channelMapper.getOrderDetailList(channelId,agentId,type,productId);} | |
92 | + public List<DiscountPackage> getOrderDetailList(int channelId,int agentId,int type,int productId){return channelMapper.getOrderDetailList(channelId,agentId,type,productId,1);} | |
93 | 93 | |
94 | 94 | @Override |
95 | 95 | public int insertAccessToken(AccessToken accessToken){return channelMapper.insertAccessToken(accessToken);} |
... | ... |
src/main/resources/mapper/ChannelMapper.xml
... | ... | @@ -306,11 +306,15 @@ |
306 | 306 | and DateDiff(mm,create_time,getdate())=0 |
307 | 307 | </if> |
308 | 308 | </where> |
309 | + order by create_time desc | |
309 | 310 | </select> |
310 | 311 | |
311 | 312 | <select id="getOrderDetailList" resultMap="PackageMap"> |
312 | 313 | select account,product_name as package_name,intime from report_voluntary.dbo.orderpay |
313 | 314 | <where> |
315 | + <if test="state==1"> | |
316 | + and paystate=1 | |
317 | + </if> | |
314 | 318 | <if test="channelId>0"> |
315 | 319 | and channelId=#{channelId} |
316 | 320 | </if> |
... | ... | @@ -330,6 +334,7 @@ |
330 | 334 | and DateDiff(mm,intime,getdate())=0 |
331 | 335 | </if> |
332 | 336 | </where> |
337 | + order by intime desc | |
333 | 338 | </select> |
334 | 339 | |
335 | 340 | <insert id="insertAccessToken" parameterType="com.sincere.wechatbusiness.model.AccessToken"> |
... | ... |