Authored by 匡佳华

Merge branch 'dev-couponSend' into test6.9.1

@@ -297,6 +297,7 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ @@ -297,6 +297,7 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{
297 return new ApiResponse(201, "uid数量大于当前券可用数量:"+ availableNum + "!" , null); 297 return new ApiResponse(201, "uid数量大于当前券可用数量:"+ availableNum + "!" , null);
298 } 298 }
299 // 发券 299 // 发券
  300 + Set<Integer> failUidSet = new HashSet<>();
300 for(Integer uid : uidSet){ 301 for(Integer uid : uidSet){
301 try { 302 try {
302 JSONObject sendCouponParam = new JSONObject(); 303 JSONObject sendCouponParam = new JSONObject();
@@ -306,9 +307,11 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ @@ -306,9 +307,11 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{
306 yhProducer.send("ufo.couponSendWithTradeMqNotify", sendCouponParam, null); 307 yhProducer.send("ufo.couponSendWithTradeMqNotify", sendCouponParam, null);
307 Thread.sleep(5); 308 Thread.sleep(5);
308 }catch (Exception e){ 309 }catch (Exception e){
309 - LOGGER.info("sendCoupon by mq fail with uid is {}, token is {}", uid, couponToken); 310 + failUidSet.add(uid);
  311 + LOGGER.warn("sendCoupon by mq fail with uid is {}, token is {}, e is {}", uid, couponToken,e);
310 } 312 }
311 } 313 }
  314 + LOGGER.info("sendCoupon end with success num is {}", uidSet.size() - failUidSet.size());
312 return new ApiResponse(); 315 return new ApiResponse();
313 } 316 }
314 317