|  |  |  | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | insert into pr_schedule | 
|---|
|  |  |  | <trim prefix="(" suffix=")" suffixOverrides=","> | 
|---|
|  |  |  | <if test="id != null and id !=''"> | 
|---|
|  |  |  | <if test="id != null"> | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="userId != null and userId !=''"> | 
|---|
|  |  |  | <if test="userId != null"> | 
|---|
|  |  |  | user_id, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="scheduleDate != null and scheduleDate !=''"> | 
|---|
|  |  |  | schedule_date, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="deleted != null and deleted !=''"> | 
|---|
|  |  |  | <if test="deleted != null"> | 
|---|
|  |  |  | deleted, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="dt != null and dt !=''"> | 
|---|
|  |  |  | <if test="dt != null"> | 
|---|
|  |  |  | dt, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|---|
|  |  |  | <if test="id != null and id !=''"> | 
|---|
|  |  |  | <if test="id != null"> | 
|---|
|  |  |  | #{id,jdbcType=BIGINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="userId != null and userId !=''"> | 
|---|
|  |  |  | <if test="userId != null"> | 
|---|
|  |  |  | #{userId,jdbcType=BIGINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="scheduleDate != null  and scheduleDate !=''"> | 
|---|
|  |  |  | #{scheduleDate,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="deleted != null and deleted !=''"> | 
|---|
|  |  |  | <if test="deleted != null"> | 
|---|
|  |  |  | #{deleted,jdbcType=TINYINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="dt != null and dt !=''"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | update pr_schedule | 
|---|
|  |  |  | <set> | 
|---|
|  |  |  | <if test="userId != null and userId !=''"> | 
|---|
|  |  |  | <if test="userId != null"> | 
|---|
|  |  |  | user_id = #{userId,jdbcType=BIGINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="scheduleDate != null  and scheduleDate !=''"> | 
|---|
|  |  |  | schedule_date = #{scheduleDate,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="deleted != null and deleted !=''"> | 
|---|
|  |  |  | <if test="deleted != null"> | 
|---|
|  |  |  | deleted = #{deleted,jdbcType=TINYINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </set> | 
|---|
|  |  |  | 
|---|
|  |  |  | select count(1) | 
|---|
|  |  |  | from pr_schedule | 
|---|
|  |  |  | where deleted = 0 | 
|---|
|  |  |  | <if test="userId != null and userId !=''"> | 
|---|
|  |  |  | <if test="userId != null"> | 
|---|
|  |  |  | and user_id = #{userId,jdbcType=BIGINT} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="scheduleDate != null  and scheduleDate !=''"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <include refid="Base_Column_List" /> | 
|---|
|  |  |  | from pr_schedule | 
|---|
|  |  |  | where deleted = 0 | 
|---|
|  |  |  | <if test="userId != null and userId !=''"> | 
|---|
|  |  |  | <if test="userId != null"> | 
|---|
|  |  |  | and user_id = #{userId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="scheduleDate != null  and scheduleDate !=''"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <include refid="Base_Column_List" /> | 
|---|
|  |  |  | from pr_schedule | 
|---|
|  |  |  | where deleted = 0 | 
|---|
|  |  |  | <if test="userId != null  and userId !=''"> | 
|---|
|  |  |  | <if test="userId != null"> | 
|---|
|  |  |  | and user_id = #{userId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="scheduleDate != null  and scheduleDate !=''"> | 
|---|