|
@@ -24,7 +24,7 @@
|
|
|
su.avatar_ as activationUserAvatar
|
|
|
FROM tenant_activation_code t
|
|
|
LEFT JOIN tenant_album_purchase ta on t.tenant_album_purchase_id_ = ta.id_
|
|
|
- LEFT JOIN sys_user su on t.activation_user_id_ = su.id_
|
|
|
+ LEFT JOIN sys_user su on t.activation_phone_ = su.phone_
|
|
|
LEFT JOIN student st on su.id_ = st.user_id_
|
|
|
<if test="param.orderNo != null and param.orderNo != ''">
|
|
|
left join tenant_album_purchase t4 on t4.id_ = t.tenant_album_purchase_id_
|
|
@@ -61,7 +61,10 @@
|
|
|
and ${param.orderNo} = t4.order_no_
|
|
|
</if>
|
|
|
<if test="param.subjectId != null and param.subjectId.trim() != ''">
|
|
|
- and ${param.subjectId} = su.subject_id_
|
|
|
+ and #{param.subjectId} = st.subject_id_
|
|
|
+ </if>
|
|
|
+ <if test="param.tenantGroupId != null">
|
|
|
+ and st.tenant_group_id_ = #{param.tenantGroupId}
|
|
|
</if>
|
|
|
</where>
|
|
|
order by t.activation_status_ asc, t.id_ desc
|