Browse Source

调取部门测试

anderx 7 years ago
parent
commit
91b3ef7b77

+ 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(Integer i);
+	List<OrganizationListOut> selectSuperId(@Param("sort")int sort);
 	/**
 	 * 根据组织名称查组织编号
 	 */

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

@@ -449,14 +449,14 @@
 			AND om.dep_no=#{depNo,jdbcType=VARCHAR}
 		</if>	
 	</select>
-	<select id="selectSuperId" resultType="com.goafanti.organization.bo.OrganizationListOut">
+	<select id="selectSuperId"  resultType="com.goafanti.organization.bo.OrganizationListOut">
 		select
 		id,name,dep_no as depNo
 		from department
 		where
 		status ='0'
-		<if test="i ==1" >
-			limit 10
+		<if test="sort ==1" >
+		limit 10	
 		</if>
 	</select>
 	<insert id="insert1" parameterType="com.goafanti.organization.bo.OrganizationListOut">

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

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