Commit 65031c8c authored by duanruiming's avatar duanruiming

[add] 诱导屏文字删除功能

parent ad7fe0ee
...@@ -77,4 +77,19 @@ public class InduceFontHistController { ...@@ -77,4 +77,19 @@ public class InduceFontHistController {
return jsonViewObject; return jsonViewObject;
} }
@ApiOperation(value = "通过字体id删除诱导屏字体信息", notes = "通过字体id删除诱导屏字体信息",
response = JsonViewObject.class, produces = MediaType.APPLICATION_JSON)
@GetMapping(value = "/deleteOneById", produces = MediaType.APPLICATION_JSON)
public JsonViewObject deleteOneById(@RequestParam("id") Integer id) {
JsonViewObject jsonViewObject = JsonViewObject.newInstance();
try {
induceFontHistService.deleteOneById(id);
jsonViewObject.success("删除成功");
} catch (Exception e) {
jsonViewObject.fail(I18nResourceBundle.getConstants("GET_FAILED_MSG"));
log.error("{} byLastOne error", this.getClass().getSimpleName(), e);
}
return jsonViewObject;
}
} }
...@@ -28,4 +28,11 @@ public interface InduceFontHistService { ...@@ -28,4 +28,11 @@ public interface InduceFontHistService {
* @return * @return
*/ */
InduceFontHist getLastOne(String equipCode); InduceFontHist getLastOne(String equipCode);
/**
* 通过id删除诱导屏文字信息
* @param id
* @return
*/
void deleteOneById(Integer id);
} }
...@@ -60,4 +60,13 @@ public class InduceFontHistServiceImpl implements InduceFontHistService { ...@@ -60,4 +60,13 @@ public class InduceFontHistServiceImpl implements InduceFontHistService {
} }
return null; return null;
} }
@Override
public void deleteOneById(Integer id) {
if (Objects.nonNull(id)) {
InduceFontHist hist = new InduceFontHist();
hist.setId(id.longValue());
induceFontHistMapper.deleteById(id);
}
}
} }
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