Ejemplo n.º 1
0
 /// <summary>
 /// 首页发送推广短息
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 public CommonActionResult AddSendMsgHistoryRecord(SendMsgHistoryRecordInfo info)
 {
     try
     {
         new UserBusiness().AddSendMsgHistoryRecord(info);
         return(new CommonActionResult(true, "发送短信成功"));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message, ex);
     }
 }
Ejemplo n.º 2
0
 public void AddSendMsgHistoryRecord(SendMsgHistoryRecordInfo info)
 {
     using (var manager = new UserBalanceManager())
     {
         if (info == null)
         {
             throw new Exception("未查询到数据!");
         }
         var ListInfo = manager.GetSendMsgHistoryRecord(info.PhoneNumber, info.IP, info.MsgType);
         if (ListInfo != null && ListInfo.Count > 1)
         {
             throw new Exception("每天只能发送三次,并且手机号码必须不相同!");
         }
         SendMsgHistoryRecord entity = new SendMsgHistoryRecord();
         ObjectConvert.ConverInfoToEntity(info, ref entity);
         manager.AddSendMsgHistoryRecord(entity);
     }
 }