예제 #1
0
        public bool UserReg(UserRegParam userRegParam, string openID)
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendFormat(OpenSqls.UPDATE_WXAPP_STAFF_USER,
                                 userRegParam.nickName,
                                 userRegParam.avatarUrl,
                                 openID,
                                 userRegParam.userCode);
            string sqlInsert = builder.ToString();

            return(DatabaseOperationWeb.ExecuteDML(sqlInsert));
        }
예제 #2
0
        public bool UserReg(UserRegParam userRegParam, string openID)
        {
            string scanCode = "";

            using (var md5 = MD5.Create())
            {
                var result    = md5.ComputeHash(Encoding.UTF8.GetBytes(openID));
                var strResult = BitConverter.ToString(result);
                scanCode = strResult.Replace("-", "");
            }

            StringBuilder builder = new StringBuilder();

            builder.AppendFormat(OpenSqls.INSERT_USER,
                                 userRegParam.nickName,
                                 userRegParam.avatarUrl,
                                 openID,
                                 scanCode);
            string sqlInsert = builder.ToString();

            return(DatabaseOperationWeb.ExecuteDML(sqlInsert));
        }