| File was renamed from ard-route/src/main/resources/mapper/ArdRouteGroupingMapper.xml |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ard.route.mapper.ArdRouteGroupingMapper"> |
| | | <mapper namespace="com.ard.route.mapper.ArdRouteGroupMapper"> |
| | | |
| | | <resultMap type="ArdRouteGrouping" id="ArdRouteGroupingResult"> |
| | | <resultMap type="ArdRouteGroup" id="ArdRouteGroupResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="groupingName" column="grouping_name" /> |
| | | <result property="serialNumber" column="serial_number" /> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdRouteGroupingVo"> |
| | | <sql id="selectArdRouteGroupVo"> |
| | | select id, |
| | | grouping_name, |
| | | serial_number, |
| | |
| | | from ard_route_grouping |
| | | </sql> |
| | | |
| | | <select id="selectArdRouteGroupingList" parameterType="ArdRouteGrouping" resultMap="ArdRouteGroupingResult"> |
| | | <include refid="selectArdRouteGroupingVo"/> |
| | | <select id="selectArdRouteGroupList" parameterType="ArdRouteGroup" resultMap="ArdRouteGroupResult"> |
| | | <include refid="selectArdRouteGroupVo"/> |
| | | <where> |
| | | <if test="groupingName != null and groupingName != ''"> and grouping_name like concat('%', #{groupingName}, '%')</if> |
| | | <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if> |
| | |
| | | order by serial_number asc |
| | | </select> |
| | | |
| | | <select id="selectArdRouteGroupingById" parameterType="String" resultMap="ArdRouteGroupingResult"> |
| | | <include refid="selectArdRouteGroupingVo"/> |
| | | <select id="selectArdRouteGroupById" parameterType="String" resultMap="ArdRouteGroupResult"> |
| | | <include refid="selectArdRouteGroupVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertArdRouteGrouping" parameterType="ArdRouteGrouping"> |
| | | <insert id="insertArdRouteGroup" parameterType="ArdRouteGroup"> |
| | | insert into ard_route_grouping |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateArdRouteGrouping" parameterType="ArdRouteGrouping"> |
| | | <update id="updateArdRouteGroup" parameterType="ArdRouteGroup"> |
| | | update ard_route_grouping |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="groupingName != null">grouping_name = #{groupingName},</if> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdRouteGroupingById" parameterType="String"> |
| | | <delete id="deleteArdRouteGroupById" parameterType="String"> |
| | | delete from ard_route_grouping where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdRouteGroupingByIds" parameterType="String"> |
| | | <delete id="deleteArdRouteGroupByIds" parameterType="String"> |
| | | delete from ard_route_grouping where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |