Explorar o código

Merge branch 'feature/0721-tenant' of http://git.dayaedu.com/yonge/cooleshow into feature/0721-tenant

Eric hai 1 ano
pai
achega
76bfba36bd

+ 5 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantStaffMapper.xml

@@ -9,7 +9,6 @@
          t.id_ AS id
         , t.tenant_id_ AS tenantId
         , t.user_id_ AS userId
-        , t.avatar_ AS avatar
         , t.nickname_ AS nickname
         , t.im_token_ AS imToken
         , t.wechat_id_ AS wechatId
@@ -31,19 +30,24 @@
     <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.entity.TenantStaff">
 		SELECT         
         	<include refid="baseColumns" />
+        ,su.avatar_ as avatar
 		FROM tenant_staff t
+        left join sys_user su on t.user_id_ = su.id_
 	</select>
 
     <select id="getByPhone" resultType="com.yonge.cooleshow.biz.dal.entity.TenantStaff">
         select
             <include refid="baseColumns" />
+        ,t1.avatar_ as avatar
         from tenant_staff t
         left join sys_user t1 on t1.id_ = t.user_id_
         where t1.phone_ = #{phone}
     </select>
     <select id="selectByUserId" resultType="com.yonge.cooleshow.biz.dal.entity.TenantStaff">
         select <include refid="baseColumns" />
+        ,su.avatar_ as avatar
         from  tenant_staff t
+        left join sys_user su on t.user_id_ = su.id_
         where user_id_ = #{id}
     </select>
 </mapper>