use student id as primary key instead.

This commit is contained in:
Sola
2015-11-26 15:58:56 +08:00
parent c2b2f89805
commit c0f72f4d70
8 changed files with 136 additions and 23 deletions

View File

@@ -0,0 +1,26 @@
package love.sola.netsupport.wechat;
import com.google.gson.Gson;
import love.sola.netsupport.config.Settings;
import org.junit.Test;
/**
* ***********************************************
* Created by Sola on 2015/11/26.
* Don't modify this source without my agreement
* ***********************************************
*/
public class TestGson {
@Test
public void testGson() {
Gson gson = new Gson();
Settings settings = new Settings();
settings.Wechat_AppId = "*";
settings.Wechat_Secret = "*";
settings.Wechat_Token = "*";
settings.Wechat_AesKey = "*";
System.out.println(gson.toJson(settings));
}
}

View File

@@ -0,0 +1,21 @@
package love.sola.netsupport.wechat;
import org.junit.Test;
/**
* ***********************************************
* Created by Sola on 2015/11/26.
* Don't modify this source without my agreement
* ***********************************************
*/
public class TestRegex {
public static final String STUDENT_ID_REGEX = "^(2012|2013|2014|2015)[0-9]{9}";
@Test
public void testStudentId() {
System.out.println("2011130201233".matches(STUDENT_ID_REGEX));
System.out.println("2015130201233".matches(STUDENT_ID_REGEX));
}
}