修改收藏英文翻译
This commit is contained in:
@@ -235,4 +235,12 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
List<DictModel> queryAllTableDictItems(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql);
|
||||
|
||||
Integer checkUsed(@Param("dictCode") String dictCode);
|
||||
|
||||
/**
|
||||
* 获取英文
|
||||
* @param code
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
String queryDictTextByKeyEn(@Param("code") String code,@Param("key") String key);
|
||||
}
|
||||
|
||||
@@ -207,4 +207,9 @@
|
||||
<select id="checkUsed" resultType="java.lang.Integer">
|
||||
select count(*) from laws_tag where dict_field = #{dictCode}
|
||||
</select>
|
||||
<select id="queryDictTextByKeyEn" resultType="java.lang.String">
|
||||
select s.en_name from sys_dict_item s
|
||||
where s.dict_id = (select id from sys_dict where dict_code = #{code} and del_flag = 0)
|
||||
and s.item_value = #{key} and del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -52,6 +52,8 @@ public interface ISysDictService extends IService<SysDict> {
|
||||
|
||||
public String queryDictTextByKey(String code, String key);
|
||||
|
||||
public String queryDictTextByKeyEn(String code, String key);
|
||||
|
||||
/**
|
||||
* 可通过多个字典code查询翻译文本
|
||||
* @param dictCodeList 多个字典code
|
||||
|
||||
+6
@@ -122,6 +122,12 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||
return sysDictMapper.queryDictTextByKey(code, key);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Cacheable(value = CacheConstant.SYS_DICT_CACHE_EN,key = "#code+':'+#key", unless = "#result == null ")
|
||||
public String queryDictTextByKeyEn(String code, String key) {
|
||||
return sysDictMapper.queryDictTextByKeyEn(code, key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<DictModel>> queryManyDictByKeys(List<String> dictCodeList, List<String> keys) {
|
||||
List<DictModelMany> list = sysDictMapper.queryManyDictByKeys(dictCodeList, keys);
|
||||
|
||||
Reference in New Issue
Block a user