Browse Source

获取所有部门问题处理

anderx 7 years ago
parent
commit
2714e92aca

+ 1 - 1
src/main/java/com/goafanti/common/dao/OrganizationManagementMapper.java

@@ -67,7 +67,7 @@ public interface OrganizationManagementMapper {
 	 * @mbg.generated  Thu Nov 30 11:09:29 CST 2017
 	 */
 	int updateByPrimaryKey(OrganizationManagement record);
-	List<OrganizationListOut> selectSuperId();
+	List<OrganizationListOut> selectSuperId(Integer i);
 	/**
 	 * 根据组织名称查组织编号
 	 */

+ 3 - 0
src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml

@@ -455,6 +455,9 @@
 		from department
 		where
 		status ='0'
+		<if test="i ==1" >
+			limit 10
+		</if>
 	</select>
 	<insert id="insert1" parameterType="com.goafanti.organization.bo.OrganizationListOut">
 		insert into department(

+ 10 - 2
src/main/java/com/goafanti/organization/controller/AdminOrganizationController.java

@@ -31,10 +31,18 @@ public class AdminOrganizationController extends BaseApiController{
 		return res;		
 	}
 	/**部门组织管理上级组织查询 **/
-	@RequestMapping(value = "/selectSuperId" , method = RequestMethod.POST)
+	@RequestMapping(value = "/selectSuperId" , method = RequestMethod.GET)
 	public Result selectsuperId(){
 		Result res = new Result();
-		res.setData(organizationService.selectSuperId());
+		res.setData(organizationService.selectSuperId(null));
+		return res;
+	}
+	/**部门组织管理上级组织查询 **/
+	@RequestMapping(value = "/selectSuperIdS" , method = RequestMethod.GET)
+	public Result selectsuperIdS(){
+		Result res = new Result();
+		Integer i=1;
+		res.setData(organizationService.selectSuperId(i));
 		return res;
 	}
 	/**部门组织管理新增**/

+ 1 - 1
src/main/java/com/goafanti/organization/service/OrganizationService.java

@@ -17,7 +17,7 @@ public interface OrganizationService {
 	Pagination<OrganizationListOut> 
 	listOrganizationManagement(OrganizationListOut olo,Integer pageNo, Integer pageSize);
 	/**组织名称查上级组织*/
-	List<OrganizationListOut> selectSuperId();
+	List<OrganizationListOut> selectSuperId(Integer i);
 	/**
 	 * 
 	 * @param name 组织名称

+ 2 - 2
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -48,8 +48,8 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
 		return params;
 	}
 	@Override
-	public List<OrganizationListOut> selectSuperId() {
-		return organizationManagementMapper.selectSuperId();
+	public List<OrganizationListOut> selectSuperId(Integer i) {
+		return organizationManagementMapper.selectSuperId(i);
 	}
 	/**
 	 *   XXIn form 提交 ,bo包中