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,6 +4,7 @@ import com.b2c.myapp.common.api.fundTrade.input.FundTradeListInput;
4 import com.b2c.myapp.common.api.fundTrade.input.FundTradeSaveInput; 4 import com.b2c.myapp.common.api.fundTrade.input.FundTradeSaveInput;
5 import com.b2c.myapp.common.api.fundTrade.output.FundTradeOutput; 5 import com.b2c.myapp.common.api.fundTrade.output.FundTradeOutput;
6 import com.b2c.myapp.common.utils.BaseOutput; 6 import com.b2c.myapp.common.utils.BaseOutput;
  7 +import com.b2c.myapp.common.utils.ResultCode;
7 import com.b2c.myapp.common.utils.base.Page; 8 import com.b2c.myapp.common.utils.base.Page;
8 import com.b2c.myapp.sdk.MyAppClient; 9 import com.b2c.myapp.sdk.MyAppClient;
9 import com.diligrp.mobsite.getway.domain.except.ServiceException; 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,7 +232,7 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
232 throw new ServiceException(output.getCode(),output.getResult()); 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,7 +278,7 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
278 throw new ServiceException(output.getCode(),output.getResult()); 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 @Override 284 @Override
@@ -299,7 +299,7 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC { @@ -299,7 +299,7 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
299 throw new ServiceException(output.getCode(),output.getResult()); 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,7 +321,7 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
321 throw new ServiceException(output.getCode(),output.getResult()); 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 @Override 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,7 +55,7 @@ public class SellerRPCImpl implements SellerRPC {
55 throw new ServiceException(); 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 logger.error("手机号查询卖家接口失败:[userId={},code={},result={}]",new Object[]{mobile,output.getCode(),output.getResult()}); 59 logger.error("手机号查询卖家接口失败:[userId={},code={},result={}]",new Object[]{mobile,output.getCode(),output.getResult()});
60 throw new ServiceException(output.getResult()); 60 throw new ServiceException(output.getResult());
61 } 61 }
@@ -84,7 +84,7 @@ public class SellerRPCImpl implements SellerRPC { @@ -84,7 +84,7 @@ public class SellerRPCImpl implements SellerRPC {
84 throw new ServiceException(); 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 logger.error("手机号查询卖家接口失败:[userId={},code={},result={}]",new Object[]{accountName,output.getCode(),output.getResult()}); 88 logger.error("手机号查询卖家接口失败:[userId={},code={},result={}]",new Object[]{accountName,output.getCode(),output.getResult()});
89 throw new ServiceException(); 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 +6,7 @@ import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerDetailOutput;
6 import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerKeyOutput; 6 import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerKeyOutput;
7 import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerOutput; 7 import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerOutput;
8 import com.b2c.myapp.common.utils.BaseOutput; 8 import com.b2c.myapp.common.utils.BaseOutput;
  9 +import com.b2c.myapp.common.utils.ResultCode;
9 import com.b2c.myapp.common.utils.base.Page; 10 import com.b2c.myapp.common.utils.base.Page;
10 import com.b2c.myapp.sdk.MyAppClient; 11 import com.b2c.myapp.sdk.MyAppClient;
11 import com.diligrp.mobsite.getway.domain.except.ServiceException; 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,7 +44,7 @@ public class ShopRPCImpl implements ShopRPC {
44 BaseOutput<ShopOutput> output = null; 44 BaseOutput<ShopOutput> output = null;
45 try{ 45 try{
46 output = myAppClient.getShopInfoService().createShopInfo(shopSaveInput); 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 return output.getData(); 48 return output.getData();
49 }else{ 49 }else{
50 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); 50 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
@@ -67,7 +67,7 @@ public class ShopRPCImpl implements ShopRPC { @@ -67,7 +67,7 @@ public class ShopRPCImpl implements ShopRPC {
67 BaseOutput<ShopOutput> output = null; 67 BaseOutput<ShopOutput> output = null;
68 try{ 68 try{
69 output = myAppClient.getShopInfoService().getShopBySellerId(sellerId); 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 return output.getData(); 71 return output.getData();
72 }else{ 72 }else{
73 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); 73 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
@@ -90,7 +90,7 @@ public class ShopRPCImpl implements ShopRPC { @@ -90,7 +90,7 @@ public class ShopRPCImpl implements ShopRPC {
90 BaseOutput<ShopOutput> output = null; 90 BaseOutput<ShopOutput> output = null;
91 try{ 91 try{
92 output = myAppClient.getShopInfoService().getShopByShopId(shopId); 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 return output.getData(); 94 return output.getData();
95 }else{ 95 }else{
96 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); 96 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
@@ -113,7 +113,7 @@ public class ShopRPCImpl implements ShopRPC { @@ -113,7 +113,7 @@ public class ShopRPCImpl implements ShopRPC {
113 BaseOutput<ShopOutput> output = null; 113 BaseOutput<ShopOutput> output = null;
114 try{ 114 try{
115 output = myAppClient.getShopInfoService().getShopInfo(shopListInput); 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 return output.getData(); 117 return output.getData();
118 }else{ 118 }else{
119 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); 119 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
@@ -136,7 +136,7 @@ public class ShopRPCImpl implements ShopRPC { @@ -136,7 +136,7 @@ public class ShopRPCImpl implements ShopRPC {
136 BaseOutput<Boolean> output = null; 136 BaseOutput<Boolean> output = null;
137 try{ 137 try{
138 output = myAppClient.getShopInfoService().modifyShopBasicInfo(shopUpdateInput); 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 return output.getData(); 140 return output.getData();
141 }else{ 141 }else{
142 throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); 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,7 +64,7 @@ public class UserRPCImpl implements UserRPC {
64 throw new ServiceException(); 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 logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{mobile,output.getCode(),output.getResult()}); 68 logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{mobile,output.getCode(),output.getResult()});
69 throw new ServiceException(output.getResult()); 69 throw new ServiceException(output.getResult());
70 } 70 }
@@ -89,7 +89,7 @@ public class UserRPCImpl implements UserRPC { @@ -89,7 +89,7 @@ public class UserRPCImpl implements UserRPC {
89 throw new ServiceException(); 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 logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{accountName,output.getCode(),output.getResult()}); 93 logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{accountName,output.getCode(),output.getResult()});
94 throw new ServiceException(); 94 throw new ServiceException();
95 } 95 }
@@ -111,7 +111,7 @@ public class UserRPCImpl implements UserRPC { @@ -111,7 +111,7 @@ public class UserRPCImpl implements UserRPC {
111 throw new ServiceException(); 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 logger.error("买家查询储值卡余额失败:[userId={},code={},result={}]",new Object[]{buyerId,output.getCode(),output.getResult()}); 115 logger.error("买家查询储值卡余额失败:[userId={},code={},result={}]",new Object[]{buyerId,output.getCode(),output.getResult()});
116 throw new ServiceException(); 116 throw new ServiceException();
117 } 117 }