public static long GetCheckPhotoCount(CheckPhotoStatus cps) { try { return new PhotoCheckOperation().GetCount(cps); } catch (Exception ex) { throw new CBB.ExceptionHelper.OperationException( CBB.ExceptionHelper.ErrType.SystemErr, CBB.ExceptionHelper.ErrNo.DBOperationError, ex); } }
/// <summary> /// 批量修改状态 /// </summary> /// <param name="_id">id集合</param> /// <param name="cps">状态</param> /// <param name="adminid">审核人Id</param> /// <param name="useridlist">要更新的用户id集合</param> public void UpdateCheckPhotoStatuss(List<ObjectId> _id, CheckPhotoStatus cps, string adminid, List<ObjectId> useridlist) { if (_id.Count <= 0 || cps == CheckPhotoStatus.waitaudit) return; UpdateCheckPhotoStatuss(_id, cps, adminid); }
/// <summary> /// 批量修改状态 /// </summary> /// <param name="_id">id集合</param> /// <param name="cps">状态</param> /// <param name="adminid">审核人Id</param> public void UpdateCheckPhotoStatuss(List<ObjectId> _id, CheckPhotoStatus cps, string adminid) { if (_id.Count <= 0 || cps == CheckPhotoStatus.waitaudit) return; try { MongoDatabase md = MongoDBHelper.MongoDB; MongoCollection<PhotoCheckModel> mc = md.GetCollection<PhotoCheckModel>("PhotoCheck"); QueryConditionList qcl = Query.In("_id", new BsonArray(_id.ToArray())); mc.Update(qcl, Update.Set("CheckStatus", Convert.ToInt32(cps)).Set("AdminId", adminid).Set("JionTime", DateTime.Now), UpdateFlags.Multi); } catch (Exception es) { throw new CBB.ExceptionHelper.OperationException( CBB.ExceptionHelper.ErrType.SystemErr, CBB.ExceptionHelper.ErrNo.DBOperationError, es); } }
/// <summary> /// 修改单个待审照片状态 /// </summary> /// <param name="_id">id</param> /// <param name="cps">状态</param> /// <param name="adminid">审核人</param> public void UpdateCheckPhotoStatus(ObjectId _id, CheckPhotoStatus cps, string adminid) { try { if (cps == CheckPhotoStatus.waitaudit) return; MongoDatabase md = MongoDBHelper.MongoDB; MongoCollection<PhotoCheckModel> mc = md.GetCollection<PhotoCheckModel>("PhotoCheck"); mc.Update(Query.EQ("_id", _id), Update.Set("CheckStatus", Convert.ToInt32(cps)) .Set("AdminId", adminid) .Set("JionTime", DateTime.Now) ); } catch (Exception es) { throw new CBB.ExceptionHelper.OperationException( CBB.ExceptionHelper.ErrType.SystemErr, CBB.ExceptionHelper.ErrNo.DBOperationError, es); } }
/// <summary> /// 获取总记录数 /// </summary> /// <param name="verifyStatus">类型枚举</param> /// <returns></returns> public long GetCount(CheckPhotoStatus cps) { long count; try { MongoDatabase md = MongoDBHelper.MongoDB; MongoCollection<PhotoCheckModel> mc = md.GetCollection<PhotoCheckModel>("PhotoCheck"); count = mc.Count(Query.EQ("CheckStatus", Convert.ToInt32(cps))); return count; } catch (System.Exception err) { throw new CBB.ExceptionHelper.OperationException( CBB.ExceptionHelper.ErrType.SystemErr, CBB.ExceptionHelper.ErrNo.DBOperationError, err); } }
/// <summary> /// 依据审核状态批量查询待审文本 /// </summary> /// <param name="cps">待审状态枚举</param> /// <returns></returns> public List<PhotoCheckModel> GetCheckPotoList(CheckPhotoStatus cps, int pageno, int pagesize) { List<PhotoCheckModel> list = new List<PhotoCheckModel>(); try { MongoCursor<PhotoCheckModel> mc = MongoDBHelper.GetCursor<PhotoCheckModel>( "PhotoCheck", Query.EQ("CheckStatus", Convert.ToInt32(cps)), new SortByDocument("CreatedTime", 1), pageno, pagesize ); List<PhotoCheckModel> objs = new List<PhotoCheckModel>(); objs.AddRange(mc); return objs; } catch (Exception es) { throw new CBB.ExceptionHelper.OperationException( CBB.ExceptionHelper.ErrType.SystemErr, CBB.ExceptionHelper.ErrNo.DBOperationError, es); } }
public static List<PhotoCheckModel> GetCheckPhotoList(CheckPhotoStatus cps, int pageno, int pagesize) { try { return new PhotoCheckOperation().GetCheckPotoList(cps, pageno, pagesize); } catch (Exception ex) { throw new CBB.ExceptionHelper.OperationException( CBB.ExceptionHelper.ErrType.SystemErr, CBB.ExceptionHelper.ErrNo.DBOperationError, ex); } }
public static CBB.ExceptionHelper.OperationResult UpdateCheckPhotoStatuss(List<ObjectId> idlist, CheckPhotoStatus cps, string adminid, List<ObjectId> useridlist) { try { new PhotoCheckOperation().UpdateCheckPhotoStatuss(idlist, cps, adminid,useridlist); if (cps == CheckPhotoStatus.auditpass) { //更新用户的视频认证为成功! MemberManager.MemberManager.CheckRealPhoto(useridlist, true); } return new CBB.ExceptionHelper.OperationResult(true); } catch (Exception ex) { throw new CBB.ExceptionHelper.OperationException( CBB.ExceptionHelper.ErrType.SystemErr, CBB.ExceptionHelper.ErrNo.DBOperationError, ex); } }
public static CBB.ExceptionHelper.OperationResult UpdateCheckPhotoStatus(ObjectId id, CheckPhotoStatus cps, string adminid,string userid) { try { new PhotoCheckOperation().UpdateCheckPhotoStatus(id, cps, adminid); if (cps == CheckPhotoStatus.auditpass) { //更新用户的视频认证为成功! List<ObjectId> list = new List<ObjectId>(); list.Add(ObjectId.Parse(userid)); MemberManager.MemberManager.CheckRealPhoto(list, true); } else if (cps == CheckPhotoStatus.waitaudit || cps == CheckPhotoStatus.audidel) { //更新用户的视频认证为不通过! List<ObjectId> list = new List<ObjectId>(); list.Add(ObjectId.Parse(userid)); MemberManager.MemberManager.CheckRealPhoto(list, false); } return new CBB.ExceptionHelper.OperationResult(true); } catch (Exception ex) { throw new CBB.ExceptionHelper.OperationException( CBB.ExceptionHelper.ErrType.SystemErr, CBB.ExceptionHelper.ErrNo.DBOperationError, ex); } }