|
@@ -94,20 +94,28 @@
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="BaseResultMap" parameterType="map">
|
|
|
- SELECT * FROM contract_template ORDER BY id_
|
|
|
+ SELECT tct.*,ifnull(u.real_name_,u.username_) latest_operator_ FROM contract_template tct left join sys_user u on tct.modify_by_ = u.id_
|
|
|
+ <where>
|
|
|
+ tct.type_ = 'PLATFORM'
|
|
|
+ <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>
|
|
|
+ ORDER BY id_
|
|
|
<include refid="global.limit" />
|
|
|
</select>
|
|
|
|
|
|
- <!-- 查询当前表的总记录数 -->
|
|
|
- <select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM contract_template
|
|
|
- </select>
|
|
|
-
|
|
|
<!-- 分页查询 -->
|
|
|
- <select id="queryPageList" resultMap="ContractTemplateDto"
|
|
|
- parameterType="map">
|
|
|
- SELECT tct.*,ifnull(u.real_name_,u.username_) latest_operator_ FROM contract_template tct left join sys_user u on tct.modify_by_ = u.id_
|
|
|
+ <select id="queryPageList" resultMap="ContractTemplateDto" parameterType="map">
|
|
|
+ SELECT tct.*,ifnull(u.real_name_,u.username_) latest_operator_ FROM contract_template tct left join sys_user u on tct.modify_by_ = u.id_
|
|
|
<where>
|
|
|
+ tct.type_ = 'PLATFORM'
|
|
|
<if test="status != null">
|
|
|
and tct.status_ = #{status}
|
|
|
</if>
|
|
@@ -122,10 +130,12 @@
|
|
|
<include refid="global.limit" />
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
SELECT COUNT(tct.id_) FROM contract_template tct
|
|
|
<where>
|
|
|
+ tct.type_ = 'PLATFORM'
|
|
|
<if test="status != null">
|
|
|
and tct.status_ = #{status}
|
|
|
</if>
|
|
@@ -137,7 +147,7 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="queryLatestContractTemplate" resultMap="BaseResultMap" parameterType="map">
|
|
|
SELECT a.* FROM (
|
|
|
select
|