Commit 681c8ede8d3797bb22b15d416a371116f6380acf

Authored by jiangchengyong
1 parent 84afa95a

时间段 收货地址 实现

mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/DeliveryTimeRPCImpl.java
... ... @@ -40,12 +40,13 @@ public class DeliveryTimeRPCImpl implements DeliveryTimeRPC {
40 40 output = myAppClient.getDeliveryTimeService().createShopDeliveryTime(deliveryTimeSaveInput);
41 41 if(output.getCode().equals(200)){
42 42 return output.getData();
  43 + }else{
  44 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
43 45 }
44 46 } catch (Exception e) {
45 47 logger.error("创建店铺送货时间段接口出错:msg={}",e);
46 48 throw new ServiceException();
47 49 }
48   - return null;
49 50 }
50 51  
51 52 /**
... ... @@ -62,12 +63,13 @@ public class DeliveryTimeRPCImpl implements DeliveryTimeRPC {
62 63 output = myAppClient.getDeliveryTimeService().deleteShopDeliveryTime(deliveryTimeId);
63 64 if(output.getCode().equals(200)){
64 65 return output.getData();
  66 + }else{
  67 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
65 68 }
66 69 } catch (Exception e) {
67 70 logger.error("删除店铺送货时间段接口出错:msg={}",e);
68 71 throw new ServiceException();
69 72 }
70   - return null;
71 73 }
72 74  
73 75 /**
... ... @@ -84,11 +86,12 @@ public class DeliveryTimeRPCImpl implements DeliveryTimeRPC {
84 86 output = myAppClient.getDeliveryTimeService().queryShopDeliveryTime(deliveryTimeListInput);
85 87 if(output.getCode().equals(200)){
86 88 return output.getData();
  89 + }else{
  90 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
87 91 }
88 92 } catch (Exception e) {
89 93 logger.error("查找店铺送货时间段接口出错:msg={}",e);
90 94 throw new ServiceException();
91 95 }
92   - return null;
93 96 }
94 97 }
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/FundTradeRPCImpl.java
... ... @@ -35,12 +35,13 @@ public class FundTradeRPCImpl implements FundTradeRPC {
35 35 output = myAppClient.getFundTradeService().queryFundTrade(fundTradeListInput);
36 36 if(output.getCode().equals(200)){
37 37 return output.getData();
  38 + }else{
  39 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
38 40 }
39 41 } catch (Exception e) {
40 42 log.error("多条件查询储值卡资金交易明细接口出错:msg={}",e);
41 43 throw new ServiceException();
42 44 }
43   - return null;
44 45 }
45 46  
46 47 /**
... ... @@ -56,11 +57,12 @@ public class FundTradeRPCImpl implements FundTradeRPC {
56 57 output = myAppClient.getFundTradeService().fundTrade(fundTradeSaveInput);
57 58 if(output.getCode().equals(200)){
58 59 return output.getData();
  60 + }else{
  61 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
59 62 }
60 63 } catch (Exception e) {
61 64 log.error("储值卡交易接口出错:msg={}",e);
62 65 throw new ServiceException();
63 66 }
64   - return null;
65 67 }
66 68 }
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/PickInfoRPCImpl.java
... ... @@ -39,12 +39,13 @@ public class PickInfoRPCImpl implements PickInfoRPC{
39 39 output = myAppClient.getPickingInfoService().addPickingInfo(pickingInfoSaveInput);
40 40 if(output.getCode().equals(200)){
41 41 return output.getData();
  42 + }else{
  43 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
42 44 }
43 45 } catch (Exception e) {
44 46 logger.error("新增收货人接口出错:msg={}",e);
45 47 throw new ServiceException();
46 48 }
47   - return null;
48 49 }
49 50  
50 51 /**
... ... @@ -60,12 +61,13 @@ public class PickInfoRPCImpl implements PickInfoRPC{
60 61 output = myAppClient.getPickingInfoService().modify(pickingInfoUpdateInput);
61 62 if(output.getCode().equals(200)){
62 63 return output.getData();
  64 + }else{
  65 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
63 66 }
64 67 } catch (Exception e) {
65 68 logger.error("修改收货人信息接口出错:msg={}",e);
66 69 throw new ServiceException();
67 70 }
68   - return null;
69 71 }
70 72  
71 73 /**
... ... @@ -81,12 +83,13 @@ public class PickInfoRPCImpl implements PickInfoRPC{
81 83 output = myAppClient.getPickingInfoService().queryPickingInfosByBuyerId(buyerId);
82 84 if(output.getCode().equals(200)){
83 85 return output.getData();
  86 + }else{
  87 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
84 88 }
85 89 } catch (Exception e) {
86 90 logger.error("按买家ID查询收货人接口出错:msg={}",e);
87 91 throw new ServiceException();
88 92 }
89   - return null;
90 93 }
91 94  
92 95 /**
... ... @@ -103,12 +106,13 @@ public class PickInfoRPCImpl implements PickInfoRPC{
103 106 output = myAppClient.getPickingInfoService().getDefaultPickingInfoByBuyerId(buyerId);
104 107 if(output.getCode().equals(200)){
105 108 return output.getData();
  109 + }else{
  110 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
106 111 }
107 112 } catch (Exception e) {
108 113 logger.error("根据买家id获取默认收货地址接口出错:msg={}",e);
109 114 throw new ServiceException();
110 115 }
111   - return null;
112 116 }
113 117  
114 118 /**
... ... @@ -125,11 +129,12 @@ public class PickInfoRPCImpl implements PickInfoRPC{
125 129 output = myAppClient.getPickingInfoService().delPickingInfoById(id);
126 130 if(output.getCode().equals(200)){
127 131 return output.getData();
  132 + }else{
  133 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
128 134 }
129 135 } catch (Exception e) {
130 136 logger.error("删除收货地址接口出错:msg={}",e);
131 137 throw new ServiceException();
132 138 }
133   - return null;
134 139 }
135 140 }
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/ShopBuyerRPCImpl.java
... ... @@ -38,12 +38,13 @@ public class ShopBuyerRPCImpl implements ShopBuyerRPC {
38 38 output = myAppClient.getShopBuyerService().queryShopAllBuyerList(shopBuyerDetail);
39 39 if(output.getCode().equals(200)){
40 40 return output.getData();
  41 + }else{
  42 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
41 43 }
42 44 } catch (Exception e) {
43 45 log.error("查找店铺所有买家列表接口出错:msg={}",e);
44 46 throw new ServiceException();
45 47 }
46   - return null;
47 48 }
48 49  
49 50 /**
... ... @@ -61,13 +62,14 @@ public class ShopBuyerRPCImpl implements ShopBuyerRPC {
61 62 output = myAppClient.getShopBuyerService().bindAndActivate(buyerId,promoCode);
62 63 if(output.getCode().equals(200)){
63 64 return output.getData();
  65 + }else{
  66 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
64 67 }
65 68 } catch (Exception e) {
66 69 log.error("绑定并激活接口出错:msg={}",e);
67 70 throw new ServiceException();
68 71 }
69 72  
70   - return null;
71 73 }
72 74  
73 75 /**
... ... @@ -84,13 +86,14 @@ public class ShopBuyerRPCImpl implements ShopBuyerRPC {
84 86 output = myAppClient.getShopBuyerService().getShopBuyerKeys(shopBuyerId);
85 87 if(output.getCode().equals(200)){
86 88 return output.getData();
  89 + }else{
  90 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
87 91 }
88 92 } catch (Exception e) {
89 93 log.error("获取店铺用户的相关主键信息接口出错:msg={}",e);
90 94 throw new ServiceException();
91 95 }
92 96  
93   - return null;
94 97 }
95 98  
96 99 /**
... ... @@ -108,12 +111,13 @@ public class ShopBuyerRPCImpl implements ShopBuyerRPC {
108 111 output = myAppClient.getShopBuyerService().modifyShopRemarkName(shopBuyerId,remarkName);
109 112 if(output.getCode().equals(200)){
110 113 return output.getData();
  114 + }else{
  115 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
111 116 }
112 117 } catch (Exception e) {
113 118 log.error("修改店铺名称接口出错:msg={}",e);
114 119 throw new ServiceException();
115 120 }
116 121  
117   - return null;
118 122 }
119 123 }
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/ShopRPCImpl.java
... ... @@ -44,12 +44,13 @@ public class ShopRPCImpl implements ShopRPC {
44 44 output = myAppClient.getShopInfoService().createShopInfo(shopSaveInput);
45 45 if(output.getCode().equals(200)){
46 46 return output.getData();
  47 + }else{
  48 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
47 49 }
48 50 }catch (Exception e){
49 51 logger.info("调用创建店铺接口出错:",e);
50 52 throw new ServiceException(ResultCode.NETWORK_FAILED);
51 53 }
52   - return null;
53 54 }
54 55  
55 56 /**
... ... @@ -66,12 +67,13 @@ public class ShopRPCImpl implements ShopRPC {
66 67 output = myAppClient.getShopInfoService().getShopBySellerId(sellerId);
67 68 if(output.getCode().equals(200)){
68 69 return output.getData();
  70 + }else{
  71 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
69 72 }
70 73 }catch (Exception e){
71 74 logger.info("调用通过卖家id获取店铺信息接口出错:",e);
72 75 throw new ServiceException(ResultCode.NETWORK_FAILED);
73 76 }
74   - return null;
75 77 }
76 78  
77 79 /**
... ... @@ -88,12 +90,13 @@ public class ShopRPCImpl implements ShopRPC {
88 90 output = myAppClient.getShopInfoService().getShopByShopId(shopId);
89 91 if(output.getCode().equals(200)){
90 92 return output.getData();
  93 + }else{
  94 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
91 95 }
92 96 }catch (Exception e){
93 97 logger.info("调用通过店铺id获取店铺信息接口出错:",e);
94 98 throw new ServiceException(ResultCode.NETWORK_FAILED);
95 99 }
96   - return null;
97 100 }
98 101  
99 102 /**
... ... @@ -110,12 +113,13 @@ public class ShopRPCImpl implements ShopRPC {
110 113 output = myAppClient.getShopInfoService().getShopInfo(shopListInput);
111 114 if(output.getCode().equals(200)){
112 115 return output.getData();
  116 + }else{
  117 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
113 118 }
114 119 }catch (Exception e){
115 120 logger.info("调用多字段条件查询店铺信息接口出错:",e);
116 121 throw new ServiceException(ResultCode.NETWORK_FAILED);
117 122 }
118   - return null;
119 123 }
120 124  
121 125 /**
... ... @@ -132,11 +136,12 @@ public class ShopRPCImpl implements ShopRPC {
132 136 output = myAppClient.getShopInfoService().modifyShopBasicInfo(shopUpdateInput);
133 137 if(output.getCode().equals(200)){
134 138 return output.getData();
  139 + }else{
  140 + throw new ServiceException(Integer.parseInt(output.getCode()),output.getResult());
135 141 }
136 142 }catch (Exception e){
137 143 logger.info("调用修改店铺基本信息接口出错:",e);
138 144 throw new ServiceException(ResultCode.NETWORK_FAILED);
139 145 }
140   - return null;
141 146 }
142 147 }
... ...