Beispiel #1
0
        /// <summary>
        /// 获取原序列号
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="fullName">序列名称</param>
        /// <param name="defaultSequence">默认序列</param>
        /// <param name="sequenceLength">序列长度</param>
        /// <param name="fillZeroPrefix">是否填充补零</param>
        /// <returns>序列号</returns>
        public string GetOldSequence(BaseUserInfo userInfo, string fullName, int defaultSequence, int sequenceLength, bool fillZeroPrefix)
        {
            string result = string.Empty;

            var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessUserCenterWriteDbWithLock(userInfo, parameter, LOCK, (dbHelper) =>
            {
                var sequenceManager = new BaseSequenceManager(dbHelper);
                result = sequenceManager.StoreCounter(fullName, defaultSequence, sequenceLength, fillZeroPrefix);
            });
            return(result);
        }