<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.gkhy.exam.system.mapper.CompanySummaryMapper">
|
<update id="updateSummaryById">
|
UPDATE company_summary
|
<set>
|
<if test="companyId != null and companyId != ''" >
|
company_id = #{companyId},
|
</if>
|
<if test="companyName != null and companyName != ''" >
|
company_name = #{companyName},
|
</if>
|
<if test="companySummary != null and companySummary !=''" >
|
company_summary = #{companySummary},
|
</if>
|
<if test="delFlag != null and delFlag != ''" >
|
del_flag = #{delFlag},
|
</if>
|
<if test="createBy != null" >
|
create_by = #{createBy},
|
</if>
|
<if test="createTime != null" >
|
create_time = #{createTime},
|
</if>
|
<if test="updateBy != null" >
|
update_by = #{updateBy},
|
</if>
|
<if test="updateTime != null" >
|
update_time = #{updateTime}
|
</if>
|
</set>
|
where id = #{id}
|
</update>
|
|
<select id="selectCompanySummaryList" resultType="com.gkhy.exam.system.domain.CompanySummary">
|
SELECT
|
cs.`id`,
|
cs.`company_id`,
|
sc.`name` as company_name,
|
cs.`company_summary`,
|
cs.`del_flag`,
|
cs.`create_by`,
|
cs.`create_time`,
|
cs.`update_by`,
|
cs.`update_time`
|
FROM
|
company_summary cs
|
left join sys_company sc on cs.company_id = sc.id
|
WHERE
|
cs.del_flag = 1
|
<if test="companyId!=null and companyId!=''">
|
and cs.company_id = #{companyId}
|
</if>
|
ORDER BY
|
cs.create_time DESC
|
</select>
|
</mapper>
|