anderx пре 4 година
родитељ
комит
8b32663080

+ 1 - 1
src/main/java/com/kede/common/controller/PublicApiController.java

@@ -131,7 +131,7 @@ public class PublicApiController extends BaseController {
 	public Result projectList(String name, String startTime, String endTime,Integer pageNo,Integer pageSize) {
 		Result res =new Result();
 		
-		res.data(projectService.list( name,  startTime,  endTime, pageNo, pageSize));
+		res.data(projectService.list( name,  startTime,  endTime, 1,1,pageNo, pageSize));
 		return res;
 	}
 	

+ 12 - 0
src/main/java/com/kede/common/mapper/ProjectMapper.xml

@@ -270,6 +270,12 @@
 	<if test="name != null">
 	and a.name like concat('%',#{name},'%')
 	</if>
+	<if test="releaseStatus != null">
+	and a.release_status = #{releaseStatus}
+	</if>
+	<if test="host != null">
+	and a.host = #{host}
+	</if>
 	<if test="startTime != null and endTime !=null">
 	and a.create_time between #{startTime} and #{endTime}
 	</if>
@@ -283,6 +289,12 @@
 	<if test="name != null">
 	and name like concat('%',#{name},'%')
 	</if>
+	<if test="releaseStatus != null">
+	and a.release_status = #{releaseStatus}
+	</if>
+	<if test="host != null">
+	and a.host = #{host}
+	</if>
 	<if test="startTime != null and endTime !=null">
 	and create_time between #{startTime} and #{endTime}
 	</if>

+ 1 - 1
src/main/java/com/kede/project/controller/ProjectApiController.java

@@ -63,7 +63,7 @@ public class ProjectApiController extends BaseApiController {
 	public Result list(String name,String startTime,String endTime,Integer pageNo,Integer pageSize) {
 		Result res =new Result();
 		
-		res.data(projectService.list(name, startTime, endTime,pageNo, pageSize));
+		res.data(projectService.list(name, startTime, endTime,null,null,pageNo, pageSize));
 		return res;
 	}
 	

+ 1 - 1
src/main/java/com/kede/project/service/ProjectService.java

@@ -11,7 +11,7 @@ public interface ProjectService {
 
 	int delete(Integer id);
 
-	Object list(String name, String startTime, String endTime, Integer pageNo, Integer pageSize);
+	Object list(String name, String startTime, String endTime,Integer releaseStatus,Integer host, Integer pageNo, Integer pageSize);
 
 	Project get(Integer id);
 

+ 3 - 1
src/main/java/com/kede/project/service/impl/ProjectServiceImpl.java

@@ -47,11 +47,13 @@ public class ProjectServiceImpl extends BaseMybatisDao<ProjectMapper> implements
 	}
 
 	@Override
-	public Object list(String name, String startTime, String endTime,Integer pageNo,Integer pageSize) {
+	public Object list(String name, String startTime, String endTime,Integer releaseStatus,Integer host,Integer pageNo,Integer pageSize) {
 		Map<String, Object> params=new HashMap<String, Object>();
 		if(StringUtils.isBlank(name))params.put("name", name);
 		if(StringUtils.isBlank(startTime))params.put("startTime", startTime);
 		if(StringUtils.isBlank(endTime))params.put("endTime", endTime);
+		if(releaseStatus!=null)params.put("releaseStatus", releaseStatus);
+		if(host!=null)params.put("host", host);
 		return findPage("selectProjectList", "selectProjectCount", params, pageNo, pageSize);
 	}