Browse Source

--add queryMyPublish();

zzy.zhiyuan.foxmail 8 years ago
parent
commit
650fd8c572

+ 5 - 0
src/main/java/com/ekexiu/portal/dao/DemandDao.java

@ -43,6 +43,11 @@ public abstract class DemandDao {
43 43
	@From(Demand.class)
44 44
	public abstract int queryCountByStatus(Connection con,String demander,String demandStatus)throws SQLException, JfwBaseException;
45 45
	
46
	@QueryVal
47
	@Column(handlerClass=IntHandler.class,value="COUNT(1)")
48
	@From(Demand.class)
49
	public abstract int queryCountStatus(Connection con,String demandStatus)throws SQLException, JfwBaseException;
50
	
46 51
	@SelectList
47 52
	@OrderBy("ORDER BY CREATE_TIME DESC")
48 53
	public abstract List<Demand> queryByDemander(Connection con,String demander)throws SQLException;

+ 9 - 3
src/main/java/com/ekexiu/portal/service/DemandService.java

@ -103,7 +103,7 @@ public class DemandService {
103 103
	}
104 104
	
105 105
	/**
106
	 * 查询发布中的需求总数
106
	 * 查询发布中的需求总数
107 107
	 * @param con
108 108
	 * @param demander 发布者ID
109 109
	 * @return 返回状态发布中的需求总数
@ -111,11 +111,17 @@ public class DemandService {
111 111
	 * @throws JfwBaseException 
112 112
	 */
113 113
	@Get
114
	@Path("/queryPublish")
115
	public int queryPublish(@JdbcConn Connection con,String demander)throws SQLException, JfwBaseException{
114
	@Path("/queryMyPublish")
115
	public int queryMyPublish(@JdbcConn Connection con,String demander)throws SQLException, JfwBaseException{
116 116
		return this.demandDao.queryCountByStatus(con, demander, "1");
117 117
	}
118 118
	
119
	@Get
120
	@Path("/queryPublish")
121
	public int queryPublish(@JdbcConn Connection con)throws SQLException, JfwBaseException{
122
		return this.demandDao.queryCountStatus(con, "1");
123
	}
124
	
119 125
	@Get
120 126
	@Path("/byDemander")
121 127
	public List<Demand> queryByDemander(@JdbcConn Connection con,String demander)throws SQLException{