Пример #1
0
 /// <summary>
 /// 更新提货验证码数据
 /// </summary>
 /// <param name="entity">提货验证码实体</param>
 /// <returns></returns>
 ///<remarks>2013-07-06 朱成果 创建</remarks>
 public override void UpdateEntity(WhPickUpCode entity)
 {
     Context.Update("WhPickupCode", entity)
     .AutoMap(x => x.SysNo)
     .Where("SysNo", entity.SysNo)
     .Execute();
 }
Пример #2
0
        /// <summary>
        /// 插入验证码数据
        /// </summary>
        /// <param name="entity">验证码实体</param>
        /// <returns>最新编号</returns>
        ///<remarks>2013-07-06 朱成果 创建</remarks>
        public override int InsertEntity(WhPickUpCode entity)
        {
            var sysNo = Context.Insert("WhPickupCode", entity)
                        .AutoMap(o => o.SysNo)
                        .ExecuteReturnLastId <int>("SysNo");

            return(sysNo);
        }
Пример #3
0
        /// <summary>
        /// 发送门店提货验证码
        /// </summary>
        /// <param name="sysNo">出库单编号</param>
        /// <param name="orderNO">订单号</param>
        /// <param name="mobileNum">收货人手机</param>
        /// <param name="shop">门店</param>
        /// <returns>提货验证码</returns>
        /// <remarks>2013-07-06 朱成果 创建</remarks>
        public SmsResult SendSelfDeliveryValidation(int sysNo, int orderNO, string mobileNum, WhWarehouse shop = null)
        {
            //随机生成6位验证码
            //string code = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 6).ToLower();
            string       code = Hyt.Util.WebUtil.Number(6, false);
            WhPickUpCode p    = new WhPickUpCode();

            p.Code              = code;
            p.StockOutSysNo     = sysNo;
            p.MobilePhoneNumber = mobileNum;
            p.CreatedDate       = DateTime.Now;
            SetWhPickUpCode(p);
            //SendMobileMessage(mobileNum, string.Format(Hyt.Model.SystemPredefined.Constant.SELF_DELIVERY_SURE_CODE, sysNo, code));//发送验证码
            return(BLL.Extras.SmsBO.Instance.发送自提通知短信带验证码(mobileNum, orderNO.ToString(), shop.StreetAddress, shop.Phone, code));
            //BLL.Extra.EmailBO.SendMail
        }
Пример #4
0
 /// <summary>
 /// 插或者更新门店提货验证码
 /// </summary>
 /// <param name="entity">提货验证码实体</param>
 /// <returns></returns>
 /// <remarks>2013-07-06 朱成果 创建</remarks>
 public void SetWhPickUpCode(WhPickUpCode entity)
 {
     if (entity != null && entity.StockOutSysNo != 0)
     {
         var model = GetEntityByStockOutNo(entity.StockOutSysNo);
         if (model == null)
         {
             Hyt.DataAccess.Order.IWhPickUpCodeDao.Instance.InsertEntity(entity);
         }
         else
         {
             model.Code = entity.Code;
             model.MobilePhoneNumber = entity.MobilePhoneNumber;
             model.LastUpdateBy      = entity.CreatedBy;
             model.LastUpdateDate    = DateTime.Now;
             Hyt.DataAccess.Order.IWhPickUpCodeDao.Instance.UpdateEntity(model);
         }
     }
 }
Пример #5
0
 /// <summary>
 /// 更新提货验证码数据
 /// </summary>
 /// <param name="entity">提货验证码实体</param>
 /// <returns></returns>
 ///<remarks>2013-07-06 朱成果 创建</remarks>
 public abstract void  UpdateEntity(WhPickUpCode entity);
Пример #6
0
 /// <summary>
 /// 插入验证码数据
 /// </summary>
 /// <param name="entity">验证码实体</param>
 /// <returns></returns>
 ///<remarks>2013-07-06 朱成果 创建</remarks>
 public abstract int InsertEntity(WhPickUpCode entity);