<?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="org.jeecg.ctop.finance.policy.mapper.CwjsCompanySubjectMapper">
    <select id="queryAllSubjectName" resultType="org.jeecg.ctop.finance.policy.entity.CwjsCompanySubject">
        select distinct company_subject_name from ctop_cwjs_company_subject
    </select>
    <select id="queryByCompanyId" resultType="org.jeecg.ctop.finance.policy.entity.CwjsCompanySubject">
        select * from ctop_cwjs_company_subject where company_id = #{companyId}
    </select>
    <select id="queryIdBySubjectNameAndArea" resultType="integer">
        select id from ctop_cwjs_company_subject where company_subject_name = #{companySubjectName} and area_info = #{areaInfo}
    </select>
</mapper>