/// <summary> /// 在管理员尚未审核之前,用户重新上传 /// </summary> /// <param name="user"></param> /// <param name="ip"></param> public void UpdateLastUpload(User user, string ip) { UserErrorPic x = UserErrorPic.find("UserId=" + user.Id + " order by Id desc").first(); x.Created = DateTime.Now; x.Ip = ip; x.update(); }
public String GetLastReviewMsg(User user) { UserErrorPic x = UserErrorPic.find("UserId=" + user.Id + " and ReviewMsg<>'' order by Id desc").first(); if (x == null) { return(null); } return(x.ReviewMsg); }
/// <summary> /// 管理员审核通过 /// </summary> /// <param name="ids"></param> /// <param name="reviewMsg"></param> public void ApproveOk(String ids, String reviewMsg) { List <User> userList = getUserList(ids); foreach (User user in userList) { user.IsPicError = 0; user.update(); UserErrorPic x = UserErrorPic.find("UserId=" + user.Id + " order by Id desc").first(); x.ReviewMsg = reviewMsg; x.IsPass = 1; x.update(); } }
public int GetStatus(User user) { UserErrorPic x = UserErrorPic.find("UserId=" + user.Id + " order by Id desc").first(); if (x == null) { return(UserErrorPic.StatusFirstUpload); } if (strUtil.HasText(x.ReviewMsg)) { if (x.IsPass == 0) { return(UserErrorPic.StatusWaitingUpload); } else { return(UserErrorPic.StatusOk); } } return(UserErrorPic.StatusWaitingApprove); }
public UserErrorPic GetLastLog(User user) { return(UserErrorPic.find("UserId=" + user.Id + " and ReviewMsg<>'' order by Id desc").first()); }