|
|
@@ -61,9 +61,11 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="export" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileWxfriend">
|
|
|
- SELECT
|
|
|
+ SELECT T.* FROM (SELECT
|
|
|
A.friend_id,
|
|
|
A.mobile_id,
|
|
|
+ B.wx_name,
|
|
|
+ B.wx_username,
|
|
|
C.mobile_code,
|
|
|
D.id as station_id,
|
|
|
D.station_name
|
|
|
@@ -71,11 +73,11 @@
|
|
|
left join pan_fosterwx_wxfriend as B on A.friend_id = B.id
|
|
|
left join pan_fosterwx_mobile as C on A.mobile_id = C.id
|
|
|
left join pan_fosterwx_station as D on C.station_id = D.id
|
|
|
+ GROUP BY A.mobile_id,B.wx_name,B.wx_username,C.mobile_code,D.id,D.station_name,A.friend_id) as T
|
|
|
<where>
|
|
|
- <if test="params.stationId">and D.id = #{params.stationId}</if>
|
|
|
- <if test="params.mobileCode">and C.mobile_code = #{params.mobileCode}</if>
|
|
|
- <if test="params.name">and B.wx_name like CONCAT('%',#{params.name},'%') or B.wx_username like CONCAT('%',#{params.name},'%')</if>
|
|
|
+ <if test="params.stationId">and T.station_id = #{params.stationId}</if>
|
|
|
+ <if test="params.mobileCode">and T.mobile_code = #{params.mobileCode}</if>
|
|
|
+ <if test="params.name">and T.wx_name like CONCAT('%',#{params.name},'%') or T.wx_username like CONCAT('%',#{params.name},'%')</if>
|
|
|
</where>
|
|
|
- GROUP BY A.mobile_id,C.mobile_code,D.id,D.station_name,A.friend_id
|
|
|
</select>
|
|
|
</mapper>
|