Bonus-Cloud-Material/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/IwsTeamUserMapper.xml

60 lines
2.3 KiB
XML
Raw Normal View History

2025-06-27 14:43:33 +08:00
<?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.bonus.material.clz.mapper.IwsTeamUserMapper">
<select id="selectUserInfoByUserName" resultType="com.bonus.material.clz.domain.vo.IwsTeamUserVo">
select
id, name, mobile as userPhone, user_name as userName, id_card as idCard
from
`uni_org`.org_user
<where>
and (state = 1 or state = 4)
and user_name = #{userName}
</where>
limit 1
</select>
<select id="selectProjectTeamInfoByIdCard" resultType="com.bonus.material.clz.domain.vo.IwsTeamUserVo">
select
2025-07-13 10:09:45 +08:00
DISTINCT
2025-07-11 16:33:19 +08:00
bzgl_bz.id, bzgl_bz.bzmc as teamName, bzgl_bz.bzz_name as relName, bzgl_bz.bzz_idcard as teamLeaderIdCard,
2025-06-27 14:43:33 +08:00
bzgl_bz.bz as remark, bzgl_bz.bz_status as teamStatus, bzgl_bz.project_id as projectId,
2025-07-11 16:33:19 +08:00
bzgl_bz.project_name as projectName, org_user.mobile as relPhone
2025-06-27 14:43:33 +08:00
from
`micro-tool`.bzgl_bz bzgl_bz
left join `uni_org`.org_user org_user on bzgl_bz.bzz_idcard = org_user.id_card
<where>
2025-07-14 17:26:40 +08:00
bzgl_bz.bz_status = 3
2025-06-27 14:43:33 +08:00
and bzgl_bz.sfjs = 0
and bzgl_bz.bzz_idcard = #{idCard}
</where>
</select>
<select id="selectProjectTeamInfoByProjectIds" resultType="com.bonus.material.clz.domain.vo.IwsTeamUserVo">
select
2025-07-13 10:09:45 +08:00
DISTINCT
2025-07-11 16:33:19 +08:00
bzgl_bz.id, bzgl_bz.bzmc as teamName, bzgl_bz.bzz_name as relName, bzgl_bz.bzz_idcard as teamLeaderIdCard,
2025-06-27 14:43:33 +08:00
bzgl_bz.bz as remark, bzgl_bz.bz_status as teamStatus, bzgl_bz.project_id as projectId, bzgl_bz.project_name as projectName,
2025-07-11 16:33:19 +08:00
bzgl_bz.bzz_idcard as teamLeaderIdCard, org_user.mobile as relPhone
2025-06-27 14:43:33 +08:00
from
`micro-tool`.bzgl_bz bzgl_bz
left join `uni_org`.org_user org_user on bzgl_bz.bzz_idcard = org_user.id_card
WHERE bzgl_bz.project_id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
2025-09-13 01:02:36 +08:00
<select id="getTeamName" resultType="java.lang.String">
select
DISTINCT
bzgl_bz.ssfbdw
from
`micro-tool`.bzgl_bz bzgl_bz
WHERE bzgl_bz.bz_status = '3'
and bzgl_bz.bzmc = #{teamName}
Limit 1
</select>
2025-06-27 14:43:33 +08:00
</mapper>