提交 | 用户 | 时间
|
722af2
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
X |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
3 |
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
4 |
<mapper namespace="com.xxl.job.admin.dao.XxlJobGroupDao"> |
|
5 |
|
|
6 |
<resultMap id="XxlJobGroup" type="com.xxl.job.admin.core.model.XxlJobGroup" > |
|
7 |
<result column="id" property="id" /> |
|
8 |
<result column="app_name" property="appname" /> |
|
9 |
<result column="title" property="title" /> |
|
10 |
<result column="address_type" property="addressType" /> |
|
11 |
<result column="address_list" property="addressList" /> |
|
12 |
<result column="update_time" property="updateTime" /> |
|
13 |
</resultMap> |
|
14 |
|
|
15 |
<sql id="Base_Column_List"> |
|
16 |
t.id, |
|
17 |
t.app_name, |
|
18 |
t.title, |
|
19 |
t.address_type, |
|
20 |
t.address_list, |
|
21 |
t.update_time |
|
22 |
</sql> |
|
23 |
|
|
24 |
<select id="findAll" resultMap="XxlJobGroup"> |
|
25 |
SELECT <include refid="Base_Column_List" /> |
|
26 |
FROM xxl_job_group AS t |
|
27 |
ORDER BY t.app_name, t.title, t.id ASC |
|
28 |
</select> |
|
29 |
|
|
30 |
<select id="findByAddressType" parameterType="java.lang.Integer" resultMap="XxlJobGroup"> |
|
31 |
SELECT <include refid="Base_Column_List" /> |
|
32 |
FROM xxl_job_group AS t |
|
33 |
WHERE t.address_type = #{addressType} |
|
34 |
ORDER BY t.app_name, t.title, t.id ASC |
|
35 |
</select> |
|
36 |
|
|
37 |
<insert id="save" parameterType="com.xxl.job.admin.core.model.XxlJobGroup" useGeneratedKeys="true" keyProperty="id" > |
|
38 |
INSERT INTO xxl_job_group ( `app_name`, `title`, `address_type`, `address_list`, `update_time`) |
|
39 |
values ( #{appname}, #{title}, #{addressType}, #{addressList}, #{updateTime} ); |
|
40 |
</insert> |
|
41 |
|
|
42 |
<update id="update" parameterType="com.xxl.job.admin.core.model.XxlJobGroup" > |
|
43 |
UPDATE xxl_job_group |
|
44 |
SET `app_name` = #{appname}, |
|
45 |
`title` = #{title}, |
|
46 |
`address_type` = #{addressType}, |
|
47 |
`address_list` = #{addressList}, |
|
48 |
`update_time` = #{updateTime} |
|
49 |
WHERE id = #{id} |
|
50 |
</update> |
|
51 |
|
|
52 |
<delete id="remove" parameterType="java.lang.Integer" > |
|
53 |
DELETE FROM xxl_job_group |
|
54 |
WHERE id = #{id} |
|
55 |
</delete> |
|
56 |
|
|
57 |
<select id="load" parameterType="java.lang.Integer" resultMap="XxlJobGroup"> |
|
58 |
SELECT <include refid="Base_Column_List" /> |
|
59 |
FROM xxl_job_group AS t |
|
60 |
WHERE t.id = #{id} |
|
61 |
</select> |
|
62 |
|
|
63 |
<select id="pageList" parameterType="java.util.HashMap" resultMap="XxlJobGroup"> |
|
64 |
SELECT <include refid="Base_Column_List" /> |
|
65 |
FROM xxl_job_group AS t |
|
66 |
<trim prefix="WHERE" prefixOverrides="AND | OR" > |
|
67 |
<if test="appname != null and appname != ''"> |
|
68 |
AND t.app_name like CONCAT(CONCAT('%', #{appname}), '%') |
|
69 |
</if> |
|
70 |
<if test="title != null and title != ''"> |
|
71 |
AND t.title like CONCAT(CONCAT('%', #{title}), '%') |
|
72 |
</if> |
|
73 |
</trim> |
|
74 |
ORDER BY t.app_name, t.title, t.id ASC |
|
75 |
LIMIT #{offset}, #{pagesize} |
|
76 |
</select> |
|
77 |
|
|
78 |
<select id="pageListCount" parameterType="java.util.HashMap" resultType="int"> |
|
79 |
SELECT count(1) |
|
80 |
FROM xxl_job_group AS t |
|
81 |
<trim prefix="WHERE" prefixOverrides="AND | OR" > |
|
82 |
<if test="appname != null and appname != ''"> |
|
83 |
AND t.app_name like CONCAT(CONCAT('%', #{appname}), '%') |
|
84 |
</if> |
|
85 |
<if test="title != null and title != ''"> |
|
86 |
AND t.title like CONCAT(CONCAT('%', #{title}), '%') |
|
87 |
</if> |
|
88 |
</trim> |
|
89 |
</select> |
|
90 |
|
|
91 |
</mapper> |