| | |
| | | PageResult<StAlarmAndSuggestRespVO> page = mcsApi.getAlarmAndSuggestPage(reqVO); |
| | | return success(BeanUtils.toBean(page, StAlarmAndSuggestRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/chart/param/list") |
| | | @Operation(summary = "图表配置列表") |
| | | public CommonResult<List<ChartParamDTO>> getChartParamList(@RequestParam("chartCode") String chartCode) { |
| | | List<ChartParamDTO> chartParamList = mcsApi.getChartParamList(chartCode); |
| | | return CommonResult.success(chartParamList); |
| | | } |
| | | } |
| | |
| | | import com.iailab.framework.tenant.core.db.dynamic.TenantDS; |
| | | import com.iailab.module.model.mpk.entity.ChartParamEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: |
| | |
| | | @Mapper |
| | | public interface ChartParamDao extends BaseDao<ChartParamEntity> { |
| | | |
| | | List<ChartParamEntity> selectChartParamByChartCode(@Param("chartCode") String chartCode); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<ChartParamDTO> list(String chartCode) { |
| | | List<ChartParamEntity> list = baseDao.selectList(new QueryWrapper<ChartParamEntity>().eq("chart_code", chartCode)); |
| | | List<ChartParamEntity> list = baseDao.selectChartParamByChartCode(chartCode); |
| | | return ConvertUtils.sourceToTarget(list,ChartParamDTO.class); |
| | | } |
| | | |
对比新文件 |
| | |
| | | <?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.iailab.module.model.mpk.dao.ChartParamDao"> |
| | | <select id="selectChartParamByChartCode" resultType="com.iailab.module.model.mpk.entity.ChartParamEntity" |
| | | parameterType="java.lang.String"> |
| | | SELECT |
| | | t2.* |
| | | FROM |
| | | t_chart t1 |
| | | LEFT JOIN t_chart_param t2 ON t1.id = t2.chart_id |
| | | WHERE |
| | | t1.chart_code = #{chartCode} |
| | | </select> |
| | | </mapper> |