Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
1c572f9a
Commit
1c572f9a
authored
Aug 11, 2021
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分商城
parent
d4aaa4a4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
order-application-service/src/main/java/cn/freemud/service/impl/PointsMallOrderServiceImpl.java
+5
-2
order-application-service/src/main/java/cn/freemud/service/thirdparty/CustomerPropertyClient.java
+1
-1
order-application-service/src/main/java/cn/freemud/service/thirdparty/PointMallProductClient.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponPromotionService.java
+4
-0
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/PointsMallOrderServiceImpl.java
View file @
1c572f9a
...
@@ -32,9 +32,11 @@ import com.freemud.sdk.api.assortment.order.request.order.ProductBindingCouponTy
...
@@ -32,9 +32,11 @@ import com.freemud.sdk.api.assortment.order.request.order.ProductBindingCouponTy
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.*
;
import
java.util.*
;
@Component
public
class
PointsMallOrderServiceImpl
implements
PointsMallOrderService
{
public
class
PointsMallOrderServiceImpl
implements
PointsMallOrderService
{
...
@@ -63,7 +65,7 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
...
@@ -63,7 +65,7 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
String
memberId
=
userLoginInfoDto
.
getMemberId
();
String
memberId
=
userLoginInfoDto
.
getMemberId
();
String
skuId
=
""
;
String
skuId
=
""
;
if
(
CollectionUtils
.
isNotEmpty
(
createOrderVo
.
getProducts
())){
if
(
CollectionUtils
.
isNotEmpty
(
createOrderVo
.
getProducts
())){
createOrderVo
.
getProducts
().
get
(
0
).
getSkuId
();
skuId
=
createOrderVo
.
getProducts
().
get
(
0
).
getSkuId
();
}
}
//查询商品信息并且校验用户是否能购买 /product/listProductInfo 查询积分商品详情,可根据入参校验商品
//查询商品信息并且校验用户是否能购买 /product/listProductInfo 查询积分商品详情,可根据入参校验商品
PointMallListProductInfoRequest
productInfoRequest
=
new
PointMallListProductInfoRequest
();
PointMallListProductInfoRequest
productInfoRequest
=
new
PointMallListProductInfoRequest
();
...
@@ -72,7 +74,8 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
...
@@ -72,7 +74,8 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
productInfoRequest
.
setValidateMember
(
true
);
productInfoRequest
.
setValidateMember
(
true
);
productInfoRequest
.
setValidateStock
(
true
);
productInfoRequest
.
setValidateStock
(
true
);
productInfoRequest
.
setValidateTime
(
true
);
productInfoRequest
.
setValidateTime
(
true
);
PointMallListProductInfoResponse
<
IntegralProductType
>
productInfosDto
=
pointMallProductClient
.
listProductInfo
(
productInfoRequest
);
// PointMallListProductInfoResponse<IntegralProductType> productInfosDto = pointMallProductClient.listProductInfo(productInfoRequest);
PointMallListProductInfoResponse
<
IntegralProductType
>
productInfosDto
=
null
;
if
(!
Objects
.
equals
(
100
,
productInfosDto
.
getStatusCode
())){
if
(!
Objects
.
equals
(
100
,
productInfosDto
.
getStatusCode
())){
return
ResponseUtil
.
error
(
productInfosDto
.
getStatusCode
().
toString
(),
productInfosDto
.
getMessage
());
return
ResponseUtil
.
error
(
productInfosDto
.
getStatusCode
().
toString
(),
productInfosDto
.
getMessage
());
}
}
...
...
order-application-service/src/main/java/cn/freemud/service/thirdparty/CustomerPropertyClient.java
View file @
1c572f9a
...
@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.PostMapping;
...
@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@FeignClient
(
name
=
"customer-property-service"
,
url
=
"
${saas.customerpropertyclient.feign.url}"
)
@FeignClient
(
name
=
"customer-property-service"
,
url
=
"
http://saastestapi.sandload.cn/customer-application-service/"
)
//${saas.customerpropertyclient.feign.url}
@RequestMapping
(
produces
=
{
"application/json;charset=UTF-8"
})
@RequestMapping
(
produces
=
{
"application/json;charset=UTF-8"
})
public
interface
CustomerPropertyClient
{
public
interface
CustomerPropertyClient
{
...
...
order-application-service/src/main/java/cn/freemud/service/thirdparty/PointMallProductClient.java
View file @
1c572f9a
...
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping;
...
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@FeignClient
(
value
=
"PRODUCTSERVICE"
,
url
=
"http://172.16.19.240:9996
/swagger-ui.html#/
"
)
//${saas.pointMallProductClient.feign.url}
@FeignClient
(
value
=
"PRODUCTSERVICE"
,
url
=
"http://172.16.19.240:9996"
)
//${saas.pointMallProductClient.feign.url}
@RequestMapping
(
produces
=
{
"application/json;charset=UTF-8"
})
@RequestMapping
(
produces
=
{
"application/json;charset=UTF-8"
})
public
interface
PointMallProductClient
{
public
interface
PointMallProductClient
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponPromotionService.java
View file @
1c572f9a
...
@@ -96,6 +96,10 @@ public class CouponPromotionService implements IPromotionService {
...
@@ -96,6 +96,10 @@ public class CouponPromotionService implements IPromotionService {
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
CouponResults
>
couponResultsList
=
calculationDiscountResult
.
getCouponDiscounts
();
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
CouponResults
>
couponResultsList
=
calculationDiscountResult
.
getCouponDiscounts
();
if
(
CollectionUtils
.
isNotEmpty
(
couponResultsList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
couponResultsList
))
{
for
(
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
CouponResults
couponResults
:
couponResultsList
)
{
for
(
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
CouponResults
couponResults
:
couponResultsList
)
{
if
(
ActivityTypeEnum
.
TYPE_33
.
getCode
()==
couponResults
.
getActivityType
()
||
ActivityTypeEnum
.
TYPE_32
.
getCode
()==
couponResults
.
getActivityType
()){
continue
;
}
couponDiscount
=
couponDiscount
+
(
couponResults
.
getDiscountAmount
()
==
null
?
0
:
couponResults
.
getDiscountAmount
());
couponDiscount
=
couponDiscount
+
(
couponResults
.
getDiscountAmount
()
==
null
?
0
:
couponResults
.
getDiscountAmount
());
}
}
}
}
...
...
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