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
| <?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.lf.server.mapper.show.ApplyMapper">
| <select id="selectCount" resultType="java.lang.Integer">
| select count(*) from lf.sys_apply
| <where>
| <if test="userid != null">
| userid = #{userid}
| </if>
| </where>
| </select>
|
| <select id="selectByPage" resultType="com.lf.server.entity.show.ApplyEntity">
| select * from lf.sys_apply
| <where>
| <if test="userid != null">
| userid = #{userid}
| </if>
| </where>
| order by id
| limit #{limit} offset #{offset}
| </select>
|
| <select id="selectAll" resultType="com.lf.server.entity.show.ApplyEntity">
| select * from lf.sys_apply order by id;
| </select>
|
| <select id="selectById" resultType="com.lf.server.entity.show.ApplyEntity">
| select * from lf.sys_apply where id = #{id}
| </select>
|
| <insert id="insert" parameterType="com.lf.server.entity.show.ApplyEntity">
| <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
| select currval('lf.sys_apply_id_seq'::regclass) as id
| </selectKey>
|
| insert into lf.sys_apply
| (userid,depids,tabs,entities,wkt,pwd,status,count,descr,create_user,create_time)
| values
| (#{userid},#{depids},#{tabs},#{entities},#{wkt},#{pwd},#{status},#{count},#{descr},#{createUser},now())
| </insert>
|
| <insert id="inserts">
| insert into lf.sys_apply
| (userid,depids,tabs,entities,wkt,pwd,status,count,descr,create_user,create_time)
| values
| <foreach collection="list" item="item" index="index" separator=",">
| (#{item.userid},#{item.depids},#{item.tabs},#{item.entities},#{item.wkt},#{item.pwd},#{item.status},#{item.count},#{item.descr},#{item.createUser},now())
| </foreach>
| </insert>
|
| <delete id="delete">
| delete from lf.sys_apply where id = #{id}
| </delete>
|
| <delete id="deletes">
| delete from lf.sys_apply where id in
| <foreach item="id" collection="ids" index="index" open="(" separator="," close=")">
| #{id}
| </foreach>
| </delete>
|
| <update id="update">
| update lf.sys_apply
| set userid=#{userid},depids=#{depids},tabs=#{tabs},entities=#{entities},wkt=#{wkt},pwd=#{pwd},status=#{status},count=#{count},descr=#{descr},update_user=#{updateUser},update_time=now()
| where id=#{id}
| </update>
|
| <update id="updates">
| <foreach collection="list" item="item" index="index" separator=";">
| update lf.sys_apply
| <set>
| userid=#{item.userid},depids=#{item.depids},tabs=#{item.tabs},entities=#{item.entities},wkt=#{item.wkt},pwd=#{item.pwd},status=#{item.status},count=#{item.count},descr=#{item.descr},update_user=#{item.updateUser},update_time=now()
| </set>
| where id = #{item.id}
| </foreach>
| </update>
| </mapper>
|
|