|
|
@@ -0,0 +1,155 @@
|
|
|
+<?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.jjt.biz.mapper.RipaAlgoMapper">
|
|
|
+
|
|
|
+ <resultMap type="RipaAlgo" id="RipaAlgoResult">
|
|
|
+ <result property="algoId" column="ALGO_ID"/>
|
|
|
+ <result property="algoName" column="ALGO_NAME"/>
|
|
|
+ <result property="algoDesc" column="ALGO_DESC"/>
|
|
|
+ <result property="algoScript" column="ALGO_SCRIPT"/>
|
|
|
+ <result property="algoOk" column="ALGO_OK"/>
|
|
|
+ <result property="algoType" column="ALGO_TYPE"/>
|
|
|
+ <result property="algoPara" column="ALGO_PARA"/>
|
|
|
+ <result property="createBy" column="CREATE_BY"/>
|
|
|
+ <result property="createTime" column="CREATE_TIME"/>
|
|
|
+ <result property="updateBy" column="UPDATE_BY"/>
|
|
|
+ <result property="updateTime" column="UPDATE_TIME"/>
|
|
|
+ <result property="remark" column="REMARK"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectRipaAlgoVo">
|
|
|
+ select ALGO_ID, ALGO_NAME, ALGO_DESC, ALGO_SCRIPT, ALGO_OK, ALGO_TYPE, ALGO_PARA, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK
|
|
|
+ from ripa_algo
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectRipaAlgoList" parameterType="RipaAlgo" resultMap="RipaAlgoResult">
|
|
|
+ <include refid="selectRipaAlgoVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="algoName != null and algoName != ''">
|
|
|
+ and ALGO_NAME like concat('%', #{algoName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="algoDesc != null and algoDesc != ''">
|
|
|
+ and ALGO_DESC = #{algoDesc}
|
|
|
+ </if>
|
|
|
+ <if test="algoType != null and algoType != ''">
|
|
|
+ and ALGO_TYPE = #{algoType}
|
|
|
+ </if>
|
|
|
+ <if test="algoPara != null and algoPara != ''">
|
|
|
+ and ALGO_PARA = #{algoPara}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectRipaAlgoByAlgoId" parameterType="Long"
|
|
|
+ resultMap="RipaAlgoResult">
|
|
|
+ <include refid="selectRipaAlgoVo"/>
|
|
|
+ where ALGO_ID = #{algoId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertRipaAlgo" parameterType="RipaAlgo" useGeneratedKeys="true"
|
|
|
+ keyProperty="algoId">
|
|
|
+ insert into ripa_algo
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="algoName != null">ALGO_NAME,
|
|
|
+ </if>
|
|
|
+ <if test="algoDesc != null">ALGO_DESC,
|
|
|
+ </if>
|
|
|
+ <if test="algoScript != null">ALGO_SCRIPT,
|
|
|
+ </if>
|
|
|
+ <if test="algoOk != null">ALGO_OK,
|
|
|
+ </if>
|
|
|
+ <if test="algoType != null">ALGO_TYPE,
|
|
|
+ </if>
|
|
|
+ <if test="algoPara != null">ALGO_PARA,
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">CREATE_BY,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">CREATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">UPDATE_BY,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">UPDATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">REMARK,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="algoName != null">#{algoName},
|
|
|
+ </if>
|
|
|
+ <if test="algoDesc != null">#{algoDesc},
|
|
|
+ </if>
|
|
|
+ <if test="algoScript != null">#{algoScript},
|
|
|
+ </if>
|
|
|
+ <if test="algoOk != null">#{algoOk},
|
|
|
+ </if>
|
|
|
+ <if test="algoType != null">#{algoType},
|
|
|
+ </if>
|
|
|
+ <if test="algoPara != null">#{algoPara},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">#{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">#{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">#{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">#{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">#{remark},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateRipaAlgo" parameterType="RipaAlgo">
|
|
|
+ update ripa_algo
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="algoName != null">ALGO_NAME =
|
|
|
+ #{algoName},
|
|
|
+ </if>
|
|
|
+ <if test="algoDesc != null">ALGO_DESC =
|
|
|
+ #{algoDesc},
|
|
|
+ </if>
|
|
|
+ <if test="algoScript != null">ALGO_SCRIPT =
|
|
|
+ #{algoScript},
|
|
|
+ </if>
|
|
|
+ <if test="algoOk != null">ALGO_OK =
|
|
|
+ #{algoOk},
|
|
|
+ </if>
|
|
|
+ <if test="algoType != null">ALGO_TYPE =
|
|
|
+ #{algoType},
|
|
|
+ </if>
|
|
|
+ <if test="algoPara != null">ALGO_PARA =
|
|
|
+ #{algoPara},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">CREATE_BY =
|
|
|
+ #{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">CREATE_TIME =
|
|
|
+ #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">UPDATE_BY =
|
|
|
+ #{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">UPDATE_TIME =
|
|
|
+ #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">REMARK =
|
|
|
+ #{remark},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ where ALGO_ID = #{algoId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteRipaAlgoByAlgoId" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from ripa_algo where ALGO_ID = #{algoId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteRipaAlgoByAlgoIds" parameterType="String">
|
|
|
+ delete from ripa_algo where ALGO_ID in
|
|
|
+ <foreach item="algoId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{algoId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|