Browse Source

管理中心查询修改

ender 8 years ago
parent
commit
801a5d03fb
1 changed files with 7 additions and 2 deletions
  1. 7 2
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

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

@@ -854,6 +854,9 @@
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
 	LEFT JOIN organization_identity oi on a.owner_id = oi.uid
+	<if test="adminId != null">
+		LEFT JOIN user u on a.owner_id = u.id
+	</if>
   	<if test="hot != null and hot == 1"> <!-- 在首页 -->
 		inner join marketing_management mm on a.id = mm.product_id
 	</if>
@@ -861,9 +864,11 @@
 		left join marketing_management mm on a.id = mm.product_id 
 	</if>
   	where a.deleted_sign = 0 and a.owner_type = 1
-  	
+  	<if test="adminId != null">
+		and (u.mid = #{adminId,jdbcType=VARCHAR}
+	</if>
 	<if test="adminId != null">
-		and (  a.principal_id = #{adminId,jdbcType=VARCHAR}
+		or  a.salesman_id = #{adminId,jdbcType=VARCHAR}
 	</if>
 	<if test="adminId != null">
 		or  a.tech_broker_id = #{adminId,jdbcType=VARCHAR}