SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as TemplateGroupName,p.IsActiveAssociation FROM Template p join TemplateGroup q on p.templategroupID=q.ID
SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as TemplateGroupName,p.IsActiveAssociation
<iftest="serviceTypeID!=null">
FROM Template p join TemplateGroup q on p.templategroupID=q.ID
<where>
<iftest="serviceTypeID!=null">
WHERE q.ServiceTypeID=#{serviceTypeID,jdbcType=VARCHAR}
WHERE q.ServiceTypeID=#{serviceTypeID,jdbcType=VARCHAR}
</if>
</if>
<iftest="payTaxType!=null">
<iftest="payTaxType!=null">
AND q.PayTaxType = #{payTaxType,jdbcType=INTEGER}
AND q.PayTaxType = #{payTaxType,jdbcType=INTEGER}
</if>
</if>
...
@@ -429,6 +434,7 @@ SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as Templat
...
@@ -429,6 +434,7 @@ SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as Templat