package com.yeshi.fanli.util.factory.msg;
|
|
import java.util.ArrayList;
|
import java.util.Date;
|
import java.util.List;
|
|
import com.google.gson.Gson;
|
import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
|
import com.yeshi.fanli.entity.bus.user.UserInfo;
|
import com.yeshi.fanli.util.Constant;
|
import com.yeshi.fanli.util.StringUtil;
|
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
|
import com.yeshi.fanli.vo.msg.CommonMsgItemVOFactory;
|
|
import net.sf.json.JSONArray;
|
import net.sf.json.JSONObject;
|
|
public class MsgAccountDetailFactory {
|
public final static int TYPE_WX = 1;// 微信
|
public final static int TYPE_TB = 2;// 淘宝
|
public final static int TYPE_PHONE = 3;// 电话
|
|
|
public final static int WAY_BIND = 1;// 绑定
|
public final static int WAY_CHANGE = 2;// 更换
|
public final static int WAY_UNBIND = 3;// 解绑
|
|
|
/**
|
* 账号绑定成功
|
*
|
* @param uid
|
* @param type
|
* @return
|
*/
|
public static MsgAccountDetail createBindSuccess(Long uid, int type, int changeWay) {
|
if (uid == null)
|
return null;
|
|
String info = "";
|
String typeName = "";
|
if (type == TYPE_PHONE) {
|
info = "手机号码";
|
typeName = "手机号";
|
} else if (type == TYPE_TB) {
|
info = "淘宝账号";
|
typeName = "淘宝账号";
|
} else if (type == TYPE_WX) {
|
info = "微信账号";
|
typeName = "微信号";
|
}
|
|
String way = "";
|
if (changeWay == WAY_BIND) {
|
way = "绑定成功";
|
} else if (changeWay == WAY_CHANGE) {
|
way = "更换成功";
|
} else if (changeWay == WAY_UNBIND) {
|
way = "解绑成功";
|
}
|
|
String beizu = "无";
|
if (type == TYPE_TB && changeWay == WAY_CHANGE) {
|
beizu = "淘宝账号更换绑定后,请务必要用更换后的淘宝账号领券下单";
|
}
|
|
List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("绑定详情", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("恭喜你!" + info +"-"+ way, ClientTextStyleVO.COLOR_CONTENT)));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("绑定账号", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO(typeName, ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO(beizu, ClientTextStyleVO.COLOR_CONTENT)));
|
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setTitle("绑定账号");
|
detail.setType(MsgTypeAccountTypeEnum.bingding);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
detail.setExtraInfo(new Gson().toJson(listMsg));
|
return detail;
|
}
|
|
|
|
/**
|
* 账号绑定失败
|
*
|
* @param uid
|
* @param type
|
* @return
|
*/
|
public static MsgAccountDetail createBindFail(Long uid, int type, int changeWay, String reason) {
|
if (uid == null)
|
return null;
|
|
String info = "";
|
String typeName = "";
|
if (type == TYPE_PHONE) {
|
info = "手机号码";
|
typeName = "手机号";
|
} else if (type == TYPE_TB) {
|
info = "淘宝账号";
|
typeName = "淘宝账号";
|
} else if (type == TYPE_WX) {
|
info = "微信账号";
|
typeName = "微信号";
|
}
|
|
String way = "";
|
if (changeWay == WAY_BIND) {
|
way = "绑定失败";
|
} else if (changeWay == WAY_CHANGE) {
|
way = "更换失败";
|
} else if (changeWay == WAY_UNBIND) {
|
way = "解绑失败";
|
}
|
|
|
List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("绑定详情", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("恭喜你!" + info +"-"+ way, ClientTextStyleVO.COLOR_CONTENT)));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("绑定账号", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO(typeName, ClientTextStyleVO.COLOR_CONTENT)));
|
if (!StringUtil.isNullOrEmpty(reason)) {
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("失败原因", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO(reason, ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)));
|
}
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("无", ClientTextStyleVO.COLOR_CONTENT)));
|
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setTitle("绑定账号");
|
detail.setType(MsgTypeAccountTypeEnum.bingding);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
detail.setExtraInfo(new Gson().toJson(listMsg));
|
return detail;
|
}
|
|
|
/**
|
* 邀请码修改
|
* @param uid
|
* @param oldCode
|
* @param newCode
|
* @return
|
*/
|
public static MsgAccountDetail createChangeInviteCode(Long uid, String oldCode, String newCode) {
|
if (uid == null || StringUtil.isNullOrEmpty(oldCode) || StringUtil.isNullOrEmpty(newCode))
|
return null;
|
|
List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("修改类别", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("邀请码修改", ClientTextStyleVO.COLOR_CONTENT)));
|
|
List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
contentList2.add(new ClientTextStyleVO(String.format("你原邀请码:%s已经成功修改为新邀请码:", oldCode), ClientTextStyleVO.COLOR_CONTENT));
|
contentList2.add(new ClientTextStyleVO(newCode, ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("修改详情", ClientTextStyleVO.COLOR_TITLE),contentList2));
|
|
List<ClientTextStyleVO> contentList3 = new ArrayList<>();
|
contentList3.add(new ClientTextStyleVO("原邀请码依然可以使用", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
contentList3.add(new ClientTextStyleVO(",每个账户ID仅能修改一次", ClientTextStyleVO.COLOR_CONTENT));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("重要提醒", ClientTextStyleVO.COLOR_TITLE),contentList3));
|
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("无", ClientTextStyleVO.COLOR_CONTENT)));
|
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setTitle("绑定账号");
|
detail.setType(MsgTypeAccountTypeEnum.changeCode);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
detail.setExtraInfo(new Gson().toJson(listMsg));
|
return detail;
|
}
|
|
|
/**
|
* 账号解绑成功
|
*
|
* @param uid
|
* @param type
|
* @return
|
*/
|
public static MsgAccountDetail createUnBindingAccount(Long uid, int type) {
|
String msg = "";
|
if (type == TYPE_PHONE) {
|
msg = "<highlight>手机号解绑成功</highlight>";
|
} else if (type == TYPE_TB) {
|
msg = "<highlight>淘宝解绑成功</highlight>";
|
} else if (type == TYPE_WX) {
|
msg = "<highlight>微信解绑成功</highlight>";
|
}
|
if (StringUtil.isNullOrEmpty(msg))
|
return null;
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setBeiZhu("无");
|
detail.setContent(msg);
|
detail.setTitle("解绑账号");
|
detail.setType(MsgTypeAccountTypeEnum.cancelBinding);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
return detail;
|
}
|
|
/**
|
* 账号更换成功
|
*
|
* @param uid
|
* @param type
|
* @return
|
*/
|
public static MsgAccountDetail createChangeBindingAccount(Long uid, int type) {
|
String msg = "";
|
if (type == TYPE_PHONE) {
|
msg = "<highlight>手机号更换绑定成功</highlight>";
|
} else if (type == TYPE_TB) {
|
msg = "<highlight>淘宝更换绑定成功</highlight>";
|
} else if (type == TYPE_WX) {
|
msg = "<highlight>微信更换绑定成功</highlight>";
|
}
|
if (StringUtil.isNullOrEmpty(msg))
|
return null;
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setBeiZhu("无");
|
detail.setContent(msg);
|
detail.setTitle("更换绑定账号");
|
detail.setType(MsgTypeAccountTypeEnum.bingdingChange);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
return detail;
|
}
|
|
/**
|
* 账号打通
|
*
|
* @param mainUid
|
* @param lessUid
|
* @return
|
*/
|
public static MsgAccountDetail createConnectAccount(Long mainUid, Long lessUid) {
|
if (mainUid == null || lessUid == null)
|
return null;
|
String msg = String.format("恭喜你账号合并成功,由“<highlight>%s</highlight>”合并到“<highlight>%s</highlight>”", lessUid + "",
|
mainUid + "");
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setBeiZhu("无");
|
detail.setContent(msg);
|
detail.setTitle("账号合并");
|
detail.setType(MsgTypeAccountTypeEnum.connect);
|
detail.setUser(new UserInfo(mainUid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
return detail;
|
}
|
|
// 账号等级
|
public static MsgAccountDetail createUserRank(Long uid, String orderType, int orderCount, String rankName) {
|
if (uid == null || rankName == null)
|
return null;
|
|
String msg = String.format(
|
"恭喜你,上月<highlight>%s</highlight>订单达到<highlight>%s</highlight>单,已为你升级为<highlight>%s</highlight>用户,将会获得对应的福利和特权。",
|
orderType, orderCount + "", rankName);
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setBeiZhu("无");
|
detail.setContent(msg);
|
detail.setTitle("账号等级");
|
detail.setType(MsgTypeAccountTypeEnum.level);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
return detail;
|
}
|
|
// 淘宝授权失败
|
public static MsgAccountDetail createTaoBaoAuthFail(Long uid, String taoBaoNickName, String reason) {
|
if (uid == null || reason == null)
|
return null;
|
|
JSONArray msg = new JSONArray();
|
JSONObject item = new JSONObject();
|
item.put("name", "账号");
|
item.put("content", String.format("淘宝昵称[%s]", taoBaoNickName));
|
msg.add(item);
|
|
item = new JSONObject();
|
item.put("name", "原因");
|
item.put("content", reason);
|
msg.add(item);
|
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setBeiZhu("无");
|
detail.setContent(msg.toString());
|
detail.setTitle("淘宝账号授权失败");
|
detail.setType(MsgTypeAccountTypeEnum.taoBaoAuthFail);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
return detail;
|
}
|
|
|
/**
|
* 普通会员、高级会员自动提升
|
* @param uid
|
* @param originalName
|
* @param upName
|
* @param days
|
* @param targetNum1
|
* @param type
|
* @param targetNum2
|
* @param beizu
|
* @return
|
*/
|
public static MsgAccountDetail vipPreUpgrade(Long uid, String originalName, String upName, int days, long targetNum1,
|
Long targetNum2, Integer type, String beizu) {
|
if (uid == null || originalName == null || upName == null)
|
return null;
|
|
List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
List<ClientTextStyleVO> contentList = new ArrayList<>();
|
contentList.add(new ClientTextStyleVO("恭喜你!有效", ClientTextStyleVO.COLOR_CONTENT));
|
if (type == null) {
|
contentList.add(new ClientTextStyleVO("直接粉丝已达", ClientTextStyleVO.COLOR_CONTENT));
|
contentList.add(new ClientTextStyleVO(targetNum1+"", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
contentList.add(new ClientTextStyleVO("人,有效间接粉丝已达", ClientTextStyleVO.COLOR_CONTENT));
|
contentList.add(new ClientTextStyleVO(targetNum2+"", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
contentList.add(new ClientTextStyleVO("人", ClientTextStyleVO.COLOR_CONTENT));
|
} else if (type == Constant.TYPE_REBATE) {
|
contentList.add(new ClientTextStyleVO("返利订单已达", ClientTextStyleVO.COLOR_CONTENT));
|
contentList.add(new ClientTextStyleVO(targetNum1+"", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
contentList.add(new ClientTextStyleVO("笔", ClientTextStyleVO.COLOR_CONTENT));
|
} else if (type == Constant.TYPE_SHAER) {
|
contentList.add(new ClientTextStyleVO("分享订单已达", ClientTextStyleVO.COLOR_CONTENT));
|
contentList.add(new ClientTextStyleVO(targetNum1+"", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
contentList.add(new ClientTextStyleVO("笔", ClientTextStyleVO.COLOR_CONTENT));
|
}
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("成长说明", ClientTextStyleVO.COLOR_TITLE),contentList));
|
|
List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
contentList2.add(new ClientTextStyleVO("你的账户已由"+originalName+"升级为", ClientTextStyleVO.COLOR_CONTENT));
|
contentList2.add(new ClientTextStyleVO(upName, ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("成长详情", ClientTextStyleVO.COLOR_TITLE),contentList2));
|
|
List<ClientTextStyleVO> contentList3 = new ArrayList<>();
|
contentList3.add(new ClientTextStyleVO(days+"", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
contentList3.add(new ClientTextStyleVO("天", ClientTextStyleVO.COLOR_CONTENT));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("共耗时", ClientTextStyleVO.COLOR_TITLE),contentList3));
|
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("对应权益", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("从收到本消息起,你将获得该账户等级对应的全部权益", ClientTextStyleVO.COLOR_CONTENT)));
|
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO(StringUtil.isNullOrEmpty(beizu)?"无":beizu, ClientTextStyleVO.COLOR_CONTENT)));
|
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setBeiZhu(beizu);
|
detail.setTitle("等级成长");
|
detail.setType(MsgTypeAccountTypeEnum.vipPgrade);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
detail.setExtraInfo(new Gson().toJson(listMsg));
|
return detail;
|
}
|
|
|
|
/**
|
* 普通会员、高级会员自动提升
|
* @param uid
|
* @param originalName
|
* @param upName
|
* @param days
|
* @param targetNum1
|
* @param type
|
* @param targetNum2
|
* @param beizu
|
* @return
|
*/
|
public static MsgAccountDetail vipUpgradeSuccess(Long uid, int days) {
|
if (uid == null)
|
return null;
|
|
List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("成长说明", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("恭喜你!已通过人工审核", ClientTextStyleVO.COLOR_CONTENT)));
|
|
List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
contentList2.add(new ClientTextStyleVO("你的账户已由高级会员升级为", ClientTextStyleVO.COLOR_CONTENT));
|
contentList2.add(new ClientTextStyleVO("超级会员", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("成长详情", ClientTextStyleVO.COLOR_TITLE),contentList2));
|
|
List<ClientTextStyleVO> contentList3 = new ArrayList<>();
|
contentList3.add(new ClientTextStyleVO(days+"", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
contentList3.add(new ClientTextStyleVO("天", ClientTextStyleVO.COLOR_CONTENT));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("共耗时", ClientTextStyleVO.COLOR_TITLE),contentList3));
|
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("对应权益", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("从收到本消息起,你将获得该账户等级对应的全部权益", ClientTextStyleVO.COLOR_CONTENT)));
|
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("感恩努力的自己,让我们携手板栗快省一起成长", ClientTextStyleVO.COLOR_CONTENT)));
|
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setTitle("等级成长");
|
detail.setType(MsgTypeAccountTypeEnum.vipPgrade);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
detail.setExtraInfo(new Gson().toJson(listMsg));
|
return detail;
|
}
|
|
|
/**
|
* 普通会员、高级会员自动提升
|
* @param uid
|
* @param originalName
|
* @param upName
|
* @param days
|
* @param targetNum1
|
* @param type
|
* @param targetNum2
|
* @param beizu
|
* @return
|
*/
|
public static MsgAccountDetail vipUpgradeFail(Long uid, String reason) {
|
if (uid == null)
|
return null;
|
|
List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("成长说明", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("很抱歉!未通过人工审核", ClientTextStyleVO.COLOR_CONTENT)));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("成长详情", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("你的账户仍是高级会员", ClientTextStyleVO.COLOR_CONTENT)));
|
|
if (!StringUtil.isNullOrEmpty(reason)) {
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("拒绝原因", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO(reason, ClientTextStyleVO.COLOR_CONTENT)));
|
}
|
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("如有疑问请联系人工客服", ClientTextStyleVO.COLOR_CONTENT)));
|
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setTitle("等级成长");
|
detail.setType(MsgTypeAccountTypeEnum.vipPgrade);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
detail.setExtraInfo(new Gson().toJson(listMsg));
|
return detail;
|
}
|
|
|
/**
|
* 资深导师--运营发出邀约
|
* @param uid
|
* @param nickname
|
* @param kefuName
|
* @param kefuWX
|
* @return
|
*/
|
public static MsgAccountDetail teacherInvite(Long uid, String nickname,String kefuName, String kefuWX) {
|
if (uid == null)
|
return null;
|
|
List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("邀约原因", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("尊敬的"+ nickname+",你已符合成长为一名资深导师的条件,希望你能加入板栗快省运营团队,与我们共创辉煌", ClientTextStyleVO.COLOR_CONTENT)));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("专属客服", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO(kefuName + "-微信号:" +kefuWX, ClientTextStyleVO.COLOR_CONTENT)));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("对应权益", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("如果你接受邀约,你将获得该账户等级对应的全部权益 ", ClientTextStyleVO.COLOR_CONTENT)));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("资深导师资格需要后台手动开通,请务必联系专属客服", ClientTextStyleVO.COLOR_CONTENT)));
|
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setTitle("等级成长");
|
detail.setType(MsgTypeAccountTypeEnum.vipPgrade);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
detail.setExtraInfo(new Gson().toJson(listMsg));
|
return detail;
|
}
|
|
|
/**
|
* 资深导师--运营发出邀约
|
* @param uid
|
* @param nickname
|
* @param kefuName
|
* @param kefuWX
|
* @return
|
*/
|
public static MsgAccountDetail teacherSuccess(Long uid, int days, String kefuName, String kefuWX) {
|
if (uid == null)
|
return null;
|
|
List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
List<ClientTextStyleVO> contentList = new ArrayList<>();
|
contentList.add(new ClientTextStyleVO("恭喜你!你的账户已由超级会员升级为", ClientTextStyleVO.COLOR_CONTENT));
|
contentList.add(new ClientTextStyleVO("资深导师", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("成长详情", ClientTextStyleVO.COLOR_TITLE), contentList));
|
|
List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
contentList2.add(new ClientTextStyleVO(days+ "", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
contentList2.add(new ClientTextStyleVO("天", ClientTextStyleVO.COLOR_CONTENT));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("成长详情", ClientTextStyleVO.COLOR_TITLE), contentList2));
|
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("邀约原因", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("从收到本消息起,你将获得该账户等级对应的全部权益", ClientTextStyleVO.COLOR_CONTENT)));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("专属客服", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO(kefuName + "-微信号:" +kefuWX, ClientTextStyleVO.COLOR_CONTENT)));
|
listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
new ClientTextStyleVO("与你共创辉煌", ClientTextStyleVO.COLOR_CONTENT)));
|
|
MsgAccountDetail detail = new MsgAccountDetail();
|
detail.setTitle("等级成长");
|
detail.setType(MsgTypeAccountTypeEnum.vipPgrade);
|
detail.setUser(new UserInfo(uid));
|
detail.setCreateTime(new Date());
|
detail.setRead(false);
|
detail.setExtraInfo(new Gson().toJson(listMsg));
|
return detail;
|
}
|
}
|