“djh”
2025-12-03 e32ac074e0cdc07b7551155e2e1c24684857f2b7
multi-system/src/main/resources/mapper/system/StandardizedTemplateMapper.xml
@@ -31,6 +31,12 @@
            <if test="deptId !=null">
                dept_id = #{deptId},
            </if>
            <if test="department !=null">
                department = #{department},
            </if>
            <if test="stage != null and stage != ''">
                stage = #{stage},
            </if>
            <if test="delFlag != null and delFlag != ''" >
                del_flag = #{delFlag},
            </if>
@@ -50,7 +56,7 @@
        where id = #{id}
    </update>
    <select id="selectStandardizedTemplateList" resultType="com.gkhy.exam.system.domain.StandardizedTemplate">
    <select id="selectStandardizedTemplateList" resultType="com.gkhy.exam.system.domain.StandardizedTemplate" parameterType="com.gkhy.exam.system.domain.StandardizedTemplate">
        SELECT
            st.`id`,
            st.`company_id`,
@@ -62,6 +68,7 @@
            st. `classify`,
            st. `dept_id`,
            sd.`dept_name`,
            st.`stage`,
            st. `del_flag`,
            st. `create_by`,
            st. `create_time`,
@@ -76,12 +83,27 @@
        <if test="companyId!=null and companyId!=''">
            and st.company_id = #{companyId}
        </if>
        ORDER BY
            st.create_time DESC
        <if test="templateName!=null and templateName!=''">
            and st.template_name like concat('%',#{templateName},'%')
        </if>
        <if test="sort!=null and sort==1">
            ORDER BY
            st.template_name asc
        </if>
        <if test="sort!=null and sort==2">
            ORDER BY
            st.template_name desc
        </if>
        <if test="sort ==null or sort== '' or sort == 0">
            ORDER BY
            st.create_time desc
        </if>
    </select>
    <select id="selectStandardizedTemplateListV2" resultType="com.gkhy.exam.system.domain.StandardizedTemplate">
    <select id="selectStandardizedTemplateListV2" resultType="com.gkhy.exam.system.domain.StandardizedTemplate" parameterType="com.gkhy.exam.system.domain.StandardizedTemplate">
        SELECT
        st.`id`,
        st.`company_id`,
@@ -93,12 +115,14 @@
        st. `classify`,
        st. `dept_id`,
        sd.`dept_name`,
        st. `stage`,
        st. `del_flag`,
        st. `create_by`,
        st. `create_time`,
        st. `update_by`,
        st. `update_time`,
        st.industry_type_id,
        st.`department`,
        cit.`name` as industryTypeName
        FROM
        standardized_template st
@@ -113,8 +137,21 @@
        <if test="industryTypeId!=null ">
            and st.industry_type_id = #{industryTypeId}
        </if>
        ORDER BY
        st.create_time DESC
        <if test="templateName!=null and templateName!=''">
            and st.template_name like concat('%',#{templateName},'%')
        </if>
        <if test="sort!=null and sort==1">
            ORDER BY
            st.template_name asc
        </if>
        <if test="sort!=null and sort==2">
            ORDER BY
            st.template_name desc
        </if>
        <if test="sort ==null or sort== '' or sort == 0">
            ORDER BY
            st.create_time desc
        </if>
    </select>
</mapper>