Commit 5f944c8a516dd77805cb650dc5ca4d1e19541173

Authored by jiangchengyong
1 parent c37a37d7

update rpc result code

mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/FundTradeRPCImpl.java
... ... @@ -4,6 +4,7 @@ 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 6 import com.b2c.myapp.common.utils.BaseOutput;
  7 +import com.b2c.myapp.common.utils.ResultCode;
7 8 import com.b2c.myapp.common.utils.base.Page;
8 9 import com.b2c.myapp.sdk.MyAppClient;
9 10 import com.diligrp.mobsite.getway.domain.except.ServiceException;
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/PassportRPCImpl.java
... ... @@ -232,7 +232,7 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
232 232 throw new ServiceException(output.getCode(),output.getResult());
233 233 }
234 234  
235   - return output.getCode().equals(ResultCode.OK);
  235 + return output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK);
236 236 }
237 237  
238 238  
... ... @@ -278,7 +278,7 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
278 278 throw new ServiceException(output.getCode(),output.getResult());
279 279 }
280 280  
281   - return output.getCode().equals(ResultCode.OK);
  281 + return output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK);
282 282 }
283 283  
284 284 @Override
... ... @@ -299,7 +299,7 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
299 299 throw new ServiceException(output.getCode(),output.getResult());
300 300 }
301 301  
302   - return output.getCode().equals(ResultCode.OK);
  302 + return output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK);
303 303 }
304 304  
305 305  
... ... @@ -321,7 +321,7 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
321 321 throw new ServiceException(output.getCode(),output.getResult());
322 322 }
323 323  
324   - return output.getCode().equals(ResultCode.OK);
  324 + return output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK);
325 325 }
326 326  
327 327 @Override
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/SellerRPCImpl.java
... ... @@ -55,7 +55,7 @@ public class SellerRPCImpl implements SellerRPC {
55 55 throw new ServiceException();
56 56 }
57 57  
58   - if (output==null||!output.getCode().equals(ResultCode.OK)){
  58 + if (output==null||!output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
59 59 logger.error("手机号查询卖家接口失败:[userId={},code={},result={}]",new Object[]{mobile,output.getCode(),output.getResult()});
60 60 throw new ServiceException(output.getResult());
61 61 }
... ... @@ -84,7 +84,7 @@ public class SellerRPCImpl implements SellerRPC {
84 84 throw new ServiceException();
85 85 }
86 86  
87   - if (output==null||!output.getCode().equals(ResultCode.SUCCESS)){
  87 + if (output==null||!output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
88 88 logger.error("手机号查询卖家接口失败:[userId={},code={},result={}]",new Object[]{accountName,output.getCode(),output.getResult()});
89 89 throw new ServiceException();
90 90 }
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/ShopBuyerRPCImpl.java
... ... @@ -6,6 +6,7 @@ import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerDetailOutput;
6 6 import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerKeyOutput;
7 7 import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerOutput;
8 8 import com.b2c.myapp.common.utils.BaseOutput;
  9 +import com.b2c.myapp.common.utils.ResultCode;
9 10 import com.b2c.myapp.common.utils.base.Page;
10 11 import com.b2c.myapp.sdk.MyAppClient;
11 12 import com.diligrp.mobsite.getway.domain.except.ServiceException;
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/ShopRPCImpl.java
... ... @@ -44,7 +44,7 @@ public class ShopRPCImpl implements ShopRPC {
44 44 BaseOutput<ShopOutput> output = null;
45 45 try{
46 46 output = myAppClient.getShopInfoService().createShopInfo(shopSaveInput);
47   - if(output.getCode().equals(ResultCode.OK)){
  47 + if(output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
48 48 return output.getData();
49 49 }else{
50 50 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
... ... @@ -67,7 +67,7 @@ public class ShopRPCImpl implements ShopRPC {
67 67 BaseOutput<ShopOutput> output = null;
68 68 try{
69 69 output = myAppClient.getShopInfoService().getShopBySellerId(sellerId);
70   - if(output.getCode().equals(ResultCode.OK)){
  70 + if(output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
71 71 return output.getData();
72 72 }else{
73 73 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
... ... @@ -90,7 +90,7 @@ public class ShopRPCImpl implements ShopRPC {
90 90 BaseOutput<ShopOutput> output = null;
91 91 try{
92 92 output = myAppClient.getShopInfoService().getShopByShopId(shopId);
93   - if(output.getCode().equals(ResultCode.OK)){
  93 + if(output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
94 94 return output.getData();
95 95 }else{
96 96 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
... ... @@ -113,7 +113,7 @@ public class ShopRPCImpl implements ShopRPC {
113 113 BaseOutput<ShopOutput> output = null;
114 114 try{
115 115 output = myAppClient.getShopInfoService().getShopInfo(shopListInput);
116   - if(output.getCode().equals(ResultCode.OK)){
  116 + if(output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
117 117 return output.getData();
118 118 }else{
119 119 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
... ... @@ -136,7 +136,7 @@ public class ShopRPCImpl implements ShopRPC {
136 136 BaseOutput<Boolean> output = null;
137 137 try{
138 138 output = myAppClient.getShopInfoService().modifyShopBasicInfo(shopUpdateInput);
139   - if(output.getCode().equals(ResultCode.OK)){
  139 + if(output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
140 140 return output.getData();
141 141 }else{
142 142 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/UserRPCImpl.java
... ... @@ -64,7 +64,7 @@ public class UserRPCImpl implements UserRPC {
64 64 throw new ServiceException();
65 65 }
66 66  
67   - if (output==null||!output.getCode().equals(ResultCode.SUCCESS)){
  67 + if (output==null||!output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
68 68 logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{mobile,output.getCode(),output.getResult()});
69 69 throw new ServiceException(output.getResult());
70 70 }
... ... @@ -89,7 +89,7 @@ public class UserRPCImpl implements UserRPC {
89 89 throw new ServiceException();
90 90 }
91 91  
92   - if (output==null||!output.getCode().equals(ResultCode.SUCCESS)){
  92 + if (output==null||!output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
93 93 logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{accountName,output.getCode(),output.getResult()});
94 94 throw new ServiceException();
95 95 }
... ... @@ -111,7 +111,7 @@ public class UserRPCImpl implements UserRPC {
111 111 throw new ServiceException();
112 112 }
113 113  
114   - if (output==null||!output.getCode().equals(ResultCode.SUCCESS)){
  114 + if (output==null||!output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
115 115 logger.error("买家查询储值卡余额失败:[userId={},code={},result={}]",new Object[]{buyerId,output.getCode(),output.getResult()});
116 116 throw new ServiceException();
117 117 }
... ...