Authored by mingdan.ge

cps锁粉mq修改

1 package com.yoho.unions.dal.model; 1 package com.yoho.unions.dal.model;
2 2
3 -public class UnionShareOrdersActivityPage { 3 +import com.yoho.service.model.union.request.BaseBO;
  4 +
  5 +public class UnionShareOrdersActivityPage extends BaseBO {
4 private Integer id; 6 private Integer id;
5 7
6 private Integer activityId; 8 private Integer activityId;
1 package com.yoho.unions.dal.model; 1 package com.yoho.unions.dal.model;
2 2
3 -public class UnionShareOrdersActivityPagePre { 3 +import com.yoho.service.model.union.request.BaseBO;
  4 +
  5 +public class UnionShareOrdersActivityPagePre extends BaseBO {
4 private Integer id; 6 private Integer id;
5 7
6 private Integer uid; 8 private Integer uid;
1 package com.yoho.unions.dal.model; 1 package com.yoho.unions.dal.model;
2 2
  3 +import com.yoho.service.model.union.request.BaseBO;
  4 +
3 import java.math.BigDecimal; 5 import java.math.BigDecimal;
4 6
5 -public class UnionShareOrdersProduct { 7 +public class UnionShareOrdersProduct extends BaseBO {
6 private Integer id; 8 private Integer id;
7 9
8 private Integer productSkn; 10 private Integer productSkn;
1 package com.yoho.unions.dal.model; 1 package com.yoho.unions.dal.model;
2 2
3 -public class UnionShareUser { 3 +import com.yoho.service.model.union.request.BaseBO;
  4 +
  5 +public class UnionShareUser extends BaseBO {
4 private Integer id; 6 private Integer id;
5 7
6 private Integer uid; 8 private Integer uid;
1 package com.yoho.unions.dal.model; 1 package com.yoho.unions.dal.model;
2 2
3 -public class UnionShareUserApply { 3 +import com.yoho.service.model.union.request.BaseBO;
  4 +
  5 +public class UnionShareUserApply extends BaseBO {
4 private Integer id; 6 private Integer id;
5 7
6 private Integer uid; 8 private Integer uid;
1 package com.yoho.unions.dal.model; 1 package com.yoho.unions.dal.model;
2 2
3 -public class UnionShareUserFans { 3 +import com.yoho.service.model.union.request.BaseBO;
  4 +
  5 +public class UnionShareUserFans extends BaseBO {
4 private Integer id; 6 private Integer id;
5 7
6 private Integer uid; 8 private Integer uid;
1 package com.yoho.unions.dal.model; 1 package com.yoho.unions.dal.model;
2 2
  3 +import com.yoho.service.model.union.request.BaseBO;
  4 +
3 import java.math.BigDecimal; 5 import java.math.BigDecimal;
4 6
5 -public class UnionShareUserInvite { 7 +public class UnionShareUserInvite extends BaseBO {
6 private Integer id; 8 private Integer id;
7 9
8 private Integer inviterUid; 10 private Integer inviterUid;
1 package com.yoho.unions.server.mqconsumer; 1 package com.yoho.unions.server.mqconsumer;
2 2
3 -import com.alibaba.fastjson.JSON;  
4 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
5 import com.yoho.core.common.utils.JsonUtil; 4 import com.yoho.core.common.utils.JsonUtil;
6 import com.yoho.core.rabbitmq.YhConsumer; 5 import com.yoho.core.rabbitmq.YhConsumer;
@@ -33,13 +32,13 @@ public class UnionFansRelationConsumer implements YhConsumer { @@ -33,13 +32,13 @@ public class UnionFansRelationConsumer implements YhConsumer {
33 if (null == o) { 32 if (null == o) {
34 return; 33 return;
35 } 34 }
36 - JSONObject jsonObject = (JSONObject) JSON.toJSON(o); 35 + JSONObject jsonObject =JSONObject.parseObject(o.toString(),JSONObject.class);
37 if (jsonObject != null&&jsonObject.containsKey("list")) { 36 if (jsonObject != null&&jsonObject.containsKey("list")) {
38 List<UnionShareUserFans> bo = JsonUtil.jsonToList(jsonObject.getString("list"), UnionShareUserFans.class); 37 List<UnionShareUserFans> bo = JsonUtil.jsonToList(jsonObject.getString("list"), UnionShareUserFans.class);
39 unionShareService.updateFansRelation(bo); 38 unionShareService.updateFansRelation(bo);
40 } 39 }
41 } catch (Exception e) { 40 } catch (Exception e) {
42 - logger.warn("UnionFansRelationConsumer,handleMessage fail! obj is {}, e {}",o,e); 41 + logger.warn("UnionFansRelationConsumer,handleMessage fail! obj is {}, e is {}",o,e);
43 } 42 }
44 } 43 }
45 } 44 }
@@ -50,7 +50,7 @@ public class UnionShareOrderConsumer implements YhConsumer { @@ -50,7 +50,7 @@ public class UnionShareOrderConsumer implements YhConsumer {
50 dates.add(DateUtil.getDateStrBySecond(bo.getOrderTime(),"yyyyMM")); 50 dates.add(DateUtil.getDateStrBySecond(bo.getOrderTime(),"yyyyMM"));
51 uids.put(bo.getPromoteUid(), dates); 51 uids.put(bo.getPromoteUid(), dates);
52 } catch (Exception e) { 52 } catch (Exception e) {
53 - logger.warn("UnionShareOrderConsumer,handleMessage fail! bo is {}, e {}",l,e.getMessage()); 53 + logger.warn("UnionShareOrderConsumer,handleMessage fail! bo is {}, e is {}",l,e);
54 } 54 }
55 }); 55 });
56 logger.info("UnionShareOrderConsumer,begin to updateMonthData,uids is {},o is {}",uids, o); 56 logger.info("UnionShareOrderConsumer,begin to updateMonthData,uids is {},o is {}",uids, o);
@@ -60,7 +60,7 @@ public class UnionShareOrderConsumer implements YhConsumer { @@ -60,7 +60,7 @@ public class UnionShareOrderConsumer implements YhConsumer {
60 try { 60 try {
61 unionShareService.updateMonthData(u,dates); 61 unionShareService.updateMonthData(u,dates);
62 } catch (Exception e) { 62 } catch (Exception e) {
63 - logger.warn("UnionShareOrderConsumer,updateMonthData error,uid is {},dates is {},e is {}",u, dates,e.getMessage()); 63 + logger.warn("UnionShareOrderConsumer,updateMonthData error,uid is {},dates is {},e is {}",u, dates,e);
64 } 64 }
65 }); 65 });
66 logger.info("UnionShareOrderConsumer,updateMonthData end,uids is {},o is {}",uids, o); 66 logger.info("UnionShareOrderConsumer,updateMonthData end,uids is {},o is {}",uids, o);
@@ -68,7 +68,7 @@ public class UnionShareOrderConsumer implements YhConsumer { @@ -68,7 +68,7 @@ public class UnionShareOrderConsumer implements YhConsumer {
68 int date = Integer.valueOf(DateUtil.getToday("yyyyMMdd")); 68 int date = Integer.valueOf(DateUtil.getToday("yyyyMMdd"));
69 redisHashCache.delete(ShareOrdersKeyEnum.RANK_LIST.getPreKey(),date); 69 redisHashCache.delete(ShareOrdersKeyEnum.RANK_LIST.getPreKey(),date);
70 } catch (Exception e) { 70 } catch (Exception e) {
71 - logger.warn("UnionShareOrderConsumer,handleMessage fail! obj is {}, e {}",o,e.getMessage()); 71 + logger.warn("UnionShareOrderConsumer,handleMessage fail! obj is {}, e is {}",o,e);
72 } 72 }
73 } 73 }
74 } 74 }
@@ -798,6 +798,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport @@ -798,6 +798,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
798 * */ 798 * */
799 @Override 799 @Override
800 public void updateFansRelation(List<UnionShareUserFans> bo){ 800 public void updateFansRelation(List<UnionShareUserFans> bo){
  801 + logger.info("updateFansRelation,bo is {}",JsonUtil.objectToJSON(bo));
801 if (CollectionUtils.isEmpty(bo)) { 802 if (CollectionUtils.isEmpty(bo)) {
802 return; 803 return;
803 } 804 }
@@ -823,7 +824,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport @@ -823,7 +824,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
823 return; 824 return;
824 } 825 }
825 if (fans.getCreateTime() <= fansDb.getCreateTime()) { 826 if (fans.getCreateTime() <= fansDb.getCreateTime()) {
826 - logger.info("saveFansRelation end.fans is older than fansDb,fansDb is {},fans is {}",fans); 827 + logger.info("saveFansRelation end.fans is older than fansDb,fansDb is {},fans is {}",fansDb,fans);
827 return; 828 return;
828 } 829 }
829 if (fansDb.getUid().equals(fans.getUid())) { 830 if (fansDb.getUid().equals(fans.getUid())) {