| | |
| | | @ResponseBody |
| | | @LogSave(operationType = "油烟模块", contain = "监测报警统计&运维情况报表") |
| | | public CommonResult<String> getDetectorDailyStatsDocument(@RequestParam(value = "field", required = false) String field, |
| | | @RequestParam(value = "mn", required = false) String mn) { |
| | | OdsLocaleDocument odsLocaleDocument = documentService.getByLocaleId(mn); |
| | | @RequestParam(value = "localeId", required = false) String localeId) { |
| | | OdsLocaleDocument odsLocaleDocument = documentService.getByLocaleId(localeId); |
| | | String value = getFieldValueByFieldName(field, odsLocaleDocument); |
| | | return CommonResult.success(value); |
| | | } |
| | |
| | | |
| | | void saveByLocaleId(OdsLocaleDocument document); |
| | | |
| | | OdsLocaleDocument getByLocaleId(String mn); |
| | | OdsLocaleDocument getByLocaleId(String localeId); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public OdsLocaleDocument getByLocaleId(String mn) { |
| | | public OdsLocaleDocument getByLocaleId(String localeId) { |
| | | LambdaQueryWrapper<OdsLocaleDocument> queryWrapper = new LambdaQueryWrapper<OdsLocaleDocument>() |
| | | .eq(OdsLocaleDocument::getMn, mn); |
| | | .eq(OdsLocaleDocument::getLocaleId, localeId); |
| | | return this.getOne(queryWrapper); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.smoke.mapper.OdsStatisticsMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.entity.smoke.OdsStatistics"> |
| | | <id column="id" property="id" /> |
| | | <result column="type_name" property="typeName" /> |
| | | <result column="content" property="content" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, type_name, content |
| | | </sql> |
| | | |
| | | </mapper> |