Quellcode durchsuchen

--add queryOrgEmail();

zzy.zhiyuan.foxmail vor 8 Jahren
Ursprung
Commit
08643daa66

+ 9 - 0
src/main/java/com/ekexiu/portal/dao/OrgUserDao.java

4
import java.sql.SQLException;
4
import java.sql.SQLException;
5

5

6
import org.jfw.apt.annotation.Nullable;
6
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.orm.annotation.dao.Column;
7
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
10
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
11
import org.jfw.apt.orm.annotation.dao.method.operator.QueryVal;
10
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
12
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
11
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
13
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
12
import org.jfw.apt.orm.annotation.dao.param.Alias;
14
import org.jfw.apt.orm.annotation.dao.param.Alias;
13
import org.jfw.apt.orm.annotation.dao.param.Set;
15
import org.jfw.apt.orm.annotation.dao.param.Set;
16
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
14

17

15
import com.ekexiu.portal.po.OrgUser;
18
import com.ekexiu.portal.po.OrgUser;
16

19

31
	@From(OrgUser.class)
34
	@From(OrgUser.class)
32
	public abstract int updatePw(Connection con,String id,@Set String passwd,@Alias("passwd")String key)throws SQLException;
35
	public abstract int updatePw(Connection con,String id,@Set String passwd,@Alias("passwd")String key)throws SQLException;
33
	
36
	
37
	@QueryVal
38
	@Column(handlerClass=StringHandler.class, value = { "EMAIL" })
39
	@From(OrgUser.class)
40
	@Nullable
41
	public abstract String queryOrgEmail(Connection con,String id)throws SQLException;
42
	
34
	@SelectOne
43
	@SelectOne
35
	@Nullable
44
	@Nullable
36
	public abstract OrgUser queryOne(Connection con,String id)throws SQLException;
45
	public abstract OrgUser queryOne(Connection con,String id)throws SQLException;

+ 4 - 0
src/main/java/com/ekexiu/portal/service/ImageService.java

153
	 * @param id 专家ID
153
	 * @param id 专家ID
154
	 * @return 有头像返回1,没有返回0.
154
	 * @return 有头像返回1,没有返回0.
155
	 */
155
	 */
156
	@Get
157
	@Path("/hasProImg")
156
	public int hasProfessorImage(String id) {
158
	public int hasProfessorImage(String id) {
157
		String headPath = this.headPath+"/"+id+"_l.jpg";
159
		String headPath = this.headPath+"/"+id+"_l.jpg";
158
		File file = new File(headPath);
160
		File file = new File(headPath);
168
	 * @param id 企业ID
170
	 * @param id 企业ID
169
	 * @return 有企业logo返回true,否则返回false
171
	 * @return 有企业logo返回true,否则返回false
170
	 */
172
	 */
173
	@Get
174
	@Path("/hasOrgLogo")
171
	public boolean hasOrgLogo(String id) {
175
	public boolean hasOrgLogo(String id) {
172
		String orgPath = this.orgPath+"/"+id+".jpg";
176
		String orgPath = this.orgPath+"/"+id+".jpg";
173
		File file = new File(orgPath);
177
		File file = new File(orgPath);

+ 31 - 0
src/main/java/com/ekexiu/portal/service/OrgUserService.java

1
package com.ekexiu.portal.service;
2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5

6
import org.jfw.apt.annotation.Autowrie;
7
import org.jfw.apt.web.annotation.Path;
8
import org.jfw.apt.web.annotation.operate.Get;
9
import org.jfw.apt.web.annotation.param.JdbcConn;
10

11
import com.ekexiu.portal.dao.OrgUserDao;
12

13
@Path("/orgUser")
14
public class OrgUserService {
15
	@Autowrie
16
	private OrgUserDao orgUserDao;
17

18
	public OrgUserDao getOrgUserDao() {
19
		return orgUserDao;
20
	}
21

22
	public void setOrgUserDao(OrgUserDao orgUserDao) {
23
		this.orgUserDao = orgUserDao;
24
	}
25
	
26
	@Get
27
	@Path("/orgEmail")
28
	public String queryOrgEmail(@JdbcConn Connection con,String id)throws SQLException{
29
		return this.orgUserDao.queryOrgEmail(con, id);
30
	}
31
}