Commit c37a37d798203f2ed7dba4f1d63246d04b43a9f9
1 parent
c0a69fb9
update rpc shopuser
Showing
7 changed files
with
27 additions
and
25 deletions
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/DeliveryTimeRPCImpl.java
... | ... | @@ -5,6 +5,7 @@ import com.b2c.myapp.common.api.deliveryTime.input.DeliveryTimeSaveInput; |
5 | 5 | import com.b2c.myapp.common.api.deliveryTime.output.DeliveryTimeOutput; |
6 | 6 | import com.b2c.myapp.common.api.fundTrade.output.FundTradeOutput; |
7 | 7 | import com.b2c.myapp.common.utils.BaseOutput; |
8 | +import com.b2c.myapp.common.utils.ResultCode; | |
8 | 9 | import com.b2c.myapp.common.utils.base.Page; |
9 | 10 | import com.b2c.myapp.sdk.MyAppClient; |
10 | 11 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
... | ... | @@ -38,7 +39,7 @@ public class DeliveryTimeRPCImpl implements DeliveryTimeRPC { |
38 | 39 | BaseOutput<DeliveryTimeOutput> output = null; |
39 | 40 | try { |
40 | 41 | output = myAppClient.getDeliveryTimeService().createShopDeliveryTime(deliveryTimeSaveInput); |
41 | - if(output.getCode().equals("200")){ | |
42 | + if(output.getCode().equals(ResultCode.OK)){ | |
42 | 43 | return output.getData(); |
43 | 44 | }else{ |
44 | 45 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -61,7 +62,7 @@ public class DeliveryTimeRPCImpl implements DeliveryTimeRPC { |
61 | 62 | BaseOutput<Boolean> output = null; |
62 | 63 | try { |
63 | 64 | output = myAppClient.getDeliveryTimeService().deleteShopDeliveryTime(deliveryTimeId); |
64 | - if(output.getCode().equals("200")){ | |
65 | + if(output.getCode().equals(ResultCode.OK)){ | |
65 | 66 | return output.getData(); |
66 | 67 | }else{ |
67 | 68 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -84,7 +85,7 @@ public class DeliveryTimeRPCImpl implements DeliveryTimeRPC { |
84 | 85 | BaseOutput<List<DeliveryTimeOutput>> output = null; |
85 | 86 | try { |
86 | 87 | output = myAppClient.getDeliveryTimeService().queryShopDeliveryTime(deliveryTimeListInput); |
87 | - if(output.getCode().equals("200")){ | |
88 | + if(output.getCode().equals(ResultCode.OK)){ | |
88 | 89 | return output.getData(); |
89 | 90 | }else{ |
90 | 91 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/FundTradeRPCImpl.java
... | ... | @@ -33,7 +33,7 @@ public class FundTradeRPCImpl implements FundTradeRPC { |
33 | 33 | BaseOutput<Page<FundTradeOutput>> output = null; |
34 | 34 | try { |
35 | 35 | output = myAppClient.getFundTradeService().queryFundTrade(fundTradeListInput); |
36 | - if(output.getCode().equals("200")){ | |
36 | + if(output.getCode().equals(ResultCode.OK)){ | |
37 | 37 | return output.getData(); |
38 | 38 | }else{ |
39 | 39 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -55,7 +55,7 @@ public class FundTradeRPCImpl implements FundTradeRPC { |
55 | 55 | BaseOutput<Boolean> output = null; |
56 | 56 | try { |
57 | 57 | output = myAppClient.getFundTradeService().fundTrade(fundTradeSaveInput); |
58 | - if(output.getCode().equals("200")){ | |
58 | + if(output.getCode().equals(ResultCode.OK)){ | |
59 | 59 | return output.getData(); |
60 | 60 | }else{ |
61 | 61 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... |
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("200"); | |
235 | + return output.getCode().equals(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("200"); | |
281 | + return output.getCode().equals(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("200"); | |
302 | + return output.getCode().equals(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("200"); | |
324 | + return output.getCode().equals(ResultCode.OK); | |
325 | 325 | } |
326 | 326 | |
327 | 327 | @Override |
... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/PickInfoRPCImpl.java
... | ... | @@ -5,6 +5,7 @@ import com.b2c.myapp.common.api.pickingInfo.input.PickingInfoSaveInput; |
5 | 5 | import com.b2c.myapp.common.api.pickingInfo.input.PickingInfoUpdateInput; |
6 | 6 | import com.b2c.myapp.common.api.pickingInfo.output.PickingInfoOutput; |
7 | 7 | import com.b2c.myapp.common.utils.BaseOutput; |
8 | +import com.b2c.myapp.common.utils.ResultCode; | |
8 | 9 | import com.b2c.myapp.sdk.MyAppClient; |
9 | 10 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
10 | 11 | import com.diligrp.mobsite.getway.rpc.PickInfoRPC; |
... | ... | @@ -37,7 +38,7 @@ public class PickInfoRPCImpl implements PickInfoRPC{ |
37 | 38 | BaseOutput<PickingInfoOutput> output = null; |
38 | 39 | try { |
39 | 40 | output = myAppClient.getPickingInfoService().addPickingInfo(pickingInfoSaveInput); |
40 | - if(output.getCode().equals("200")){ | |
41 | + if(output.getCode().equals(ResultCode.OK)){ | |
41 | 42 | return output.getData(); |
42 | 43 | }else{ |
43 | 44 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -59,7 +60,7 @@ public class PickInfoRPCImpl implements PickInfoRPC{ |
59 | 60 | BaseOutput<Boolean> output = null; |
60 | 61 | try { |
61 | 62 | output = myAppClient.getPickingInfoService().modify(pickingInfoUpdateInput); |
62 | - if(output.getCode().equals("200")){ | |
63 | + if(output.getCode().equals(ResultCode.OK)){ | |
63 | 64 | return output.getData(); |
64 | 65 | }else{ |
65 | 66 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -81,7 +82,7 @@ public class PickInfoRPCImpl implements PickInfoRPC{ |
81 | 82 | BaseOutput<List<PickingInfoOutput>> output = null; |
82 | 83 | try { |
83 | 84 | output = myAppClient.getPickingInfoService().queryPickingInfosByBuyerId(buyerId); |
84 | - if(output.getCode().equals("200")){ | |
85 | + if(output.getCode().equals(ResultCode.OK)){ | |
85 | 86 | return output.getData(); |
86 | 87 | }else{ |
87 | 88 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -104,7 +105,7 @@ public class PickInfoRPCImpl implements PickInfoRPC{ |
104 | 105 | BaseOutput<PickingInfoOutput> output = null; |
105 | 106 | try { |
106 | 107 | output = myAppClient.getPickingInfoService().getDefaultPickingInfoByBuyerId(buyerId); |
107 | - if(output.getCode().equals("200")){ | |
108 | + if(output.getCode().equals(ResultCode.OK)){ | |
108 | 109 | return output.getData(); |
109 | 110 | }else{ |
110 | 111 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -127,7 +128,7 @@ public class PickInfoRPCImpl implements PickInfoRPC{ |
127 | 128 | BaseOutput<Boolean> output = null; |
128 | 129 | try { |
129 | 130 | output = myAppClient.getPickingInfoService().delPickingInfoById(id); |
130 | - if(output.getCode().equals("200")){ | |
131 | + if(output.getCode().equals(ResultCode.OK)){ | |
131 | 132 | return output.getData(); |
132 | 133 | }else{ |
133 | 134 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -149,7 +150,7 @@ public class PickInfoRPCImpl implements PickInfoRPC{ |
149 | 150 | BaseOutput<PickingInfoOutput> output = null; |
150 | 151 | try { |
151 | 152 | output = myAppClient.getPickingInfoService().getPickingInfoById(id); |
152 | - if(output.getCode().equals("200")){ | |
153 | + if(output.getCode().equals(ResultCode.OK)){ | |
153 | 154 | return output.getData(); |
154 | 155 | }else{ |
155 | 156 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... |
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("200")){ | |
58 | + if (output==null||!output.getCode().equals(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 | } |
... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/ShopBuyerRPCImpl.java
... | ... | @@ -36,7 +36,7 @@ public class ShopBuyerRPCImpl implements ShopBuyerRPC { |
36 | 36 | boolean flag = false; |
37 | 37 | try { |
38 | 38 | output = myAppClient.getShopBuyerService().queryShopAllBuyerList(shopBuyerDetail); |
39 | - if(output.getCode().equals("200")){ | |
39 | + if(output.getCode().equals(ResultCode.OK)){ | |
40 | 40 | return output.getData(); |
41 | 41 | }else{ |
42 | 42 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -60,7 +60,7 @@ public class ShopBuyerRPCImpl implements ShopBuyerRPC { |
60 | 60 | boolean flag = false; |
61 | 61 | try { |
62 | 62 | output = myAppClient.getShopBuyerService().bindAndActivate(buyerId,promoCode); |
63 | - if(output.getCode().equals("200")){ | |
63 | + if(output.getCode().equals(ResultCode.OK)){ | |
64 | 64 | return output.getData(); |
65 | 65 | }else{ |
66 | 66 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -84,7 +84,7 @@ public class ShopBuyerRPCImpl implements ShopBuyerRPC { |
84 | 84 | boolean flag = false; |
85 | 85 | try { |
86 | 86 | output = myAppClient.getShopBuyerService().getShopBuyerKeys(shopBuyerId); |
87 | - if(output.getCode().equals("200")){ | |
87 | + if(output.getCode().equals(ResultCode.OK)){ | |
88 | 88 | return output.getData(); |
89 | 89 | }else{ |
90 | 90 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... | @@ -109,7 +109,7 @@ public class ShopBuyerRPCImpl implements ShopBuyerRPC { |
109 | 109 | boolean flag = false; |
110 | 110 | try { |
111 | 111 | output = myAppClient.getShopBuyerService().modifyShopRemarkName(shopBuyerId,remarkName); |
112 | - if(output.getCode().equals("200")){ | |
112 | + if(output.getCode().equals(ResultCode.OK)){ | |
113 | 113 | return output.getData(); |
114 | 114 | }else{ |
115 | 115 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... |
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("200")){ | |
47 | + if(output.getCode().equals(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("200")){ | |
70 | + if(output.getCode().equals(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("200")){ | |
93 | + if(output.getCode().equals(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("200")){ | |
116 | + if(output.getCode().equals(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("200")){ | |
139 | + if(output.getCode().equals(ResultCode.OK)){ | |
140 | 140 | return output.getData(); |
141 | 141 | }else{ |
142 | 142 | throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult()); |
... | ... |