<?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.CompanyBasicMapper">
|
<update id="updateBasicById">
|
UPDATE company_basic
|
<set>
|
<if test="companyId != null and companyId != ''" >
|
company_id = #{companyId},
|
</if>
|
<if test="companyName != null and companyName != ''" >
|
company_name = #{companyName},
|
</if>
|
<if test="basic != null and basic !=''" >
|
basic = #{basic},
|
</if>
|
<if test="introduce != null and introduce != ''" >
|
introduce = #{introduce},
|
</if>
|
<if test="target != null and target != ''" >
|
target = #{target},
|
</if>
|
<if test="quality != null and quality != ''" >
|
quality = #{quality},
|
</if>
|
<if test="activity != null and activity!=''" >
|
activity = #{activity},
|
</if>
|
<if test="audit != null and audit != ''" >
|
audit = #{audit},
|
</if>
|
<if test="epiboly != null and epiboly != ''" >
|
epiboly = #{epiboly},
|
</if>
|
<if test="resource != null and resource != ''" >
|
resource = #{resource},
|
</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="selectCompanyBasicList" resultType="com.gkhy.exam.system.domain.CompanyBasic">
|
SELECT
|
cb.`id`,
|
cb.`company_id`,
|
sc.`name` as company_name,
|
cb.`basic`,
|
cb.`introduce`,
|
cb.`target`,
|
cb.`quality`,
|
cb.`activity`,
|
cb.`audit`,
|
cb.`epiboly`,
|
cb.`resource`,
|
cb.`del_flag`,
|
cb.`create_by`,
|
cb.`create_time`,
|
cb.`update_by`,
|
cb.`update_time`
|
FROM
|
company_basic cb
|
left join sys_company sc on cb.company_id = sc.id
|
WHERE
|
cb.del_flag = 1
|
<if test="companyId!=null and companyId != ''">
|
and cb.company_id = #{companyId}
|
</if>
|
ORDER BY
|
cb.create_time DESC
|
</select>
|
</mapper>
|