123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496 |
- <?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.idea.oa.flow2.mapper.FlowMainMapper">
- <resultMap id="BaseResultMap" type="com.idea.oa.flow2.model.FlowMain">
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="apply_theme" jdbcType="VARCHAR" property="applyTheme" />
- <result column="form_id" jdbcType="VARCHAR" property="formId" />
- <result column="apply_user" jdbcType="VARCHAR" property="applyUser" />
- <result column="dept_id" jdbcType="VARCHAR" property="deptId" />
- <result column="flow_result" jdbcType="INTEGER" property="flowResult" />
- <result column="flow_status" jdbcType="INTEGER" property="flowStatus" />
- <result column="cc_list" jdbcType="VARCHAR" property="ccList" />
- <result column="flow_name" jdbcType="VARCHAR" property="flowName" />
- <result column="flow_type" jdbcType="VARCHAR" property="flowType" />
- <result column="flow_post" jdbcType="VARCHAR" property="flowPost" />
- <result column="flow_id" jdbcType="VARCHAR" property="flowId" />
- <result column="task_id" jdbcType="VARCHAR" property="taskId" />
- <result column="return_status" jdbcType="INTEGER" property="returnStatus" />
- <result column="last_main_log_id" jdbcType="VARCHAR" property="lastMainLogId" />
- <result column="condition_map" jdbcType="VARCHAR" property="conditionMap" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
- <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
- <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
- <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
- <result column="group_id" jdbcType="VARCHAR" property="groupId" />
- <result column="remark" jdbcType="VARCHAR" property="remark" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- id, apply_theme, form_id, apply_user, dept_id, flow_result, flow_status, cc_list,
- flow_name, flow_type, flow_post, flow_id, task_id, return_status, last_main_log_id,
- condition_map, status, created_by, created_at, updated_by, updated_at, group_id,
- remark
- </sql>
- <select id="selectByExample" parameterType="com.idea.oa.flow2.model.FlowMainExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from flow_main
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from flow_main
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from flow_main
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.idea.oa.flow2.model.FlowMainExample">
- delete from flow_main
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.idea.oa.flow2.model.FlowMain">
- insert into flow_main (id, apply_theme, form_id,
- apply_user, dept_id, flow_result,
- flow_status, cc_list, flow_name,
- flow_type, flow_post, flow_id,
- task_id, return_status, last_main_log_id,
- condition_map, status, created_by,
- created_at, updated_by, updated_at,
- group_id, remark)
- values (#{id,jdbcType=VARCHAR}, #{applyTheme,jdbcType=VARCHAR}, #{formId,jdbcType=VARCHAR},
- #{applyUser,jdbcType=VARCHAR}, #{deptId,jdbcType=VARCHAR}, #{flowResult,jdbcType=INTEGER},
- #{flowStatus,jdbcType=INTEGER}, #{ccList,jdbcType=VARCHAR}, #{flowName,jdbcType=VARCHAR},
- #{flowType,jdbcType=VARCHAR}, #{flowPost,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR},
- #{taskId,jdbcType=VARCHAR}, #{returnStatus,jdbcType=INTEGER}, #{lastMainLogId,jdbcType=VARCHAR},
- #{conditionMap,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createdBy,jdbcType=VARCHAR},
- #{createdAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
- #{groupId,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.idea.oa.flow2.model.FlowMain">
- insert into flow_main
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="applyTheme != null">
- apply_theme,
- </if>
- <if test="formId != null">
- form_id,
- </if>
- <if test="applyUser != null">
- apply_user,
- </if>
- <if test="deptId != null">
- dept_id,
- </if>
- <if test="flowResult != null">
- flow_result,
- </if>
- <if test="flowStatus != null">
- flow_status,
- </if>
- <if test="ccList != null">
- cc_list,
- </if>
- <if test="flowName != null">
- flow_name,
- </if>
- <if test="flowType != null">
- flow_type,
- </if>
- <if test="flowPost != null">
- flow_post,
- </if>
- <if test="flowId != null">
- flow_id,
- </if>
- <if test="taskId != null">
- task_id,
- </if>
- <if test="returnStatus != null">
- return_status,
- </if>
- <if test="lastMainLogId != null">
- last_main_log_id,
- </if>
- <if test="conditionMap != null">
- condition_map,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="createdBy != null">
- created_by,
- </if>
- <if test="createdAt != null">
- created_at,
- </if>
- <if test="updatedBy != null">
- updated_by,
- </if>
- <if test="updatedAt != null">
- updated_at,
- </if>
- <if test="groupId != null">
- group_id,
- </if>
- <if test="remark != null">
- remark,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="applyTheme != null">
- #{applyTheme,jdbcType=VARCHAR},
- </if>
- <if test="formId != null">
- #{formId,jdbcType=VARCHAR},
- </if>
- <if test="applyUser != null">
- #{applyUser,jdbcType=VARCHAR},
- </if>
- <if test="deptId != null">
- #{deptId,jdbcType=VARCHAR},
- </if>
- <if test="flowResult != null">
- #{flowResult,jdbcType=INTEGER},
- </if>
- <if test="flowStatus != null">
- #{flowStatus,jdbcType=INTEGER},
- </if>
- <if test="ccList != null">
- #{ccList,jdbcType=VARCHAR},
- </if>
- <if test="flowName != null">
- #{flowName,jdbcType=VARCHAR},
- </if>
- <if test="flowType != null">
- #{flowType,jdbcType=VARCHAR},
- </if>
- <if test="flowPost != null">
- #{flowPost,jdbcType=VARCHAR},
- </if>
- <if test="flowId != null">
- #{flowId,jdbcType=VARCHAR},
- </if>
- <if test="taskId != null">
- #{taskId,jdbcType=VARCHAR},
- </if>
- <if test="returnStatus != null">
- #{returnStatus,jdbcType=INTEGER},
- </if>
- <if test="lastMainLogId != null">
- #{lastMainLogId,jdbcType=VARCHAR},
- </if>
- <if test="conditionMap != null">
- #{conditionMap,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=INTEGER},
- </if>
- <if test="createdBy != null">
- #{createdBy,jdbcType=VARCHAR},
- </if>
- <if test="createdAt != null">
- #{createdAt,jdbcType=TIMESTAMP},
- </if>
- <if test="updatedBy != null">
- #{updatedBy,jdbcType=VARCHAR},
- </if>
- <if test="updatedAt != null">
- #{updatedAt,jdbcType=TIMESTAMP},
- </if>
- <if test="groupId != null">
- #{groupId,jdbcType=VARCHAR},
- </if>
- <if test="remark != null">
- #{remark,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.idea.oa.flow2.model.FlowMainExample" resultType="java.lang.Long">
- select count(*) from flow_main
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update flow_main
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.applyTheme != null">
- apply_theme = #{record.applyTheme,jdbcType=VARCHAR},
- </if>
- <if test="record.formId != null">
- form_id = #{record.formId,jdbcType=VARCHAR},
- </if>
- <if test="record.applyUser != null">
- apply_user = #{record.applyUser,jdbcType=VARCHAR},
- </if>
- <if test="record.deptId != null">
- dept_id = #{record.deptId,jdbcType=VARCHAR},
- </if>
- <if test="record.flowResult != null">
- flow_result = #{record.flowResult,jdbcType=INTEGER},
- </if>
- <if test="record.flowStatus != null">
- flow_status = #{record.flowStatus,jdbcType=INTEGER},
- </if>
- <if test="record.ccList != null">
- cc_list = #{record.ccList,jdbcType=VARCHAR},
- </if>
- <if test="record.flowName != null">
- flow_name = #{record.flowName,jdbcType=VARCHAR},
- </if>
- <if test="record.flowType != null">
- flow_type = #{record.flowType,jdbcType=VARCHAR},
- </if>
- <if test="record.flowPost != null">
- flow_post = #{record.flowPost,jdbcType=VARCHAR},
- </if>
- <if test="record.flowId != null">
- flow_id = #{record.flowId,jdbcType=VARCHAR},
- </if>
- <if test="record.taskId != null">
- task_id = #{record.taskId,jdbcType=VARCHAR},
- </if>
- <if test="record.returnStatus != null">
- return_status = #{record.returnStatus,jdbcType=INTEGER},
- </if>
- <if test="record.lastMainLogId != null">
- last_main_log_id = #{record.lastMainLogId,jdbcType=VARCHAR},
- </if>
- <if test="record.conditionMap != null">
- condition_map = #{record.conditionMap,jdbcType=VARCHAR},
- </if>
- <if test="record.status != null">
- status = #{record.status,jdbcType=INTEGER},
- </if>
- <if test="record.createdBy != null">
- created_by = #{record.createdBy,jdbcType=VARCHAR},
- </if>
- <if test="record.createdAt != null">
- created_at = #{record.createdAt,jdbcType=TIMESTAMP},
- </if>
- <if test="record.updatedBy != null">
- updated_by = #{record.updatedBy,jdbcType=VARCHAR},
- </if>
- <if test="record.updatedAt != null">
- updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
- </if>
- <if test="record.groupId != null">
- group_id = #{record.groupId,jdbcType=VARCHAR},
- </if>
- <if test="record.remark != null">
- remark = #{record.remark,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update flow_main
- set id = #{record.id,jdbcType=VARCHAR},
- apply_theme = #{record.applyTheme,jdbcType=VARCHAR},
- form_id = #{record.formId,jdbcType=VARCHAR},
- apply_user = #{record.applyUser,jdbcType=VARCHAR},
- dept_id = #{record.deptId,jdbcType=VARCHAR},
- flow_result = #{record.flowResult,jdbcType=INTEGER},
- flow_status = #{record.flowStatus,jdbcType=INTEGER},
- cc_list = #{record.ccList,jdbcType=VARCHAR},
- flow_name = #{record.flowName,jdbcType=VARCHAR},
- flow_type = #{record.flowType,jdbcType=VARCHAR},
- flow_post = #{record.flowPost,jdbcType=VARCHAR},
- flow_id = #{record.flowId,jdbcType=VARCHAR},
- task_id = #{record.taskId,jdbcType=VARCHAR},
- return_status = #{record.returnStatus,jdbcType=INTEGER},
- last_main_log_id = #{record.lastMainLogId,jdbcType=VARCHAR},
- condition_map = #{record.conditionMap,jdbcType=VARCHAR},
- status = #{record.status,jdbcType=INTEGER},
- created_by = #{record.createdBy,jdbcType=VARCHAR},
- created_at = #{record.createdAt,jdbcType=TIMESTAMP},
- updated_by = #{record.updatedBy,jdbcType=VARCHAR},
- updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
- group_id = #{record.groupId,jdbcType=VARCHAR},
- remark = #{record.remark,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.idea.oa.flow2.model.FlowMain">
- update flow_main
- <set>
- <if test="applyTheme != null">
- apply_theme = #{applyTheme,jdbcType=VARCHAR},
- </if>
- <if test="formId != null">
- form_id = #{formId,jdbcType=VARCHAR},
- </if>
- <if test="applyUser != null">
- apply_user = #{applyUser,jdbcType=VARCHAR},
- </if>
- <if test="deptId != null">
- dept_id = #{deptId,jdbcType=VARCHAR},
- </if>
- <if test="flowResult != null">
- flow_result = #{flowResult,jdbcType=INTEGER},
- </if>
- <if test="flowStatus != null">
- flow_status = #{flowStatus,jdbcType=INTEGER},
- </if>
- <if test="ccList != null">
- cc_list = #{ccList,jdbcType=VARCHAR},
- </if>
- <if test="flowName != null">
- flow_name = #{flowName,jdbcType=VARCHAR},
- </if>
- <if test="flowType != null">
- flow_type = #{flowType,jdbcType=VARCHAR},
- </if>
- <if test="flowPost != null">
- flow_post = #{flowPost,jdbcType=VARCHAR},
- </if>
- <if test="flowId != null">
- flow_id = #{flowId,jdbcType=VARCHAR},
- </if>
- <if test="taskId != null">
- task_id = #{taskId,jdbcType=VARCHAR},
- </if>
- <if test="returnStatus != null">
- return_status = #{returnStatus,jdbcType=INTEGER},
- </if>
- <if test="lastMainLogId != null">
- last_main_log_id = #{lastMainLogId,jdbcType=VARCHAR},
- </if>
- <if test="conditionMap != null">
- condition_map = #{conditionMap,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=INTEGER},
- </if>
- <if test="createdBy != null">
- created_by = #{createdBy,jdbcType=VARCHAR},
- </if>
- <if test="createdAt != null">
- created_at = #{createdAt,jdbcType=TIMESTAMP},
- </if>
- <if test="updatedBy != null">
- updated_by = #{updatedBy,jdbcType=VARCHAR},
- </if>
- <if test="updatedAt != null">
- updated_at = #{updatedAt,jdbcType=TIMESTAMP},
- </if>
- <if test="groupId != null">
- group_id = #{groupId,jdbcType=VARCHAR},
- </if>
- <if test="remark != null">
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.idea.oa.flow2.model.FlowMain">
- update flow_main
- set apply_theme = #{applyTheme,jdbcType=VARCHAR},
- form_id = #{formId,jdbcType=VARCHAR},
- apply_user = #{applyUser,jdbcType=VARCHAR},
- dept_id = #{deptId,jdbcType=VARCHAR},
- flow_result = #{flowResult,jdbcType=INTEGER},
- flow_status = #{flowStatus,jdbcType=INTEGER},
- cc_list = #{ccList,jdbcType=VARCHAR},
- flow_name = #{flowName,jdbcType=VARCHAR},
- flow_type = #{flowType,jdbcType=VARCHAR},
- flow_post = #{flowPost,jdbcType=VARCHAR},
- flow_id = #{flowId,jdbcType=VARCHAR},
- task_id = #{taskId,jdbcType=VARCHAR},
- return_status = #{returnStatus,jdbcType=INTEGER},
- last_main_log_id = #{lastMainLogId,jdbcType=VARCHAR},
- condition_map = #{conditionMap,jdbcType=VARCHAR},
- status = #{status,jdbcType=INTEGER},
- created_by = #{createdBy,jdbcType=VARCHAR},
- created_at = #{createdAt,jdbcType=TIMESTAMP},
- updated_by = #{updatedBy,jdbcType=VARCHAR},
- updated_at = #{updatedAt,jdbcType=TIMESTAMP},
- group_id = #{groupId,jdbcType=VARCHAR},
- remark = #{remark,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- </mapper>
|