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