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
2dac0d21
Commit
2dac0d21
authored
Sep 18, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券,权限相关
parent
321b7e80
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
2 deletions
+41
-2
CheckBizType.java
...wxiaoqi/security/auth/client/annotation/CheckBizType.java
+14
-0
User.java
...n/java/com/github/wxiaoqi/security/admin/entity/User.java
+3
-0
CouponDTO.java
...c/main/java/com/xxfc/platform/activity/dto/CouponDTO.java
+8
-0
Coupon.java
...c/main/java/com/xxfc/platform/activity/entity/Coupon.java
+8
-1
UserCoupon.java
...in/java/com/xxfc/platform/activity/entity/UserCoupon.java
+7
-1
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+1
-0
No files found.
ace-auth/ace-auth-client/src/main/java/com/github/wxiaoqi/security/auth/client/annotation/CheckBizType.java
0 → 100644
View file @
2dac0d21
package
com
.
github
.
wxiaoqi
.
security
.
auth
.
client
.
annotation
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* 检测是否符合端登录
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
value
={
ElementType
.
METHOD
,
ElementType
.
TYPE
})
public
@interface
CheckBizType
{
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/User.java
View file @
2dac0d21
...
@@ -91,6 +91,9 @@ public class User {
...
@@ -91,6 +91,9 @@ public class User {
@Column
(
name
=
"data_corporation"
)
@Column
(
name
=
"data_corporation"
)
private
String
dataCorporation
;
private
String
dataCorporation
;
@Column
(
name
=
"biz_type"
)
private
String
bizType
;
private
String
attr1
;
private
String
attr1
;
private
String
attr2
;
private
String
attr2
;
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/dto/CouponDTO.java
View file @
2dac0d21
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.activity.dto;
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.activity.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
/**
/**
...
@@ -103,4 +104,11 @@ public class CouponDTO {
...
@@ -103,4 +104,11 @@ public class CouponDTO {
@ApiModelProperty
(
value
=
"跳转链接"
)
@ApiModelProperty
(
value
=
"跳转链接"
)
private
String
url
;
private
String
url
;
/**
* 可使用门店ids
*/
@Column
(
name
=
"company_ids"
)
@ApiModelProperty
(
value
=
"可使用门店ids"
)
private
String
companyIds
;
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/Coupon.java
View file @
2dac0d21
...
@@ -237,11 +237,18 @@ public class Coupon implements Serializable {
...
@@ -237,11 +237,18 @@ public class Coupon implements Serializable {
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
updTime
;
private
Long
updTime
;
/**
/**
* 是否删除;0-正常;1-删除
* 是否删除;0-正常;1-删除
*/
*/
@Column
(
name
=
"is_del"
)
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除;0-正常;1-删除"
)
@ApiModelProperty
(
value
=
"是否删除;0-正常;1-删除"
)
private
Integer
isDel
;
private
Integer
isDel
;
/**
* 可使用门店ids
*/
@Column
(
name
=
"company_ids"
)
@ApiModelProperty
(
value
=
"可使用门店ids"
)
private
String
companyIds
;
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/UserCoupon.java
View file @
2dac0d21
...
@@ -106,6 +106,12 @@ public class UserCoupon implements Serializable {
...
@@ -106,6 +106,12 @@ public class UserCoupon implements Serializable {
@Column
(
name
=
"is_del"
)
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除;0-正常;1-删除"
)
@ApiModelProperty
(
value
=
"是否删除;0-正常;1-删除"
)
private
Integer
isDel
;
private
Integer
isDel
;
/**
* 可使用门店ids
*/
@Column
(
name
=
"company_ids"
)
@ApiModelProperty
(
value
=
"可使用门店ids"
)
private
String
companyIds
;
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
2dac0d21
...
@@ -161,6 +161,7 @@ public class OrderCalculateBiz {
...
@@ -161,6 +161,7 @@ public class OrderCalculateBiz {
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
List
<
BigDecimal
>
couponAmounts
=
Lists
.
newArrayList
();
List
<
BigDecimal
>
couponAmounts
=
Lists
.
newArrayList
();
for
(
String
tickerNo
:
baseOrder
.
getCouponTickerNos
().
split
(
","
))
{
for
(
String
tickerNo
:
baseOrder
.
getCouponTickerNos
().
split
(
","
))
{
//如果优惠券已经使用了,则会返回 0 元
BigDecimal
couponAmount
=
activityFeign
.
use
(
baseOrder
.
getUserId
(),
Lists
.
newArrayList
(
tickerNo
),
baseOrder
.
getNo
(),
Coupon
.
CHANNEL_RENT
,
consumeAmount
,
ActivityFeign
.
TYPE_CHECK
);
BigDecimal
couponAmount
=
activityFeign
.
use
(
baseOrder
.
getUserId
(),
Lists
.
newArrayList
(
tickerNo
),
baseOrder
.
getNo
(),
Coupon
.
CHANNEL_RENT
,
consumeAmount
,
ActivityFeign
.
TYPE_CHECK
);
if
(
couponAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
if
(
couponAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
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