admin
2021-05-31 1f2740829d4e7e1198a2070f66849873b18b4c22
特价消息完善
10个文件已添加
31个文件已修改
2 文件已重命名
4204 ■■■■■ 已修改文件
fanli/pom.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserMsgControllerV2.java 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgAccountDetailMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgInviteDetailMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgMoneyDetailMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgOrderDetailMapper.java 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgOtherDetailMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/UserSystemMsgMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgExtra.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/exception/msg/MsgLijinVIPDetailException.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/lijin/dao/MsgLijinVIPDetailMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/lijin/entity/MsgLijinVIPDetail.java 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/lijin/service/MsgLijinVIPService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/lijin/service/impl/MsgLijinVIPServiceImpl.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOverViewsServiceImpl.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserSystemMsgServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/msg/MsgOrderDetailServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/MsgInviteDetailServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/msg/MsgAccountDetailServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/money/msg/MsgMoneyDetailService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/msg/MsgOtherDetailService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/msg/MsgOverViewsService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/msg/UserSystemMsgService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/msg/MsgOrderDetailService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/MsgInviteDetailService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/msg/MsgAccountDetailService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/vipshop/VIPShopClassService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/vipshop/VIPShopGoodsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgLijinVIPDetailFactory.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgOrderDetailFactory.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgOverViewsFactory.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java 3016 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/mybatishandler/msg/MsgTypeLijinVIPTypeEnumHandler.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/lijin/MsgLijinVIPDetailMapper.xml 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/msg/MsgAccountDetailMapper.xml 158 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/msg/MsgInviteDetailMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/msg/MsgMoneyDetailMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/msg/MsgOrderDetailMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/msg/MsgOtherDetailMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/msg/UserSystemMsgMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/spring.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/pom.xml
@@ -212,13 +212,13 @@
        <dependency>
            <groupId>com.ks</groupId>
            <artifactId>facade-vip</artifactId>
            <version>0.0.5</version>
            <version>0.0.6</version>
        </dependency>
        <dependency>
            <groupId>com.ks</groupId>
            <artifactId>facade-lijin</artifactId>
            <version>0.0.3</version>
            <version>0.0.4</version>
        </dependency>
        <dependency>
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserMsgControllerV2.java
New file
@@ -0,0 +1,208 @@
package com.yeshi.fanli.controller.client.v2;
import com.google.gson.*;
import com.yeshi.fanli.dto.msg.MsgCommonDTO;
import com.yeshi.fanli.entity.SystemEnum;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.lable.QualityFactory;
import com.yeshi.fanli.entity.bus.msg.*;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.goods.CommonGoods;
import com.yeshi.fanli.entity.goods.RecommendUserGoods;
import com.yeshi.fanli.entity.push.DeviceActive;
import com.yeshi.fanli.entity.push.PushGoods;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
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.lijin.entity.MsgLijinVIPDetail;
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
import com.yeshi.fanli.service.inter.goods.RecommendUserGoodsService;
import com.yeshi.fanli.service.inter.homemodule.SpecialService;
import com.yeshi.fanli.service.inter.lable.QualityFactoryService;
import com.yeshi.fanli.service.inter.money.msg.MsgMoneyDetailService;
import com.yeshi.fanli.service.inter.msg.*;
import com.yeshi.fanli.service.inter.order.msg.MsgOrderDetailService;
import com.yeshi.fanli.service.inter.push.DeviceActiveService;
import com.yeshi.fanli.service.inter.push.PushGoodsService;
import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.service.inter.user.invite.MsgInviteDetailService;
import com.yeshi.fanli.service.inter.user.msg.MsgAccountDetailService;
import com.yeshi.fanli.util.*;
import com.yeshi.fanli.util.account.UserUtil;
import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
import com.yeshi.fanli.util.factory.CommonGoodsFactory;
import com.yeshi.fanli.util.factory.msg.UserMsgVOFactory;
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
import com.yeshi.fanli.vo.msg.*;
import com.yeshi.fanli.vo.user.UserSettingsVO;
import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.yeshi.utils.BigDecimalUtil;
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.TimeUtil;
import org.yeshi.utils.taobao.TbImgUtil;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.io.PrintWriter;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.util.*;
@Controller
@RequestMapping("api/v2/user/msg")
public class UserMsgControllerV2 {
    @Resource
    private UserMsgReadStateService userMsgReadStateService;
    @Resource
    private JumpDetailV2Service jumpDetailV2Service;
    @Resource
    private MsgOverViewsService msgOverViewsService;
    @Resource
    private ConfigService configService;
    /**
     * 获取消息列表
     *
     * @param acceptData
     * @param uid
     * @param page
     * @param type
     * @param out
     */
    @RequestMapping(value = "getMsgList", method = RequestMethod.POST)
    public void getMsgList(AcceptData acceptData, Long uid, int page, String type, PrintWriter out) {
        if (uid == null) {
            out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
            return;
        }
        List<MsgOverViews> list1 = msgOverViewsService.listByUid(uid, page, Constant.PAGE_SIZE);
        long count = msgOverViewsService.countByUid(uid);
        List<Object> msgList = msgOverViewsService.listDetail(list1);
        userMsgReadStateService.setAllMsgRead(uid);
        //检索overviews下的消息
        List<UserMsgVO> list = new ArrayList<>();
        for (Object obj : msgList) {
            if (obj instanceof MsgOrderDetail) {
                MsgOrderDetail detail = (MsgOrderDetail) obj;
                JSONObject params = new JSONObject();
                params.put("orderNo", detail.getOrderId());
                if (detail.getType() == MsgTypeOrderTypeEnum.invite || detail.getType() == MsgTypeOrderTypeEnum.orderInvite)
                    params.put("orderHideNo", UserUtil.filterOrderId(detail.getOrderId()));
                UserMsgVO msgVO = UserMsgVOFactory.create(detail, jumpDetailV2Service.getByTypeCache("order_search"), params);
                msgVO.setType(MsgExtra.MSG_TYPE_ORDER);
                list.add(msgVO);
            } else if (obj instanceof MsgMoneyDetail) {
                MsgMoneyDetail detail = (MsgMoneyDetail) obj;
                UserMsgVO msgVO = UserMsgVOFactory.create(detail);
                msgVO.setType(MsgExtra.MSG_TYPE_MONEY);
                list.add(msgVO);
            } else if (obj instanceof MsgAccountDetail) {
                MsgAccountDetail detail = (MsgAccountDetail) obj;
                UserMsgVO msgVO = UserMsgVOFactory.create(detail);
                msgVO.setType(MsgExtra.MSG_TYPE_ACCOUNT);
                list.add(msgVO);
            } else if (obj instanceof MsgInviteDetail) {
                MsgInviteDetail detail = (MsgInviteDetail) obj;
                UserMsgVO vo = UserMsgVOFactory.create(detail);
                if (vo != null) {
                    vo.setType(MsgExtra.MSG_TYPE_INVITE);
                    list.add(vo);
                } else {
                    count--;
                }
            } else if (obj instanceof MsgOtherDetail) {
                MsgOtherDetail detail = (MsgOtherDetail) obj;
                UserMsgVO vo = UserMsgVOFactory.create(detail);
                if (vo != null) {
                    vo.setType(MsgExtra.MSG_TYPE_OTHER);
                    list.add(vo);
                } else {
                    count--;
                }
            } else if (obj instanceof MsgLijinVIPDetail) {
                MsgLijinVIPDetail detail = (MsgLijinVIPDetail) obj;
                JSONObject params = new JSONObject();
                params.put("url", configService.getValue(ConfigKeyEnum.lijinVIPLink, acceptData.getSystem()));
                UserMsgVO vo = UserMsgVOFactory.create(detail, jumpDetailV2Service.getByTypeCache("web"), params);
                vo.setType(MsgExtra.MSG_TYPE_LIJIN_VIP);
                list.add(vo);
            } else if (obj instanceof UserSystemMsg) {
                UserSystemMsg detail = (UserSystemMsg) obj;
                UserMsgVO vo = UserMsgVOFactory.create(detail);
                vo.setType(MsgExtra.MSG_TYPE_SYSTEM);
                list.add(vo);
            }
        }
        GsonBuilder builder = new GsonBuilder();
        builder = getTimeDescJsonBuilder(builder);
        JSONObject root = new JSONObject();
        root.put("data", builder.create().toJson(list));
        root.put("count", count);
        out.print(JsonUtil.loadTrueResult(root));
    }
    private String getTimeDesc(Date nowDate, Date targetDate) {
        Calendar now = Calendar.getInstance();
        now.setTime(nowDate);
        if (TimeUtil.getGernalTime(targetDate.getTime(), "yyyy-MM-dd")
                .equalsIgnoreCase(TimeUtil.getGernalTime(now.getTimeInMillis(), "yyyy-MM-dd"))) {
            return "今天 " + TimeUtil.getGernalTime(targetDate.getTime(), "HH:mm");
        } else if (TimeUtil.getGernalTime(targetDate.getTime(), "yyyy-MM-dd")
                .equalsIgnoreCase(TimeUtil.getGernalTime(now.getTimeInMillis() - 1000 * 60 * 60 * 24L, "yyyy-MM-dd"))) {
            return "昨天 " + TimeUtil.getGernalTime(targetDate.getTime(), "HH:mm");
        } else {
            return TimeUtil.getGernalTime(targetDate.getTime(), "yyyy.MM.dd HH:mm");
        }
    }
    private GsonBuilder getTimeDescJsonBuilder(GsonBuilder builder) {
        builder = builder.registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
            @Override
            public JsonElement serialize(Date value, Type theType, JsonSerializationContext context) {
                if (value == null) {
                    return new JsonPrimitive("");
                } else {
                    Calendar now = Calendar.getInstance();
                    return new JsonPrimitive(getTimeDesc(new Date(now.getTimeInMillis()), value));
                }
            }
        }).registerTypeAdapter(BigDecimal.class, new JsonSerializer<BigDecimal>() {
            @Override
            public JsonElement serialize(BigDecimal value, Type theType, JsonSerializationContext context) {
                if (value == null) {
                    return new JsonPrimitive("0");
                } else {
                    return new JsonPrimitive(BigDecimalUtil.getWithNoZera(value).toString());
                }
            }
        });
        return builder;
    }
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgAccountDetailMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
@@ -19,6 +20,8 @@
     */
    List<MsgAccountDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count);
    List<MsgAccountDetail> listByPrimaryKeys(@Param("ids") List<Long> ids);
    /**
     * 根据用户查询数量
     * 
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgInviteDetailMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
@@ -27,6 +28,8 @@
     */
    List<MsgInviteDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count);
    List<MsgInviteDetail> listByPrimaryKeys(@Param("ids") List<Long> ids);
    /**
     * 根据用户查询数量
     * 
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgMoneyDetailMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
@@ -15,6 +16,8 @@
    List<MsgMoneyDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count);
    List<MsgMoneyDetail> listByPrimaryKeys(@Param("ids") List<Long> ids);
    Long countByUid(@Param("uid") Long uid);
    
    /**
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgOrderDetailMapper.java
@@ -9,27 +9,29 @@
public interface MsgOrderDetailMapper extends BaseMapper<MsgOrderDetail> {
    MsgOrderDetail selectByUidAndOrderId(@Param("uid") Long uid, @Param("orderId") String orderId);
    MsgOrderDetail selectByUidAndOrderId(@Param("uid") Long uid, @Param("orderId") String orderId);
    List<MsgOrderDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count);
    List<MsgOrderDetail> listByOrderId(@Param("orderId") String orderId);
    List<MsgOrderDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count);
    Long countByUid(@Param("uid") Long uid);
    /**
     * 设置消息已读时
     *
     * @param uid
     */
    void setMsgReadByUid(Long uid);
    /**
     * 根据唯一索引查询
     *
     * @param uniqueKey
     * @return
     */
    MsgOrderDetail getByUniqueKey(@Param("uniqueKey") String uniqueKey);
    List<MsgOrderDetail> listByPrimaryKeys(@Param("ids") List<Long> ids);
    List<MsgOrderDetail> listByOrderId(@Param("orderId") String orderId);
    Long countByUid(@Param("uid") Long uid);
    /**
     * 设置消息已读时
     *
     * @param uid
     */
    void setMsgReadByUid(Long uid);
    /**
     * 根据唯一索引查询
     *
     * @param uniqueKey
     * @return
     */
    MsgOrderDetail getByUniqueKey(@Param("uniqueKey") String uniqueKey);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/MsgOtherDetailMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
@@ -19,6 +20,8 @@
     */
    List<MsgOtherDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count);
    List<MsgOtherDetail> listByPrimaryKeys(@Param("ids") List<Long> ids);
    /**
     * 查询用户的消息数量
     * 
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/msg/UserSystemMsgMapper.java
@@ -2,6 +2,8 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
import org.apache.ibatis.annotations.Param;
import com.beust.jcommander.Parameter;
@@ -20,6 +22,8 @@
     */
    List<UserSystemMsg> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count);
    List<UserSystemMsg> listByPrimaryKeys(@Param("ids") List<Long> ids);
    /**
     * 用户系统消息数量
     * 
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgExtra.java
@@ -19,6 +19,8 @@
    public final static String MSG_TYPE_ACCOUNT = "account";
    public final static String MSG_TYPE_INVITE = "invite";
    public final static String MSG_TYPE_OTHER = "other";
    public final static String MSG_TYPE_LIJIN_VIP = "lijinVip";
    public final static String MSG_TYPE_SYSTEM = "system";
    @Column(name = "mea_id")
    private Long id;
fanli/src/main/java/com/yeshi/fanli/exception/msg/MsgLijinVIPDetailException.java
New file
@@ -0,0 +1,17 @@
package com.yeshi.fanli.exception.msg;
import com.yeshi.fanli.exception.BaseException;
public class MsgLijinVIPDetailException extends BaseException {
    private static final long serialVersionUID = 1L;
    public MsgLijinVIPDetailException(int code, String msg) {
        super(code, msg);
    }
    public MsgLijinVIPDetailException() {
        super();
    }
}
fanli/src/main/java/com/yeshi/fanli/lijin/dao/MsgLijinVIPDetailMapper.java
New file
@@ -0,0 +1,17 @@
package com.yeshi.fanli.lijin.dao;
import com.ks.lib.common.dao.BaseMapper;
import com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface MsgLijinVIPDetailMapper extends BaseMapper<MsgLijinVIPDetail> {
    List<MsgLijinVIPDetail> listByPrimaryKeys(@Param("ids") List<Long> ids);
}
fanli/src/main/java/com/yeshi/fanli/lijin/entity/MsgLijinVIPDetail.java
New file
@@ -0,0 +1,120 @@
package com.yeshi.fanli.lijin.entity;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import org.springframework.data.annotation.Transient;
import org.yeshi.utils.mybatis.Column;
import org.yeshi.utils.mybatis.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 礼金会员
 */
@Table("yeshi_ec_msg_lijin_vip")
public class MsgLijinVIPDetail implements Serializable {
    public enum MsgTypeLijinVIPTypeEnum {
        vipNotify("会员提醒", "http://img.flqapp.com/resource/msg/icon_msg_order.png"),
        vipDown("会员降级", "http://img.flqapp.com/resource/msg/icon_msg_order.png");
        private final String desc;
        private final String icon;
        private MsgTypeLijinVIPTypeEnum(String desc, String icon) {
            this.desc = desc;
            this.icon = icon;
        }
        public String getDesc() {
            return desc;
        }
        public String getIcon() {
            return icon;
        }
    }
    @Column(name = "mlv_id")
    private Long id;
    @Column(name = "mlv_uid")
    private UserInfo user;
    @Column(name = "mlv_type")
    private MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum type;// 消息类型
    @Column(name = "mlv_remark")
    private String remark;
    @Column(name = "mlv_read")
    private Boolean read;// 是否已读
    @Column(name = "mlv_create_time")
    private Date createTime;
    @Column(name = "mlv_update_time")
    private Date updateTime;
    @Transient
    private String extraInfo;// 新版消息内容
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public UserInfo getUser() {
        return user;
    }
    public void setUser(UserInfo user) {
        this.user = user;
    }
    public MsgTypeLijinVIPTypeEnum getType() {
        return type;
    }
    public void setType(MsgTypeLijinVIPTypeEnum type) {
        this.type = type;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public Boolean getRead() {
        return read;
    }
    public void setRead(Boolean read) {
        this.read = read;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getExtraInfo() {
        return extraInfo;
    }
    public void setExtraInfo(String extraInfo) {
        this.extraInfo = extraInfo;
    }
}
fanli/src/main/java/com/yeshi/fanli/lijin/service/MsgLijinVIPService.java
New file
@@ -0,0 +1,23 @@
package com.yeshi.fanli.lijin.service;
import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
import com.yeshi.fanli.exception.msg.MsgLijinVIPDetailException;
import com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail;
import java.util.List;
public interface MsgLijinVIPService {
    /**
     * 添加礼金会员消息
     * @param detail
     * @param needNotify
     * @throws MsgLijinVIPDetailException
     */
    public void addMsgLijinVIPDetail(MsgLijinVIPDetail detail, boolean needNotify) throws MsgLijinVIPDetailException;
    public List<MsgLijinVIPDetail> listDetail(List<Long> ids);
}
fanli/src/main/java/com/yeshi/fanli/lijin/service/impl/MsgLijinVIPServiceImpl.java
New file
@@ -0,0 +1,46 @@
package com.yeshi.fanli.lijin.service.impl;
import com.yeshi.fanli.entity.bus.msg.MsgExtra;
import com.yeshi.fanli.exception.msg.MsgLijinVIPDetailException;
import com.yeshi.fanli.lijin.dao.MsgLijinVIPDetailMapper;
import com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail;
import com.yeshi.fanli.lijin.service.MsgLijinVIPService;
import com.yeshi.fanli.service.inter.msg.MsgExtraService;
import com.yeshi.fanli.service.inter.msg.MsgOverViewsService;
import com.yeshi.fanli.util.factory.msg.MsgOverViewsFactory;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service
public class MsgLijinVIPServiceImpl implements MsgLijinVIPService {
    @Resource
    private MsgLijinVIPDetailMapper msgLijinVIPDetailMapper;
    @Resource
    private MsgOverViewsService msgOverViewsService;
    @Resource
    private MsgExtraService msgExtraService;
    @Override
    public void addMsgLijinVIPDetail(MsgLijinVIPDetail detail, boolean needNotify) throws MsgLijinVIPDetailException {
        if (detail.getType() == null || detail.getType() == null) {
            throw new MsgLijinVIPDetailException(1, "参数不完整");
        }
        detail.setCreateTime(new Date());
        detail.setUpdateTime(new Date());
        detail.setRead(false);
        msgLijinVIPDetailMapper.insertSelective(detail);
        //加入消息索引
        msgOverViewsService.save(MsgOverViewsFactory.create(detail));
        // 消息内容
        msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_LIJIN_VIP);
    }
    @Override
    public List<MsgLijinVIPDetail> listDetail(List<Long> ids) {
        return msgLijinVIPDetailMapper.listByPrimaryKeys(ids);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java
@@ -6,6 +6,7 @@
import javax.annotation.Resource;
import com.yeshi.fanli.service.inter.msg.MsgOverViewsService;
import com.yeshi.fanli.util.factory.msg.MsgOverViewsFactory;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.msg.MsgMoneyDetailMapper;
@@ -49,7 +50,8 @@
                detail.setUpdateTime(new Date());
                detail.setRead(false);
                msgMoneyDetailMapper.insertSelective(detail);
                /
                //加入消息索引
                msgOverViewsService.save(MsgOverViewsFactory.create(detail));
                msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
            } else {
                MsgMoneyDetail update = new MsgMoneyDetail();
@@ -58,7 +60,8 @@
                update.setRead(false);
                update.setStateDesc(detail.getStateDesc());
                msgMoneyDetailMapper.updateByPrimaryKeySelective(update);
                /
                //更新消息索引时间
                msgOverViewsService.updateTime(MsgOverViewsFactory.create(detail).getId(), update.getUpdateTime());
                msgExtraService.addMsgExtra(update.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
            }
        } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.extractValid) {
@@ -71,7 +74,8 @@
                detail.setUpdateTime(new Date());
                detail.setRead(false);
                msgMoneyDetailMapper.insertSelective(detail);
                /
                //加入消息索引
                msgOverViewsService.save(MsgOverViewsFactory.create(detail));
                msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
            } else {
                MsgMoneyDetail update = new MsgMoneyDetail();
@@ -80,7 +84,8 @@
                update.setRead(false);
                update.setStateDesc(detail.getStateDesc());
                msgMoneyDetailMapper.updateByPrimaryKeySelective(update);
                /
                //更新消息索引时间
                msgOverViewsService.updateTime(MsgOverViewsFactory.create(detail).getId(), update.getUpdateTime());
                msgExtraService.addMsgExtra(update.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
            }
        }  else {
@@ -88,7 +93,8 @@
            detail.setUpdateTime(new Date());
            detail.setRead(false);
            msgMoneyDetailMapper.insertSelective(detail);
            /
            //加入消息索引
            msgOverViewsService.save(MsgOverViewsFactory.create(detail));
            msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
        }
        userMsgReadStateService.addMoneyMsgUnReadCount(detail.getUser().getId(), 1);
@@ -100,6 +106,11 @@
    }
    @Override
    public List<MsgMoneyDetail> listDetail(List<Long> ids) {
        return msgMoneyDetailMapper.listByPrimaryKeys(ids);
    }
    @Override
    public long countMsgMoneyDetail(Long uid) {
        return msgMoneyDetailMapper.countByUid(uid);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java
@@ -67,6 +67,11 @@
    }
    @Override
    public List<MsgOtherDetail> listDetail(List<Long> ids) {
        return msgOtherDetailMapper.listByPrimaryKeys(ids);
    }
    @Override
    public long countMsgOtherDetail(Long uid) {
        return msgOtherDetailMapper.countByUid(uid);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOverViewsServiceImpl.java
@@ -1,19 +1,45 @@
package com.yeshi.fanli.service.impl.msg;
import com.yeshi.fanli.dao.user.msg.MsgOverViewsDao;
import com.yeshi.fanli.entity.bus.msg.MsgOverViews;
import com.yeshi.fanli.entity.bus.msg.*;
import com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail;
import com.yeshi.fanli.lijin.service.MsgLijinVIPService;
import com.yeshi.fanli.lijin.service.impl.MsgLijinVIPServiceImpl;
import com.yeshi.fanli.service.inter.money.msg.MsgMoneyDetailService;
import com.yeshi.fanli.service.inter.msg.MsgOtherDetailService;
import com.yeshi.fanli.service.inter.msg.MsgOverViewsService;
import com.yeshi.fanli.service.inter.msg.UserSystemMsgService;
import com.yeshi.fanli.service.inter.order.msg.MsgOrderDetailService;
import com.yeshi.fanli.service.inter.user.invite.MsgInviteDetailService;
import com.yeshi.fanli.service.inter.user.msg.MsgAccountDetailService;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.io.Serializable;
import java.util.*;
@Service
public class MsgOverViewsServiceImpl implements MsgOverViewsService {
    @Resource
    private MsgOverViewsDao msgOverViewsDao;
    @Resource
    private MsgAccountDetailService msgAccountDetailService;
    @Resource
    private MsgInviteDetailService msgInviteDetailService;
    @Resource
    private MsgMoneyDetailService msgMoneyDetailService;
    @Resource
    private MsgOrderDetailService msgOrderDetailService;
    @Resource
    private MsgOtherDetailService msgOtherDetailService;
    @Resource
    private MsgLijinVIPService msgLijinVIPService;
    @Resource
    private UserSystemMsgService userSystemMsgService;
    @Override
    public void save(MsgOverViews msgOverViews) {
@@ -27,6 +53,15 @@
        }
        msgOverViewsDao.save(msgOverViews);
    }
    @Override
    public void updateTime(String id, Date updateTime) {
        Update update = new Update();
        update.set("updateTime", updateTime);
        Query query = new Query();
        query.addCriteria(Criteria.where("id").is(id));
        msgOverViewsDao.update(query, update);
    }
    @Override
@@ -44,4 +79,64 @@
        daoQuery.uid = uid;
        return msgOverViewsDao.count(daoQuery);
    }
    @Override
    public List<Object> listDetail(List<MsgOverViews> msgList) {
        Object[] objs = new Object[msgList.size()];
        //分类型查询详情
        Map<MsgTypeEnum, List<Long>> map = new HashMap<>();
        Map<String, Integer> positionMap = new HashMap<>();
        int p = 0;
        for (MsgOverViews views : msgList) {
            positionMap.put(views.getMsgType().name() + "#" + views.getIdentityCode(), p++);
            if (map.get(views.getMsgType()) == null) {
                map.put(views.getMsgType(), new ArrayList<>());
            }
            map.get(views.getMsgType()).add(views.getIdentityCode());
        }
        for (Iterator<MsgTypeEnum> its = map.keySet().iterator(); its.hasNext(); ) {
            MsgTypeEnum type = its.next();
            List<Long> ids = map.get(type);
            if (type == MsgTypeEnum.lijinVip) {
                List<MsgLijinVIPDetail> list = (msgLijinVIPService.listDetail(ids));
                for (MsgLijinVIPDetail detail : list) {
                    objs[positionMap.get(type.name() + "#" + detail.getId())] = detail;
                }
            } else if (type == MsgTypeEnum.money) {
                List<MsgMoneyDetail> list = (msgMoneyDetailService.listDetail(ids));
                for (MsgMoneyDetail detail : list) {
                    objs[positionMap.get(type.name() + "#" + detail.getId())] = detail;
                }
            } else if (type == MsgTypeEnum.order) {
                List<MsgOrderDetail> list = (msgOrderDetailService.listDetail(ids));
                for (MsgOrderDetail detail : list) {
                    objs[positionMap.get(type.name() + "#" + detail.getId())] = detail;
                }
            } else if (type == MsgTypeEnum.other) {
                List<MsgOtherDetail> list = (msgOtherDetailService.listDetail(ids));
                for (MsgOtherDetail detail : list) {
                    objs[positionMap.get(type.name() + "#" + detail.getId())] = detail;
                }
            } else if (type == MsgTypeEnum.account) {
                List<MsgAccountDetail> list = (msgAccountDetailService.listDetail(ids));
                for (MsgAccountDetail detail : list) {
                    objs[positionMap.get(type.name() + "#" + detail.getId())] = detail;
                }
            } else if (type == MsgTypeEnum.invite) {
                List<MsgInviteDetail> list = (msgInviteDetailService.listDetail(ids));
                for (MsgInviteDetail detail : list) {
                    objs[positionMap.get(type.name() + "#" + detail.getId())] = detail;
                }
            } else if (type == MsgTypeEnum.system) {
                List<UserSystemMsg> list = (userSystemMsgService.listDetail(ids));
                for (UserSystemMsg detail : list) {
                    objs[positionMap.get(type.name() + "#" + detail.getId())] = detail;
                }
            }
        }
        return Arrays.asList(objs);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserSystemMsgServiceImpl.java
@@ -5,6 +5,7 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -95,6 +96,11 @@
    }
    @Override
    public List<UserSystemMsg> listDetail(List<Long> ids) {
        return userSystemMsgMapper.listByPrimaryKeys(ids);
    }
    @Override
    public long countUserSystemMsg(Long uid) {
        return userSystemMsgMapper.countByUid(uid);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/order/msg/MsgOrderDetailServiceImpl.java
@@ -7,6 +7,7 @@
import com.yeshi.fanli.service.inter.msg.MsgOverViewsService;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.factory.msg.MsgOverViewsFactory;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.msg.MsgOrderDetailMapper;
@@ -72,7 +73,8 @@
                    detail.setUpdateTime(new Date());
                    detail.setRead(false);
                    msgOrderDetailMapper.insertSelective(detail);
                    /
                    //加入消息索引
                    msgOverViewsService.save(MsgOverViewsFactory.create(detail));
                    // 消息内容
                    msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ORDER);
                } else {
@@ -85,7 +87,8 @@
                    update.setRead(false);
                    update.setBeiZhu(detail.getBeiZhu());
                    msgOrderDetailMapper.updateByPrimaryKeySelective(update);
                    /
                    //更新消息索引时间
                    msgOverViewsService.updateTime(MsgOverViewsFactory.create(detail).getId(), update.getUpdateTime());
                    msgExtraService.addMsgExtra(update.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ORDER);
                }
                if (needNotify)
@@ -105,6 +108,11 @@
    }
    @Override
    public List<MsgOrderDetail> listDetail(List<Long> ids) {
        return msgOrderDetailMapper.listByPrimaryKeys(ids);
    }
    @Override
    public long countMsgOrderDetail(Long uid) {
        return msgOrderDetailMapper.countByUid(uid);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/MsgInviteDetailServiceImpl.java
@@ -55,6 +55,11 @@
    }
    @Override
    public List<MsgInviteDetail> listDetail(List<Long> ids) {
        return msgInviteDetailMapper.listByPrimaryKeys(ids);
    }
    @Override
    public long countMsgInviteDetail(Long uid) {
        return msgInviteDetailMapper.countByUid(uid);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/user/msg/MsgAccountDetailServiceImpl.java
@@ -62,6 +62,11 @@
    }
    @Override
    public List<MsgAccountDetail> listDetail(List<Long> ids) {
        return msgAccountDetailMapper.listByPrimaryKeys(ids);
    }
    @Override
    public long countMsgAccountDetail(Long uid) {
        return msgAccountDetailMapper.countByUid(uid);
    }
fanli/src/main/java/com/yeshi/fanli/service/inter/money/msg/MsgMoneyDetailService.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
import com.yeshi.fanli.exception.msg.MsgMoneyDetailException;
@@ -23,6 +24,8 @@
     */
    public List<MsgMoneyDetail> listMsgMoneyDetail(Long uid, int page);
    public List<MsgMoneyDetail> listDetail(List<Long> ids);
    /**
     * 资金消息数
     * 
fanli/src/main/java/com/yeshi/fanli/service/inter/msg/MsgOtherDetailService.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
import com.yeshi.fanli.exception.msg.MsgOtherDetailException;
@@ -31,6 +32,8 @@
     */
    public List<MsgOtherDetail> listMsgOtherDetail(Long uid, int page);
    public List<MsgOtherDetail> listDetail(List<Long> ids);
    /**
     * 其他消息数
     * 
fanli/src/main/java/com/yeshi/fanli/service/inter/msg/MsgOverViewsService.java
@@ -2,6 +2,7 @@
import com.yeshi.fanli.entity.bus.msg.MsgOverViews;
import java.util.Date;
import java.util.List;
public interface MsgOverViewsService {
@@ -14,10 +15,21 @@
    public void save(MsgOverViews msgOverViews);
    /**
     * 更新更新时间
     *
     * @param id
     * @param updateTime
     */
    public void updateTime(String id, Date updateTime);
    public List<MsgOverViews> listByUid(Long uid, int page, int pageSize);
    public long countByUid(Long uid);
    public List<Object> listDetail(List<MsgOverViews> msgList);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/msg/UserSystemMsgService.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
import com.yeshi.fanli.entity.bus.msg.UserSystemMsg;
import com.yeshi.fanli.entity.bus.msg.UserSystemMsgTypeEnum;
import com.yeshi.fanli.entity.system.SystemZnx;
@@ -53,6 +54,8 @@
     */
    public List<UserSystemMsg> listUserSystemMsg(Long uid, int page, int pageSize);
    public List<UserSystemMsg> listDetail(List<Long> ids);
    /**
     * 用户系统消息数
     * 
fanli/src/main/java/com/yeshi/fanli/service/inter/order/msg/MsgOrderDetailService.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
@@ -32,6 +33,8 @@
     */
    public List<MsgOrderDetail> listMsgOrderDetail(Long uid, int page);
    public List<MsgOrderDetail> listDetail(List<Long> ids);
    /**
     * 根据订单号获取
     * @return
fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/MsgInviteDetailService.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
import com.yeshi.fanli.entity.bus.user.ThreeSale;
import com.yeshi.fanli.exception.msg.MsgInviteDetailException;
@@ -24,6 +25,8 @@
     */
    public List<MsgInviteDetail> listMsgInviteDetail(Long uid, int page);
    public List<MsgInviteDetail> listDetail(List<Long> ids);
    /**
     * 账户消息数
     * 
fanli/src/main/java/com/yeshi/fanli/service/inter/user/msg/MsgAccountDetailService.java
@@ -25,6 +25,9 @@
     */
    public List<MsgAccountDetail> listMsgAccountDetail(Long uid, int page);
    public List<MsgAccountDetail> listDetail(List<Long> ids);
    /**
     * 账户消息数
     * 
fanli/src/main/java/com/yeshi/fanli/service/inter/vipshop/VIPShopClassService.java
File was renamed from fanli/src/main/java/com/yeshi/fanli/service/inter/vipshop/JDGoodsClassService.java
@@ -4,7 +4,7 @@
import com.yeshi.fanli.entity.jd.JDGoodsClass;
public interface JDGoodsClassService {
public interface VIPShopClassService {
    public void insertSelective(JDGoodsClass record);
    
fanli/src/main/java/com/yeshi/fanli/service/inter/vipshop/VIPShopGoodsService.java
File was renamed from fanli/src/main/java/com/yeshi/fanli/service/inter/vipshop/JDGoodsService.java
@@ -7,7 +7,7 @@
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.exception.jd.JDGoodsException;
public interface JDGoodsService {
public interface VIPShopGoodsService {
    /**
     * 专题分类
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgLijinVIPDetailFactory.java
New file
@@ -0,0 +1,104 @@
package com.yeshi.fanli.util.factory.msg;
import com.google.gson.Gson;
import com.ks.vip.pojo.Enums.VIPEnum;
import com.yeshi.common.vo.ClientTextStyleVO;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
import com.yeshi.fanli.vo.msg.CommonMsgItemVOFactory;
import org.yeshi.utils.TimeUtil;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class MsgLijinVIPDetailFactory {
    /**
     * 会员即将到期
     *
     * @param uid
     * @param outOfDateTime
     * @param remark
     * @return
     */
    public static MsgLijinVIPDetail createVIPWillOutOfDate(Long uid, Date outOfDateTime, VIPEnum vipLevel, String remark) {
        if (uid == null || outOfDateTime == null)
            return null;
        long time = outOfDateTime.getTime() - System.currentTimeMillis();
        time = time < 0 ? 0L : time;
        time = time / 1000;
        String timeDesc = "";
        if (time < 60) {
            timeDesc += time + "秒";
        } else if (time < 60 * 60) {
            timeDesc += time / 60 + "分";
        } else if (time < 60 * 60 * 24L) {
            timeDesc += time / (60 * 60) + "小时";
        } else {
            timeDesc += time / (60 * 60 * 24) + "天";
        }
        // 添加内容
        List<CommonMsgItemVO> listMsg = new ArrayList<>();
        listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("有效期", ClientTextStyleVO.COLOR_TITLE),
                new ClientTextStyleVO(vipLevel.getDesc() + "会员" + timeDesc, ClientTextStyleVO.COLOR_CONTENT)));
        listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
                new ClientTextStyleVO(StringUtil.isNullOrEmpty(remark) ? "无" : remark,
                        ClientTextStyleVO.COLOR_CONTENT)));
        MsgLijinVIPDetail detail = new MsgLijinVIPDetail();
        detail.setRemark(remark);
        detail.setCreateTime(new Date());
        detail.setRead(false);
        detail.setType(MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum.vipNotify);
        detail.setUser(new UserInfo(uid));
        detail.setExtraInfo(new Gson().toJson(listMsg));
        return detail;
    }
    /**
     * 会员降级
     *
     * @param uid
     * @param nowVIPLevel
     * @param originVIPLevel
     * @param remark
     * @return
     */
    public static MsgLijinVIPDetail createVIPLevelDown(Long uid, VIPEnum nowVIPLevel, VIPEnum originVIPLevel, String remark) {
        if (uid == null || nowVIPLevel == null)
            return null;
        // 添加内容
        List<CommonMsgItemVO> listMsg = new ArrayList<>();
        listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("当前会员", ClientTextStyleVO.COLOR_TITLE),
                new ClientTextStyleVO(nowVIPLevel.getDesc(), ClientTextStyleVO.COLOR_CONTENT)));
        listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
                new ClientTextStyleVO(StringUtil.isNullOrEmpty(remark) ? "无" : remark,
                        ClientTextStyleVO.COLOR_CONTENT)));
        MsgLijinVIPDetail detail = new MsgLijinVIPDetail();
        detail.setRemark(remark);
        detail.setCreateTime(new Date());
        detail.setRead(false);
        detail.setType(MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum.vipDown);
        detail.setUser(new UserInfo(uid));
        detail.setExtraInfo(new Gson().toJson(listMsg));
        return detail;
    }
}
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgOrderDetailFactory.java
@@ -34,7 +34,6 @@
     * @param beiZhu 备注信息 - 非必填
     * @return
     */
    @Transactional
    public static MsgOrderDetail  createOrderStatistics(Long uid, String orderId, int source, int type, int goodsCount,
            BigDecimal payMoney, BigDecimal money, Date downTime, String beiZhu) {
        if (uid == null || StringUtil.isNullOrEmpty(orderId) || downTime == null)
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgOverViewsFactory.java
New file
@@ -0,0 +1,51 @@
package com.yeshi.fanli.util.factory.msg;
import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import com.yeshi.fanli.entity.bus.msg.MsgOverViews;
import com.yeshi.fanli.entity.bus.msg.MsgTypeEnum;
import com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail;
import java.util.Date;
public class MsgOverViewsFactory {
    public static MsgOverViews create(MsgOrderDetail msgOrderDetail) {
        MsgOverViews overViews = new MsgOverViews();
        overViews.setIdentityCode(msgOrderDetail.getId());
        overViews.setMsgType(MsgTypeEnum.order);
        overViews.setUid(msgOrderDetail.getUser().getId());
        overViews.setCreateTime(msgOrderDetail.getCreateTime());
        overViews.setUpdateTime(msgOrderDetail.getUpdateTime());
        overViews.setId(MsgOverViews.createId(overViews.getMsgType(), overViews.getIdentityCode()));
        return overViews;
    }
    public static MsgOverViews create(MsgMoneyDetail msgMoneyDetail) {
        MsgOverViews overViews = new MsgOverViews();
        overViews.setIdentityCode(msgMoneyDetail.getId());
        overViews.setMsgType(MsgTypeEnum.money);
        overViews.setUid(msgMoneyDetail.getUser().getId());
        overViews.setCreateTime(msgMoneyDetail.getCreateTime());
        overViews.setUpdateTime(msgMoneyDetail.getUpdateTime());
        overViews.setId(MsgOverViews.createId(overViews.getMsgType(), overViews.getIdentityCode()));
        return overViews;
    }
    public static MsgOverViews create(MsgLijinVIPDetail msgLijinVIPetail) {
        MsgOverViews overViews = new MsgOverViews();
        overViews.setIdentityCode(msgLijinVIPetail.getId());
        overViews.setMsgType(MsgTypeEnum.lijinVip);
        overViews.setUid(msgLijinVIPetail.getUser().getId());
        overViews.setCreateTime(msgLijinVIPetail.getCreateTime());
        overViews.setUpdateTime(msgLijinVIPetail.getUpdateTime());
        overViews.setId(MsgOverViews.createId(overViews.getMsgType(), overViews.getIdentityCode()));
        return overViews;
    }
}
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
@@ -21,20 +21,17 @@
import com.yeshi.fanli.dto.msg.MsgRedPackGiveContentDTO;
import com.yeshi.fanli.dto.msg.MsgRedPackTeamRewardContentDTO;
import com.yeshi.fanli.dto.msg.MsgRedPackUseContentDTO;
import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
import com.yeshi.fanli.entity.bus.msg.*;
import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail.MsgTypeInviteTypeEnum;
import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum;
import com.yeshi.fanli.entity.bus.user.BindingAccount;
import com.yeshi.fanli.entity.bus.user.Extract;
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
@@ -49,1807 +46,1868 @@
public class UserMsgVOFactory {
    private final static String COLOR_TITLE = "#888888";
    private final static String COLOR_CONTENT = "#000000";
    private final static String COLOR_HIGHLIGHT_CONTENT = "#E5005C";
    private final static String COLOR_TITLE = "#888888";
    private final static String COLOR_CONTENT = "#000000";
    private final static String COLOR_HIGHLIGHT_CONTENT = "#E5005C";
    private static BigDecimal filterMoney(BigDecimal money) {
        if (money == null)
            return null;
        else
            return money.setScale(2);
    }
    private static BigDecimal filterMoney(BigDecimal money) {
        if (money == null)
            return null;
        else
            return money.setScale(2);
    }
    /**
     * 订单消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgOrderDetail msg, JumpDetailV2 jumpDetail, JSONObject params) {
        List<CommonMsgItemVO> items = new ArrayList<>();
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
    /**
     * 订单消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgOrderDetail msg, JumpDetailV2 jumpDetail, JSONObject params) {
        List<CommonMsgItemVO> items = new ArrayList<>();
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getType().getIcon());
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            userMsgVO.setJumpDetail(jumpDetail);
            if (params != null)
                userMsgVO.setParams(params.toString());
            return userMsgVO;
        }
        UserMsgVO vo = new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_order.png", "订单消息",
                msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), null);
        List<ClientTextStyleVO> contentList = new ArrayList<>();
        if (msg.getType() == MsgTypeOrderTypeEnum.found) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {
            }.getType()));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单找回", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getType().getIcon());
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList));
            userMsgVO.setJumpDetail(jumpDetail);
            if (params != null)
                userMsgVO.setParams(params.toString());
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(
                    TimeUtil.getGernalTime(msg.getHappendDate().getTime(), "yyyy.MM.dd HH:mm"), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提交时间", COLOR_TITLE), contentList));
            return userMsgVO;
        }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getState() == 1 ? "订单找回成功" : "订单找回失败", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("找回状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getState() == 1 ? "¥" + filterMoney(msg.getPayMoney()) : "无",
                    COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("找回金额", COLOR_TITLE), contentList));
        UserMsgVO vo = new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_order.png", "订单消息",
                msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), null);
        } else if (msg.getType() == MsgTypeOrderTypeEnum.elme) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
        List<ClientTextStyleVO> contentList = new ArrayList<>();
        if (msg.getType() == MsgTypeOrderTypeEnum.found) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            String orderId = msg.getOrderId();
            MsgTypeOrderTypeEnum type = msg.getType();
            if (type == MsgTypeOrderTypeEnum.invite) {
                orderId = UserUtil.filterOrderId(orderId);
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(orderId, COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList, false));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单找回", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getType().getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单类型", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            if (msg.getState() == HongBaoV2.STATE_BUKELINGQU || msg.getState() == HongBaoV2.STATE_KELINGQU)
                contentList.add(new ClientTextStyleVO("已付款", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getState() == HongBaoV2.STATE_SHIXIAO)
                contentList.add(new ClientTextStyleVO("未付款/已退款", COLOR_HIGHLIGHT_CONTENT));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(
                    TimeUtil.getGernalTime(msg.getHappendDate().getTime(), "yyyy.MM.dd HH:mm"), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提交时间", COLOR_TITLE), contentList));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getState() == 1 ? "订单找回成功" : "订单找回失败", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("找回状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getPayMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("付款金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getState() == 1 ? "¥" + filterMoney(msg.getPayMoney()) : "无",
                    COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("找回金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getHongBaoMoney()), COLOR_HIGHLIGHT_CONTENT));
        } else if (msg.getType() == MsgTypeOrderTypeEnum.elme) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", COLOR_TITLE), contentList));
            if (params != null)
                vo.setParams(params.toString());
        } else {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            String orderId = msg.getOrderId();
            MsgTypeOrderTypeEnum type = msg.getType();
            if (type == MsgTypeOrderTypeEnum.invite) {
                orderId = UserUtil.filterOrderId(orderId);
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(orderId, COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList, false));
            String orderId = msg.getOrderId();
            MsgTypeOrderTypeEnum type = msg.getType();
            if (type == MsgTypeOrderTypeEnum.invite) {
                orderId = UserUtil.filterOrderId(orderId);
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(orderId, COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList, true));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getType().getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单类型", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("共", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO(msg.getGoodsCount() + "", COLOR_HIGHLIGHT_CONTENT));
            contentList.add(new ClientTextStyleVO("件商品", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("商品数量", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            if (msg.getState() == HongBaoV2.STATE_BUKELINGQU || msg.getState() == HongBaoV2.STATE_KELINGQU)
                contentList.add(new ClientTextStyleVO("已付款", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getState() == HongBaoV2.STATE_SHIXIAO)
                contentList.add(new ClientTextStyleVO("未付款/已退款", COLOR_HIGHLIGHT_CONTENT));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getType().getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单类型", COLOR_TITLE), contentList));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            if (msg.getState() == MsgOrderDetail.STATE_FK)
                contentList.add(new ClientTextStyleVO("已付款", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getState() == MsgOrderDetail.STATE_JS)
                contentList.add(new ClientTextStyleVO("已收货", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getState() == MsgOrderDetail.STATE_SX)
                contentList.add(new ClientTextStyleVO("未付款/已退款", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getState() == MsgOrderDetail.STATE_WQ)
                contentList.add(new ClientTextStyleVO("已维权", COLOR_HIGHLIGHT_CONTENT));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getPayMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("付款金额", COLOR_TITLE), contentList));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getHongBaoMoney()), COLOR_HIGHLIGHT_CONTENT));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getPayMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("付款金额", COLOR_TITLE), contentList));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", COLOR_TITLE), contentList));
            if (params != null)
                vo.setParams(params.toString());
        } else {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getHongBaoMoney()), COLOR_HIGHLIGHT_CONTENT));
            String orderId = msg.getOrderId();
            MsgTypeOrderTypeEnum type = msg.getType();
            if (type == MsgTypeOrderTypeEnum.invite) {
                orderId = UserUtil.filterOrderId(orderId);
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(orderId, COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList, true));
            if (msg.getType() == MsgTypeOrderTypeEnum.fanli)
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", COLOR_TITLE), contentList));
            else if (msg.getType() == MsgTypeOrderTypeEnum.share)
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("分享奖金", COLOR_TITLE), contentList));
            else if (msg.getType() == MsgTypeOrderTypeEnum.invite)
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请奖金", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("共", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO(msg.getGoodsCount() + "", COLOR_HIGHLIGHT_CONTENT));
            contentList.add(new ClientTextStyleVO("件商品", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("商品数量", COLOR_TITLE), contentList));
            vo.setJumpDetail(jumpDetail);
            if (params != null)
                vo.setParams(params.toString());
        }
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getType().getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单类型", COLOR_TITLE), contentList));
        vo.setContentItems(items);
        return vo;
    }
            contentList = new ArrayList<>();
            if (msg.getState() == MsgOrderDetail.STATE_FK)
                contentList.add(new ClientTextStyleVO("已付款", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getState() == MsgOrderDetail.STATE_JS)
                contentList.add(new ClientTextStyleVO("已收货", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getState() == MsgOrderDetail.STATE_SX)
                contentList.add(new ClientTextStyleVO("未付款/已退款", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getState() == MsgOrderDetail.STATE_WQ)
                contentList.add(new ClientTextStyleVO("已维权", COLOR_HIGHLIGHT_CONTENT));
    /**
     * 资金消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgMoneyDetail msg) {
        List<CommonMsgItemVO> items = new ArrayList<>();
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单状态", COLOR_TITLE), contentList));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getMsgType().getIcon());
            userMsgVO.setTitle(msg.getMsgType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
        List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getPayMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("付款金额", COLOR_TITLE), contentList));
        // 提现
        if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extract) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getHongBaoMoney()), COLOR_HIGHLIGHT_CONTENT));
            BindingAccount ba = new BindingAccount();
            ba.setAccount(msg.getExtract().getAccount());
            ba.setName(msg.getExtract().getName());
            ba = UserUtil.filterBindingAccount(ba);
            if (msg.getType() == MsgTypeOrderTypeEnum.fanli)
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", COLOR_TITLE), contentList));
            else if (msg.getType() == MsgTypeOrderTypeEnum.share)
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("分享奖金", COLOR_TITLE), contentList));
            else if (msg.getType() == MsgTypeOrderTypeEnum.invite)
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请奖金", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO("支付宝:" + ba.getName() + " " + ba.getAccount(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现账号", COLOR_TITLE), contentList));
            vo.setJumpDetail(jumpDetail);
            if (params != null)
                vo.setParams(params.toString());
        }
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(
                    new ClientTextStyleVO("¥" + filterMoney(msg.getExtract().getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现金额", COLOR_TITLE), contentList));
        vo.setContentItems(items);
        return vo;
    }
            contentList = new ArrayList<>();
            if (msg.getExtract().getState() == Extract.STATE_NOT_PROCESS
                    || msg.getExtract().getState() == Extract.STATE_PROCESSING)
                contentList.add(new ClientTextStyleVO("人工审核中", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getExtract().getState() == Extract.STATE_PASS)
                contentList.add(new ClientTextStyleVO("已通过", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getExtract().getState() == Extract.STATE_REJECT)
                contentList.add(new ClientTextStyleVO("提现被拒绝", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现状态", COLOR_TITLE), contentList));
    /**
     * 资金消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgMoneyDetail msg) {
        List<CommonMsgItemVO> items = new ArrayList<>();
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {
            }.getType()));
            contentList = new ArrayList<>();
            if (msg.getExtract().getState() == Extract.STATE_NOT_PROCESS
                    || msg.getExtract().getState() == Extract.STATE_PROCESSING)
                contentList.add(new ClientTextStyleVO("无", COLOR_CONTENT));
            else if (msg.getExtract().getState() == Extract.STATE_PASS)
                contentList.add(new ClientTextStyleVO("无", COLOR_CONTENT));
            else if (msg.getExtract().getState() == Extract.STATE_REJECT)
                contentList.add(new ClientTextStyleVO(msg.getExtract().getReason(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态说明", COLOR_TITLE), contentList));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getMsgType().getIcon());
            userMsgVO.setTitle(msg.getMsgType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
            if (msg.getExtract().getState() != Extract.STATE_REJECT) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(TimeUtil.getGernalTime(
                        msg.getExtract().getExtractTime() + 1000 * 60 * 60 * 24L, "yyyy-MM-dd HH:mm"), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("预计到账", COLOR_TITLE), contentList));
            }
            if (msg.getExtract().getState() == Extract.STATE_PASS) {//
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(
                        TimeUtil.getGernalTime(msg.getExtract().getReceiveTime().getTime(), "yyyy-MM-dd HH:mm"),
                        COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("实际到账", COLOR_TITLE), contentList));
            }
        List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_extract.png", "提现",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extractValid) {
            BindingAccount ba = new BindingAccount();
            ba.setAccount(msg.getAlipayAccountValid().getAccount());
            ba.setName(msg.getAlipayAccountValid().getName());
            ba = UserUtil.filterBindingAccount(ba);
        // 提现
        if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extract) {
            // 支付宝验证
            contentList.add(new ClientTextStyleVO("支付宝:" + ba.getName() + " " + ba.getAccount(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现账号", COLOR_CONTENT), contentList));
            BindingAccount ba = new BindingAccount();
            ba.setAccount(msg.getExtract().getAccount());
            ba.setName(msg.getExtract().getName());
            ba = UserUtil.filterBindingAccount(ba);
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现金额", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO("支付宝:" + ba.getName() + " " + ba.getAccount(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现账号", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("验证成功", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("验证状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(
                    new ClientTextStyleVO("¥" + filterMoney(msg.getExtract().getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            if (msg.getExtract().getState() == Extract.STATE_NOT_PROCESS
                    || msg.getExtract().getState() == Extract.STATE_PROCESSING)
                contentList.add(new ClientTextStyleVO("人工审核中", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getExtract().getState() == Extract.STATE_PASS)
                contentList.add(new ClientTextStyleVO("已通过", COLOR_HIGHLIGHT_CONTENT));
            else if (msg.getExtract().getState() == Extract.STATE_REJECT)
                contentList.add(new ClientTextStyleVO("提现被拒绝", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            if (msg.getExtract().getState() == Extract.STATE_NOT_PROCESS
                    || msg.getExtract().getState() == Extract.STATE_PROCESSING)
                contentList.add(new ClientTextStyleVO("无", COLOR_CONTENT));
            else if (msg.getExtract().getState() == Extract.STATE_PASS)
                contentList.add(new ClientTextStyleVO("无", COLOR_CONTENT));
            else if (msg.getExtract().getState() == Extract.STATE_REJECT)
                contentList.add(new ClientTextStyleVO(msg.getExtract().getReason(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态说明", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_extract.png", "提现账号验证",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanli) {
            if (msg.getExtract().getState() != Extract.STATE_REJECT) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(TimeUtil.getGernalTime(
                        msg.getExtract().getExtractTime() + 1000 * 60 * 60 * 24L, "yyyy-MM-dd HH:mm"), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("预计到账", COLOR_TITLE), contentList));
            }
            if (msg.getExtract().getState() == Extract.STATE_PASS) {//
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(
                        TimeUtil.getGernalTime(msg.getExtract().getReceiveTime().getTime(), "yyyy-MM-dd HH:mm"),
                        COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("实际到账", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            // 返利到账
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利订单", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_extract.png", "提现",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extractValid) {
            BindingAccount ba = new BindingAccount();
            ba.setAccount(msg.getAlipayAccountValid().getAccount());
            ba.setName(msg.getAlipayAccountValid().getName());
            ba = UserUtil.filterBindingAccount(ba);
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("共", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO(msg.getGoodsCount() + "", COLOR_HIGHLIGHT_CONTENT));
            contentList.add(new ClientTextStyleVO("件商品", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("商品数量", COLOR_TITLE), contentList));
            // 支付宝验证
            contentList.add(new ClientTextStyleVO("支付宝:" + ba.getName() + " " + ba.getAccount(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现账号", COLOR_CONTENT), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("验证成功", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("验证状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态说明", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_fanli.png", "返利到账",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanliElme) {
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_extract.png", "提现账号验证",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanli) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("饿了么", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            // 返利到账
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            // 返利到账
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("共", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO(msg.getGoodsCount() + "", COLOR_HIGHLIGHT_CONTENT));
            contentList.add(new ClientTextStyleVO("件商品", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("商品数量", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_fanli.png", "返利到账",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.invite || msg.getMsgType() == MsgTypeMoneyTypeEnum.share) {
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_fanli.png", "返利到账",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanliElme) {
            contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("饿了么", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            // 邀请奖金,分享奖金
            contentList = new ArrayList<>();
            // 返利到账
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(msg.getOrderCount() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单数量", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("共", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO(msg.getGoodsCount() + "", COLOR_HIGHLIGHT_CONTENT));
            contentList.add(new ClientTextStyleVO("件商品", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖金商品", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("到账金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_fanli.png", "返利到账",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.invite || msg.getMsgType() == MsgTypeMoneyTypeEnum.share) {
            Calendar ca = Calendar.getInstance();
            ca.setTime(msg.getCreateTime());
            ca.add(Calendar.MONTH, -1);
            String date = ca.get(Calendar.YEAR) + "年" + (ca.get(Calendar.MONTH) + 1) + "月";
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            if (msg.getMsgType() == MsgTypeMoneyTypeEnum.share)
                return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_share_money.png",
                        date + msg.getMsgType().getDesc(),
                        msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            else
                return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_invite_money.png",
                        date + msg.getMsgType().getDesc(),
                        msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            contentList = new ArrayList<>();
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanliWeiQuan) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            // 邀请奖金,分享奖金
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利订单", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(msg.getOrderCount() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单数量", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单售后", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("共", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO(msg.getGoodsCount() + "", COLOR_HIGHLIGHT_CONTENT));
            contentList.add(new ClientTextStyleVO("件商品", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖金商品", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利扣除", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("到账金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_fanli.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.shareWeiQuan) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            Calendar ca = Calendar.getInstance();
            ca.setTime(msg.getCreateTime());
            ca.add(Calendar.MONTH, -1);
            String date = ca.get(Calendar.YEAR) + "年" + (ca.get(Calendar.MONTH) + 1) + "月";
            contentList = new ArrayList<>();
            if (msg.getMsgType() == MsgTypeMoneyTypeEnum.share)
                return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_share_money.png",
                        date + msg.getMsgType().getDesc(),
                        msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            else
                return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_invite_money.png",
                        date + msg.getMsgType().getDesc(),
                        msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("分享订单", COLOR_TITLE), contentList));
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanliWeiQuan) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单售后", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖金扣除", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单售后", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利扣除", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_share_money.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.inviteWeiQuan) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_fanli.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.shareWeiQuan) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单售后", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除说明", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("分享订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖金扣除", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单售后", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖金扣除", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_invite_money.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.orderReward) {// 奖励订单
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_share_money.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.inviteWeiQuan) {
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖励订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖励金额", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单售后", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖金扣除", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_order_reward.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.systemEqualize) {// 系统补偿
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("补齐金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getOrderId() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("补齐原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_invite_money.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.orderReward) {// 奖励订单
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/money_detail/icon_system.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extractAutoWX) { // 微信自动提现
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("自动提现微信红包成功推送", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖励订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖励金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_order_reward.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.systemEqualize) {// 系统补偿
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("补齐金额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/money_detail/icon_system.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.subSidy) { // 额外补贴
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getOrderId() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("补齐原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()) + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/money_detail/icon_system.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extractAutoWX) { // 微信自动提现
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("自动提现微信红包成功推送", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_subsidy.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        }else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.orderTeamReward) { // 团队奖励
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/money_detail/icon_system.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.subSidy) { // 额外补贴
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("金额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_team_reward.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackReceiveOff) { // 红包成功领取
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            MsgRedPackGiveContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackGiveContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getUserInfo() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送人", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送时间", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_subsidy.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.orderTeamReward) { // 团队奖励
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_hongbao_give.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackGiveOff) { // 红包被成功领取
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getBalance()), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            MsgRedPackGiveContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackGiveContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getUserInfo() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取人", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_team_reward.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackReceiveOff) { // 红包成功领取
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取时间", COLOR_TITLE), contentList));
            MsgRedPackGiveContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackGiveContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getUserInfo() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送人", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送时间", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_hongbao_give.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackGiveBack) { // 红包未被领取退回
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取金额", COLOR_TITLE), contentList));
            MsgRedPackGiveContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackGiveContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTitle() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送类别", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_hongbao_give.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackGiveOff) { // 红包被成功领取
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送金额", COLOR_TITLE), contentList));
            MsgRedPackGiveContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackGiveContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getGiveTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getUserInfo() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取人", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("退回时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送金额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_hongbao_give.png",
                    MsgTypeMoneyTypeEnum.redPackGiveBack.getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackExchangePass) { // 红包提现成功
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_hongbao_give.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackGiveBack) { // 红包未被领取退回
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getMsgType().getDesc() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            MsgRedPackGiveContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackGiveContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTitle() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getHandle() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("审核方式", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getGiveTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getBalance() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("退回时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_hongbao_tixian.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackExchangeReject) { // 红包提现拒绝
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_hongbao_give.png",
                    MsgTypeMoneyTypeEnum.redPackGiveBack.getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackExchangePass) { // 红包提现成功
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getMsgType().getDesc() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getMsgType().getDesc() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("失败原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getHandle() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("审核方式", COLOR_TITLE), contentList));
            String handle = dto.getHandle();
            if (!StringUtil.isNullOrEmpty(handle)) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(handle, COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("处理", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getBalance() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("账户余额", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_hongbao_tixian.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbid) { // 红包封禁消息
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_hongbao_tixian.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackExchangeReject) { // 红包提现拒绝
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getMsgType().getDesc() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("封禁时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("失败原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getHandle(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("处理", COLOR_TITLE), contentList));
            String handle = dto.getHandle();
            if (!StringUtil.isNullOrEmpty(handle)) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(handle, COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("处理", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbidRemove) { // 红包封禁解除消息
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_hongbao_tixian.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbid) { // 红包封禁消息
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包状态", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getHandle(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("封禁时间", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getHandle(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("处理", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackDeduct) { // 红包扣除消息
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbidRemove) { // 红包封禁解除消息
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + dto.getBalance(), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包余额", COLOR_TITLE), contentList));
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getHandle(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackDeduct) { // 红包扣除消息
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + dto.getBalance(), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackOneStageReward
                || msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackTwoStageReward
                || msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackThreeStageReward) { // 红包邀请获得
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgRedPackTeamRewardContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackTeamRewardContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getNickName() + "", COLOR_CONTENT, dto.getPortrait()));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("被邀请人", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包进程", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/img/tlj/icon_tlj.png", "红包提醒",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseSuccess) { // 红包使用成功
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgRedPackUseContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackUseContentDTO.class);
            if (dto == null)
                return null;
            String useType = "";
            boolean moneyPay = dto.getMoney() != null && dto.getMoney().compareTo(new BigDecimal(0)) > 0;
            boolean hongBaoPay = dto.getHongBao() != null && dto.getHongBao().compareTo(new BigDecimal(0)) > 0;
            if (moneyPay && hongBaoPay) {
                useType = "红包+现金";
            } else if (hongBaoPay)
                useType = "仅红包";
            else if (moneyPay)
                useType = "仅现金";
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("红包使用成功", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getGoodsSetName() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换商品", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(useType, COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换方式", COLOR_TITLE), contentList));
            if (hongBaoPay) {
                contentList = new ArrayList<>();
                contentList.add(
                        new ClientTextStyleVO("¥" + dto.getHongBao().setScale(2).toString(), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗红包", COLOR_TITLE), contentList));
            }
            if (moneyPay) {
                contentList = new ArrayList<>();
                contentList.add(
                        new ClientTextStyleVO("¥" + dto.getMoney().setScale(2).toString(), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗现金", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(
                    "人工审核[" + TimeUtil.getGernalTime(dto.getTime().getTime(), "yyyy.MM.dd HH:mm") + "]",
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("审核方式", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/img/tlj/icon_tlj.png", "红包消息",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseFail) { // 红包使用失败
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgRedPackUseContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackUseContentDTO.class);
            if (dto == null)
                return null;
            String useType = "";
            boolean moneyPay = dto.getMoney() != null && dto.getMoney().compareTo(new BigDecimal(0)) > 0;
            boolean hongBaoPay = dto.getHongBao() != null && dto.getHongBao().compareTo(new BigDecimal(0)) > 0;
            if (moneyPay && hongBaoPay) {
                useType = "红包+现金";
            } else if (hongBaoPay)
                useType = "仅红包";
            else if (moneyPay)
                useType = "仅现金";
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("红包使用失败", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getGoodsSetName() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换商品", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(useType, COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换方式", COLOR_TITLE), contentList));
            if (hongBaoPay) {
                contentList = new ArrayList<>();
                contentList.add(
                        new ClientTextStyleVO("¥" + dto.getHongBao().setScale(2).toString(), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗红包", COLOR_TITLE), contentList));
            }
            if (moneyPay) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO("¥" + dto.getMoney().setScale(2).toString() + "[已原路退回]",
                        COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗现金", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getReason(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/img/tlj/icon_tlj.png", "红包消息",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        }
        return null;
    }
    /**
     * 账号消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgAccountDetail msg) {
        List<CommonMsgItemVO> items = new ArrayList<>();
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {
            }.getType()));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getType().getIcon());
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
        List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        if (msg.getType() == MsgTypeAccountTypeEnum.vipPgrade) {// 等级升级
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackOneStageReward
                || msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackTwoStageReward
                || msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackThreeStageReward) { // 红包邀请获得
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList.add(new ClientTextStyleVO(msg.getTitle() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("详        情", COLOR_TITLE), contentList));
            MsgRedPackTeamRewardContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackTeamRewardContentDTO.class);
            if (dto == null)
                return null;
            MsgAccountVipDTO dto = new Gson().fromJson(msg.getContent(), MsgAccountVipDTO.class);
            if (dto != null) {
                if (!StringUtil.isNullOrEmpty(dto.getStatus())) {
                    contentList = new ArrayList<>();
                    contentList.add(new ClientTextStyleVO(dto.getStatus() + "", COLOR_CONTENT));
                    items.add(new CommonMsgItemVO(new ClientTextStyleVO("状        态", COLOR_TITLE), contentList));
                }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getNickName() + "", COLOR_CONTENT, dto.getPortrait()));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("被邀请人", COLOR_TITLE), contentList));
                if (!StringUtil.isNullOrEmpty(dto.getEquity())) {
                    contentList = new ArrayList<>();
                    contentList.add(new ClientTextStyleVO(dto.getEquity() + "", COLOR_CONTENT));
                    items.add(new CommonMsgItemVO(new ClientTextStyleVO("权        益", COLOR_TITLE), contentList));
                }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包进程", COLOR_TITLE), contentList));
                if (!StringUtil.isNullOrEmpty(dto.getReason())) {
                    contentList = new ArrayList<>();
                    contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
                    items.add(new CommonMsgItemVO(new ClientTextStyleVO("原        因", COLOR_TITLE), contentList));
                }
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu() + "",
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_account.png", msg.getType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        }
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/img/tlj/icon_tlj.png", "红包提醒",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseSuccess) { // 红包使用成功
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgRedPackUseContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackUseContentDTO.class);
            if (dto == null)
                return null;
        if (msg.getType() == MsgTypeAccountTypeEnum.vipApply) {// vip升级申请
            String useType = "";
            boolean moneyPay = dto.getMoney() != null && dto.getMoney().compareTo(new BigDecimal(0)) > 0;
            boolean hongBaoPay = dto.getHongBao() != null && dto.getHongBao().compareTo(new BigDecimal(0)) > 0;
            if (moneyPay && hongBaoPay) {
                useType = "红包+现金";
            } else if (hongBaoPay)
                useType = "仅红包";
            else if (moneyPay)
                useType = "仅现金";
            contentList.add(new ClientTextStyleVO(msg.getTitle() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("申请进度", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("红包使用成功", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getContent() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("说        明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getGoodsSetName() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换商品", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu() + "",
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(useType, COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换方式", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_account.png", msg.getType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        }
            if (hongBaoPay) {
                contentList = new ArrayList<>();
                contentList.add(
                        new ClientTextStyleVO("¥" + dto.getHongBao().setScale(2).toString(), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗红包", COLOR_TITLE), contentList));
            }
            if (moneyPay) {
                contentList = new ArrayList<>();
                contentList.add(
                        new ClientTextStyleVO("¥" + dto.getMoney().setScale(2).toString(), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗现金", COLOR_TITLE), contentList));
            }
        contentList.add(new ClientTextStyleVO(msg.getTitle() + "", COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("事项", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(
                    "人工审核[" + TimeUtil.getGernalTime(dto.getTime().getTime(), "yyyy.MM.dd HH:mm") + "]",
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("审核方式", COLOR_TITLE), contentList));
        // 状态修改
        contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/img/tlj/icon_tlj.png", "红包消息",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseFail) { // 红包使用失败
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
        int fromIndex = 0;
        int toIndex = 0;
        String stateDesc = msg.getContent();
        if (msg.getType() == MsgTypeAccountTypeEnum.taoBaoAuthFail) {// 淘宝授权失败
            JSONArray array = JSONArray.fromObject(stateDesc);
            for (int i = 0; i < array.size(); i++) {
                String name = array.optJSONObject(i).optString("name");
                String content = array.optJSONObject(i).optString("content");
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(content, i > 0 ? COLOR_HIGHLIGHT_CONTENT : COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO(name, COLOR_TITLE), contentList));
            }
            MsgRedPackUseContentDTO dto = new Gson().fromJson(msg.getContent(), MsgRedPackUseContentDTO.class);
            if (dto == null)
                return null;
        } else {
            while (stateDesc.indexOf("<highlight>") > -1) {
                fromIndex = stateDesc.indexOf("<highlight>");
                toIndex = stateDesc.indexOf("</highlight>");
                String content1 = stateDesc.substring(0, fromIndex);
                String content2 = stateDesc.substring(fromIndex + "<highlight>".length(), toIndex);
                stateDesc = stateDesc.substring(toIndex + "</highlight>".length(), stateDesc.length());
            String useType = "";
            boolean moneyPay = dto.getMoney() != null && dto.getMoney().compareTo(new BigDecimal(0)) > 0;
            boolean hongBaoPay = dto.getHongBao() != null && dto.getHongBao().compareTo(new BigDecimal(0)) > 0;
            if (moneyPay && hongBaoPay) {
                useType = "红包+现金";
            } else if (hongBaoPay)
                useType = "仅红包";
            else if (moneyPay)
                useType = "仅现金";
                if (!StringUtil.isNullOrEmpty(content1)) {
                    contentList.add(new ClientTextStyleVO(content1, COLOR_CONTENT));
                }
                if (!StringUtil.isNullOrEmpty(content2)) {
                    contentList.add(new ClientTextStyleVO(content2, COLOR_HIGHLIGHT_CONTENT));
                }
            }
            if (!StringUtil.isNullOrEmpty(stateDesc)) {
                contentList.add(new ClientTextStyleVO(stateDesc, COLOR_CONTENT));
            }
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
        }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("红包使用失败", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu() + "",
                COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_account.png", msg.getType().getDesc(),
                msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
    }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getGoodsSetName() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换商品", COLOR_TITLE), contentList));
    /**
     * 邀请消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgInviteDetail msg) {
        MsgTypeInviteTypeEnum msgType = msg.getMsgType();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(useType, COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换方式", COLOR_TITLE), contentList));
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            List<CommonMsgItemVO> items = new ArrayList<>();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {
            }.getType()));
            if (hongBaoPay) {
                contentList = new ArrayList<>();
                contentList.add(
                        new ClientTextStyleVO("¥" + dto.getHongBao().setScale(2).toString(), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗红包", COLOR_TITLE), contentList));
            }
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getMsgType().getIcon());
            userMsgVO.setTitle(msg.getMsgType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
            if (moneyPay) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO("¥" + dto.getMoney().setScale(2).toString() + "[已原路退回]",
                        COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗现金", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getReason(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
        if (msgType != null && msgType == MsgTypeInviteTypeEnum.receiveGift) {
            if (StringUtil.isNullOrEmpty(msg.getDesc()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/img/tlj/icon_tlj.png", "红包消息",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        }
        return null;
    }
            MsgInviteContentDTO dto = new Gson().fromJson(msg.getDesc(), MsgInviteContentDTO.class);
            if (dto == null)
                return null;
    /**
     * 账号消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgAccountDetail msg) {
        List<CommonMsgItemVO> items = new ArrayList<>();
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
            List<CommonMsgItemVO> items = new ArrayList<>();
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getType().getIcon());
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
        List<ClientTextStyleVO> contentList = new ArrayList<>();
        if (msg.getType() == MsgTypeAccountTypeEnum.vipPgrade) {// 等级升级
            contentList.add(new ClientTextStyleVO(msg.getTitle() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("详        情", COLOR_TITLE), contentList));
            MsgAccountVipDTO dto = new Gson().fromJson(msg.getContent(), MsgAccountVipDTO.class);
            if (dto != null) {
                if (!StringUtil.isNullOrEmpty(dto.getStatus())) {
                    contentList = new ArrayList<>();
                    contentList.add(new ClientTextStyleVO(dto.getStatus() + "", COLOR_CONTENT));
                    items.add(new CommonMsgItemVO(new ClientTextStyleVO("状        态", COLOR_TITLE), contentList));
                }
            if (!StringUtil.isNullOrEmpty(dto.getState())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getState() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            }
                if (!StringUtil.isNullOrEmpty(dto.getEquity())) {
                    contentList = new ArrayList<>();
                    contentList.add(new ClientTextStyleVO(dto.getEquity() + "", COLOR_CONTENT));
                    items.add(new CommonMsgItemVO(new ClientTextStyleVO("权        益", COLOR_TITLE), contentList));
                }
                if (!StringUtil.isNullOrEmpty(dto.getReason())) {
                    contentList = new ArrayList<>();
                    contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
                    items.add(new CommonMsgItemVO(new ClientTextStyleVO("原        因", COLOR_TITLE), contentList));
                }
            }
            if (!StringUtil.isNullOrEmpty(dto.getCode())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getCode() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请码", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu() + "",
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_account.png", msg.getType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        }
        if (msg.getType() == MsgTypeAccountTypeEnum.vipApply) {// vip升级申请
            contentList.add(new ClientTextStyleVO(msg.getTitle() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("申请进度", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getContent() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("说        明", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getInviter())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getInviter() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请人", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu() + "",
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_account.png", msg.getType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        }
            if (!StringUtil.isNullOrEmpty(dto.getMode())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getMode() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("激活方式", COLOR_TITLE), contentList));
            }
        contentList.add(new ClientTextStyleVO(msg.getTitle() + "", COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("事项", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        // 状态修改
        contentList = new ArrayList<>();
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_invite.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msgType == MsgTypeInviteTypeEnum.inviteSucceed) {
            if (msg.getInviteUser() == null || msg.getInviteUser().getWorker() == null)
                return null;
        int fromIndex = 0;
        int toIndex = 0;
        String stateDesc = msg.getContent();
        if (msg.getType() == MsgTypeAccountTypeEnum.taoBaoAuthFail) {// 淘宝授权失败
            JSONArray array = JSONArray.fromObject(stateDesc);
            for (int i = 0; i < array.size(); i++) {
                String name = array.optJSONObject(i).optString("name");
                String content = array.optJSONObject(i).optString("content");
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(content, i > 0 ? COLOR_HIGHLIGHT_CONTENT : COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO(name, COLOR_TITLE), contentList));
            }
            List<CommonMsgItemVO> items = new ArrayList<>();
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getInviteUser().getWorker().getNickName() + "", COLOR_CONTENT,
                    msg.getInviteUser().getWorker().getPortrait()));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("被邀请人", COLOR_TITLE), contentList));
        } else {
            while (stateDesc.indexOf("<highlight>") > -1) {
                fromIndex = stateDesc.indexOf("<highlight>");
                toIndex = stateDesc.indexOf("</highlight>");
                String content1 = stateDesc.substring(0, fromIndex);
                String content2 = stateDesc.substring(fromIndex + "<highlight>".length(), toIndex);
                stateDesc = stateDesc.substring(toIndex + "</highlight>".length(), stateDesc.length());
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("邀请粉丝成功", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请状态", COLOR_TITLE), contentList));
                if (!StringUtil.isNullOrEmpty(content1)) {
                    contentList.add(new ClientTextStyleVO(content1, COLOR_CONTENT));
                }
                if (!StringUtil.isNullOrEmpty(content2)) {
                    contentList.add(new ClientTextStyleVO(content2, COLOR_HIGHLIGHT_CONTENT));
                }
            }
            if (!StringUtil.isNullOrEmpty(stateDesc)) {
                contentList.add(new ClientTextStyleVO(stateDesc, COLOR_CONTENT));
            }
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
        }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getDesc() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包相关", COLOR_TITLE), contentList));
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu() + "",
                COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_account.png", msg.getType().getDesc(),
                msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
    }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
    /**
     * 邀请消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgInviteDetail msg) {
        MsgTypeInviteTypeEnum msgType = msg.getMsgType();
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            List<CommonMsgItemVO> items = new ArrayList<>();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_invite.png", "邀请提醒 ",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        }
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getMsgType().getIcon());
            userMsgVO.setTitle(msg.getMsgType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
        if (msgType != null && msgType == MsgTypeInviteTypeEnum.receiveGift) {
            if (StringUtil.isNullOrEmpty(msg.getDesc()))
                return null;
        if (msg.getInviteUser() == null || msg.getInviteUser().getWorker() == null)
            return null;
            MsgInviteContentDTO dto = new Gson().fromJson(msg.getDesc(), MsgInviteContentDTO.class);
            if (dto == null)
                return null;
        List<CommonMsgItemVO> items = new ArrayList<>();
        List<ClientTextStyleVO> contentList = new ArrayList<>();
        LogHelper.test("邀请消息:" + new Gson().toJson(msg));
        contentList.add(new ClientTextStyleVO(msg.getInviteUser().getWorker().getNickName() + "", COLOR_CONTENT,
                msg.getInviteUser().getWorker().getPortrait()));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("被邀请人", COLOR_TITLE), contentList));
            List<CommonMsgItemVO> items = new ArrayList<>();
            List<ClientTextStyleVO> contentList = new ArrayList<>();
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(msg.getDesc() + "", COLOR_HIGHLIGHT_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getState())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getState() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            }
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getCode())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getCode() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请码", COLOR_TITLE), contentList));
            }
        return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_invite.png", msg.getMsgType().getDesc(),
                msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
    }
            if (!StringUtil.isNullOrEmpty(dto.getInviter())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getInviter() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请人", COLOR_TITLE), contentList));
            }
    /**
     * 其他消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgOtherDetail msg) {
        List<CommonMsgItemVO> items = new ArrayList<>();
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {
            }.getType()));
            if (!StringUtil.isNullOrEmpty(dto.getMode())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getMode() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("激活方式", COLOR_TITLE), contentList));
            }
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getType().getIcon());
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        String icon = null;
        if (msg.getType() == MsgTypeOtherTypeEnum.couponMianDan
                || msg.getType() == MsgTypeOtherTypeEnum.couponWelfareMianDan
                || msg.getType() == MsgTypeOtherTypeEnum.couponReward
                || msg.getType() == MsgTypeOtherTypeEnum.freeCouponBuy
                || msg.getType() == MsgTypeOtherTypeEnum.freeCouponGive) {
            return new UserMsgVO(msg.getId(), "http://img.flqapp.com/resource/msg/icon_msg_invite.png", dto.getTitle(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msgType == MsgTypeInviteTypeEnum.inviteSucceed) {
            if (msg.getInviteUser() == null || msg.getInviteUser().getWorker() == null)
                return null;
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgOtherCouponContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherCouponContentDTO.class);
            if (dto == null)
                return null;
            List<CommonMsgItemVO> items = new ArrayList<>();
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getInviteUser().getWorker().getNickName() + "", COLOR_CONTENT,
                    msg.getInviteUser().getWorker().getPortrait()));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("被邀请人", COLOR_TITLE), contentList));
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_coupon.png";
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("邀请粉丝成功", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请状态", COLOR_TITLE), contentList));
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getState(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(msg.getDesc() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包相关", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getOrderId())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getOrderId() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            if (dto.getFanLiMoney() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO("¥" + filterMoney(dto.getFanLiMoney()), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("预估返利", COLOR_TITLE), contentList));
            }
            return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_invite.png", "邀请提醒 ",
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        }
            if (dto.getOrderFanLiMoney() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO("¥" + filterMoney(dto.getOrderFanLiMoney()), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单返利", COLOR_TITLE), contentList));
            }
        if (msg.getInviteUser() == null || msg.getInviteUser().getWorker() == null)
            return null;
            if (dto.getRewardMoney() != null) {
                contentList = new ArrayList<>();
                contentList
                        .add(new ClientTextStyleVO("¥" + filterMoney(dto.getRewardMoney()), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖励金", COLOR_TITLE), contentList));
            }
        List<CommonMsgItemVO> items = new ArrayList<>();
        List<ClientTextStyleVO> contentList = new ArrayList<>();
        LogHelper.test("邀请消息:" + new Gson().toJson(msg));
        contentList.add(new ClientTextStyleVO(msg.getInviteUser().getWorker().getNickName() + "", COLOR_CONTENT,
                msg.getInviteUser().getWorker().getPortrait()));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("被邀请人", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getSource())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getSource() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            }
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(msg.getDesc() + "", COLOR_HIGHLIGHT_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getStartTime()) && !StringUtil.isNullOrEmpty(dto.getEndTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getStartTime() + "-" + dto.getEndTime(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("有效期", COLOR_TITLE), contentList));
            }
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            if (dto.getLeftDay() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getLeftDay() + "", COLOR_HIGHLIGHT_CONTENT));
        return new UserMsgVO(msg.getId(),"http://img.flqapp.com/resource/msg/icon_msg_invite.png", msg.getMsgType().getDesc(),
                msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
    }
                if (msg.getType() == MsgTypeOtherTypeEnum.couponReward) {
                    contentList.add(new ClientTextStyleVO("天(未使用将会过期)", COLOR_CONTENT));
                } else if (msg.getType() == MsgTypeOtherTypeEnum.couponMianDan) {
                    contentList.add(new ClientTextStyleVO("天(未使用将会过期)", COLOR_CONTENT));
                } else {
                    contentList.add(new ClientTextStyleVO("天", COLOR_CONTENT));
                }
    /**
     * 其他消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgOtherDetail msg) {
        List<CommonMsgItemVO> items = new ArrayList<>();
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("剩余天数", COLOR_TITLE), contentList));
            }
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getType().getIcon());
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
        String icon = null;
        if (msg.getType() == MsgTypeOtherTypeEnum.couponMianDan
                || msg.getType() == MsgTypeOtherTypeEnum.couponWelfareMianDan
                || msg.getType() == MsgTypeOtherTypeEnum.couponReward
                || msg.getType() == MsgTypeOtherTypeEnum.freeCouponBuy
                || msg.getType() == MsgTypeOtherTypeEnum.freeCouponGive) {
            if (!StringUtil.isNullOrEmpty(dto.getDesc())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getDesc(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            }
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgOtherCouponContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherCouponContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_coupon.png";
        } else if (msg.getType() == MsgTypeOtherTypeEnum.taoLiJin) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getState(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            MsgOtherTaoLiJinContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherTaoLiJinContentDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getOrderId())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getOrderId() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList));
            }
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_tlj.png";
            if (dto.getFanLiMoney() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO("¥" + filterMoney(dto.getFanLiMoney()), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("预估返利", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getState(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            if (dto.getOrderFanLiMoney() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO("¥" + filterMoney(dto.getOrderFanLiMoney()), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单返利", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getSource())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getSource() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            }
            if (dto.getRewardMoney() != null) {
                contentList = new ArrayList<>();
                contentList
                        .add(new ClientTextStyleVO("¥" + filterMoney(dto.getRewardMoney()), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖励金", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getTimeDesc())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getTimeDesc() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("时间", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getSource())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getSource() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            }
            if (dto.getMoney() != null) {
                contentList = new ArrayList<>();
                contentList.add(
                        new ClientTextStyleVO("¥" + filterMoney(dto.getMoney().setScale(2)), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("面额", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getStartTime()) && !StringUtil.isNullOrEmpty(dto.getEndTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getStartTime() + "-" + dto.getEndTime(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("有效期", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getReason())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            }
            if (dto.getLeftDay() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getLeftDay() + "", COLOR_HIGHLIGHT_CONTENT));
            if (!StringUtil.isNullOrEmpty(dto.getResult())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getResult() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("结果", COLOR_TITLE), contentList));
            }
                if (msg.getType() == MsgTypeOtherTypeEnum.couponReward) {
                    contentList.add(new ClientTextStyleVO("天(未使用将会过期)", COLOR_CONTENT));
                } else if (msg.getType() == MsgTypeOtherTypeEnum.couponMianDan) {
                    contentList.add(new ClientTextStyleVO("天(未使用将会过期)", COLOR_CONTENT));
                } else {
                    contentList.add(new ClientTextStyleVO("天", COLOR_CONTENT));
                }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("剩余天数", COLOR_TITLE), contentList));
            }
        } else if (msg.getType() == MsgTypeOtherTypeEnum.give) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getDesc())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getDesc(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            }
            MsgOtherGiveContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherGiveContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            String type = dto.getType();
            if (type == null)
                return null;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.taoLiJin) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (MsgOtherGiveContentDTO.TYEP_COUPON.equalsIgnoreCase(type)) {
                icon = "http://img.flqapp.com/resource/msg/icon_msg_other_coupon.png";
            } else {
                icon = "http://img.flqapp.com/resource/msg/icon_msg_other_tlj.png";
            }
            MsgOtherTaoLiJinContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherTaoLiJinContentDTO.class);
            if (dto == null)
                return null;
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getGiveType(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送类别", COLOR_TITLE), contentList));
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_tlj.png";
            if (!StringUtil.isNullOrEmpty(dto.getReceiveInfo())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReceiveInfo() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取用户", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getState(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getGiveTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getGiveTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送时间", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getSource())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getSource() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getReceiveTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReceiveTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取时间", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getTimeDesc())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getTimeDesc() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("时间", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getReturnTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReturnTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("退回时间", COLOR_TITLE), contentList));
            }
            if (dto.getMoney() != null) {
                contentList = new ArrayList<>();
                contentList.add(
                        new ClientTextStyleVO("¥" + filterMoney(dto.getMoney().setScale(2)), COLOR_HIGHLIGHT_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("面额", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getReason())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            }
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(dto.getTitle());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.exchange) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getResult())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getResult() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("结果", COLOR_TITLE), contentList));
            }
            MsgOtherExchangeContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherExchangeContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_integral.png";
        } else if (msg.getType() == MsgTypeOtherTypeEnum.give) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getState(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            MsgOtherGiveContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherGiveContentDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getExpend())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getExpend() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗", COLOR_TITLE), contentList));
            }
            String type = dto.getType();
            if (type == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getTotalGold())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getTotalGold() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("剩余", COLOR_TITLE), contentList));
            }
            if (MsgOtherGiveContentDTO.TYEP_COUPON.equalsIgnoreCase(type)) {
                icon = "http://img.flqapp.com/resource/msg/icon_msg_other_coupon.png";
            } else {
                icon = "http://img.flqapp.com/resource/msg/icon_msg_other_tlj.png";
            }
            if (!StringUtil.isNullOrEmpty(dto.getThing())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getThing() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换物品", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getGiveType(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送类别", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        } else if (msg.getType() == MsgTypeOtherTypeEnum.couponActivate) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getReceiveInfo())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReceiveInfo() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取用户", COLOR_TITLE), contentList));
            }
            MsgOtherCouponActivateDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherCouponActivateDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getGiveTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getGiveTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送时间", COLOR_TITLE), contentList));
            }
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_coupon.png";
            if (!StringUtil.isNullOrEmpty(dto.getReceiveTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReceiveTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("领取时间", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getType(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getReturnTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReturnTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("退回时间", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getExplain())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getExplain() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getGiveUser())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getGiveUser() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送人", COLOR_TITLE), contentList));
            }
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(dto.getTitle());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.exchange) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getReceiveTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReceiveTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("获赠时间", COLOR_TITLE), contentList));
            }
            MsgOtherExchangeContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherExchangeContentDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getValidityTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getValidityTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("有效期", COLOR_TITLE), contentList));
            }
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_integral.png";
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getState(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(dto.getTitle());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.firstOrderReward) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getExpend())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getExpend() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("消耗", COLOR_TITLE), contentList));
            }
            MsgOtherRewardIntegralDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherRewardIntegralDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getTotalGold())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getTotalGold() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("剩余", COLOR_TITLE), contentList));
            }
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_integral.png";
            if (!StringUtil.isNullOrEmpty(dto.getThing())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getThing() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("兑换物品", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
        } else if (msg.getType() == MsgTypeOtherTypeEnum.couponActivate) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getSource())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getSource() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            }
            MsgOtherCouponActivateDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherCouponActivateDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getNum())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getNum() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("数量", COLOR_TITLE), contentList));
            }
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_coupon.png";
            if (!StringUtil.isNullOrEmpty(dto.getTotal())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getTotal() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("剩余", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getType(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getExplain())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getExplain() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getExplain())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getExplain() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getGiveUser())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getGiveUser() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送人", COLOR_TITLE), contentList));
            }
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(dto.getTitle());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.systemGive) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getReceiveTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReceiveTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("获赠时间", COLOR_TITLE), contentList));
            }
            MsgOtherSystemGiveDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherSystemGiveDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getValidityTime())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getValidityTime() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("有效期", COLOR_TITLE), contentList));
            }
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_system_give.png";
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(dto.getTitle());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.firstOrderReward) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getName())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getName() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠品", COLOR_TITLE), contentList));
            }
            MsgOtherRewardIntegralDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherRewardIntegralDTO.class);
            if (dto == null)
                return null;
            if (dto.getCount() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getCount() + "张", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("数量", COLOR_TITLE), contentList));
            }
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_integral.png";
            if (!StringUtil.isNullOrEmpty(dto.getReason())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            if (!StringUtil.isNullOrEmpty(dto.getOrderId())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(
                        "[" + Constant.getSourceName(dto.getOrderType()) + "]" + dto.getOrderId() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getSource())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getSource() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("来源", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getDesc())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getDesc(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getNum())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getNum() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("数量", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getTotal())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getTotal() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("剩余", COLOR_TITLE), contentList));
            }
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.taoLiJinExchange) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getExplain())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getExplain() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            }
            MsgOtherRewardIntegralDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherRewardIntegralDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_system_give.png";
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(dto.getTitle());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.systemGive) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            MsgOtherSystemGiveDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherSystemGiveDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getExplain())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getExplain() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("原        因", COLOR_TITLE), contentList));
            }
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_system_give.png";
            if (dto.getTotal() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getTotal(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("可折算额", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            if (!StringUtil.isNullOrEmpty(dto.getNum())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getNum() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("折算金币", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getName())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getName() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠品", COLOR_TITLE), contentList));
            }
            if (!StringUtil.isNullOrEmpty(dto.getSource())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getSource(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("状        态", COLOR_TITLE), contentList));
            }
            if (dto.getCount() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getCount() + "张", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("数量", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getReason())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            }
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(dto.getTitle());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.passVIPApply
                || msg.getType() == MsgTypeOtherTypeEnum.rejectVIPApply) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getOrderId())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(
                        "[" + Constant.getSourceName(dto.getOrderType()) + "]" + dto.getOrderId() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单", COLOR_TITLE), contentList));
            }
            MsgOtherVIPDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherVIPDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getDesc())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getDesc(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent1(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("审核状态", COLOR_TITLE), contentList));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.taoLiJinExchange) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent2(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原        因", COLOR_TITLE), contentList));
            MsgOtherRewardIntegralDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherRewardIntegralDTO.class);
            if (dto == null)
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getContent3())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getContent3() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("升级时间", COLOR_TITLE), contentList));
            }
            icon = "http://img.flqapp.com/resource/msg/icon_msg_other_system_give.png";
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon("http://img.flqapp.com/resource/msg/icon_msg_vip.png");
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.teamVIPCallBoss) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            if (!StringUtil.isNullOrEmpty(dto.getExplain())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getExplain() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("原        因", COLOR_TITLE), contentList));
            }
            MsgOtherVIPDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherVIPDTO.class);
            if (dto == null)
                return null;
            if (dto.getTotal() != null) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getTotal(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("可折算额", COLOR_TITLE), contentList));
            }
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            if (!StringUtil.isNullOrEmpty(dto.getNum())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getNum() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("折算金币", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent1(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("直接粉丝", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getSource())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getSource(), COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("状        态", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent2(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("会员状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent3() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("特别提醒", COLOR_TITLE), contentList));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(icon);
            userMsgVO.setTitle(dto.getTitle());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.passVIPApply
                || msg.getType() == MsgTypeOtherTypeEnum.rejectVIPApply) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            MsgOtherVIPDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherVIPDTO.class);
            if (dto == null)
                return null;
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon("http://img.flqapp.com/resource/msg/icon_msg_notify.png");
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.teamSplitCallBoss) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            MsgOtherVIPDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherVIPDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent1(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("审核状态", COLOR_TITLE), contentList));
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent2(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原        因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent1(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("直接粉丝", COLOR_TITLE), contentList));
            if (!StringUtil.isNullOrEmpty(dto.getContent3())) {
                contentList = new ArrayList<>();
                contentList.add(new ClientTextStyleVO(dto.getContent3() + "", COLOR_CONTENT));
                items.add(new CommonMsgItemVO(new ClientTextStyleVO("升级时间", COLOR_TITLE), contentList));
            }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent2(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("脱离原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent3() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请关系", COLOR_TITLE), contentList));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon("http://img.flqapp.com/resource/msg/icon_msg_vip.png");
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.teamVIPCallBoss) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            MsgOtherVIPDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherVIPDTO.class);
            if (dto == null)
                return null;
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon("http://img.flqapp.com/resource/msg/icon_msg_invite_break.png");
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.vipUpgradeReward) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getContent(), new TypeToken<ArrayList<CommonMsgItemVO>>() {
            }.getType()));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent1(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("直接粉丝", COLOR_TITLE), contentList));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getType().getIcon());
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent2(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("会员状态", COLOR_TITLE), contentList));
        return new UserMsgVO(msg.getId(), icon, msg.getType().getDesc(),
                msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
    }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent3() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("特别提醒", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
    /**
     * 礼金消息
     *
     * @param msg
     * @return
     */
    public static UserMsgVO create(MsgLijinVIPDetail msg, JumpDetailV2 jumpDetail, JSONObject params) {
        List<CommonMsgItemVO> items = new ArrayList<>();
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon("http://img.flqapp.com/resource/msg/icon_msg_notify.png");
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.teamSplitCallBoss) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
        // 新版消息
        if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {
            }.getType()));
            MsgOtherVIPDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherVIPDTO.class);
            if (dto == null)
                return null;
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getType().getIcon());
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            userMsgVO.setJumpDetail(jumpDetail);
            if (params != null)
                userMsgVO.setParams(params.toString());
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent1(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("直接粉丝", COLOR_TITLE), contentList));
            return userMsgVO;
        }
        return null;
    }
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent2(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("脱离原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getContent3() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请关系", COLOR_TITLE), contentList));
    //TODO 系统消息
    public static UserMsgVO create(UserSystemMsg msg) {
        List<CommonMsgItemVO> items = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
        List<ClientTextStyleVO> contentList = null;
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon("http://img.flqapp.com/resource/msg/icon_msg_invite_break.png");
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.vipUpgradeReward) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(msg.getTitle(), COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("标题", COLOR_TITLE), contentList));
            Gson gson = new Gson();
            items.addAll(gson.fromJson(msg.getContent(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setId(msg.getId());
            userMsgVO.setIcon(msg.getType().getIcon());
            userMsgVO.setTitle(msg.getType().getDesc());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
        contentList = new ArrayList<>();
        contentList.add(new ClientTextStyleVO(msg.getContent(), COLOR_CONTENT));
        items.add(new CommonMsgItemVO(new ClientTextStyleVO("内容", COLOR_TITLE), contentList));
        return new UserMsgVO(msg.getId(),icon, msg.getType().getDesc(),
                msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
    }
        UserMsgVO userMsgVO = new UserMsgVO();
        userMsgVO.setId(msg.getId());
        userMsgVO.setIcon("");
        userMsgVO.setTitle(msg.getType().getDesc());
        userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
        userMsgVO.setContentItems(items);
        return userMsgVO;
    }
}
fanli/src/main/java/com/yeshi/fanli/util/mybatishandler/msg/MsgTypeLijinVIPTypeEnumHandler.java
New file
@@ -0,0 +1,52 @@
package com.yeshi.fanli.util.mybatishandler.msg;
import com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class MsgTypeLijinVIPTypeEnumHandler extends BaseTypeHandler<MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum> {
    @Override
    public MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum getNullableResult(ResultSet arg0, String arg1) throws SQLException {
        String key = arg0.getString(arg1);
        if (arg0.wasNull()) {
            return null;
        } else {
            return  MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum.valueOf(key);
        }
    }
    @Override
    public  MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum getNullableResult(ResultSet arg0, int arg1) throws SQLException {
        String key = arg0.getString(arg1);
        if (arg0.wasNull()) {
            return null;
        } else {
            // 根据数据库中的key值,定位SexEnum子类
            return  MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum.valueOf(key);
        }
    }
    @Override
    public  MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum getNullableResult(CallableStatement arg0, int arg1) throws SQLException {
        String key = arg0.getString(arg1);
        if (arg0.wasNull()) {
            return null;
        } else {
            // 根据数据库中的key值,定位SexEnum子类
            return  MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum.valueOf(key);
        }
    }
    @Override
    public void setNonNullParameter(PreparedStatement arg0, int arg1,  MsgLijinVIPDetail.MsgTypeLijinVIPTypeEnum arg2, JdbcType arg3)
            throws SQLException {
        arg0.setString(arg1, arg2.name());
    }
}
fanli/src/main/resource/mapping/lijin/MsgLijinVIPDetailMapper.xml
New file
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeshi.fanli.lijin.dao.MsgLijinVIPDetailMapper">
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail">
        <id column="mlv_id" property="id" jdbcType="BIGINT"/>
        <result column="mlv_type" property="type"
                typeHandler="com.yeshi.fanli.util.mybatishandler.msg.MsgTypeLijinVIPTypeEnumHandler"/>
        <result column="mlv_remark" property="remark" jdbcType="VARCHAR"/>
        <result column="mlv_read" property="read" jdbcType="BOOLEAN"/>
        <result column="mlv_create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="mlv_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
        <result column="extraInfo" property="extraInfo" jdbcType="VARCHAR"/>
        <association property="user" column="mlv_uid"
                     javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
            <id column="mlv_uid" property="id" jdbcType="BIGINT"/>
        </association>
    </resultMap>
    <sql id="Base_Column_List">mlv_id,mlv_uid,mlv_type,mlv_remark,mlv_read,mlv_create_time,mlv_update_time</sql>
    <select id="listByPrimaryKeys" resultMap="BaseResultMap">
        SELECT d.*, t.`mea_content` AS extraInfo FROM yeshi_ec_msg_lijin_vip d
        LEFT JOIN `yeshi_ec_msg_extra` t ON (t.`mea_rid` = d.`mlv_id` AND t.`mea_type` = 'lijinVip')
        WHERE
        <foreach collection="ids" separator=" or " open="(" close=")" item="id">
            mlv_id=#{id}
        </foreach>
    </select>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
        <include refid="Base_Column_List"/>from yeshi_ec_msg_lijin_vip where mlv_id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey"
            parameterType="java.lang.Long">delete from yeshi_ec_msg_lijin_vip where mlv_id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail" useGeneratedKeys="true"
            keyProperty="id">insert into yeshi_ec_msg_lijin_vip (mlv_id,mlv_uid,mlv_type,mlv_remark,mlv_read,mlv_create_time,mlv_update_time) values (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{read,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail" useGeneratedKeys="true"
            keyProperty="id">insert into yeshi_ec_msg_lijin_vip
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">mlv_id,</if>
            <if test="user != null">mlv_uid,</if>
            <if test="type != null">mlv_type,</if>
            <if test="remark != null">mlv_remark,</if>
            <if test="read != null">mlv_read,</if>
            <if test="createTime != null">mlv_create_time,</if>
            <if test="updateTime != null">mlv_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="user != null">#{user.id,jdbcType=BIGINT},</if>
            <if test="type != null">#{type,jdbcType=VARCHAR},</if>
            <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
            <if test="read != null">#{read,jdbcType=BOOLEAN},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey"
            parameterType="com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail">update yeshi_ec_msg_lijin_vip set mlv_uid = #{user.id,jdbcType=BIGINT},mlv_type = #{type,jdbcType=VARCHAR},mlv_remark = #{remark,jdbcType=VARCHAR},mlv_read = #{read,jdbcType=BOOLEAN},mlv_create_time = #{createTime,jdbcType=TIMESTAMP},mlv_update_time = #{updateTime,jdbcType=TIMESTAMP} where mlv_id = #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.lijin.entity.MsgLijinVIPDetail">update
        yeshi_ec_msg_lijin_vip
        <set>
            <if test="user != null">mlv_uid=#{user.id,jdbcType=BIGINT},</if>
            <if test="type != null">mlv_type=#{type,jdbcType=VARCHAR},</if>
            <if test="remark != null">mlv_remark=#{remark,jdbcType=VARCHAR},</if>
            <if test="read != null">mlv_read=#{read,jdbcType=BOOLEAN},</if>
            <if test="createTime != null">mlv_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">mlv_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where mlv_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>
fanli/src/main/resource/mapping/msg/MsgAccountDetailMapper.xml
@@ -2,34 +2,34 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeshi.fanli.dao.mybatis.msg.MsgAccountDetailMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail">
        <id column="ma_id" property="id" jdbcType="BIGINT" />
        <result column="ma_type" property="type"
            typeHandler="com.yeshi.fanli.util.mybatishandler.msg.MsgTypeAccountTypeEnumHandler" />
        <result column="ma_title" property="title" jdbcType="VARCHAR" />
        <result column="ma_content" property="content" jdbcType="VARCHAR" />
        <result column="ma_beizhu" property="beiZhu" jdbcType="VARCHAR" />
        <result column="ma_read" property="read" jdbcType="BOOLEAN" />
        <result column="ma_create_time" property="createTime" jdbcType="TIMESTAMP" />
        <result column="ma_update_time" property="updateTime" jdbcType="TIMESTAMP" />
        <result column="extraInfo" property="extraInfo" jdbcType="VARCHAR"/>
        <association property="user" column="ma_uid"
            javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
            <id column="ma_uid" property="id" jdbcType="BIGINT" />
        </association>
    </resultMap>
    <sql id="Base_Column_List">ma_id,ma_uid,ma_type,ma_title,ma_content,ma_beizhu,ma_read,ma_create_time,ma_update_time
    <resultMap id="BaseResultMap"
               type="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail">
        <id column="ma_id" property="id" jdbcType="BIGINT"/>
        <result column="ma_type" property="type"
                typeHandler="com.yeshi.fanli.util.mybatishandler.msg.MsgTypeAccountTypeEnumHandler"/>
        <result column="ma_title" property="title" jdbcType="VARCHAR"/>
        <result column="ma_content" property="content" jdbcType="VARCHAR"/>
        <result column="ma_beizhu" property="beiZhu" jdbcType="VARCHAR"/>
        <result column="ma_read" property="read" jdbcType="BOOLEAN"/>
        <result column="ma_create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="ma_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
        <result column="extraInfo" property="extraInfo" jdbcType="VARCHAR"/>
        <association property="user" column="ma_uid"
                     javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
            <id column="ma_uid" property="id" jdbcType="BIGINT"/>
        </association>
    </resultMap>
    <sql id="Base_Column_List">ma_id,ma_uid,ma_type,ma_title,ma_content,ma_beizhu,ma_read,ma_create_time,ma_update_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_msg_account where ma_id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
            parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List"/>
        from yeshi_ec_msg_account where ma_id = #{id,jdbcType=BIGINT}
    </select>
    <select id="listByUid" resultMap="BaseResultMap">
    <select id="listByUid" resultMap="BaseResultMap">
        select d.*,t.`mea_content` AS extraInfo from yeshi_ec_msg_account d
        LEFT JOIN  `yeshi_ec_msg_extra` t  ON (t.`mea_rid` = d.`ma_id` AND t.`mea_type` = 'account')
        where d.ma_uid = #{uid,jdbcType=BIGINT} 
@@ -37,8 +37,19 @@
        limit #{start},#{count}
    </select>
    <select id="countByUid" resultType="java.lang.Long"
        parameterType="java.lang.Long">
    <select id="listByPrimaryKeys" resultMap="BaseResultMap">
        select d.*,t.`mea_content` AS extraInfo from yeshi_ec_msg_account d
        LEFT JOIN `yeshi_ec_msg_extra` t ON (t.`mea_rid` = d.`ma_id` AND t.`mea_type` = 'account')
        where
        <foreach collection="ids" separator=" or " open="(" close=")" item="id">
            ma_id=#{id}
        </foreach>
    </select>
    <select id="countByUid" resultType="java.lang.Long"
            parameterType="java.lang.Long">
        select
        count(ma_id)
        from yeshi_ec_msg_account where ma_uid
@@ -46,43 +57,43 @@
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_msg_account where ma_id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail"
        useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_account
    <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail"
            useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_account
        (ma_id,ma_uid,ma_type,ma_title,ma_content,ma_beizhu,ma_read,ma_create_time,ma_update_time)
        values
        (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{read,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_msg_account
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">ma_id,</if>
            <if test="user != null">ma_uid,</if>
            <if test="type != null">ma_type,</if>
            <if test="title != null">ma_title,</if>
            <if test="content != null">ma_content,</if>
            <if test="beiZhu != null">ma_beizhu,</if>
            <if test="read != null">ma_read,</if>
            <if test="createTime != null">ma_create_time,</if>
            <if test="updateTime != null">ma_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="user != null">#{user.id,jdbcType=BIGINT},</if>
            <if test="type != null">#{type,jdbcType=VARCHAR},</if>
            <if test="title != null">#{title,jdbcType=VARCHAR},</if>
            <if test="content != null">#{content,jdbcType=VARCHAR},</if>
            <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if>
            <if test="read != null">#{read,jdbcType=BOOLEAN},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail">update
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail"
            useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_msg_account
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">ma_id,</if>
            <if test="user != null">ma_uid,</if>
            <if test="type != null">ma_type,</if>
            <if test="title != null">ma_title,</if>
            <if test="content != null">ma_content,</if>
            <if test="beiZhu != null">ma_beizhu,</if>
            <if test="read != null">ma_read,</if>
            <if test="createTime != null">ma_create_time,</if>
            <if test="updateTime != null">ma_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="user != null">#{user.id,jdbcType=BIGINT},</if>
            <if test="type != null">#{type,jdbcType=VARCHAR},</if>
            <if test="title != null">#{title,jdbcType=VARCHAR},</if>
            <if test="content != null">#{content,jdbcType=VARCHAR},</if>
            <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if>
            <if test="read != null">#{read,jdbcType=BOOLEAN},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail">update
        yeshi_ec_msg_account set ma_uid = #{user.id,jdbcType=BIGINT},ma_type
        =
        #{type,jdbcType=VARCHAR},ma_title =
@@ -93,24 +104,23 @@
        #{createTime,jdbcType=TIMESTAMP},ma_update_time =
        #{updateTime,jdbcType=TIMESTAMP} where ma_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail">
        update yeshi_ec_msg_account
        <set>
            <if test="user != null">ma_uid=#{user.id,jdbcType=BIGINT},</if>
            <if test="type != null">ma_type=#{type,jdbcType=VARCHAR},</if>
            <if test="title != null">ma_title=#{title,jdbcType=VARCHAR},</if>
            <if test="content != null">ma_content=#{content,jdbcType=VARCHAR},</if>
            <if test="beiZhu != null">ma_beizhu=#{beiZhu,jdbcType=VARCHAR},</if>
            <if test="read != null">ma_read=#{read,jdbcType=BOOLEAN},</if>
            <if test="createTime != null">ma_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">ma_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where ma_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail">
        update yeshi_ec_msg_account
        <set>
            <if test="user != null">ma_uid=#{user.id,jdbcType=BIGINT},</if>
            <if test="type != null">ma_type=#{type,jdbcType=VARCHAR},</if>
            <if test="title != null">ma_title=#{title,jdbcType=VARCHAR},</if>
            <if test="content != null">ma_content=#{content,jdbcType=VARCHAR},</if>
            <if test="beiZhu != null">ma_beizhu=#{beiZhu,jdbcType=VARCHAR},</if>
            <if test="read != null">ma_read=#{read,jdbcType=BOOLEAN},</if>
            <if test="createTime != null">ma_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">ma_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where ma_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="setMsgReadByUid" parameterType="java.lang.Long">
    <update id="setMsgReadByUid" parameterType="java.lang.Long">
        update
        yeshi_ec_msg_account set ma_read=1 where ma_uid=#{0}
    </update>
fanli/src/main/resource/mapping/msg/MsgInviteDetailMapper.xml
@@ -68,6 +68,20 @@
    </select>
    <select id="listByPrimaryKeys" resultMap="BaseResultMap">
        select <include refid="Base_Column_List" />,u.`id`,u.`nick_name`,u.`portrait`,
        te.`mea_content` AS extraInfo FROM yeshi_ec_msg_invite i
        LEFT JOIN yeshi_ec_threesale t ON t.`id`=i.`mi_invite_id`
        LEFT JOIN yeshi_ec_user u ON u.`id`=t.`worker_id`
        LEFT JOIN `yeshi_ec_msg_extra` te  ON (te.`mea_rid` = i.`mi_id` AND te.`mea_type` = 'invite')
        where
        <foreach collection="ids" separator=" or " open="(" close=")" item="id">
            mi_id=#{id}
        </foreach>
    </select>
    <select id="countByUid" resultType="java.lang.Long"
        parameterType="java.lang.Long">
        select
fanli/src/main/resource/mapping/msg/MsgMoneyDetailMapper.xml
@@ -50,6 +50,19 @@
        where d.mm_uid =#{uid,jdbcType=BIGINT} order by d.mm_update_time desc 
        limit #{start},#{count}
    </select>
    <select id="listByPrimaryKeys" resultMap="BaseResultMap">
        select d.*, d.mm_source_id as mm_source_id_extract, d.mm_source_id as mm_source_id_alipayvalid
        ,t.`mea_content` AS extraInfo from yeshi_ec_msg_money d
        LEFT JOIN  `yeshi_ec_msg_extra` t  ON (t.`mea_rid` = d.`mm_id` AND t.`mea_type` = 'money')
        where
        <foreach collection="ids" separator=" or " open="(" close=")" item="id">
            mm_id=#{id}
        </foreach>
    </select>
    <select id="countByUid" resultType="java.lang.Long"
        parameterType="java.lang.Long">select count(mm_id) from yeshi_ec_msg_money where mm_uid
        = #{uid,jdbcType=BIGINT}
fanli/src/main/resource/mapping/msg/MsgOrderDetailMapper.xml
@@ -54,6 +54,19 @@
        ORDER BY d.mo_update_time DESC 
        LIMIT #{start},#{count}
    </select>
    <select id="listByPrimaryKeys" resultMap="BaseResultMap">
        SELECT  d.*, t.`mea_content` AS extraInfo FROM yeshi_ec_msg_order  d
        LEFT JOIN  `yeshi_ec_msg_extra` t  ON (t.`mea_rid` = d.`mo_id` AND t.`mea_type` = 'order')
        WHERE
        <foreach collection="ids" separator=" or " open="(" close=")" item="id">
            mo_id=#{id}
        </foreach>
    </select>
    <select id="countByUid" resultType="java.lang.Long"
        parameterType="java.lang.Long">select count(mo_id) from yeshi_ec_msg_order where mo_uid
        = #{uid,jdbcType=BIGINT}
fanli/src/main/resource/mapping/msg/MsgOtherDetailMapper.xml
@@ -34,6 +34,18 @@
        order by mo_create_time desc 
        limit #{start},#{count}
    </select>
    <select id="listByPrimaryKeys" resultMap="BaseResultMap">
        SELECT  d.*, t.`mea_content` AS extraInfo FROM yeshi_ec_msg_order  d
        LEFT JOIN  `yeshi_ec_msg_extra` t  ON (t.`mea_rid` = d.`mo_id` AND t.`mea_type` = 'order')
        WHERE
        <foreach collection="ids" separator=" or " open="(" close=")" item="id">
            mo_id=#{id}
        </foreach>
    </select>
    <select id="countByUid" resultType="java.lang.Long"
        parameterType="java.lang.Long">select count(mo_id) from yeshi_ec_msg_other where mo_uid
        = #{uid,jdbcType=BIGINT}</select>
fanli/src/main/resource/mapping/msg/UserSystemMsgMapper.xml
@@ -40,6 +40,17 @@
        order by ms_create_time desc limit #{start},#{count}
    </select>
    <select id="listByPrimaryKeys" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_user_msg_system where
        <foreach collection="ids" separator=" or " open="(" close=")" item="id">
            ms_id=#{id}
        </foreach>
    </select>
    <select id="countByUid" resultType="java.lang.Long"
        parameterType="java.lang.Long">
        select
fanli/src/main/resource/spring.xml
@@ -121,7 +121,7 @@
    <!-- DAO接口所在包名,Spring会自动查找其下的类 -->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="com.yeshi.fanli.dao.mybatis" />
        <property name="basePackage" value="com.yeshi.fanli.dao.mybatis,com.yeshi.fanli.lijin.dao" />
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
    </bean>