Althars123 3 tahun lalu
induk
melakukan
89158852aa

+ 6 - 6
twzd-service/src/main/resources/mapper/wx/WxForeverCodeMapper.xml

@@ -15,18 +15,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectWxForeverCodeVo">
-        select * from wx_forever_code
+        select t1.id,t1.openid,t1.code,t1.status,t1.url,t2.nick_name from wx_forever_code t1 left join user_info t2 on (t1.openid=t2.openid)
     </sql>
 
     <select id="selectWxForeverCodeList" parameterType="WxForeverCode" resultMap="WxForeverCodeResult">
         <include refid="selectWxForeverCodeVo"/>
         <where>
-            <if test="openid != null  and openid != ''"> and openid = #{openid}</if>
-            <if test="code != null  and code != ''"> and code = #{code}</if>
-            <if test="nickName != null "> and nick_name like concat('%', #{nickName}, '%')</if>
-            <if test="status != null "> and status = #{status}</if>
+            <if test="openid != null  and openid != ''"> and t1.openid = #{openid}</if>
+            <if test="code != null  and code != ''"> and t1.code = #{code}</if>
+            <if test="nickName != null "> and t2.nick_name like concat('%', #{nickName}, '%')</if>
+            <if test="status != null "> and t1.status = #{status}</if>
         </where>
-        order by create_time desc
+        order by t1.create_time desc
     </select>
 
 </mapper>