|  | @@ -25,6 +25,14 @@
 | 
	
		
			
				|  |  |          <include refid="baseColumns"/>,ta.name_ as tenantAlbumName,ta.cover_img_ as tenantAlbumImg
 | 
	
		
			
				|  |  |          FROM tenant_album_purchase t
 | 
	
		
			
				|  |  |          LEFT JOIN tenant_album ta on t.tenant_album_id_ = ta.id_
 | 
	
		
			
				|  |  | +        <where>
 | 
	
		
			
				|  |  | +        <if test="param.tenantId != null">
 | 
	
		
			
				|  |  | +                AND t.tenant_id_ = #{param.tenantId}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="param.purchaseStatus != null and param.purchaseStatus.trim() != ''">
 | 
	
		
			
				|  |  | +                AND t.purchase_status_ = #{param.purchaseStatus}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +        </where>
 | 
	
		
			
				|  |  |          <choose>
 | 
	
		
			
				|  |  |              <when test="param.orderBy != null and param.orderBy.trim() != ''">
 | 
	
		
			
				|  |  |                  order by #{param.orderBy}
 |