Browse Source

--add updateOrgAuth();

zzy.zhiyuan.foxmail 8 years ago
parent
commit
3ef451b6ff

+ 4 - 0
src/main/java/com/ekexiu/portal/dao/ProfessorDao.java

@ -74,6 +74,10 @@ public abstract class ProfessorDao {
74 74
	@From(Professor.class)
75 75
	public abstract int updateAuthStatusExpert(Connection con,String id,@Set Integer authStatusExpert)throws SQLException;
76 76
	
77
	@UpdateWith
78
	@From(Professor.class)
79
	public abstract int updateOrgAuth(Connection con,String id,@Set String orgAuth)throws SQLException;
80
	
77 81
	@UpdateWith
78 82
	@From(Professor.class)
79 83
	public abstract int updateStarLevel(Connection con, String id, @Set BigDecimal starLevel) throws SQLException;

+ 10 - 0
src/main/java/com/ekexiu/portal/po/Professor.java

@ -47,6 +47,7 @@ public class Professor implements CreateTimeSupported, ModifyTimeSupported{
47 47
	private Integer authType;
48 48
	private Integer authStatus;
49 49
	private Integer authStatusExpert;
50
	private String orgAuth;
50 51
	private String phone;
51 52
	private String email;
52 53
	private Integer sortFirst;
@ -266,6 +267,15 @@ public class Professor implements CreateTimeSupported, ModifyTimeSupported{
266 267
		this.authStatusExpert = authStatusExpert;
267 268
	}
268 269
270
	@Column(value=DE.SingleChar,renewable=false)
271
	public String getOrgAuth() {
272
		return orgAuth;
273
	}
274
275
	public void setOrgAuth(String orgAuth) {
276
		this.orgAuth = orgAuth;
277
	}
278
269 279
	@Column(value=DE.String_de,dbType="VARCHAR(20)")
270 280
	public String getPhone() {
271 281
		return phone;

+ 12 - 0
src/main/java/com/ekexiu/portal/service/ProfessorService.java

@ -403,6 +403,18 @@ public class ProfessorService {
403 403
		this.professorDao.updateAuthStatus(con, id, authStatus);
404 404
	}
405 405
	
406
	@Post
407
	@Path("/passOrgAuth")
408
	public void passOrgAuth(@JdbcConn(true) Connection con,String id)throws SQLException{
409
		this.professorDao.updateOrgAuth(con, id, "1");
410
	}
411
	
412
	@Post
413
	@Path("/removeOrgAuth")
414
	public void removeOrgAuth(@JdbcConn(true) Connection con,String id)throws SQLException{
415
		this.professorDao.updateOrgAuth(con, id, "0");
416
	}
417
	
406 418
	@Post
407 419
	@Path("/starLevel")
408 420
	public void updateStarLevel(@JdbcConn(true) Connection con, String id, BigDecimal starLevel) throws SQLException{