Authored by mingdan.ge

cps锁粉mq修改

package com.yoho.unions.dal.model;
public class UnionShareOrdersActivityPage {
import com.yoho.service.model.union.request.BaseBO;
public class UnionShareOrdersActivityPage extends BaseBO {
private Integer id;
private Integer activityId;
... ...
package com.yoho.unions.dal.model;
public class UnionShareOrdersActivityPagePre {
import com.yoho.service.model.union.request.BaseBO;
public class UnionShareOrdersActivityPagePre extends BaseBO {
private Integer id;
private Integer uid;
... ...
package com.yoho.unions.dal.model;
import com.yoho.service.model.union.request.BaseBO;
import java.math.BigDecimal;
public class UnionShareOrdersProduct {
public class UnionShareOrdersProduct extends BaseBO {
private Integer id;
private Integer productSkn;
... ...
package com.yoho.unions.dal.model;
public class UnionShareUser {
import com.yoho.service.model.union.request.BaseBO;
public class UnionShareUser extends BaseBO {
private Integer id;
private Integer uid;
... ...
package com.yoho.unions.dal.model;
public class UnionShareUserApply {
import com.yoho.service.model.union.request.BaseBO;
public class UnionShareUserApply extends BaseBO {
private Integer id;
private Integer uid;
... ...
package com.yoho.unions.dal.model;
public class UnionShareUserFans {
import com.yoho.service.model.union.request.BaseBO;
public class UnionShareUserFans extends BaseBO {
private Integer id;
private Integer uid;
... ...
package com.yoho.unions.dal.model;
import com.yoho.service.model.union.request.BaseBO;
import java.math.BigDecimal;
public class UnionShareUserInvite {
public class UnionShareUserInvite extends BaseBO {
private Integer id;
private Integer inviterUid;
... ...
package com.yoho.unions.server.mqconsumer;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yoho.core.common.utils.JsonUtil;
import com.yoho.core.rabbitmq.YhConsumer;
... ... @@ -33,13 +32,13 @@ public class UnionFansRelationConsumer implements YhConsumer {
if (null == o) {
return;
}
JSONObject jsonObject = (JSONObject) JSON.toJSON(o);
JSONObject jsonObject =JSONObject.parseObject(o.toString(),JSONObject.class);
if (jsonObject != null&&jsonObject.containsKey("list")) {
List<UnionShareUserFans> bo = JsonUtil.jsonToList(jsonObject.getString("list"), UnionShareUserFans.class);
unionShareService.updateFansRelation(bo);
}
} catch (Exception e) {
logger.warn("UnionFansRelationConsumer,handleMessage fail! obj is {}, e {}",o,e);
logger.warn("UnionFansRelationConsumer,handleMessage fail! obj is {}, e is {}",o,e);
}
}
}
... ...
... ... @@ -50,7 +50,7 @@ public class UnionShareOrderConsumer implements YhConsumer {
dates.add(DateUtil.getDateStrBySecond(bo.getOrderTime(),"yyyyMM"));
uids.put(bo.getPromoteUid(), dates);
} catch (Exception e) {
logger.warn("UnionShareOrderConsumer,handleMessage fail! bo is {}, e {}",l,e.getMessage());
logger.warn("UnionShareOrderConsumer,handleMessage fail! bo is {}, e is {}",l,e);
}
});
logger.info("UnionShareOrderConsumer,begin to updateMonthData,uids is {},o is {}",uids, o);
... ... @@ -60,7 +60,7 @@ public class UnionShareOrderConsumer implements YhConsumer {
try {
unionShareService.updateMonthData(u,dates);
} catch (Exception e) {
logger.warn("UnionShareOrderConsumer,updateMonthData error,uid is {},dates is {},e is {}",u, dates,e.getMessage());
logger.warn("UnionShareOrderConsumer,updateMonthData error,uid is {},dates is {},e is {}",u, dates,e);
}
});
logger.info("UnionShareOrderConsumer,updateMonthData end,uids is {},o is {}",uids, o);
... ... @@ -68,7 +68,7 @@ public class UnionShareOrderConsumer implements YhConsumer {
int date = Integer.valueOf(DateUtil.getToday("yyyyMMdd"));
redisHashCache.delete(ShareOrdersKeyEnum.RANK_LIST.getPreKey(),date);
} catch (Exception e) {
logger.warn("UnionShareOrderConsumer,handleMessage fail! obj is {}, e {}",o,e.getMessage());
logger.warn("UnionShareOrderConsumer,handleMessage fail! obj is {}, e is {}",o,e);
}
}
}
... ...
... ... @@ -798,6 +798,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
* */
@Override
public void updateFansRelation(List<UnionShareUserFans> bo){
logger.info("updateFansRelation,bo is {}",JsonUtil.objectToJSON(bo));
if (CollectionUtils.isEmpty(bo)) {
return;
}
... ... @@ -823,7 +824,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
return;
}
if (fans.getCreateTime() <= fansDb.getCreateTime()) {
logger.info("saveFansRelation end.fans is older than fansDb,fansDb is {},fans is {}",fans);
logger.info("saveFansRelation end.fans is older than fansDb,fansDb is {},fans is {}",fansDb,fans);
return;
}
if (fansDb.getUid().equals(fans.getUid())) {
... ...