Commit 8e500612 authored by duanruiming's avatar duanruiming

[add] 诱导屏文字编辑功能-优化查询

parent e437e4b6
......@@ -31,10 +31,10 @@ public class InduceFontHistController {
@ApiOperation(value = "获取所有诱导文字下发记录", notes = "获取所有诱导文字下发记录",
response = JsonViewObject.class, produces = MediaType.APPLICATION_JSON)
@GetMapping(value = "/byAll", produces = MediaType.APPLICATION_JSON)
public JsonViewObject getAll() {
public JsonViewObject getAll(@RequestParam(defaultValue = "") String equipCode) {
JsonViewObject jsonViewObject = JsonViewObject.newInstance();
try {
List<InduceFontHist> list = induceFontHistService.getAll();
List<InduceFontHist> list = induceFontHistService.getAll(equipCode);
jsonViewObject.success(list);
} catch (Exception e) {
jsonViewObject.fail(I18nResourceBundle.getConstants("GET_FAILED_MSG"));
......
......@@ -14,7 +14,7 @@ public interface InduceFontHistService {
* 获取诱导屏所有文字下发记录
* @return
*/
List<InduceFontHist> getAll();
List<InduceFontHist> getAll(String equipCode);
/**
* 诱导屏文字编辑
......
......@@ -25,8 +25,13 @@ public class InduceFontHistServiceImpl implements InduceFontHistService {
private InduceFontHistMapper induceFontHistMapper;
@Override
public List<InduceFontHist> getAll() {
List<InduceFontHist> induceFontHists = induceFontHistMapper.selectList(new LambdaQueryWrapper<InduceFontHist>());
public List<InduceFontHist> getAll(String equipCode) {
LambdaQueryWrapper<InduceFontHist> queryWrapper = new LambdaQueryWrapper<>();
if (StringUtils.isNotBlank(equipCode)) {
queryWrapper.eq(InduceFontHist::getEquipCode, equipCode);
queryWrapper.orderByDesc(InduceFontHist::getGmtModified);
}
List<InduceFontHist> induceFontHists = induceFontHistMapper.selectList(queryWrapper);
return induceFontHists;
}
......
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