Browse Source

修复person_portrait_url -> head_portrait_url问题
增加成果名字的模糊查询

albertshaw 8 years ago
parent
commit
cec1c978d6

+ 4 - 4
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1039,10 +1039,10 @@
 		and  audit_status = #{auditStatus,jdbcType=INTEGER}
 	</if>
 	<if test="name != null">
-		and  name = #{name,jdbcType=VARCHAR}
+		and  name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
 	</if>
 	<if test="keyword != null">
-		and  keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+		and  keyword like CONCAT('%',#{keyword,jdbcType=VARCHAR},'%')
 	</if>
 	<if test="category != null">
 		and  category = #{category,jdbcType=INTEGER}
@@ -1081,10 +1081,10 @@
 		and  audit_status = #{auditStatus,jdbcType=INTEGER}
 	</if>
 	<if test="name != null">
-		and  name = #{name,jdbcType=VARCHAR}
+		and  name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
 	</if>
 	<if test="keyword != null">
-		and  keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+		and  keyword like CONCAT('%',#{keyword,jdbcType=VARCHAR},'%')
 	</if>
 	<if test="category != null">
 		and  category = #{category,jdbcType=INTEGER}

+ 1 - 1
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -648,7 +648,7 @@
   <select id="selectUserPageHomeBoByUserId" parameterType="java.lang.String" resultMap="UserPageHomeBo">
    select 
    		u.lvl,mg.grade_name , u.nickname, u.email,
-   		u.number, u.type, u.person_portrait_url, 
+   		u.number, u.type, u.head_portrait_url as person_portrait_url, 
    		u.company_logo_url as logo_url, u.id as uid, adc.achievement_count as achievementNum,
    		adc.demand_count as demandNum
    from user u