Commit c37a37d798203f2ed7dba4f1d63246d04b43a9f9

Authored by jiangchengyong
1 parent c0a69fb9

update rpc shopuser

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