Althars123 %!s(int64=3) %!d(string=hai) anos
pai
achega
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>
     </resultMap>
 
 
     <sql id="selectWxForeverCodeVo">
     <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>
     </sql>
 
 
     <select id="selectWxForeverCodeList" parameterType="WxForeverCode" resultMap="WxForeverCodeResult">
     <select id="selectWxForeverCodeList" parameterType="WxForeverCode" resultMap="WxForeverCodeResult">
         <include refid="selectWxForeverCodeVo"/>
         <include refid="selectWxForeverCodeVo"/>
         <where>
         <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>
         </where>
-        order by create_time desc
+        order by t1.create_time desc
     </select>
     </select>
 
 
 </mapper>
 </mapper>