Commit 8e500612 authored by duanruiming's avatar duanruiming

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

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