Commit 47a22cf4ef007ddc2dfa6ac16ecc6f0efb182af6
1 parent
bf4a0fab
资金管理 update
Showing
1 changed file
with
33 additions
and
2 deletions
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/FundTradeRPCImpl.java
... | ... | @@ -3,22 +3,43 @@ package com.diligrp.mobsite.getway.rpc.impl; |
3 | 3 | import com.b2c.myapp.common.api.fundTrade.input.FundTradeListInput; |
4 | 4 | import com.b2c.myapp.common.api.fundTrade.input.FundTradeSaveInput; |
5 | 5 | import com.b2c.myapp.common.api.fundTrade.output.FundTradeOutput; |
6 | +import com.b2c.myapp.common.utils.BaseOutput; | |
6 | 7 | import com.b2c.myapp.common.utils.base.Page; |
8 | +import com.b2c.myapp.sdk.MyAppClient; | |
9 | +import com.diligrp.mobsite.getway.domain.except.ServiceException; | |
7 | 10 | import com.diligrp.mobsite.getway.rpc.FundTradeRPC; |
11 | +import org.apache.log4j.Logger; | |
12 | +import org.springframework.stereotype.Component; | |
13 | + | |
14 | +import javax.annotation.Resource; | |
8 | 15 | |
9 | 16 | /** |
10 | 17 | * Created by jiangchengyong on 2017/1/19. |
11 | 18 | */ |
19 | +@Component | |
12 | 20 | public class FundTradeRPCImpl implements FundTradeRPC { |
21 | + private final static Logger log = Logger.getLogger(FundTradeRPCImpl.class); | |
22 | + @Resource | |
23 | + private MyAppClient myAppClient; | |
13 | 24 | /** |
14 | - * @param FundTradeListInput | |
25 | + * @param fundTradeListInput | |
15 | 26 | * @return BaseOutput<Page<FundTradeOutput>> |
16 | 27 | * @comment 多条件查询储值卡资金交易明细 |
17 | 28 | * @author kelan |
18 | 29 | * @time 2016/12/8 10:36 |
19 | 30 | */ |
20 | 31 | @Override |
21 | - public Page<FundTradeOutput> queryFundTrade(FundTradeListInput FundTradeListInput) { | |
32 | + public Page<FundTradeOutput> queryFundTrade(FundTradeListInput fundTradeListInput) { | |
33 | + BaseOutput<Page<FundTradeOutput>> output = null; | |
34 | + try { | |
35 | + output = myAppClient.getFundTradeService().queryFundTrade(fundTradeListInput); | |
36 | + if(output.getCode().equals(200)){ | |
37 | + return output.getData(); | |
38 | + } | |
39 | + } catch (Exception e) { | |
40 | + log.error("多条件查询储值卡资金交易明细接口出错:msg={}",e); | |
41 | + throw new ServiceException(); | |
42 | + } | |
22 | 43 | return null; |
23 | 44 | } |
24 | 45 | |
... | ... | @@ -30,6 +51,16 @@ public class FundTradeRPCImpl implements FundTradeRPC { |
30 | 51 | */ |
31 | 52 | @Override |
32 | 53 | public Boolean fundTrade(FundTradeSaveInput fundTradeSaveInput) { |
54 | + BaseOutput<Boolean> output = null; | |
55 | + try { | |
56 | + output = myAppClient.getFundTradeService().fundTrade(fundTradeSaveInput); | |
57 | + if(output.getCode().equals(200)){ | |
58 | + return output.getData(); | |
59 | + } | |
60 | + } catch (Exception e) { | |
61 | + log.error("储值卡交易接口出错:msg={}",e); | |
62 | + throw new ServiceException(); | |
63 | + } | |
33 | 64 | return null; |
34 | 65 | } |
35 | 66 | } | ... | ... |