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
c50d732c
Commit
c50d732c
authored
Nov 05, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hz_master' into dev
parents
81ce0510
b62351bd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
8 deletions
+29
-8
UserSellingWaterController.java
...iaoqi/security/admin/rest/UserSellingWaterController.java
+15
-4
UserCouponVo.java
...main/java/com/xxfc/platform/activity/vo/UserCouponVo.java
+6
-0
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+4
-1
UserCouponMapper.xml
...ity-server/src/main/resources/mapper/UserCouponMapper.xml
+4
-3
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/UserSellingWaterController.java
View file @
c50d732c
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
import
com.github.wxiaoqi.security.admin.biz.AppUserSellingWaterBiz
;
import
com.github.wxiaoqi.security.admin.dto.OrderWaterDTO
;
import
com.github.wxiaoqi.security.admin.vo.SellingWalletPagVo
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil
;
...
...
@@ -8,10 +9,7 @@ import com.github.wxiaoqi.security.auth.common.util.jwt.IJWTInfo;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -34,6 +32,9 @@ public class UserSellingWaterController {
@Autowired
private
UserAuthConfig
userAuthConfig
;
@Autowired
private
AppUserSellingWaterBiz
waterBiz
;
@GetMapping
(
"/page"
)
public
ObjectRestResponse
<
SellingWalletPagVo
>
findSellingWaterPage
(
@RequestParam
(
required
=
false
,
value
=
"type"
)
Integer
wating
,
@RequestParam
(
"pageNo"
)
Integer
pageNo
,
...
...
@@ -61,4 +62,14 @@ public class UserSellingWaterController {
throw
new
BaseException
(
e
);
}
}
@PostMapping
(
"app/unauth/order"
)
public
ObjectRestResponse
order
(
@RequestBody
OrderWaterDTO
orderWaterDTO
)
{
try
{
waterBiz
.
orderWater
(
orderWaterDTO
);
return
ObjectRestResponse
.
succ
();
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
e
);
}
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/UserCouponVo.java
View file @
c50d732c
...
...
@@ -59,11 +59,17 @@ public class UserCouponVo {
@ApiModelProperty
(
value
=
"开始时间"
,
hidden
=
true
)
private
Long
startTime
;
/**
* 到期时间
*/
@ApiModelProperty
(
value
=
"到期时间"
,
hidden
=
true
)
private
Long
expireTime
;
@ApiModelProperty
(
value
=
"到期时间字符串"
)
private
String
expireDate
;
/**
* 使用时间
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
c50d732c
...
...
@@ -124,9 +124,12 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
if
(
type
==
1
){
startTime
=
coupon
.
getStartTime
();
expireTime
=
coupon
.
getValidEndTime
();
}
else
{
}
else
if
(
type
==
2
)
{
startTime
=
expireTime
;
expireTime
+=
DAY
*
coupon
.
getValidDays
();
}
else
{
startTime
=
expireTime
;
expireTime
=-
1L
;
}
String
ticker_no
=
Snowflake
.
build
()+
""
;
UserCoupon
userCoupon
=
new
UserCoupon
();
...
...
xx-activity/xx-activity-server/src/main/resources/mapper/UserCouponMapper.xml
View file @
c50d732c
...
...
@@ -13,6 +13,7 @@
<result
property=
"crtTime"
column=
"crt_time"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"expireTime"
column=
"expire_time"
/>
<result
property=
"expireDate"
column=
"expireDate"
/>
<result
property=
"useTime"
column=
"use_time"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"subtitle"
column=
"subtitle"
/>
...
...
@@ -32,20 +33,20 @@
<select
id=
"getUserCouponsByType"
resultMap=
"userCouponMap"
>
SELECT
*
*
,IF(expire_time=-1,'永久',FROM_UNIXTIME(expire_time/1000,'%Y-%m-%d')) as expireDate
FROM
user_coupon u
LEFT JOIN coupon c ON u.coupon_id = c.id
WHERE
u.is_del = 0 and u.user_id=#{userId}
<if
test=
"type==0"
>
and u.is_use=0 and
u.expire_time >=#{time}
and u.is_use=0 and
(u.expire_time >=#{time} or u.expire_time=-1)
</if>
<if
test=
"type==1"
>
and u.is_use=1
</if>
<if
test=
"type==2"
>
and u.is_use=0 and u.expire_time
<
#{time}
and u.is_use=0 and u.expire_time
<
#{time}
and u.expire_time!=-1
</if>
<if
test=
"channel!=null and channel!=''"
>
and (c.channel=#{channel} or c.channel=0 )
...
...
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