|
23 | 23 | SELECT <include refid="columns_id"> </include> FROM scopespace
|
24 | 24 | <where>
|
25 | 25 | <if test="{ScopeSpace.id} != nil and {ScopeSpace.id} != 0">AND id = #{ScopeSpace.id} </if>
|
| 26 | + <if test="{ScopeSpace.user_id} != nil and {ScopeSpace.user_id} != 0">AND user_id = #{ScopeSpace.user_id} </if> |
26 | 27 | <if test="{ScopeSpace.name} != nil">AND name = #{ScopeSpace.name} </if>
|
27 | 28 | <if test="{ScopeSpace.note} != nil">AND note = #{ScopeSpace.note} </if>
|
28 | 29 | <if test="{ScopeSpace.state} != nil">AND state = #{ScopeSpace.state} </if>
|
|
35 | 36 | SELECT COUNT(*) FROM scopespace
|
36 | 37 | <where>
|
37 | 38 | <if test="{ScopeSpace.id} != nil and {ScopeSpace.id} != 0">AND id = #{ScopeSpace.id} </if>
|
| 39 | + <if test="{ScopeSpace.user_id} != nil and {ScopeSpace.user_id} != 0">AND user_id = #{ScopeSpace.user_id} </if> |
38 | 40 | <if test="{ScopeSpace.name} != nil">AND name = #{ScopeSpace.name} </if>
|
39 | 41 | <if test="{ScopeSpace.note} != nil">AND note = #{ScopeSpace.note} </if>
|
40 | 42 | <if test="{ScopeSpace.state} != nil">AND state = #{ScopeSpace.state} </if>
|
|
44 | 46 | </select>
|
45 | 47 |
|
46 | 48 | <insert id="insertScopeSpace">
|
47 |
| - INSERT INTO scopespace (id,name,note,state,created_at,updated_at) |
| 49 | + INSERT INTO scopespace (id,user_id,name,note,state,created_at,updated_at) |
48 | 50 | VALUES(
|
49 | 51 | #{ScopeSpace.id},
|
| 52 | + #{ScopeSpace.user_id}, |
50 | 53 | #{ScopeSpace.name},
|
51 | 54 | #{ScopeSpace.note},
|
52 | 55 | #{ScopeSpace.state},
|
|
56 | 59 | </insert>
|
57 | 60 |
|
58 | 61 | <insert id="insertBatchScopeSpace">
|
59 |
| - INSERT INTO scopespace (id,name,note,state,created_at,updated_at) |
| 62 | + INSERT INTO scopespace (id,user_id,name,note,state,created_at,updated_at) |
60 | 63 | VALUES
|
61 | 64 | <foreach item="item" index="index" collection="{0}" open="" separator="," close="">
|
62 |
| - (#{item.ScopeSpace.id},#{item.ScopeSpace.name},#{item.ScopeSpace.note},#{item.ScopeSpace.state},#{item.ScopeSpace.created_at},#{item.ScopeSpace.updated_at}) |
| 65 | + (#{item.ScopeSpace.id},#{item.ScopeSpace.user_id},#{item.ScopeSpace.name},#{item.ScopeSpace.note},#{item.ScopeSpace.state},#{item.ScopeSpace.created_at},#{item.ScopeSpace.updated_at}) |
63 | 66 | </foreach>
|
64 | 67 | </insert>
|
65 | 68 |
|
|
95 | 98 | DELETE FROM scopespace
|
96 | 99 | <where>
|
97 | 100 | <if test="{ScopeSpace.id} != nil and {ScopeSpace.id} != 0">AND id = #{ScopeSpace.id} </if>
|
| 101 | + <if test="{ScopeSpace.user_id} != nil and {ScopeSpace.user_id} != 0">AND user_id = #{ScopeSpace.user_id} </if> |
98 | 102 | <if test="{ScopeSpace.name} != nil">AND name = #{ScopeSpace.name} </if>
|
99 | 103 | <if test="{ScopeSpace.note} != nil">AND note = #{ScopeSpace.note} </if>
|
100 | 104 | <if test="{ScopeSpace.state} != nil">AND state = #{ScopeSpace.state} </if>
|
|
0 commit comments