从数据库提的数据没有问题
但是mybatis的case字段会出现乱码。
select resume.id
, psuser.real_name
, (case psuser.gender_code when '1' then N'男' when '2' then N'女' when '0' then N'未知' else '' end) gender_code
, (year(now())-year(psinfo.birth)) user_age
, sa.content_name user_duty
, sa1.content_name user_education
, resume.update_date
, (case year(now())-year(study.end_date) when '0' then N'应届毕业生' else CONCAT(year(now())-year(study.end_date),N'年经验') end ) end_date
from ps_user psuser
join ps_full_resume resume on psuser.id=resume.ps_user_id
join ps_base_info psinfo on psuser.id=psinfo.user_id
join sa_standard_content sa on resume.apply_position_class_code=sa.class_code and resume.apply_position_two_code=sa.content_code
join sa_standard_content sa1 on psinfo.education_class_code=sa1.class_code and psinfo.education_code=sa1.content_code
join ps_archive_study study on study.user_id=psuser.id
2个case字段出现乱码问题。
?useUnicode=true&characterEncoding=utf-8