AiSparringStaffInfoMapper.xml
2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?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="cn.com.glsx.dj.mindworkplate.mapper.AiSparringStaffInfoMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.AiSparringStaffInfo" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="staff_uuid" property="staffUuid" jdbcType="VARCHAR" />
<result column="staff_name" property="staffName" jdbcType="VARCHAR" />
<result column="staff_phone" property="staffPhone" jdbcType="VARCHAR" />
<result column="try_count" property="tryCount" jdbcType="TINYINT" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
</resultMap>
<resultMap id="DTOResultMap" extends="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.dto.AiSparringTaskStaffInfoDTO" >
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, staff_uuid, staff_name, staff_phone, try_count, deleted_flag, created_by, created_date,
updated_by, updated_date
</sql>
<sql id="Prefix_Column" >
${prefix}.id as ${prefix}_id,
${prefix}.staff_uuid as ${prefix}_staff_uuid,
${prefix}.staff_name as ${prefix}_staff_name,
${prefix}.staff_phone as ${prefix}_staff_phone,
${prefix}.try_count as ${prefix}_try_count,
${prefix}.deleted_flag as ${prefix}_deleted_flag,
${prefix}.created_by as ${prefix}_created_by,
${prefix}.created_date as ${prefix}_created_date,
${prefix}.updated_by as ${prefix}_updated_by,
${prefix}.updated_date as ${prefix}_updated_date
</sql>
<select id="findByStaffUuid" resultMap="BaseResultMap">
select t.* from ai_sparring_staff_info t
left join ai_sparring_task_staff_ref astsr on t.staff_uuid = astsr.staff_uuid and astsr.deleted_flag = 'N'
where t.deleted_flag = 'N' and t.staff_uuid = #{staffUuid}
<if test="yqMerchantId != null">
and astsr.yq_merchant_id = #{yqMerchantId}
</if>
order by t.try_count, t.created_date desc
limit 1
</select>
<select id="findByStaffUuids" resultMap="BaseResultMap">
select t.* from ai_sparring_staff_info t
where t.deleted_flag = 'N'
and t.staff_uuid in
<foreach collection="staffUuids" item="uuid" separator="," open="(" close=")" >
#{uuid}
</foreach>
</select>
</mapper>