<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
<mapper namespace="com.kakarote.crm.mapper.CrmActionRecordMapper">
    <select id="queryRecordList" resultType="com.kakarote.crm.entity.VO.CrmActionRecordVO">
      select a.*,b.realname,b.img
      from wk_crm_action_record a join wk_admin_user b on a.create_user_id = b.user_id
      where action_id = #{actionId} and types = #{types} and content is not null and content != '' order by create_time desc
    </select>
    <select id="queryFieldValue" resultType="com.kakarote.crm.entity.VO.CrmModelFiledVO">
        select a.field_id, a.value,b.field_name,b.name,b.type from ${data.dataTableName} as a
        join wk_crm_field b on a.field_id = b.field_id
        where batch_id = #{data.batchId} and b.field_name is not null
    </select>
</mapper>
