Commit 91be4ae3 authored by Smile's avatar Smile Committed by wux

会员等级在app和web上多语言显示问题修改

parent 471f7c27
...@@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.member.service.score; ...@@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.member.service.score;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO; import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.i18n.core.LangEnum;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService; import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreUpdateReqDTO; import cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreUpdateReqDTO;
import cn.iocoder.yudao.module.member.controller.app.userScore.vo.AppMemberUserScoreInfoRespVO; import cn.iocoder.yudao.module.member.controller.app.userScore.vo.AppMemberUserScoreInfoRespVO;
...@@ -142,8 +144,15 @@ public class MemberUserScoreServiceImpl extends AbstractService<MemberUserScoreM ...@@ -142,8 +144,15 @@ public class MemberUserScoreServiceImpl extends AbstractService<MemberUserScoreM
List<DictDataRespDTO> dictMemberShipLevels = List<DictDataRespDTO> dictMemberShipLevels =
dictDataApi.getDictDatas("membership_levels"); dictDataApi.getDictDatas("membership_levels");
Map<String, String> dictMemberShipLevelMap = new HashMap<>(); Map<String, String> dictMemberShipLevelMap = new HashMap<>();
Integer lang = I18nMessage.getLang();
for (DictDataRespDTO d : dictMemberShipLevels) { for (DictDataRespDTO d : dictMemberShipLevels) {
if (lang == LangEnum.ZH.getLang()){
dictMemberShipLevelMap.put(d.getValue(), d.getLabel()); dictMemberShipLevelMap.put(d.getValue(), d.getLabel());
}else if (lang == LangEnum.EN.getLang()){
dictMemberShipLevelMap.put(d.getValue(), d.getLabelEn());
}else {
dictMemberShipLevelMap.put(d.getValue(), d.getLabelFr());
}
} }
MemberUserLevelDetailsDO memberUserLevelDetailsDO = memberUserLevelDetailsMapper.selectOne(queryWrapper); MemberUserLevelDetailsDO memberUserLevelDetailsDO = memberUserLevelDetailsMapper.selectOne(queryWrapper);
if (memberUserLevelDetailsDO != null) { if (memberUserLevelDetailsDO != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment