首页 新闻 会员 周边 捐助

mysql case 乱码

0
悬赏园豆:5 [已关闭问题] 关闭于 2017-08-11 17:02

从数据库提的数据没有问题

但是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字段出现乱码问题。

PPBoy的主页 PPBoy | 初学一级 | 园豆:14
提问于:2017-08-11 16:58
< >
分享
所有回答(1)
0

?useUnicode=true&characterEncoding=utf-8

PPBoy | 园豆:14 (初学一级) | 2017-08-11 17:02
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册