<?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.mcs.pre.dao.MmPredictInfluenceFactorResultDao">
|
|
<insert id="insertOrUpdate" parameterType="com.iailab.module.model.mcs.pre.entity.MmPredictInfluenceFactorResultEntity">
|
INSERT INTO t_mm_predict_influence_factor_result (factor_id, time, value)
|
VALUES
|
<foreach collection="list" item="item" separator=",">
|
(#{item.factorId},#{item.time},#{item.value})
|
</foreach>
|
ON DUPLICATE KEY UPDATE
|
value = VALUES(value);
|
</insert>
|
<select id="getResultList" resultType="com.iailab.module.model.mcs.pre.vo.MmPredictInfluenceFactorResultVO"
|
parameterType="com.iailab.module.model.mcs.pre.vo.MmPredictInfluenceFactorResultListReqVO">
|
SELECT
|
t1.output_id,
|
t1.pattern,
|
t3.result_name factor_output_name,
|
t4.time,
|
t4.value
|
FROM
|
t_mm_predict_influence_factor_config t1
|
LEFT JOIN t_mm_predict_influence_factor t2 ON t1.id = t2.config_id
|
LEFT JOIN t_mm_item_output t3 ON t2.factor_output_id = t3.id
|
LEFT JOIN t_mm_predict_influence_factor_result t4 ON t4.factor_id = t2.id
|
WHERE
|
t1.is_enable = 1
|
and t1.output_id IN
|
<foreach collection="outIds" item="item" open="(" close=")" separator=",">
|
#{item}
|
</foreach>
|
<if test="startTime != null">
|
AND t4.time >= #{startTime}
|
</if>
|
<if test="endTime != null">
|
AND t4.time <= #{endTime}
|
</if>
|
</select>
|
</mapper>
|