<resultMapid="dutyInfo"type="com.huating.jfp.msg.api.kafka.entity.DutyInfo"><resultjavaType="java.lang.String"property="post"column="postName"/><collectionproperty="times"ofType="com.huating.jfp.msg.api.kafka.entity.Times"javaType="java.util.ArrayList"select="selectTodayInfo"column="postUuid"></collection></resultMap><selectid="getPostAllNotGroup"resultMap="dutyInfo">
select
CONCAT_WS('-',b.sct_type_name,a.spc_job) AS postName,
a.spc_uuid as postUuid
FROM
ag_sdl_post_configure a
LEFT JOIN ag_sdl_type_configure b ON a.sct_uuid = b.sct_uuid
WHERE
source_dept='allpersons'
</select><selectid="selectTodayInfo"resultType="com.huating.jfp.msg.api.kafka.entity.Times">
SELECT
CONCAT_WS('-',b.shc_class_begtime,b.shc_class_endtime) as time,
(CASE WHEN ISNULL(d.us_name) != 1 && ISNULL(d.us_phone) != 1 THEN GROUP_CONCAT(CONCAT_WS( '+',d.us_name, d.us_phone )) end) AS personers
FROM ag_sdl_postshift a
LEFT JOIN ag_sdl_shift_configure b ON a.shc_formuuid = b.shc_uuid
LEFT JOIN ag_sdl_daily_from c on c.sdf_post = a.ps_uuid
LEFT JOIN jfp_user d ON FIND_IN_SET( d.us_uuid, c.sdf_police_uuid )
WHERE c.sdf_date = DATE (NOW())
GROUP BY a.spc_formuuid
</select>
或者
<resultMapid="fieldInfoMapper"type="com.huating.jfp.safety.device.entity.DeviceTallyType"><resultproperty="codeUuid"jdbcType="VARCHAR"column="code_uuid"/><resultproperty="codeName"jdbcType="VARCHAR"column="code_name"/><resultproperty="codeCode"jdbcType="VARCHAR"column="code_code"/><collectionproperty="broadcastTallyList"ofType="com.huating.jfp.safety.device.entity.DeviceBroadcastTally"><resultproperty="tallyUuid"jdbcType="VARCHAR"column="dbt_tallyuuid"/><resultproperty="tallyName"jdbcType="VARCHAR"column="dbt_tallyname"/><resultproperty="userName"jdbcType="VARCHAR"column="dbt_username"/><resultproperty="tallyRemark"jdbcType="VARCHAR"column="dbt_remark"/></collection></resultMap><selectid="selectInfoList"resultMap="fieldInfoMapper">
SELECT
t1.code_uuid,
t1.code_name,
t1.code_code,
t2.dbt_tallyuuid,
t2.dbt_tallyname,
t2.dbt_username,
t2.dbt_remark
FROM
jfp_code t1
left join ag_security_device_broadcast_tally t2 on t1.code_uuid = t2.dbt_type
WHERE
t1.code_status != 2 and
(t1.code_cus_number = #{acCusNumber} or t1.code_cus_number = 'all') and
t1.code_char_code = 'broadcast_tally_type'
</select>