From 34f99d106551b51bf2af3bbd40c64624a3af25eb Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 09 九月 2023 09:43:57 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/CompanyTargetMapper.xml | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/CompanyTargetMapper.xml b/src/main/resources/mapper/CompanyTargetMapper.xml
index 0788f04..2629bba 100644
--- a/src/main/resources/mapper/CompanyTargetMapper.xml
+++ b/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>
--
Gitblit v1.9.1