Explorar el Código

--add updateData();

zzy.zhiyuan.foxmail %!s(int64=8) %!d(string=hace) años
padre
commit
4d1893d96a
Se han modificado 1 ficheros con 33 adiciones y 0 borrados
  1. 33 0
      src/main/java/com/ekexiu/portal/service/GrowthLogService.java

+ 33 - 0
src/main/java/com/ekexiu/portal/service/GrowthLogService.java

@ -80,6 +80,39 @@ public class GrowthLogService {
80 80
		this.rule = rule;
81 81
	}
82 82
	
83
	@Post
84
	@Path("/updateData")
85
	public boolean updateData(@JdbcConn(true) Connection con)throws SQLException{
86
		List<User> users = this.userDao.queryList(con);
87
		for (User user : users) {
88
			if((user.getMobilePhone() != null) && (user.getMobilePhone().trim().length() == 11)){
89
				Professor professor = this.professorDao.query(con, user.getId());
90
				if(professor != null){
91
					this.bindMobile(con, user.getId());
92
				}
93
			}
94
			if((user.getEmail() != null) && (!"".equals(user.getEmail()))){
95
				Professor professor = this.professorDao.query(con, user.getId());
96
				if(professor != null){
97
					this.bindEmail(con, user.getEmail());
98
				}
99
			}
100
		}
101
		List<Professor> professors = this.professorDao.queryList(con);
102
		for (Professor professor : professors) {
103
			if(professor.getAuthStatus() == 3){
104
				this.authRealName(con, professor.getId());
105
			}
106
			if(professor.getAuthType() == 1){
107
				this.authExpert(con, professor.getId());
108
			}
109
			if("1".equals(professor.getOrgAuth())){
110
				this.authOrg(con, professor.getId());
111
			}
112
		}
113
		return true;
114
	}
115
	
83 116
	@Get
84 117
	@Path("/lastSignInTime")
85 118
	public GrowthLog queryLastSignIn(@JdbcConn Connection con,String professorId)throws SQLException{