102 lines
3.2 KiB
XML
102 lines
3.2 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="cn.com.tenlion.operator.daoother.operator.callback.ISysCallbackDao">
|
|
|
|
<resultMap id="sysCallbackPO" type="cn.com.tenlion.operator.pojo.pos.callback.SysCallbackPO">
|
|
<id column="callback_id" property="callbackId"/>
|
|
<result column="name" property="name"/>
|
|
<result column="url" property="url"/>
|
|
<result column="json_body" property="jsonBody"/>
|
|
<result column="status" property="status"/>
|
|
<result column="fail_count" property="failCount"/>
|
|
<result column="gmt_create" property="gmtCreate"/>
|
|
<result column="creator" property="creator"/>
|
|
<result column="gmt_modified" property="gmtModified"/>
|
|
<result column="modifier" property="modifier"/>
|
|
<result column="is_delete" property="isDelete"/>
|
|
</resultMap>
|
|
|
|
<insert id="save" parameterType="map">
|
|
INSERT INTO
|
|
sys_callback
|
|
(callback_id, name, url, json_body, status, fail_count, gmt_create, creator, gmt_modified, modifier, is_delete)
|
|
VALUES
|
|
(#{callbackId}, #{name}, #{url}, #{jsonBody}, #{status}, #{failCount}, #{gmtCreate}, #{creator}, #{gmtModified}, #{modifier}, #{isDelete})
|
|
</insert>
|
|
|
|
<update id="update" parameterType="map">
|
|
UPDATE sys_callback
|
|
SET
|
|
<if test="name != null">
|
|
name = #{name},
|
|
</if>
|
|
<if test="url != null">
|
|
url = #{url},
|
|
</if>
|
|
<if test="jsonBody != null">
|
|
json_body = #{jsonBody},
|
|
</if>
|
|
<if test="status != null">
|
|
status = #{status},
|
|
</if>
|
|
<if test="failCount!= null">
|
|
fail_count = #{failCount},
|
|
</if>
|
|
gmt_modified = #{gmtModified},
|
|
modifier = #{modifier}
|
|
WHERE
|
|
callback_id = #{callbackId}
|
|
</update>
|
|
|
|
<select id="getPO" parameterType="map" resultMap="sysCallbackPO">
|
|
SELECT
|
|
callback_id,
|
|
name,
|
|
url,
|
|
json_body,
|
|
status,
|
|
fail_count,
|
|
gmt_create,
|
|
creator,
|
|
gmt_modified,
|
|
modifier,
|
|
is_delete
|
|
FROM
|
|
sys_callback
|
|
WHERE
|
|
is_delete = 0
|
|
AND
|
|
callback_id = #{callbackId}
|
|
</select>
|
|
|
|
<select id="listPO" parameterType="map" resultMap="sysCallbackPO">
|
|
SELECT
|
|
callback_id,
|
|
name,
|
|
url,
|
|
json_body,
|
|
status,
|
|
fail_count,
|
|
gmt_create,
|
|
creator,
|
|
gmt_modified,
|
|
modifier,
|
|
is_delete
|
|
FROM
|
|
sys_callback
|
|
WHERE
|
|
is_delete = 0
|
|
<if test="callbackIds != null and callbackIds.size > 0">
|
|
AND
|
|
callback_id IN
|
|
<foreach collection="callbackIds" item="callbackId" index="index" open="(" close=")" separator=",">
|
|
#{callbackId}
|
|
</foreach>
|
|
</if>
|
|
<if test="status != null and status != ''">
|
|
AND
|
|
status = #{status}
|
|
</if>
|
|
</select>
|
|
|
|
</mapper> |