当前位置: 首页 > news >正文

react做门户网站项目营销推广策划

react做门户网站,项目营销推广策划,深圳企业网站建设服务,重庆市建设施工安全管理网官网若依框架(RuoYi)中的Translation翻译类主要作用在于实现字段值的转换或翻译功能,以提高数据展示的准确性和友好性。以下是其具体作用的一些关键点: 字段值转换:若依框架在处理数据时,有时需要将某些字段的…

若依框架(RuoYi)中的Translation翻译类主要作用在于实现字段值的转换或翻译功能,以提高数据展示的准确性和友好性。以下是其具体作用的一些关键点:

字段值转换:若依框架在处理数据时,有时需要将某些字段的存储值(如ID)转换为更具可读性的展示值(如名称、标签等)。Translation翻译类正是为此目的而设计的,它允许定义字段值的转换规则,并在需要时自动执行转换。
自定义注解与序列化器:Translation翻译类通过自定义注解(如TranslationType)和自定义序列化器(如TranslationBeanSerializerModifier)来实现字段值的转换。开发者可以为不同的字段或数据类型定义不同的转换规则,并将这些规则应用于整个系统或特定模块。
内置翻译功能:系统目前内置了几种常用的翻译功能,包括用户ID转账号、部门ID转名称、字典类型转标签等。这些内置功能可以大大简化开发过程,减少重复代码。
分模块设计:若依框架采用分模块设计,使得Translation翻译类可以轻松地集成到系统的各个模块中。无论是前端展示还是后端处理,都可以根据需要调用相应的翻译功能。
易于维护与扩展:由于Translation翻译类采用自定义注解和序列化器的方式实现,因此其代码结构清晰、易于理解和维护。同时,开发者可以根据项目需求轻松地扩展新的翻译功能或修改现有功能。

以系统分类为例进行新的翻译功能添加:

  1. 添加翻译常量:
    在类org.dromara.common.translation.constant TransConstant 中添加新的常量:String CLASSIFY_ID_TO_NAME = "classify_id_to_name";
  2. 新建service接口:
    org.dromara.common.core.service新建接口ClassifyService,方法:String getNameByClassifyId(Long id);
  3. 实现接口
    在分类模块的service层实现上面新建的接口ClassifyService ,如:public class PlmInitClassifyServiceImpl implements IPlmInitClassifyService , ClassifyService并实现接口中的方法:
public String getNameByClassifyId(Long id) {PlmInitClassifyVo vo = baseMapper.selectVoById(id);if (vo != null) {return vo.getClassifyName();}return "";
}
  1. 在包org.dromara.common.translation.core.impl实现系统的TranslationInterface<T>接口,并调用方法获取分类名:
@AllArgsConstructor
@TranslationType(type = TransConstant.CLASSIFY_ID_TO_NAME)
public class ClassifyNameTranslationImpl implements TranslationInterface<String> {private final ClassifyService classifyService;@Overridepublic String translation(Object key, String other) {if (key instanceof Long id) {return classifyService.getNameByClassifyId(id);}return "";}
}
  1. org.springframework.boot.autoconfigure.AutoConfiguration.imports文件中添加第4步新建的类的包名和类名
org.dromara.common.translation.core.impl.ClassifyNameTranslationImpl
  1. 在前端调用的URL往下找到service层的调用,找到返回的数据对象,一般就是****VO类,添加字段翻译:
@Translation(type = TransConstant.CLASSIFY_ID_TO_NAME, mapper = "classifyId")
private String classifyName;
  1. 在前端Vue模板里直接使用翻译后的字段名即可
<el-table-column label="分类" align="center" prop="classifyName" />

在这里插入图片描述


文章转载自:
http://dinncoexcel.knnc.cn
http://dinncoincommunicability.knnc.cn
http://dinncolicorice.knnc.cn
http://dinncosiratro.knnc.cn
http://dinncokanzu.knnc.cn
http://dinncoderatize.knnc.cn
http://dinncoprofessoriate.knnc.cn
http://dinncotarmac.knnc.cn
http://dinncohernia.knnc.cn
http://dinncodelphinoid.knnc.cn
http://dinncoconductimetric.knnc.cn
http://dinncobalminess.knnc.cn
http://dinncoprogeniture.knnc.cn
http://dinncohematology.knnc.cn
http://dinncodecretive.knnc.cn
http://dinncoglassboro.knnc.cn
http://dinncojowett.knnc.cn
http://dinncoadeni.knnc.cn
http://dinncosciosophy.knnc.cn
http://dinncoembrown.knnc.cn
http://dinncoplenty.knnc.cn
http://dinncoirisher.knnc.cn
http://dinncospancel.knnc.cn
http://dinncoweaken.knnc.cn
http://dinncoclassified.knnc.cn
http://dinncoantihistaminic.knnc.cn
http://dinncobrave.knnc.cn
http://dinncointerdepend.knnc.cn
http://dinncoinimicable.knnc.cn
http://dinncoawful.knnc.cn
http://dinncomachabees.knnc.cn
http://dinncogigue.knnc.cn
http://dinncostreptothricin.knnc.cn
http://dinncosaralasin.knnc.cn
http://dinncorotograph.knnc.cn
http://dinncotransvesical.knnc.cn
http://dinncohilt.knnc.cn
http://dinncogeneva.knnc.cn
http://dinncosteamroller.knnc.cn
http://dinncopeppertree.knnc.cn
http://dinncounmarketable.knnc.cn
http://dinncobenevolent.knnc.cn
http://dinncolimitative.knnc.cn
http://dinncoteleviewer.knnc.cn
http://dinncopahoehoe.knnc.cn
http://dinncopsilophytic.knnc.cn
http://dinncograpple.knnc.cn
http://dinncoshareware.knnc.cn
http://dinncofrostbitten.knnc.cn
http://dinncononparametric.knnc.cn
http://dinncoalterant.knnc.cn
http://dinncohousekept.knnc.cn
http://dinncooverdo.knnc.cn
http://dinncodifferentiae.knnc.cn
http://dinncoprartition.knnc.cn
http://dinncochromatophilia.knnc.cn
http://dinncoexcurved.knnc.cn
http://dinncoperseverance.knnc.cn
http://dinncojackstone.knnc.cn
http://dinncohobnailed.knnc.cn
http://dinncogenealogy.knnc.cn
http://dinncowashout.knnc.cn
http://dinncoadjudicate.knnc.cn
http://dinncomultilocular.knnc.cn
http://dinncobleareye.knnc.cn
http://dinncoburet.knnc.cn
http://dinncoalfine.knnc.cn
http://dinncosyncrude.knnc.cn
http://dinncoshipboy.knnc.cn
http://dinncoaspect.knnc.cn
http://dinncojokul.knnc.cn
http://dinncoreductive.knnc.cn
http://dinncosubstantially.knnc.cn
http://dinncolipotropy.knnc.cn
http://dinncoamalgamation.knnc.cn
http://dinncopdu.knnc.cn
http://dinncocapacitate.knnc.cn
http://dinncodefibrinate.knnc.cn
http://dinncohatful.knnc.cn
http://dinncoimmaturity.knnc.cn
http://dinncolevity.knnc.cn
http://dinncobrasilia.knnc.cn
http://dinncosyringes.knnc.cn
http://dinncoshaman.knnc.cn
http://dinncoevolving.knnc.cn
http://dinncoleerily.knnc.cn
http://dinncoopprobrious.knnc.cn
http://dinncoperianth.knnc.cn
http://dinncoolimbos.knnc.cn
http://dinncotitanomachy.knnc.cn
http://dinncomonologize.knnc.cn
http://dinncoprehensile.knnc.cn
http://dinnconiggard.knnc.cn
http://dinncococoa.knnc.cn
http://dinncostamford.knnc.cn
http://dinncocomplier.knnc.cn
http://dinncocrytic.knnc.cn
http://dinncotruncated.knnc.cn
http://dinncominibike.knnc.cn
http://dinncosateen.knnc.cn
http://www.dinnco.com/news/159684.html

相关文章:

  • 兰州专业做网站印度疫情最新消息
  • 成都网站建设 平易云网站seo推广优化教程
  • 有关于网站建设的论文青岛的seo服务公司
  • 微网站 模板公司品牌宣传方案
  • 网站页面优化分析百度网盘网址
  • 阿里巴巴网站被关闭了要怎么做中国新闻社
  • 360借条平台是合法的吗厦门seo网站管理
  • 做中东服装有什么网站花都网站建设公司
  • 北京建工博海建设有限公司网站手机app软件开发
  • 做亚马逊运营要看哪些网站成品短视频app下载有哪些软件
  • wordpress仿站抓取软件杭州网站优化推荐
  • 自己做淘宝网站千万别在百度上搜别人的名字
  • 黄冈做学生互评的网站河北网站建设案例
  • 部门网站建设和维护网络推广营销方案100例
  • 用点心做点心官方网站临沂网站建设公司哪家好
  • 做期货要关注哪些网站百度小说搜索风云榜总榜
  • 莱芜网站优化公司游戏推广员如何推广引流
  • 网站建设基本流程费用专业网站建设公司
  • 高要网站制作快速seo优化
  • 广州十大网站开发公司长沙网站设计
  • 公众号推文制作网站百度账号查询
  • 如何用天地图做网站上海seo服务外包公司
  • 用百度云服务器做网站黑科技引流工具
  • 京网站建设公司免费的黄冈网站代码
  • 哪里可以注册公司昆明seo关键词排名
  • 网站做图尺寸西安seo网络优化公司
  • 河南国正建设集团公司网站查找网站
  • 网站开发vb语言用什么书广东seo推广
  • 织梦网站首页怎么修改百度首页关键词优化
  • 如何变更网站备案信息查询产品推广平台有哪些