Browse Source

品类排序更改为按修改时间

anderx 8 years ago
parent
commit
c48ffe92b1

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

@@ -381,12 +381,12 @@
   	</select>
   	</select>
   	
   	
   	<select id="findVarietiesListByPage" resultType="com.goafanti.business.bo.BusinessVarietiesBo">
   	<select id="findVarietiesListByPage" resultType="com.goafanti.business.bo.BusinessVarietiesBo">
- 		select b.id,b.create_id as createId ,b.create_time as createTime,b.update_time as updateTime,
+ 		 select b.id,b.create_id as createId ,b.create_time as createTime,b.update_time as updateTime,
   		b.delete_sign daleteSign,b.cid,b.cname,b.super_id superId ,b.layer,b.status,b2.cname as superName
   		b.delete_sign daleteSign,b.cid,b.cname,b.super_id superId ,b.layer,b.status,b2.cname as superName
   		from business_varieties b
   		from business_varieties b
   		left join business_varieties b2 on b.super_id = b2.id
   		left join business_varieties b2 on b.super_id = b2.id
   		where b.delete_sign=0 and b.layer>0
   		where b.delete_sign=0 and b.layer>0
-  		<if test="cname != null">
+ 		<if test="cname != null">
 		and b.cname like CONCAT('%',#{cname,jdbcType=VARCHAR},'%')
 		and b.cname like CONCAT('%',#{cname,jdbcType=VARCHAR},'%')
 		</if>
 		</if>
 		<if test="superId != null">
 		<if test="superId != null">
@@ -420,7 +420,7 @@
 		<if test="status != null">
 		<if test="status != null">
 		and b.status = #{status,jdbcType=VARCHAR}
 		and b.status = #{status,jdbcType=VARCHAR}
 		</if>
 		</if>
-		
+		ORDER BY b.update_time DESC
   </select>
   </select>
   
   
   <select id="getSuperList"  resultType="com.goafanti.business.bo.BusinessVarietiesBo">
   <select id="getSuperList"  resultType="com.goafanti.business.bo.BusinessVarietiesBo">