中扬CRM客户关系管理系统
#
Junjie
2023-09-08 3041a7d6dba13e237c4f21d3e46b88c35d376bf3
src/main/resources/mapper/CompanyTargetMapper.xml
@@ -11,12 +11,21 @@
        <result column="user_id" property="userId" />
        <result column="update_time" property="updateTime" />
        <result column="update_user_id" property="updateUserId" />
        <result column="staff" property="staff" />
        <result column="complete" property="complete" />
    </resultMap>
    <select id="selectByYear" resultMap="BaseResultMap">
        select * from man_company_target
    <select id="selectCompanyByYear" resultMap="BaseResultMap">
        select top 1 * from man_company_target
        where year = #{year}
        and staff is null
    </select>
    <select id="selectPersonByYear" resultMap="BaseResultMap">
        select top 1 * from man_company_target
        where year = #{year}
        and staff = #{staff}
    </select>
</mapper>