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
4c7dee47
Commit
4c7dee47
authored
Sep 18, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-chw' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev-chw
parents
5cd287d9
b139849e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
6 deletions
+64
-6
CheckBizType.java
...wxiaoqi/security/auth/client/annotation/CheckBizType.java
+14
-0
PageParam.java
...java/com/github/wxiaoqi/security/common/vo/PageParam.java
+4
-1
User.java
...n/java/com/github/wxiaoqi/security/admin/entity/User.java
+3
-0
GroupController.java
...m/github/wxiaoqi/security/admin/rest/GroupController.java
+19
-3
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 @
4c7dee47
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-common/src/main/java/com/github/wxiaoqi/security/common/vo/PageParam.java
View file @
4c7dee47
package
com
.
github
.
wxiaoqi
.
security
.
common
.
vo
;
package
com
.
github
.
wxiaoqi
.
security
.
common
.
vo
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -10,5 +11,7 @@ public class PageParam {
...
@@ -10,5 +11,7 @@ public class PageParam {
@ApiModelProperty
(
"每页限制"
)
@ApiModelProperty
(
"每页限制"
)
Integer
limit
;
Integer
limit
;
public
Query
initQuery
()
{
return
new
Query
(
this
);
}
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/User.java
View file @
4c7dee47
...
@@ -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
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/GroupController.java
View file @
4c7dee47
...
@@ -10,7 +10,10 @@ import com.github.wxiaoqi.security.admin.vo.GroupUsers;
...
@@ -10,7 +10,10 @@ import com.github.wxiaoqi.security.admin.vo.GroupUsers;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.util.TreeUtil
;
import
com.github.wxiaoqi.security.common.util.TreeUtil
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
lombok.Data
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -37,9 +40,9 @@ public class GroupController extends BaseController<GroupBiz, Group> {
...
@@ -37,9 +40,9 @@ public class GroupController extends BaseController<GroupBiz, Group> {
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
List
<
Group
>
list
(
String
name
,
String
groupType
)
{
public
List
<
Group
>
list
(
String
name
,
String
groupType
)
{
if
(
StringUtils
.
isBlank
(
name
)&&
StringUtils
.
isBlank
(
groupType
))
{
//
if(StringUtils.isBlank(name)&&StringUtils.isBlank(groupType)) {
return
new
ArrayList
<
Group
>();
//
return new ArrayList<Group>();
}
//
}
Example
example
=
new
Example
(
Group
.
class
);
Example
example
=
new
Example
(
Group
.
class
);
if
(
StringUtils
.
isNotBlank
(
name
))
{
if
(
StringUtils
.
isNotBlank
(
name
))
{
example
.
createCriteria
().
andLike
(
"name"
,
"%"
+
name
+
"%"
);
example
.
createCriteria
().
andLike
(
"name"
,
"%"
+
name
+
"%"
);
...
@@ -50,6 +53,13 @@ public class GroupController extends BaseController<GroupBiz, Group> {
...
@@ -50,6 +53,13 @@ public class GroupController extends BaseController<GroupBiz, Group> {
return
baseBiz
.
selectByExample
(
example
);
return
baseBiz
.
selectByExample
(
example
);
}
}
@RequestMapping
(
value
=
"/listPage"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ObjectRestResponse
<
PageDataVO
<
Group
>>
listPage
(
ListPageDTO
dto
)
{
return
ObjectRestResponse
.
succ
(
PageDataVO
.
pageInfo
(
dto
.
initQuery
(),
()
->
list
(
dto
.
getName
(),
dto
.
getGroupType
())));
}
@GetMapping
(
value
=
"/list_all"
)
@GetMapping
(
value
=
"/list_all"
)
@ResponseBody
@ResponseBody
public
List
<
Group
>
listAll
()
{
public
List
<
Group
>
listAll
()
{
...
@@ -158,4 +168,10 @@ public class GroupController extends BaseController<GroupBiz, Group> {
...
@@ -158,4 +168,10 @@ public class GroupController extends BaseController<GroupBiz, Group> {
}
}
return
TreeUtil
.
bulid
(
trees
,
root
)
;
return
TreeUtil
.
bulid
(
trees
,
root
)
;
}
}
@Data
static
public
class
ListPageDTO
extends
PageParam
{
String
name
;
String
groupType
;
}
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/dto/CouponDTO.java
View file @
4c7dee47
...
@@ -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 @
4c7dee47
...
@@ -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 @
4c7dee47
...
@@ -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 @
4c7dee47
...
@@ -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