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
5ebcba7f
Commit
5ebcba7f
authored
Jul 11, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
团队
parents
a5eedbf2
4c7e8c1d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
24 deletions
+92
-24
OrderGoodsDTO.java
.../com/github/wxiaoqi/security/admin/dto/OrderGoodsDTO.java
+46
-0
OrderWaterDTO.java
.../com/github/wxiaoqi/security/admin/dto/OrderWaterDTO.java
+8
-23
AppUserSellingWaterBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
+38
-1
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/OrderGoodsDTO.java
0 → 100644
View file @
5ebcba7f
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 拥金明细
*/
@Data
public
class
OrderGoodsDTO
{
/**
* 商品id
*/
@ApiModelProperty
(
value
=
"商品id"
)
private
Integer
goodId
;
/**
* 商品数量
*/
@ApiModelProperty
(
value
=
"商品数量"
)
private
Integer
goodNumber
;
/**
* 商品标题
*/
@ApiModelProperty
(
value
=
"商品标题"
)
private
String
title
;
/**
* 图片
*/
@ApiModelProperty
(
value
=
"图片"
)
private
String
img
;
/**
* 售价
*/
@ApiModelProperty
(
value
=
"售价"
)
private
Long
price
;
}
\ No newline at end of file
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/OrderWaterDTO.java
View file @
5ebcba7f
...
...
@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* 拥金明细
...
...
@@ -27,38 +28,22 @@ public class OrderWaterDTO {
private
Integer
orderId
;
/**
*
商品id
*
订单号
*/
@ApiModelProperty
(
value
=
"商品id"
)
private
Integer
goodId
;
@ApiModelProperty
(
value
=
"订单号"
)
private
String
orderNo
;
/**
*
商品数量
*
1.已支付,2-已完成,3-已退款
*/
@ApiModelProperty
(
value
=
"商品数量"
)
private
Integer
goodNumber
;
@ApiModelProperty
(
value
=
"订单状态"
)
private
Integer
status
;
/**
* 商品标题
*/
@ApiModelProperty
(
value
=
"商品标题"
)
private
String
title
;
/**
* 图片
*/
@ApiModelProperty
(
value
=
"图片"
)
private
String
img
;
@ApiModelProperty
(
value
=
"订单商品"
)
private
List
<
OrderGoodsDTO
>
goodsDTOList
;
/**
* 售价
*/
@ApiModelProperty
(
value
=
"售价"
)
private
Long
price
;
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
View file @
5ebcba7f
...
...
@@ -23,13 +23,50 @@ import java.util.stream.Collectors;
* @date 2019-07-11 14:14:54
*/
@Service
@Slf4j
public
class
AppUserSellingWaterBiz
extends
BaseBiz
<
AppUserSellingWaterMapper
,
AppUserSellingWater
>
{
@Autowired
AppUserRelationBiz
relationBiz
;
//计算用户拥金
public
void
doWaterByUserId
(
OrderWaterDTO
orderWaterDTO
){
orderWaterDTO
.
getOrderId
();
if
(
orderWaterDTO
==
null
){
log
.
info
(
"计算用户拥金----doWaterByUserId----次数不能为空----"
);
return
;
}
//订单id
Integer
orderId
=
orderWaterDTO
.
getOrderId
();
//订单号
String
orderNo
=
orderWaterDTO
.
getOrderNo
();
//用户id
Integer
userId
=
orderWaterDTO
.
getUserId
();
//订单状态
Integer
status
=
orderWaterDTO
.
getStatus
();
List
<
OrderGoodsDTO
>
goodsDTOList
=
orderWaterDTO
.
getGoodsDTOList
();
log
.
info
(
"计算用户拥金----doWaterByUserId----userId===="
+
userId
+
"---orderId==="
+
orderId
+
"---orderNo==="
+
orderNo
+
"--status=="
+
status
);
if
(
orderId
==
null
||
orderId
==
0
||
userId
==
null
||
userId
==
0
||
status
==
null
||
status
==
0
){
log
.
info
(
"计算用户拥金----doWaterByUserId----次数不能为空----orderId==="
+
orderId
);
return
;
}
AppUserRelation
relation
=
relationBiz
.
getRelationByUserId
(
userId
);
if
(
relation
==
null
||
relation
.
getParentId
()==
null
||
relation
.
getParentId
()==
0
){
log
.
info
(
"计算用户拥金----doWaterByUserId--------userId==="
+
userId
+
"---无上线"
);
return
;
}
Integer
parentId
=
relation
.
getParentId
();
//商品id
Integer
goodId
=
orderWaterDTO
.
getGoodId
();
//商品价格
Long
price
=
orderWaterDTO
.
getPrice
();
}
public
Map
<
Integer
,
BigDecimal
>
findMemberIdAndIncomeMapByMemberIds
(
List
<
Integer
>
memberIds
)
{
Map
<
Integer
,
BigDecimal
>
memberIdAndIncomeMap
=
new
HashMap
<>();
List
<
UserIncomeBo
>
userIncomeBos
=
mapper
.
accquireIncomeByMemberIds
(
memberIds
);
...
...
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