新增按照编码查询
This commit is contained in:
parent
80c0b28ceb
commit
258a425d45
@ -135,4 +135,14 @@ public class DataDictionaryController extends AbstractController {
|
||||
return dataDictionaryService.listZTreeDictionary(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "字典列表(通过字典编码)", notes = "字典列表(通过字典编码)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "dictionaryCode", value = "字典编码", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listdictionarybydictionarycode/{dictionaryCode}")
|
||||
public List<DataDictionaryDTO> listDictionaryByDictionaryCode(@PathVariable("dictionaryCode") String dictionaryCode) {
|
||||
return dataDictionaryService.listDictionaryByDictionaryCode(dictionaryCode);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -148,5 +148,12 @@ public interface IDataDictionaryService {
|
||||
*/
|
||||
List<ZTreeDTO> listZTreeDictionary(Map<String, Object> params) throws SearchException;
|
||||
|
||||
|
||||
/**
|
||||
* 字典列表(通过字典编码)
|
||||
*
|
||||
* @param dictionaryCode
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<DataDictionaryDTO> listDictionaryByDictionaryCode(String dictionaryCode) throws SearchException;
|
||||
}
|
||||
|
@ -170,6 +170,13 @@ public class DataDictionaryServiceImpl extends AbstractService implements IDataD
|
||||
return zTreeDTOs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataDictionaryDTO> listDictionaryByDictionaryCode(String dictionaryCode) throws SearchException {
|
||||
Map<String, Object> params = getHashMap(1);
|
||||
params.put("dictionaryCode", dictionaryCode);
|
||||
return dictionaryDao.listDictionary(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归查询子组
|
||||
*
|
||||
|
@ -104,7 +104,12 @@
|
||||
<!-- 字典列表 -->
|
||||
<select id="listDictionary" parameterType="map" resultMap="dictionaryDTO">
|
||||
SELECT
|
||||
*
|
||||
dictionary_id,
|
||||
dictionary_parent_id,
|
||||
dictionary_name,
|
||||
dictionary_summary,
|
||||
dictionary_code,
|
||||
dictionary_sort
|
||||
FROM
|
||||
data_dictionary
|
||||
WHERE
|
||||
@ -121,10 +126,14 @@
|
||||
AND
|
||||
LEFT(gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="dictionaryCode != null and dictionaryCode != ''">
|
||||
AND
|
||||
dictionary_code LIKE CONCAT(#{dictionaryCode}, '%')
|
||||
</if>
|
||||
<if test="dictionaryIds != null and dictionaryIds.size > 0">
|
||||
AND
|
||||
dictionary_id IN
|
||||
|
Loading…
Reference in New Issue
Block a user