a.id as id
,a.yisheng_id as yishengId
,a.yonghu_id as yonghuId
,a.guahao_uuin_number as guahaoUuinNumber
,a.guahao_time as guahaoTime
,a.guahao_types as guahaoTypes
,a.guahao_status_types as guahaoStatusTypes
,a.guahao_yesno_types as guahaoYesnoTypes
,a.guahao_yesno_text as guahaoYesnoText
,a.create_time as createTime
SELECT
-- 级联表的字段
,yisheng.yisheng_uuid_number as yishengUuidNumber
,yisheng.yisheng_name as yishengName
,yisheng.yisheng_types as yishengTypes
,yisheng.zhiwei_types as zhiweiTypes
,yisheng.yisheng_zhichneg as yishengZhichneg
,yisheng.yisheng_photo as yishengPhoto
,yisheng.yisheng_phone as yishengPhone
,yisheng.yisheng_guahao as yishengGuahao
,yisheng.yisheng_email as yishengEmail
,yisheng.yisheng_new_money as yishengNewMoney
,yisheng.yisheng_content as yishengContent
,yonghu.yonghu_name as yonghuName
,yonghu.yonghu_photo as yonghuPhoto
,yonghu.yonghu_phone as yonghuPhone
,yonghu.yonghu_id_number as yonghuIdNumber
,yonghu.yonghu_email as yonghuEmail
,yonghu.new_money as newMoney
,yonghu.yonghu_delete as yonghuDelete
FROM guahao a
left JOIN yisheng yisheng ON a.yisheng_id = yisheng.id
left JOIN yonghu yonghu ON a.yonghu_id = yonghu.id
and a.id in
#{item}
and (
a.yisheng_id = #{params.yishengId}
)
and (
a.yonghu_id = #{params.yonghuId}
)
= #{params.guahaoUuinNumberStart} ]]>
and a.guahao_uuin_number = #{params.guahaoUuinNumber}
= UNIX_TIMESTAMP(#{params.guahaoTimeStart}) ]]>
and a.guahao_types = #{params.guahaoTypes}
and a.guahao_status_types = #{params.guahaoStatusTypes}
and a.guahao_yesno_types = #{params.guahaoYesnoTypes}
and a.guahao_yesno_text like CONCAT('%',#{params.guahaoYesnoText},'%')
and a.yisheng_id IS NOT NULL
and yisheng.yisheng_uuid_number like CONCAT('%',#{params.yishengUuidNumber},'%')
and yisheng.yisheng_name like CONCAT('%',#{params.yishengName},'%')
and yisheng.yisheng_types = #{params.yishengTypes}
and yisheng.zhiwei_types = #{params.zhiweiTypes}
and yisheng.yisheng_zhichneg like CONCAT('%',#{params.yishengZhichneg},'%')
and yisheng.yisheng_phone like CONCAT('%',#{params.yishengPhone},'%')
and yisheng.yisheng_guahao like CONCAT('%',#{params.yishengGuahao},'%')
and yisheng.yisheng_email like CONCAT('%',#{params.yishengEmail},'%')
= #{params.yishengNewMoneyStart} ]]>
and yisheng.yisheng_content like CONCAT('%',#{params.yishengContent},'%')
and a.yonghu_id IS NOT NULL
and yonghu.yonghu_name like CONCAT('%',#{params.yonghuName},'%')
and yonghu.yonghu_phone like CONCAT('%',#{params.yonghuPhone},'%')
and yonghu.yonghu_id_number like CONCAT('%',#{params.yonghuIdNumber},'%')
and yonghu.yonghu_email like CONCAT('%',#{params.yonghuEmail},'%')
= #{params.newMoneyStart} ]]>
= #{params.yonghuDeleteStart} ]]>
and yonghu.yonghu_delete = #{params.yonghuDelete}
order by a.${params.orderBy} desc