王佳豪
2021-06-25 a94b59505d007ade59fa9d6d23b36ad29c76c6f1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?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.slcf.dao.SapRequestLogDao">
 
<!-- mapper不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 -->
<resultMap id="BaseResult" type="com.slcf.pojo.SapRequestLogBean">
    <result column="id" property="id"></result>
    <result column="matnr" property="matnr"></result>
    <result column="request" property="request"></result>
    <result column="response" property="response"></result>
    <result column="create_time" property="create_time"></result>
    <result column="remark" property="remark"></result>
    <result column="type" property="type"></result>
</resultMap>
 
<select id="querySapLog" resultMap="BaseResult">
    SELECT * FROM sap_request_log ORDER BY create_time desc;
</select>
 
<insert id="addSapLog">
    INSERT INTO sap_request_log(matnr, request, response, create_time, type, remark) VALUES (#{matnr}, #{request}, #{response}, #{create_time}, #{type}, #{remark})
</insert>
 
 
</mapper>