yujian
2019-01-22 88b54772dbcf5ecab1e2316e4e4626ac901b8908
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgAccountDetailFactory.java
@@ -22,11 +22,11 @@
   public static MsgAccountDetail createBindingAccount(Long uid, int type) {
      String msg = "";
      if (type == TYPE_PHONE) {
         msg = "<red>恭喜你手机号绑定成功<red>";
         msg = "<highlight>恭喜你手机号绑定成功</highlight>";
      } else if (type == TYPE_TB) {
         msg = "<red>恭喜你淘宝绑定成功<red>";
         msg = "<highlight>恭喜你淘宝绑定成功</highlight>";
      } else if (type == TYPE_WX) {
         msg = "<red>恭喜你微信绑定成功<red>";
         msg = "<highlight>恭喜你微信绑定成功</highlight>";
      }
      if (StringUtil.isNullOrEmpty(msg))
         return null;
@@ -122,6 +122,23 @@
      return detail;
   }
   // TODO 账号等级
   // 账号等级
   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;
   }
}