select ip.policy_no as policyNo,il.return_code as returnCode,il.return_msg as returnMsg,il.type as type,il.create_time as createTime from insure_log il
select ip.policy_no as policyNo,il.return_code as returnCode,il.return_msg as returnMsg,il.type as
LEFT JOIN insure_policy ip on ip.id=il.policy_id
type,il.create_time as createTime from insure_log il
WHERE ip.org_code = #{orgCode}
LEFT JOIN insure_policy ip on ip.id=il.policy_id
order by il.create_time desc
WHERE ip.org_code = #{orgCode}
order by il.create_time desc
<iftest="page.currentPage != null and page.totalPage != null">
<iftest="page.currentPage != null and page.totalPage != null">
select count(log.id) as totalNum,count(CASE WHEN return_code = '1' OR return_code='suc' THEN 1 END) as sucNum,count(CASE WHEN return_code = '0' OR return_code='e1' THEN 1 END) as errNum
from insure_log log
LEFT JOIN insure_policy ip on ip.id = log.policy_id
WHERE log.type in (1,2,3,7,8)
<iftest="param.policyNo!=null and param.policyNo != ''">