| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?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.ruoyi.wisdomarbitrate.mapper.template.TemplateFatchRuleMapper">
-
- <resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.vo.template.TemplateFatchRule" >
- <result column="id" property="id" />
- <result column="template_id" property="templateId" />
- <result column="fatch_rule_id" property="fatchRuleId" />
- </resultMap>
-
- <select id="selectTemplateFatchRulecount" parameterType="com.ruoyi.wisdomarbitrate.domain.vo.template.TemplateFatchRule" resultType="Integer">
- select count(1) from ms_template_fatch_rule t
- <where>
- <if test="templateId != null">
- AND t.template_id = #{templateId}
- </if>
- </where>
- </select>
-
- <select id="selectTemplateFatchRuleList" parameterType="com.ruoyi.wisdomarbitrate.domain.vo.template.TemplateFatchRule" resultMap="BaseResultMap">
- SELECT t.id ,t.template_id ,t.fatch_rule_id
- from ms_template_fatch_rule t
- <where>
- <if test="templateId != null">
- AND t.template_id = #{templateId}
- </if>
- </where>
-
-
- </select>
-
- <delete id="deleteTemplateFatchRule" parameterType="Long">
- delete from ms_template_fatch_rule where template_id=#{id}
- </delete>
-
- <insert id="insertTemplateFatchRule" parameterType="com.ruoyi.wisdomarbitrate.domain.vo.template.TemplateFatchRule" useGeneratedKeys="true" keyProperty="id">
- insert into ms_template_fatch_rule(
- <if test="templateId != null">template_id,</if>
- <if test="fatchRuleId != null">fatch_rule_id</if>
- )values(
- <if test="templateId != null">#{templateId},</if>
- <if test="fatchRuleId != null">#{fatchRuleId}</if>
- )
- </insert>
-
-
- </mapper>
|