|
@@ -69,7 +69,10 @@ public class MessageFacade { |
|
@@ -69,7 +69,10 @@ public class MessageFacade { |
69
|
List<String> uidList = Lists.newArrayList(ownerUid, applicantUid);
|
69
|
List<String> uidList = Lists.newArrayList(ownerUid, applicantUid);
|
70
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
70
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
71
|
String ownerMobile = profileMap.get(Integer.parseInt(ownerUid)).getMobile();
|
71
|
String ownerMobile = profileMap.get(Integer.parseInt(ownerUid)).getMobile();
|
72
|
- String applicantMobileMask = MobileHelper.coverMobile2(profileMap.get(Integer.parseInt(applicantUid)).getMobile());
|
72
|
+ String applicantName = profileMap.get(Integer.parseInt(applicantUid)).getNickname();
|
|
|
73
|
+ if(StringUtils.isEmpty(applicantName) || applicantName.startsWith("YOHO-")) {
|
|
|
74
|
+ applicantName = MobileHelper.coverMobile2(profileMap.get(Integer.parseInt(applicantUid)).getMobile());
|
|
|
75
|
+ }
|
73
|
|
76
|
|
74
|
//商品信息
|
77
|
//商品信息
|
75
|
BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
78
|
BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
|
@@ -77,12 +80,13 @@ public class MessageFacade { |
|
@@ -77,12 +80,13 @@ public class MessageFacade { |
77
|
//skup获取 productInfo
|
80
|
//skup获取 productInfo
|
78
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
81
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
79
|
String prdName = sellerOrderGoods.getProductName();
|
82
|
String prdName = sellerOrderGoods.getProductName();
|
|
|
83
|
+ String sizeName = sellerOrderGoods.getSizeName();
|
80
|
|
84
|
|
81
|
- String params = buildParams(applicantMobileMask, prdName);
|
85
|
+ String params = buildParams(applicantName, prdName, sizeName);
|
82
|
InboxReqVO req = buildInboxReqVO(Integer.parseInt(ownerUid), params, ibtOfBuyer);
|
86
|
InboxReqVO req = buildInboxReqVO(Integer.parseInt(ownerUid), params, ibtOfBuyer);
|
83
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
87
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
84
|
- logger.info("record applyToBeOwner inbox msg, ownerUid {}, applicantMobileMask {}, prdName {} resp {}",
|
|
|
85
|
- ownerUid, applicantMobileMask, prdName, resp);
|
88
|
+ logger.info("record applyToBeOwner inbox msg, ownerUid {}, applicantUid {}, prdName {} resp {}",
|
|
|
89
|
+ ownerUid, applicantUid, prdName, resp);
|
86
|
|
90
|
|
87
|
//增加倒计时属性
|
91
|
//增加倒计时属性
|
88
|
if(null != resp.getData()) {
|
92
|
if(null != resp.getData()) {
|
|
@@ -103,13 +107,13 @@ public class MessageFacade { |
|
@@ -103,13 +107,13 @@ public class MessageFacade { |
103
|
|
107
|
|
104
|
//sms
|
108
|
//sms
|
105
|
if (StringUtils.isBlank(ownerMobile)){
|
109
|
if (StringUtils.isBlank(ownerMobile)){
|
106
|
- logger.warn("in applyToBeOwner sms fail, ownerUid {} applicantMobileMask {} prdName {} ", ownerUid, applicantMobileMask,prdName);
|
110
|
+ logger.warn("in applyToBeOwner sms fail, ownerUid {} applicantUid {} prdName {} ", ownerUid, applicantUid,prdName);
|
107
|
return;
|
111
|
return;
|
108
|
}
|
112
|
}
|
109
|
- String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM.getContent(), applicantMobileMask, prdName);
|
113
|
+ String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM.getContent(), applicantName, prdName, sizeName);
|
110
|
List<String> mobileList = Arrays.asList(ownerMobile);
|
114
|
List<String> mobileList = Arrays.asList(ownerMobile);
|
111
|
sendMessageService.smsSendByMobile(content,mobileList);
|
115
|
sendMessageService.smsSendByMobile(content,mobileList);
|
112
|
- logger.info("record applyToBeOwner inbox sms msg, ownerUid {} applicantMobileMask {} prdName {}", ownerUid, applicantMobileMask,prdName);
|
116
|
+ logger.info("record applyToBeOwner inbox sms msg, ownerUid {} applicantUid {} prdName {}", ownerUid, applicantUid, prdName);
|
113
|
|
117
|
|
114
|
} catch (Exception ex) {
|
118
|
} catch (Exception ex) {
|
115
|
logger.warn("InBoxFacade applyToBeOwner error inbox msg, ownerUid {} applicantUid {} tagId {} nfcUid {}",
|
119
|
logger.warn("InBoxFacade applyToBeOwner error inbox msg, ownerUid {} applicantUid {} tagId {} nfcUid {}",
|
|
@@ -127,6 +131,7 @@ public class MessageFacade { |
|
@@ -127,6 +131,7 @@ public class MessageFacade { |
127
|
public void ownerConfirmTimeOut(String applicantUid, Long orderCode){
|
131
|
public void ownerConfirmTimeOut(String applicantUid, Long orderCode){
|
128
|
executorService.execute(()-> {
|
132
|
executorService.execute(()-> {
|
129
|
try {
|
133
|
try {
|
|
|
134
|
+ InboxBusinessTypeEnum ibtOfBuyer = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_OWNER_CONFIRM_TIMEOUT;
|
130
|
List<String> uidList = Lists.newArrayList(applicantUid);
|
135
|
List<String> uidList = Lists.newArrayList(applicantUid);
|
131
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
136
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
132
|
String applicantMobile = profileMap.get(Integer.parseInt(applicantUid)).getMobile();
|
137
|
String applicantMobile = profileMap.get(Integer.parseInt(applicantUid)).getMobile();
|
|
@@ -137,13 +142,20 @@ public class MessageFacade { |
|
@@ -137,13 +142,20 @@ public class MessageFacade { |
137
|
//skup获取 productInfo
|
142
|
//skup获取 productInfo
|
138
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
143
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
139
|
String prdName = sellerOrderGoods.getProductName();
|
144
|
String prdName = sellerOrderGoods.getProductName();
|
|
|
145
|
+ String sizeName = sellerOrderGoods.getSizeName();
|
|
|
146
|
+
|
|
|
147
|
+ String params = buildParams(prdName, sizeName);
|
|
|
148
|
+ InboxReqVO req = buildInboxReqVO(Integer.parseInt(applicantUid), params, ibtOfBuyer);
|
|
|
149
|
+ InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
150
|
+ logger.info("record applyToBeOwner inbox msg, applicantUid {}, prdName {} resp {}",
|
|
|
151
|
+ applicantUid, prdName, resp);
|
140
|
|
152
|
|
141
|
//sms
|
153
|
//sms
|
142
|
if (StringUtils.isBlank(applicantMobile)){
|
154
|
if (StringUtils.isBlank(applicantMobile)){
|
143
|
logger.warn("in ownerConfirmTimeOut sms fail, applicantUid {} prdName {} ", applicantUid, prdName);
|
155
|
logger.warn("in ownerConfirmTimeOut sms fail, applicantUid {} prdName {} ", applicantUid, prdName);
|
144
|
return;
|
156
|
return;
|
145
|
}
|
157
|
}
|
146
|
- String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_TIMEOUT.getContent(), prdName);
|
158
|
+ String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_TIMEOUT.getContent(), prdName, sizeName);
|
147
|
List<String> mobileList = Arrays.asList(applicantMobile);
|
159
|
List<String> mobileList = Arrays.asList(applicantMobile);
|
148
|
sendMessageService.smsSendByMobile(content,mobileList);
|
160
|
sendMessageService.smsSendByMobile(content,mobileList);
|
149
|
logger.info("record ownerConfirmTimeOut inbox sms msg, applicantUid {},prdName {}", applicantUid, prdName);
|
161
|
logger.info("record ownerConfirmTimeOut inbox sms msg, applicantUid {},prdName {}", applicantUid, prdName);
|
|
@@ -161,6 +173,7 @@ public class MessageFacade { |
|
@@ -161,6 +173,7 @@ public class MessageFacade { |
161
|
public void ownerReject(String applicantUid, Long orderCode){
|
173
|
public void ownerReject(String applicantUid, Long orderCode){
|
162
|
executorService.execute(()-> {
|
174
|
executorService.execute(()-> {
|
163
|
try {
|
175
|
try {
|
|
|
176
|
+ InboxBusinessTypeEnum ibtOfBuyer = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_OWNER_REJECT;
|
164
|
List<String> uidList = Lists.newArrayList(applicantUid);
|
177
|
List<String> uidList = Lists.newArrayList(applicantUid);
|
165
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
178
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
166
|
String applicantMobile = profileMap.get(Integer.parseInt(applicantUid)).getMobile();
|
179
|
String applicantMobile = profileMap.get(Integer.parseInt(applicantUid)).getMobile();
|
|
@@ -171,13 +184,62 @@ public class MessageFacade { |
|
@@ -171,13 +184,62 @@ public class MessageFacade { |
171
|
//skup获取 productInfo
|
184
|
//skup获取 productInfo
|
172
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
185
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
173
|
String prdName = sellerOrderGoods.getProductName();
|
186
|
String prdName = sellerOrderGoods.getProductName();
|
|
|
187
|
+ String sizeName = sellerOrderGoods.getSizeName();
|
|
|
188
|
+
|
|
|
189
|
+ String params = buildParams(prdName, sizeName);
|
|
|
190
|
+ InboxReqVO req = buildInboxReqVO(Integer.parseInt(applicantUid), params, ibtOfBuyer);
|
|
|
191
|
+ InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
192
|
+ logger.info("record applyToBeOwner inbox msg, applicantUid {}, prdName {} resp {}",
|
|
|
193
|
+ applicantUid, prdName, resp);
|
|
|
194
|
+
|
|
|
195
|
+ //sms
|
|
|
196
|
+ if (StringUtils.isBlank(applicantMobile)){
|
|
|
197
|
+ logger.warn("in ownerConfirmTimeOut sms fail, applicantUid {} prdName {} ", applicantUid, prdName);
|
|
|
198
|
+ return;
|
|
|
199
|
+ }
|
|
|
200
|
+ String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_REJECT.getContent(), prdName, sizeName);
|
|
|
201
|
+ List<String> mobileList = Arrays.asList(applicantMobile);
|
|
|
202
|
+ sendMessageService.smsSendByMobile(content,mobileList);
|
|
|
203
|
+ logger.info("record ownerConfirmTimeOut inbox sms msg, applicantUid {},prdName {}", applicantUid, prdName);
|
|
|
204
|
+
|
|
|
205
|
+ } catch (Exception ex) {
|
|
|
206
|
+ logger.warn("MessageFacade ownerConfirmTimeOut error inbox msg, applicantUid {} orderCode {} ",
|
|
|
207
|
+ applicantUid, orderCode, ex);
|
|
|
208
|
+ }
|
|
|
209
|
+ });
|
|
|
210
|
+ }
|
|
|
211
|
+
|
|
|
212
|
+ /**
|
|
|
213
|
+ * 当前主人同意物权转移
|
|
|
214
|
+ */
|
|
|
215
|
+ public void ownerPass(String applicantUid, Long orderCode){
|
|
|
216
|
+ executorService.execute(()-> {
|
|
|
217
|
+ try {
|
|
|
218
|
+ InboxBusinessTypeEnum ibtOfBuyer = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_OWNER_PASS;
|
|
|
219
|
+ List<String> uidList = Lists.newArrayList(applicantUid);
|
|
|
220
|
+ Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
|
|
221
|
+ String applicantMobile = profileMap.get(Integer.parseInt(applicantUid)).getMobile();
|
|
|
222
|
+
|
|
|
223
|
+ //商品信息
|
|
|
224
|
+ BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
|
|
225
|
+ Integer skup = buyerOrderGoods.getSkup();
|
|
|
226
|
+ //skup获取 productInfo
|
|
|
227
|
+ SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
228
|
+ String prdName = sellerOrderGoods.getProductName();
|
|
|
229
|
+ String sizeName = sellerOrderGoods.getSizeName();
|
|
|
230
|
+
|
|
|
231
|
+ String params = buildParams(prdName, sizeName);
|
|
|
232
|
+ InboxReqVO req = buildInboxReqVO(Integer.parseInt(applicantUid), params, ibtOfBuyer);
|
|
|
233
|
+ InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
234
|
+ logger.info("record applyToBeOwner inbox msg, applicantUid {}, prdName {} resp {}",
|
|
|
235
|
+ applicantUid, prdName, resp);
|
174
|
|
236
|
|
175
|
//sms
|
237
|
//sms
|
176
|
if (StringUtils.isBlank(applicantMobile)){
|
238
|
if (StringUtils.isBlank(applicantMobile)){
|
177
|
logger.warn("in ownerConfirmTimeOut sms fail, applicantUid {} prdName {} ", applicantUid, prdName);
|
239
|
logger.warn("in ownerConfirmTimeOut sms fail, applicantUid {} prdName {} ", applicantUid, prdName);
|
178
|
return;
|
240
|
return;
|
179
|
}
|
241
|
}
|
180
|
- String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_REJECT.getContent(), prdName);
|
242
|
+ String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_PASS.getContent(), prdName, sizeName);
|
181
|
List<String> mobileList = Arrays.asList(applicantMobile);
|
243
|
List<String> mobileList = Arrays.asList(applicantMobile);
|
182
|
sendMessageService.smsSendByMobile(content,mobileList);
|
244
|
sendMessageService.smsSendByMobile(content,mobileList);
|
183
|
logger.info("record ownerConfirmTimeOut inbox sms msg, applicantUid {},prdName {}", applicantUid, prdName);
|
245
|
logger.info("record ownerConfirmTimeOut inbox sms msg, applicantUid {},prdName {}", applicantUid, prdName);
|