| | |
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.AlipayTransferResultInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.push.PushQueueRecord;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | |
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请关系变化后券的更新
|
| | | */
|
| | | public void doThreeSaleUserCouponJob() {
|
| | |
|
| | | // 采用2个线程做更新
|
| | | for (int i = 0; i < 2; i++)
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | |
|
| | | while (true) {
|
| | | try {
|
| | |
|
| | | Map<String, ThreeSale> map = ThreeSaleCMQManager.getInstance()
|
| | | .consumeQueueMsg(ThreeSaleCMQManager.QUEUE_USER_COUPON, 16);
|
| | |
|
| | | if (map != null) {
|
| | |
|
| | | Iterator<String> its = map.keySet().iterator();
|
| | | while (its.hasNext()) {
|
| | | String key = its.next();
|
| | | try {
|
| | | ThreeSale threeSale = map.get(key);
|
| | | if (threeSale != null) {
|
| | | if (threeSale.getState() != null && threeSale.getState() == true) {
|
| | | // 邀请成功
|
| | |
|
| | | // TODO 券激活生效
|
| | | // threeSale.getBoss().getId();
|
| | |
|
| | | }
|
| | | }
|
| | | ThreeSaleCMQManager.getInstance()
|
| | | .deleteQueueMsg(ThreeSaleCMQManager.QUEUE_USER_COUPON, key);
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | | LogHelper.error("更新商品出错:" + e.getMessage());
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | | });
|
| | |
|
| | | }
|
| | | }
|