| 
					
				 | 
			
			
				@@ -12,7 +12,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="title_" property="title"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="content_" property="content"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="user_id_" property="userId"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result column="username_" property="username"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="create_time_" property="createTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result column="client_type_" property="clientType"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 根据主键查询一条记录 --> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -28,19 +30,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 向数据库增加一条记录 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SysSuggestion" useGeneratedKeys="true" keyColumn="id" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             keyProperty="id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <!-- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <selectKey resultClass="int" keyProperty="id" > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </selectKey> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        INSERT INTO sys_suggestion (id_,mobile_no_,title_,content_,user_id_,create_time_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        VALUES(#{id},#{mobileNo},#{title},#{content},#{userId},now()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        INSERT INTO sys_suggestion (id_,mobile_no_,title_,content_,user_id_,create_time_,client_type_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        VALUES(#{id},#{mobileNo},#{title},#{content},#{userId},now(),#{clientType}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 根据主键查询一条记录 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <update id="update" parameterType="com.ym.mec.biz.dal.entity.SysSuggestion"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         UPDATE sys_suggestion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <set> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="clientType != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                client_type_ = #{clientType}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="userId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 user_id_ = #{userId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -64,7 +64,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 分页查询 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="queryPage" resultMap="SysSuggestion" parameterType="map"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        SELECT * FROM sys_suggestion ORDER BY id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT ss.*,CASE WHEN su.real_name_ IS NULL THEN su.username_ ELSE su.real_name_ END username_ FROM sys_suggestion ss 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN sys_user su ON su.id_ = ss.user_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ORDER BY ss.id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <include refid="global.limit"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |