<?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.panzhihua.service_community.dao.ComActProceedingsDao">
|
<resultMap id="BaseResultMap" type="com.panzhihua.service_community.entity.ComActProceedings">
|
<id column="id" jdbcType="BIGINT" property="id" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="unit_name" jdbcType="VARCHAR" property="unitName" />
|
<result column="unit_id" jdbcType="BIGINT" property="unitId" />
|
<result column="introduce" jdbcType="VARCHAR" property="introduce" />
|
<result column="del_flag" jdbcType="BIT" property="delFlag" />
|
<result column="status" jdbcType="BIT" property="status" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_by" jdbcType="TIMESTAMP" property="updateBy" />
|
</resultMap>
|
<sql id="Base_Column_List">
|
id, `name`, unit_name, unit_id, introduce, del_flag, `status`, create_time, create_by,
|
update_time, update_by
|
</sql>
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from com_act_proceedings
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
delete from com_act_proceedings
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.panzhihua.service_community.entity.ComActProceedings" useGeneratedKeys="true">
|
insert into com_act_proceedings (id,`name`, unit_name, unit_id,
|
introduce, del_flag, `status`, work_time,
|
create_time)
|
values (#{id},#{name,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR}, #{unitId,jdbcType=BIGINT},
|
#{introduce,jdbcType=VARCHAR}, #{delFlag,jdbcType=BIT}, #{status,jdbcType=BIT}, #{workTime},
|
#{createTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.panzhihua.service_community.entity.ComActProceedings" useGeneratedKeys="true">
|
insert into com_act_proceedings
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
`id`,
|
</if>
|
<if test="name != null">
|
`name`,
|
</if>
|
<if test="unitName != null">
|
unit_name,
|
</if>
|
<if test="unitId != null">
|
unit_id,
|
</if>
|
<if test="introduce != null">
|
introduce,
|
</if>
|
<if test="delFlag != null">
|
del_flag,
|
</if>
|
<if test="status != null">
|
`status`,
|
</if>
|
<if test="createTime != null">
|
create_time,
|
</if>
|
<if test="createBy != null">
|
create_by,
|
</if>
|
<if test="updateTime != null">
|
update_time,
|
</if>
|
<if test="updateBy != null">
|
update_by,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
#{id,jdbcType=BIGINT},
|
</if>
|
<if test="name != null">
|
#{name,jdbcType=VARCHAR},
|
</if>
|
<if test="unitName != null">
|
#{unitName,jdbcType=VARCHAR},
|
</if>
|
<if test="unitId != null">
|
#{unitId,jdbcType=BIGINT},
|
</if>
|
<if test="introduce != null">
|
#{introduce,jdbcType=VARCHAR},
|
</if>
|
<if test="delFlag != null">
|
#{delFlag,jdbcType=BIT},
|
</if>
|
<if test="status != null">
|
#{status,jdbcType=BIT},
|
</if>
|
<if test="createTime != null">
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createBy != null">
|
#{createBy,jdbcType=VARCHAR},
|
</if>
|
<if test="updateTime != null">
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateBy != null">
|
#{updateBy,jdbcType=TIMESTAMP},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.panzhihua.service_community.entity.ComActProceedings">
|
update com_act_proceedings
|
<set>
|
<if test="name != null">
|
`name` = #{name,jdbcType=VARCHAR},
|
</if>
|
<if test="unitName != null">
|
unit_name = #{unitName,jdbcType=VARCHAR},
|
</if>
|
<if test="unitId != null">
|
unit_id = #{unitId,jdbcType=BIGINT},
|
</if>
|
<if test="introduce != null">
|
introduce = #{introduce,jdbcType=VARCHAR},
|
</if>
|
<if test="delFlag != null">
|
del_flag = #{delFlag,jdbcType=BIT},
|
</if>
|
<if test="status != null">
|
`status` = #{status,jdbcType=BIT},
|
</if>
|
<if test="createTime != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createBy != null">
|
create_by = #{createBy,jdbcType=VARCHAR},
|
</if>
|
<if test="updateTime != null">
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateBy != null">
|
update_by = #{updateBy,jdbcType=TIMESTAMP},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.panzhihua.service_community.entity.ComActProceedings">
|
update com_act_proceedings
|
set `name` = #{name,jdbcType=VARCHAR},
|
unit_name = #{unitName,jdbcType=VARCHAR},
|
unit_id = #{unitId,jdbcType=BIGINT},
|
introduce = #{introduce,jdbcType=VARCHAR},
|
del_flag = #{delFlag,jdbcType=BIT},
|
`status` = #{status,jdbcType=BIT},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
create_by = #{createBy,jdbcType=VARCHAR},
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
update_by = #{updateBy,jdbcType=TIMESTAMP}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<select id="pageProceedings" resultType="com.panzhihua.common.model.vos.community.ComActProceedingsVO">
|
select * from com_act_proceedings where del_flag=0
|
<if test="keyWord != null and keyWord != ''">
|
AND name like concat("%",#{keyWord},"%")
|
</if>
|
</select>
|
</mapper>
|