好友关系申请model
예제 #1
0
        /// <summary>
        /// 添加好友申请
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddRelationsApply(CustRelationsApplyModels model)
        {
            int result;
            const string sql = "insert into cust_relations_apply (innerid, fromid, toid, status, createdtime, modifiedtime, remark, sourceid) values (@innerid, @fromid, @toid, @status, @createdtime, @modifiedtime, @remark, @sourceid);";
            try
            {
                result = Helper.Execute(sql, model);
            }
            catch (Exception ex)
            {
                result = 0;
            }

            return result;
        }
예제 #2
0
        /// <summary>
        /// 修改好友申请By id
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int UpdateRelationsApplyById(CustRelationsApplyModels model)
        {
            int result;
            const string sql = "update cust_relations_apply set remark=@remark, sourceid=@sourceid where innerid=@innerid;";
            try
            {
                result = Helper.Execute(sql, model);
            }
            catch (Exception ex)
            {
                result = 0;
            }

            return result;
        }
예제 #3
0
        /// <summary>
        /// 修改好友申请[重复申请] by fromid and toid
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int UpdateRelationsApply(CustRelationsApplyModels model)
        {
            int result;
            const string sql = "update cust_relations_apply set remark=@remark, sourceid=@sourceid where fromid=@fromid and toid=@toid and `status`=0;";
            try
            {
                result = Helper.Execute(sql, model);
            }
            catch (Exception ex)
            {
                result = 0;
            }

            return result;
        }