Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
b092f1b6
Commit
b092f1b6
authored
Jun 24, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
7e916847
1ef5a4d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
2 deletions
+40
-2
ActivityFeign.java
.../java/com/xxfc/platform/activity/Feign/ActivityFeign.java
+6
-2
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+24
-0
UserCouponController.java
...com/xxfc/platform/activity/rest/UserCouponController.java
+10
-0
No files found.
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/Feign/ActivityFeign.java
View file @
b092f1b6
...
...
@@ -22,14 +22,18 @@ public interface ActivityFeign {
public
String
led
(
@RequestParam
(
value
=
"userId"
)
Integer
userId
);
@ApiOperation
(
"单个优惠卷信息"
)
@RequestMapping
(
value
=
"/info/{no}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/
user/
info/{no}"
,
method
=
RequestMethod
.
GET
)
public
UserCouponVo
info
(
@PathVariable
(
value
=
"no"
)
String
no
);
@ApiOperation
(
"优惠卷使用"
)
@RequestMapping
(
value
=
"/use"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/use
r/use
"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
use
(
@RequestParam
(
value
=
"userId"
)
Integer
userId
,
@RequestParam
(
value
=
"TickerNo"
)
String
TickerNo
,
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
);
@ApiOperation
(
"优惠卷取消使用"
)
@RequestMapping
(
value
=
"/user/cancelUse"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
cancelUse
(
@RequestParam
(
value
=
"TickerNo"
,
defaultValue
=
""
)
String
TickerNo
);
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
b092f1b6
...
...
@@ -116,6 +116,30 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
updateSelectiveById
(
userCoupon
);
}
//取消使用优惠卷
public
void
cancelTickerNo
(
String
TickerNo
){
if
(
StringUtils
.
isBlank
(
TickerNo
)){
log
.
error
(
"----参数不能为空"
);
return
;
}
Example
example
=
new
Example
(
UserCoupon
.
class
);
example
.
createCriteria
().
andEqualTo
(
"TickerNo"
,
TickerNo
).
andEqualTo
(
"isDel"
,
0
);
List
<
UserCoupon
>
list
=
selectByExample
(
example
);
if
(
list
.
size
()==
0
){
log
.
error
(
TickerNo
+
"----优惠卷不存在"
);
return
;
}
UserCoupon
userCoupon
=
list
.
get
(
0
);
if
(
userCoupon
!=
null
&&
userCoupon
.
getIsUse
()!=
1
){
log
.
error
(
TickerNo
+
"----没有领优惠卷"
);
return
;
}
userCoupon
.
setIsUse
(
0
);
userCoupon
.
setOrderNo
(
""
);
userCoupon
.
setUseTime
(
0L
);
updateSelectiveById
(
userCoupon
);
}
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/UserCouponController.java
View file @
b092f1b6
...
...
@@ -35,6 +35,8 @@ public class UserCouponController extends ActivityBaseController<UserCouponBiz>
public
UserCouponVo
info
(
@PathVariable
String
no
)
{
return
baseBiz
.
getUserCoupon
(
no
);
}
@ApiOperation
(
"优惠卷使用"
)
@RequestMapping
(
value
=
"/use"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
use
(
...
...
@@ -46,6 +48,14 @@ public class UserCouponController extends ActivityBaseController<UserCouponBiz>
return
ObjectRestResponse
.
succ
();
}
@ApiOperation
(
"优惠卷取消使用"
)
@RequestMapping
(
value
=
"/cancelUse"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
cancelUse
(
@RequestParam
(
value
=
"TickerNo"
,
defaultValue
=
""
)
String
TickerNo
){
baseBiz
.
cancelTickerNo
(
TickerNo
);
return
ObjectRestResponse
.
succ
();
}
}
\ No newline at end of file
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