| | |
| | | import com.yeshi.fanli.exception.goods.CommonGoodsException;
|
| | | import com.yeshi.fanli.exception.goods.RecommendUserGoodsException;
|
| | | import com.yeshi.fanli.exception.msg.UserSystemMsgException;
|
| | | import com.yeshi.fanli.exception.user.UserCustomSettingsException;
|
| | | import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
|
| | | import com.yeshi.fanli.service.inter.goods.RecommendUserGoodsService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityFactoryService;
|
| | |
| | | import com.yeshi.fanli.service.inter.msg.MsgOrderDetailService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserMsgReadStateService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserSystemMsgService;
|
| | | import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | | import com.yeshi.fanli.vo.msg.UserHomeMsgVO;
|
| | | import com.yeshi.fanli.vo.msg.UserMsgVO;
|
| | | import com.yeshi.fanli.vo.msg.UserSystemMsgVO;
|
| | | import com.yeshi.fanli.vo.user.UserSettingsVO;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private QualityFactoryService qualityFactoryService;
|
| | |
|
| | | @Resource
|
| | | private UserCustomSettingsService userCustomSettingsService;
|
| | |
|
| | | // 消息的类型
|
| | | final static String MSG_TYPE_ORDER = "order";
|
| | |
| | | JSONObject data = JSONObject.fromObject(JsonUtil.getApiCommonGson().toJson(num));
|
| | | data.put("totalCount", num.getTypeAccount() + num.getTypeInvite() + num.getTypeMoney() + num.getTypeOrder()
|
| | | + num.getTypeScore() + num.getTypeSystem());
|
| | |
|
| | | try {
|
| | | UserSettingsVO vo = userCustomSettingsService.getMySettings(uid);
|
| | | if (vo != null && vo.getNoNewsRedDot() != null && vo.getNoNewsRedDot() == 1) {
|
| | | data.put("totalCount", 0);
|
| | | }
|
| | | } catch (UserCustomSettingsException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | UserSystemMsg usm = userSystemMsgService.getLatestUserSystemMsg(uid);
|
| | | if (usm != null)
|
| | | root.put("systemMsg",
|
| | | new UserSystemMsgVO(usm.getId(), usm.getType().name(), usm.getSolved(), usm.getTitle(),
|
| | | usm.getContent(),
|
| | | new UserSystemMsgVO(usm.getId(), usm.getType().name(), usm.getSolved(), "系统消息", usm.getTitle(),
|
| | | usm.getTimeTag() == 1 ? "http://img.flqapp.com/resource/msg/icon_emergent.png" : "",
|
| | | "http://img.flqapp.com/resource/msg/icon_msg_system.png",
|
| | | getTimeDesc(now, usm.getCreateTime()), num.getTypeSystem()));
|