123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306 |
- <?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.huaxu.task.dao.PlanManageMapper" >
- <resultMap id="BaseResultMap" type="com.huaxu.task.entity.PlanManage" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="plan_id" property="planId" jdbcType="VARCHAR" />
- <result column="plan_name" property="planName" jdbcType="VARCHAR" />
- <result column="plan_user_id" property="planUserId" jdbcType="VARCHAR" />
- <result column="user_id" property="userId" jdbcType="VARCHAR" />
- <result column="plan_date" property="planDate" jdbcType="TIMESTAMP" />
- <result column="plan_start_date" property="planStartDate" jdbcType="TIMESTAMP" />
- <result column="plan_end_date" property="planEndDate" jdbcType="TIMESTAMP" />
- <result column="task_content" property="taskContent" jdbcType="VARCHAR" />
- <result column="task_area_shape" property="taskAreaShape" jdbcType="VARCHAR" />
- <result column="task_area_name" property="taskAreaName" jdbcType="VARCHAR" />
- <result column="task_type" property="taskType" jdbcType="INTEGER" />
- <result column="plan_status" property="planStatus" jdbcType="INTEGER" />
- <result column="tenant_id" property="tenantId" jdbcType="VARCHAR" />
- <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
- <result column="process_def_id" property="processDefId" jdbcType="VARCHAR" />
- <result column="current_task_id" property="currentTaskId" jdbcType="VARCHAR" />
- <result column="current_users" property="currentUsers" jdbcType="VARCHAR" />
- <result column="current_task_name" property="currentTaskName" jdbcType="VARCHAR" />
- <result column="create_by" property="createBy" jdbcType="VARCHAR" />
- <result column="date_create" property="dateCreate" jdbcType="TIMESTAMP" />
- <result column="update_by" property="updateBy" jdbcType="VARCHAR" />
- <result column="date_update" property="dateUpdate" jdbcType="TIMESTAMP" />
- <!-- <association property="planUser" javaType="com.huaxu.entity.UserEntity">-->
- <!-- <id column="plan_user_id" property="id" jdbcType="INTEGER"/>-->
- <!-- <result column="plan_user_name" property="username"/>-->
- <!-- </association>-->
- <!-- <association property="user" javaType="com.huaxu.entity.UserEntity">-->
- <!-- <id column="user_id" property="id" jdbcType="INTEGER"/>-->
- <!-- <result column="user_name" property="username"/>-->
- <!-- </association>-->
- <!-- <association property="createBy" javaType="com.huaxu.entity.UserEntity">-->
- <!-- <id column="create_by_id" property="id" jdbcType="INTEGER"/>-->
- <!-- <result column="create_by_name" property="username"/>-->
- <!-- </association>-->
- <!-- <association property="updateBy" javaType="com.huaxu.entity.UserEntity">-->
- <!-- <id column="update_by_id" property="id" jdbcType="INTEGER"/>-->
- <!-- <result column="update_by_name" property="username"/>-->
- <!-- </association>-->
- </resultMap>
- <sql id="Base_Column_List" >
- id, plan_id, plan_name, plan_user_id, user_id, plan_date, plan_start_date, plan_end_date,
- task_content, task_area_shape, task_area_name, task_type, plan_status, tenant_id,
- process_instance_id, process_def_id, current_task_id, current_users, current_task_name,
- create_by, date_create, update_by, date_update
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from sc_plan_manage
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from sc_plan_manage
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insertSelective" parameterType="com.huaxu.task.entity.PlanManage" >
- insert into sc_plan_manage
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="planId != null" >
- plan_id,
- </if>
- <if test="planName != null" >
- plan_name,
- </if>
- <if test="planUserId != null" >
- plan_user_id,
- </if>
- <if test="userId != null" >
- user_id,
- </if>
- <if test="planDate != null" >
- plan_date,
- </if>
- <if test="planStartDate != null" >
- plan_start_date,
- </if>
- <if test="planEndDate != null" >
- plan_end_date,
- </if>
- <if test="taskContent != null" >
- task_content,
- </if>
- <if test="taskAreaShape != null" >
- task_area_shape,
- </if>
- <if test="taskAreaName != null" >
- task_area_name,
- </if>
- <if test="taskType != null" >
- task_type,
- </if>
- <if test="planStatus != null" >
- plan_status,
- </if>
- <if test="tenantId != null" >
- tenant_id,
- </if>
- <if test="processInstanceId != null" >
- process_instance_id,
- </if>
- <if test="processDefId != null" >
- process_def_id,
- </if>
- <if test="currentTaskId != null" >
- current_task_id,
- </if>
- <if test="currentUsers != null" >
- current_users,
- </if>
- <if test="currentTaskName != null" >
- current_task_name,
- </if>
- <if test="createBy != null" >
- create_by,
- </if>
- <if test="dateCreate != null" >
- date_create,
- </if>
- <if test="updateBy != null" >
- update_by,
- </if>
- <if test="dateUpdate != null" >
- date_update,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=INTEGER},
- </if>
- <if test="planId != null" >
- #{planId,jdbcType=VARCHAR},
- </if>
- <if test="planName != null" >
- #{planName,jdbcType=VARCHAR},
- </if>
- <if test="planUserId != null" >
- #{planUserId,jdbcType=VARCHAR},
- </if>
- <if test="userId != null" >
- #{userId,jdbcType=VARCHAR},
- </if>
- <if test="planDate != null" >
- #{planDate,jdbcType=TIMESTAMP},
- </if>
- <if test="planStartDate != null" >
- #{planStartDate,jdbcType=TIMESTAMP},
- </if>
- <if test="planEndDate != null" >
- #{planEndDate,jdbcType=TIMESTAMP},
- </if>
- <if test="taskContent != null" >
- #{taskContent,jdbcType=VARCHAR},
- </if>
- <if test="taskAreaShape != null" >
- #{taskAreaShape,jdbcType=VARCHAR},
- </if>
- <if test="taskAreaName != null" >
- #{taskAreaName,jdbcType=VARCHAR},
- </if>
- <if test="taskType != null" >
- #{taskType,jdbcType=INTEGER},
- </if>
- <if test="planStatus != null" >
- #{planStatus,jdbcType=INTEGER},
- </if>
- <if test="tenantId != null" >
- #{tenantId,jdbcType=VARCHAR},
- </if>
- <if test="processInstanceId != null" >
- #{processInstanceId,jdbcType=VARCHAR},
- </if>
- <if test="processDefId != null" >
- #{processDefId,jdbcType=VARCHAR},
- </if>
- <if test="currentTaskId != null" >
- #{currentTaskId,jdbcType=VARCHAR},
- </if>
- <if test="currentUsers != null" >
- #{currentUsers,jdbcType=VARCHAR},
- </if>
- <if test="currentTaskName != null" >
- #{currentTaskName,jdbcType=VARCHAR},
- </if>
- <if test="createBy != null" >
- #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="dateCreate != null" >
- #{dateCreate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null" >
- #{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="dateUpdate != null" >
- #{dateUpdate,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.huaxu.task.entity.PlanManage" >
- update sc_plan_manage
- <set >
- <if test="planId != null" >
- plan_id = #{planId,jdbcType=VARCHAR},
- </if>
- <if test="planName != null" >
- plan_name = #{planName,jdbcType=VARCHAR},
- </if>
- <if test="planUserId != null" >
- plan_user_id = #{planUserId,jdbcType=VARCHAR},
- </if>
- <if test="userId != null" >
- user_id = #{userId,jdbcType=VARCHAR},
- </if>
- <if test="planDate != null" >
- plan_date = #{planDate,jdbcType=TIMESTAMP},
- </if>
- <if test="planStartDate != null" >
- plan_start_date = #{planStartDate,jdbcType=TIMESTAMP},
- </if>
- <if test="planEndDate != null" >
- plan_end_date = #{planEndDate,jdbcType=TIMESTAMP},
- </if>
- <if test="taskContent != null" >
- task_content = #{taskContent,jdbcType=VARCHAR},
- </if>
- <if test="taskAreaShape != null" >
- task_area_shape = #{taskAreaShape,jdbcType=VARCHAR},
- </if>
- <if test="taskAreaName != null" >
- task_area_name = #{taskAreaName,jdbcType=VARCHAR},
- </if>
- <if test="taskType != null" >
- task_type = #{taskType,jdbcType=INTEGER},
- </if>
- <if test="planStatus != null" >
- plan_status = #{planStatus,jdbcType=INTEGER},
- </if>
- <if test="tenantId != null" >
- tenant_id = #{tenantId,jdbcType=VARCHAR},
- </if>
- <if test="processInstanceId != null" >
- process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
- </if>
- <if test="processDefId != null" >
- process_def_id = #{processDefId,jdbcType=VARCHAR},
- </if>
- <if test="currentTaskId != null" >
- current_task_id = #{currentTaskId,jdbcType=VARCHAR},
- </if>
- <if test="currentUsers != null" >
- current_users = #{currentUsers,jdbcType=VARCHAR},
- </if>
- <if test="currentTaskName != null" >
- current_task_name = #{currentTaskName,jdbcType=VARCHAR},
- </if>
- <if test="createBy != null" >
- create_by = #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="dateCreate != null" >
- date_create = #{dateCreate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null" >
- update_by = #{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="dateUpdate != null" >
- date_update = #{dateUpdate,jdbcType=TIMESTAMP},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <select id="selectPlanByIdAndDate" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List"/>
- from sc_plan_manage
- where
- tenant_id = #{tenantId, jdbcType = VARCHAR}
- and plan_user_id in
- <foreach collection="userIdList" item="item" index="index" open="(" separator="," close=")">
- #{item,jdbcType=VARCHAR}
- </foreach>
- <if test="key != null and key != ''">
- and plan_id like "%" || #{planId,jdbcType=VARCHAR} || "%" or plan_name like "%" || #{planName,jdbcType=VARCHAR} || "%"
- </if>
- order by date_create desc
- </select>
- </mapper>
|