|  |  |  | @ -8,9 +8,15 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         SELECT * | 
			
		
	
		
			
				
					|  |  |  |  |         FROM auth_dept | 
			
		
	
		
			
				
					|  |  |  |  |         <where> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="flag != null and flag != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="id != null "> | 
			
		
	
		
			
				
					|  |  |  |  |                 and id = #{id} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="flag != null "> | 
			
		
	
		
			
				
					|  |  |  |  |                 and flag = #{flag} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="parentId != null and parentId != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 and parentId = #{parentId} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="name != null and '' != name"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND `name` LIKE CONCAT('%',#{name},'%') | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
	
		
			
				
					|  |  |  | @ -22,10 +28,10 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <insert id="insertDept" keyProperty="id" parameterType="com.glxp.api.entity.auth.DeptEntity"> | 
			
		
	
		
			
				
					|  |  |  |  |         INSERT INTO auth_dept(`name`, `flag`, `remark`, updateTime, code) | 
			
		
	
		
			
				
					|  |  |  |  |         INSERT INTO auth_dept(`name`, `flag`, `remark`, updateTime, code, parentId) | 
			
		
	
		
			
				
					|  |  |  |  |         values (#{name}, | 
			
		
	
		
			
				
					|  |  |  |  |                 #{flag}, | 
			
		
	
		
			
				
					|  |  |  |  |                 #{remark}, #{updateTime}, #{code}) | 
			
		
	
		
			
				
					|  |  |  |  |                 #{remark}, #{updateTime}, #{code}, #{parentId}) | 
			
		
	
		
			
				
					|  |  |  |  |     </insert> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <update id="updateDept" parameterType="com.glxp.api.entity.auth.DeptEntity"> | 
			
		
	
	
		
			
				
					|  |  |  | @ -36,6 +42,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="remark != null">remark=#{remark},</if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="code != null">code=#{code},</if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="updateTime != null">updateTime=#{updateTime},</if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="parentId != null">parentId=#{parentId},</if> | 
			
		
	
		
			
				
					|  |  |  |  |         </trim> | 
			
		
	
		
			
				
					|  |  |  |  |         WHERE id=#{id} | 
			
		
	
		
			
				
					|  |  |  |  |     </update> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |