提交 | 用户 | 时间
|
58d006
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
A |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
3 |
<mapper namespace="com.mandi.fendan.mapper.Fd_ErpconfigMapper"> |
|
4 |
<select id="getList1" parameterType="java.util.Map" resultType="com.mandi.fendan.persist.Fd_Erpconfig"> |
|
5 |
select * from ( select row_number() |
|
6 |
<choose> |
|
7 |
<when test="sort!=null and sort!='' "> |
|
8 |
over (order by ${sort} ) |
|
9 |
</when> |
|
10 |
<otherwise> |
|
11 |
over (order by id desc ) |
|
12 |
</otherwise> |
|
13 |
</choose> |
|
14 |
as rownumber,* from fd_erpconfig |
|
15 |
<where> |
|
16 |
<if test="name !=null and name !=''"> |
|
17 |
and name like '%'+#{name}+'%' |
|
18 |
</if> |
|
19 |
<if test="uri !=null and uri !=''"> |
|
20 |
and uri like '%'+#{uri}+'%' |
|
21 |
</if> |
|
22 |
</where> |
|
23 |
) as a |
|
24 |
</select> |
|
25 |
<select id="getList" parameterType="java.util.Map" resultType="com.mandi.fendan.persist.Fd_Systemconfig"> |
|
26 |
<choose> |
|
27 |
<when test="pagesize > 0 "> |
|
28 |
select top ${pagesize} * |
|
29 |
</when> |
|
30 |
<otherwise> |
|
31 |
select * |
|
32 |
</otherwise> |
|
33 |
</choose> |
|
34 |
from ( select row_number() |
|
35 |
<choose> |
|
36 |
<when test="sort!=null and sort!='' "> |
|
37 |
over (order by ${sort} ) |
|
38 |
</when> |
|
39 |
<otherwise> |
|
40 |
over (order by id desc ) |
|
41 |
</otherwise> |
|
42 |
</choose> |
|
43 |
as rownumber,* from fd_erpconfig |
|
44 |
<where> |
|
45 |
<if test="name !=null and name !=''"> |
|
46 |
and name like '%'+#{name}+'%' |
|
47 |
</if> |
|
48 |
<if test="uri !=null and uri !=''"> |
|
49 |
and uri like '%'+#{uri}+'%' |
|
50 |
</if> |
|
51 |
</where> |
|
52 |
) as a where rownumber > #{pagesize}*#{page} |
|
53 |
</select> |
|
54 |
|
|
55 |
<select id="getPages" parameterType="Map" resultType="int"> |
|
56 |
select count(1) from fd_erpconfig |
|
57 |
<where> |
|
58 |
<if test="name!=null and name !=''"> |
|
59 |
and name like '%'+#{name}+'%' |
|
60 |
</if> |
|
61 |
<if test="uri !=null and uri !=''"> |
|
62 |
and uri like '%'+#{uri}+'%' |
|
63 |
</if> |
|
64 |
</where> |
|
65 |
</select> |
|
66 |
</mapper> |