Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
chongli
/
fun-member
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9e733b65
authored
Mar 14, 2019
by
chongli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员档案现金券查询增加查看已使用、未使用、已过期
parent
c876e2fe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
src/main/resources/mybatis-mappers/VoucherMapper.xml
src/main/resources/mybatis-mappers/VoucherMapper.xml
View file @
9e733b65
...
...
@@ -13,12 +13,38 @@
<select
id=
"count"
resultType=
"int"
>
select count(1) from bsc_voucher t
<include
refid=
"where"
/>
WHERE
1 = 1
<if
test=
"params.uid != null and params.uid != ''"
>
and t.uid = #{params.uid}
</if>
<if
test=
"params.type != null and params.type == 1"
>
and t.used=1
</if>
<if
test=
"params.type != null and params.type == 2"
>
and t.used=0 and t.endUseDate
>
CURRENT_TIMESTAMP()
</if>
<if
test=
"params.type != null and params.type == 3"
>
and t.used=0 and t.endUseDate
<
CURRENT_TIMESTAMP()
</if>
</select>
<select
id=
"list"
resultType=
"Voucher"
>
SELECT t.Id,t.remark,t.description,t.used,t.startUseDate,t.endUseDate,t.amount from bsc_voucher t
<include
refid=
"where"
/>
WHERE
1 = 1
<if
test=
"params.uid != null and params.uid != ''"
>
and t.uid = #{params.uid}
</if>
<if
test=
"params.type != null and params.type == 1"
>
and t.used=1
</if>
<if
test=
"params.type != null and params.type == 2"
>
and t.used=0 and t.endUseDate
>
CURRENT_TIMESTAMP()
</if>
<if
test=
"params.type != null and params.type == 3"
>
and t.used=0 and t.endUseDate
<
CURRENT_TIMESTAMP()
</if>
${params.orderBy}
limit #{offset}, #{limit}
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment