Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
a303e5d4
Commit
a303e5d4
authored
Apr 21, 2020
by
郑勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加过期页面
parent
e4da6c52
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
GiftCouponPackageBiz.java
.../com/pcloud/book/giftcoupon/biz/GiftCouponPackageBiz.java
+1
-1
GiftCouponPackageBizImpl.java
...ud/book/giftcoupon/biz/impl/GiftCouponPackageBizImpl.java
+4
-2
GiftCouponPackageFacade.java
...cloud/book/giftcoupon/facade/GiftCouponPackageFacade.java
+2
-1
GiftReceiveDao.xml
...k/src/main/resources/mapper/giftConpon/GiftReceiveDao.xml
+6
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/giftcoupon/biz/GiftCouponPackageBiz.java
View file @
a303e5d4
...
@@ -19,7 +19,7 @@ public interface GiftCouponPackageBiz {
...
@@ -19,7 +19,7 @@ public interface GiftCouponPackageBiz {
PageBeanNew
<
GiftPackageDTO
>
list4GiftPackage
(
String
title
,
Integer
state
,
Integer
currentPage
,
Integer
numPerPage
);
PageBeanNew
<
GiftPackageDTO
>
list4GiftPackage
(
String
title
,
Integer
state
,
Integer
currentPage
,
Integer
numPerPage
);
PageBeanNew
<
MyGiftPackageDTO
>
list4MyGiftPackage
(
Long
wechatUserId
,
Integer
currentPage
,
Integer
numPerPage
);
PageBeanNew
<
MyGiftPackageDTO
>
list4MyGiftPackage
(
Integer
state
,
Long
wechatUserId
,
Integer
currentPage
,
Integer
numPerPage
);
void
useGiftCoupon
(
Long
wechatUserId
,
Long
giftPackageId
);
void
useGiftCoupon
(
Long
wechatUserId
,
Long
giftPackageId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/giftcoupon/biz/impl/GiftCouponPackageBizImpl.java
View file @
a303e5d4
...
@@ -115,10 +115,12 @@ public class GiftCouponPackageBizImpl implements GiftCouponPackageBiz {
...
@@ -115,10 +115,12 @@ public class GiftCouponPackageBizImpl implements GiftCouponPackageBiz {
}
}
@Override
@Override
public
PageBeanNew
<
MyGiftPackageDTO
>
list4MyGiftPackage
(
Long
wechatUserId
,
Integer
currentPage
,
Integer
numPerPage
)
{
public
PageBeanNew
<
MyGiftPackageDTO
>
list4MyGiftPackage
(
Integer
state
,
Long
wechatUserId
,
Integer
currentPage
,
Integer
numPerPage
)
{
//state=1 已领取 state=2 已过期
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"wechatUserId"
,
wechatUserId
);
paramMap
.
put
(
"wechatUserId"
,
wechatUserId
);
PageBeanNew
<
MyGiftPackageDTO
>
pageBeanNew
=
giftCouponPackageDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"list4MyGiftPackage"
);
paramMap
.
put
(
"state"
,
state
);
PageBeanNew
<
MyGiftPackageDTO
>
pageBeanNew
=
giftReceiveDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"list4MyGiftPackage"
);
if
(
pageBeanNew
==
null
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
if
(
pageBeanNew
==
null
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
new
ArrayList
<>());
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
new
ArrayList
<>());
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/giftcoupon/facade/GiftCouponPackageFacade.java
View file @
a303e5d4
...
@@ -109,11 +109,12 @@ public class GiftCouponPackageFacade {
...
@@ -109,11 +109,12 @@ public class GiftCouponPackageFacade {
@GetMapping
(
"/list4MyGiftPackage"
)
@GetMapping
(
"/list4MyGiftPackage"
)
public
ResponseDto
<
PageBeanNew
<
MyGiftPackageDTO
>>
list4MyGiftPackage
(
public
ResponseDto
<
PageBeanNew
<
MyGiftPackageDTO
>>
list4MyGiftPackage
(
@CookieValue
(
value
=
"userInfo"
)
String
userInfo
,
@CookieValue
(
value
=
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"state"
,
required
=
false
)
Integer
state
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
{
)
throws
BizException
,
PermissionException
{
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
return
new
ResponseDto
<>(
giftCouponPackageBiz
.
list4MyGiftPackage
(
wechatUserId
,
currentPage
,
numPerPage
));
return
new
ResponseDto
<>(
giftCouponPackageBiz
.
list4MyGiftPackage
(
state
,
wechatUserId
,
currentPage
,
numPerPage
));
}
}
@ApiOperation
(
"券包使用"
)
@ApiOperation
(
"券包使用"
)
...
...
pcloud-service-book/src/main/resources/mapper/giftConpon/GiftReceiveDao.xml
View file @
a303e5d4
...
@@ -123,6 +123,12 @@
...
@@ -123,6 +123,12 @@
on a.id=b.gift_package_id
on a.id=b.gift_package_id
where b.wechat_user_id=#{wechatUserId}
where b.wechat_user_id=#{wechatUserId}
and b.used_num
<![CDATA[ < ]]>
b.receive_num
and b.used_num
<![CDATA[ < ]]>
b.receive_num
<if
test=
"state!=null and state==1"
>
and now()
<![CDATA[ <= ]]>
a.valid_date_end
</if>
<if
test=
"state!=null and state==2"
>
and now() > a.valid_date_end
</if>
order by b.update_time desc
order by b.update_time desc
</select>
</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