|
@@ -98,6 +98,11 @@
|
|
|
<select id="queryPageList" resultMap="TenantContractTemplateDto"
|
|
|
parameterType="map">
|
|
|
SELECT tct.*,u.real_name_ latest_operator_ FROM tenant_contract_template tct left join sys_user u on tct.modify_by_ = u.id_
|
|
|
+ <include refid="queryPageListSql"/>
|
|
|
+ ORDER BY id_
|
|
|
+ <include refid="global.limit" />
|
|
|
+ </select>
|
|
|
+ <sql id="queryPageListSql">
|
|
|
<where>
|
|
|
tct.tenant_id_ = #{tenantId}
|
|
|
<if test="status != null">
|
|
@@ -110,24 +115,12 @@
|
|
|
and tct.owner_ = #{owner}
|
|
|
</if>
|
|
|
</where>
|
|
|
- ORDER BY id_
|
|
|
- <include refid="global.limit" />
|
|
|
- </select>
|
|
|
+ </sql>
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
SELECT COUNT(tct.id_) FROM tenant_contract_template tct
|
|
|
- <where>
|
|
|
- <if test="status != null">
|
|
|
- and tct.status_ = #{status}
|
|
|
- </if>
|
|
|
- <if test="type != null">
|
|
|
- and tct.type_ = #{type}
|
|
|
- </if>
|
|
|
- <if test="owner != null">
|
|
|
- and tct.owner_ = #{owner}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ <include refid="queryPageListSql"/>
|
|
|
</select>
|
|
|
|
|
|
<select id="queryLatestContractTemplate" resultMap="TenantContractTemplate" parameterType="map">
|