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
type,il.create_time as createTime from insure_log il
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 != ''">