mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?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>