mirror of
				https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
				synced 2025-11-01 02:46:19 +08:00 
			
		
		
		
	refact login command
This commit is contained in:
		| @@ -22,6 +22,15 @@ public class TableOperator extends SQLCore { | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
|  | ||||
| 	public static Operator get(String wechat) { | ||||
| 		try (Session s = SQLCore.sf.openSession()) { | ||||
| 			return (Operator) s.createCriteria(Operator.class) | ||||
| 					.add(Restrictions.eq(Operator.PROPERTY_WECHAT, wechat)) | ||||
| 					.uniqueResult(); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public static Operator get(int id) { | ||||
| 		try (Session s = SQLCore.sf.openSession()) { | ||||
| 			return s.get(Operator.class, id); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sola
					Sola