public void MakeThumb() { lastId = 0; msgList = new List<string>(); ThumbParam obj = new ThumbParam(); obj.StartId = ctx.PostInt( "startId" ); obj.EndId = ctx.PostInt( "endId" ); try { String thumbType = ctx.Post( "thumbType" ); if (thumbType == "s") { new Thread( makeSmall ).Start( obj ); } else if (thumbType == "m") { new Thread( makeMiddle ).Start( obj ); } else if (thumbType == "b") { new Thread( makeBig ).Start( obj ); } else { echo( "缩略图类型错误:" + thumbType ); return; } echoAjaxOk(); } catch (Exception ex) { logger.Error( ex.Message ); logger.Error( ex.StackTrace ); echo( "生成错误,请查看日志" ); } }
private static List<User> getByStartEndId( ThumbParam obj ) { List<User> userList = User.find( "Id>=:sid and Id<=:eid order by Id" ) .set( "sid", obj.StartId ) .set( "eid", obj.EndId ) .list(); return userList; }
private static List <User> getByStartEndId(ThumbParam obj) { List <User> userList = User.find("Id>=:sid and Id<=:eid order by Id") .set("sid", obj.StartId) .set("eid", obj.EndId) .list(); return(userList); }
private static List <User> getUsersById(ThumbParam obj) { List <User> list = User.find("Id>=:sid and Id<=:eid order by Id") .set("sid", obj.StartId) .set("eid", obj.EndId) .list(); DbContext.closeConnectionAll(); return(list); }
private List <PhotoPost> getPhotoById(ThumbParam obj) { List <PhotoPost> list = PhotoPost.find("Id>=:sid and Id<=:eid order by Id") .set("sid", obj.StartId) .set("eid", obj.EndId) .list(); DbContext.closeConnectionAll(); return(list); }
public void MakeFaceThumb() { lastId = 0; msgList = new List <string>(); ThumbParam obj = new ThumbParam(); obj.StartId = ctx.PostInt("startId"); obj.EndId = ctx.PostInt("endId"); try { new Thread(makeUserFace).Start(obj); echoAjaxOk(); } catch (Exception ex) { logger.Error(ex.Message); logger.Error(ex.StackTrace); echo("生成错误,请查看日志"); } }
public void MakeFaceThumb() { lastId = 0; msgList = new List<string>(); ThumbParam obj = new ThumbParam(); obj.StartId = ctx.PostInt( "startId" ); obj.EndId = ctx.PostInt( "endId" ); try { new Thread( makeUserFace ).Start( obj ); echoAjaxOk(); } catch (Exception ex) { logger.Error( ex.Message ); logger.Error( ex.StackTrace ); echo( "生成错误,请查看日志" ); } }
public virtual void MakePhotoThumb() { lastId = 0; msgList = new List <string>(); ThumbParam obj = new ThumbParam(); obj.StartId = ctx.PostLong("startId"); obj.EndId = ctx.PostLong("endId"); obj.OnlyComputerSize = ctx.PostInt("onlyComputerSize"); try { new Thread(makePhoto).Start(obj); echoAjaxOk(); } catch (Exception ex) { logger.Error(ex.Message); logger.Error(ex.StackTrace); echo("生成错误,请查看日志"); } }
public virtual void MakePhotoThumb() { lastId = 0; msgList = new List<string>(); ThumbParam obj = new ThumbParam(); obj.StartId = ctx.PostLong( "startId" ); obj.EndId = ctx.PostLong( "endId" ); obj.OnlyComputerSize = ctx.PostInt( "onlyComputerSize" ); try { new Thread( makePhoto ).Start( obj ); echoAjaxOk(); } catch (Exception ex) { logger.Error( ex.Message ); logger.Error( ex.StackTrace ); echo( "生成错误,请查看日志" ); } }
public void MakeThumb() { lastId = 0; msgList = new List <string>(); ThumbParam obj = new ThumbParam(); obj.StartId = ctx.PostInt("startId"); obj.EndId = ctx.PostInt("endId"); try { String thumbType = ctx.Post("thumbType"); if (thumbType == "s") { new Thread(makeSmall).Start(obj); } else if (thumbType == "m") { new Thread(makeMiddle).Start(obj); } else if (thumbType == "b") { new Thread(makeBig).Start(obj); } else { echo("缩略图类型错误:" + thumbType); return; } echoAjaxOk(); } catch (Exception ex) { logger.Error(ex.Message); logger.Error(ex.StackTrace); echo("生成错误,请查看日志"); } }
private void makePhoto(Object objParam) { ThumbParam param = objParam as ThumbParam; List <PhotoPost> photoList = getPhotoById(param); log("begin... photo count=" + photoList.Count); foreach (PhotoPost x in photoList) { lastId = x.Id; String photoPath = x.DataUrl; if (strUtil.IsNullOrEmpty(photoPath)) { continue; } if (photoPath.ToLower().StartsWith("http://")) { continue; } if (photoPath.StartsWith("/")) { continue; } // 如果不是仅仅生成缩略图 if (param.OnlyComputerSize == 0) { makeThumbPrivate(photoPath); } updatePhotoSize(x); } log("操作结束, last photo id=" + lastId); }
private List<PhotoPost> getPhotoById( ThumbParam obj ) { List<PhotoPost> list = PhotoPost.find( "Id>=:sid and Id<=:eid order by Id" ) .set( "sid", obj.StartId ) .set( "eid", obj.EndId ) .list(); DbContext.closeConnectionAll(); return list; }
private static List<User> getUsersById( ThumbParam obj ) { List<User> list = User.find( "Id>=:sid and Id<=:eid order by Id" ) .set( "sid", obj.StartId ) .set( "eid", obj.EndId ) .list(); DbContext.closeConnectionAll(); return list; }