| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <?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.goldenwater.dcproj.dao.GwSubProcessDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.GwSubProcess" id="gwSubProcessResultMap">
- <result property="id" column="ID"/>
- <result property="app" column="APP"/>
- <result property="localState" column="LOCAL_STATE"/>
- <result property="prvState" column="PRV_STATE"/>
- <result property="nextState" column="NEXT_STATE"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- APP,
- LOCAL_STATE,
- PRV_STATE,
- NEXT_STATE
- </sql>
- <sql id="entity_properties">
- #{id},
- #{app},
- #{localState},
- #{prvState},
- #{nextState}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="app != null and app != ''">and APP = #{app}</if>
- <if test="localState != null and localState != ''">and LOCAL_STATE = #{localState}</if>
- <if test="prvState != null and prvState != ''">and PRV_STATE = #{prvState}</if>
- <if test="nextState != null and nextState != ''">and NEXT_STATE = #{nextState}</if>
- </trim>
- </sql>
- <select id="get" resultMap="gwSubProcessResultMap" parameterType="String" >
- select <include refid="table_columns" /> from gw_sub_process where ID = #{id}
- </select>
- <select id="getBy" resultMap="gwSubProcessResultMap">
- select <include refid="table_columns" /> from gw_sub_process <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="gwSubProcessResultMap">
- select <include refid="table_columns" /> from gw_sub_process
- </select>
- <select id="findList" resultMap="gwSubProcessResultMap">
- select <include refid="table_columns" /> from gw_sub_process <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from gw_sub_process <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.GwSubProcess">
- insert into gw_sub_process( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from gw_sub_process where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.GwSubProcess">
- delete from gw_sub_process <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update gw_sub_process set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.GwSubProcess">
- update gw_sub_process
- <trim prefix="set" suffixOverrides=",">
- <if test="app != null and app != ''">APP = #{app},</if>
- <if test="localState != null and localState != ''">LOCAL_STATE = #{localState},</if>
- <if test="prvState != null and prvState != ''">PRV_STATE = #{prvState},</if>
- <if test="nextState != null and nextState != ''">NEXT_STATE = #{nextState},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.GwSubProcess">
- update gw_sub_process
- <trim prefix="set" suffixOverrides=",">
- <if test="app != null and app != ''">APP = #{app},</if>
- <if test="localState != null and localState != ''">LOCAL_STATE = #{localState},</if>
- <if test="prvState != null and prvState != ''">PRV_STATE = #{prvState},</if>
- <if test="nextState != null and nextState != ''">NEXT_STATE = #{nextState},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|