You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
backend/xymanager_dao/src/main/resources/mappers/RequestResultsDao.xml

96 lines
4.1 KiB
XML

<?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.shxy.xymanager_dao.dao.RequestResultsDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.RequestResults">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="term_id" jdbcType="INTEGER" property="termId"/>
<result column="request_type" jdbcType="TINYINT" property="requestType"/>
<result column="frame_no" jdbcType="TINYINT" property="frameNo"/>
<result column="client_id" jdbcType="TINYINT" property="clientId"/>
<result column="request_id" jdbcType="INTEGER" property="requestId"/>
<result column="result" jdbcType="TINYINT" property="result"/>
<result column="request_time" jdbcType="BIGINT" property="requestTime"/>
<result column="create_time" jdbcType="BIGINT" property="createTime"/>
<result column="data" jdbcType="LONGVARCHAR" property="data"/>
</resultMap>
<sql id="Base_Column_List">
id, term_id, request_type, frame_no, client_id, request_id, result, data,request_time,
create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
,
<include refid="Blob_Column_List"/>
from request_results
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByRequestId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from request_results
where request_id = #{requestId}
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.RequestResults">
update request_results
<set>
<if test="termId != null">
term_id = #{termId,jdbcType=INTEGER},
</if>
<if test="requestType != null">
request_type = #{requestType,jdbcType=TINYINT},
</if>
<if test="frameNo != null">
frame_no = #{frameNo,jdbcType=TINYINT},
</if>
<if test="clientId != null">
client_id = #{clientId,jdbcType=TINYINT},
</if>
<if test="requestId != null">
request_id = #{requestId,jdbcType=INTEGER},
</if>
<if test="result != null">
result = #{result,jdbcType=TINYINT},
</if>
<if test="requestTime != null">
request_time = #{requestTime,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="data != null">
data = #{data,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.shxy.xymanager_common.entity.RequestResults">
update request_results
set term_id = #{termId,jdbcType=INTEGER},
request_type = #{requestType,jdbcType=TINYINT},
frame_no = #{frameNo,jdbcType=TINYINT},
client_id = #{clientId,jdbcType=TINYINT},
request_id = #{requestId,jdbcType=INTEGER},
result = #{result,jdbcType=TINYINT},
request_time = #{requestTime,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=BIGINT},
data = #{data,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.RequestResults">
update request_results
set term_id = #{termId,jdbcType=INTEGER},
request_type = #{requestType,jdbcType=TINYINT},
frame_no = #{frameNo,jdbcType=TINYINT},
client_id = #{clientId,jdbcType=TINYINT},
request_id = #{requestId,jdbcType=INTEGER},
result = #{result,jdbcType=TINYINT},
request_time = #{requestTime,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>