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
ec761c0b
Commit
ec761c0b
authored
Nov 19, 2020
by
徐康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20201013_麦咖啡p4v1问题修复_xukangg'
parents
efe967c8
489b1b8f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
3 deletions
+19
-3
order-application-service/pom.xml
+1
-1
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+13
-1
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
+4
-0
order-application-service/src/main/java/cn/freemud/utils/DateUtils.java
+1
-1
No files found.
order-application-service/pom.xml
View file @
ec761c0b
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
<dependency>
<dependency>
<groupId>
com.freemud.application.service.sdk
</groupId>
<groupId>
com.freemud.application.service.sdk
</groupId>
<artifactId>
storecenter-sdk
</artifactId>
<artifactId>
storecenter-sdk
</artifactId>
<version>
3.
1.9
.RELEASE
</version>
<version>
3.
2.1
.RELEASE
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.freemud
</groupId>
<groupId>
cn.freemud
</groupId>
...
...
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
ec761c0b
...
@@ -79,6 +79,7 @@ import org.springframework.data.redis.core.RedisTemplate;
...
@@ -79,6 +79,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.awt.geom.Point2D
;
import
java.awt.geom.Point2D
;
import
java.io.*
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.spec.InvalidKeySpecException
;
import
java.security.spec.InvalidKeySpecException
;
...
@@ -182,6 +183,7 @@ public class OrderAdapter {
...
@@ -182,6 +183,7 @@ public class OrderAdapter {
}
}
}
}
createOrderDto
.
setProducts
(
products
);
createOrderDto
.
setProducts
(
products
);
boolean
hasDeliveryMonthCard
=
false
;
for
(
ActivityDiscountsDto
activityDiscountsDto
:
activityDiscountsDtos
)
{
for
(
ActivityDiscountsDto
activityDiscountsDto
:
activityDiscountsDtos
)
{
CreateOrderAccountRequest
createOrderAccountDto
=
CreateOrderAccountRequest
.
builder
()
CreateOrderAccountRequest
createOrderAccountDto
=
CreateOrderAccountRequest
.
builder
()
.
accountId
(
activityDiscountsDto
.
getActivityCode
())
.
accountId
(
activityDiscountsDto
.
getActivityCode
())
...
@@ -198,6 +200,9 @@ public class OrderAdapter {
...
@@ -198,6 +200,9 @@ public class OrderAdapter {
jsonObject
.
put
(
"tenderId"
,
activityDiscountsDto
.
getTenderId
());
jsonObject
.
put
(
"tenderId"
,
activityDiscountsDto
.
getTenderId
());
}
else
if
(
ActivityTypeEnum
.
TYPE_34
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
()))
{
}
else
if
(
ActivityTypeEnum
.
TYPE_34
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
()))
{
jsonObject
.
put
(
"customerCode"
,
activityDiscountsDto
.
getTenderId
());
jsonObject
.
put
(
"customerCode"
,
activityDiscountsDto
.
getTenderId
());
if
(
null
!=
activityDiscountsDto
.
getExtendType
()
&&
activityDiscountsDto
.
getExtendType
()
==
2
)
{
hasDeliveryMonthCard
=
true
;
}
}
}
if
(
null
!=
activityDiscountsDto
.
getExtendType
())
{
if
(
null
!=
activityDiscountsDto
.
getExtendType
())
{
jsonObject
.
put
(
"extendType"
,
activityDiscountsDto
.
getExtendType
());
jsonObject
.
put
(
"extendType"
,
activityDiscountsDto
.
getExtendType
());
...
@@ -216,6 +221,9 @@ public class OrderAdapter {
...
@@ -216,6 +221,9 @@ public class OrderAdapter {
.
sequence
(
orderAccountIndex
++)
.
sequence
(
orderAccountIndex
++)
.
actualPrice
(
discountDeliveryAmount
)
.
actualPrice
(
discountDeliveryAmount
)
.
build
();
.
build
();
if
(
hasDeliveryMonthCard
&&
StringUtils
.
isNotBlank
(
storeResponseDto
.
getBenefitCardDiscountAmount
()))
{
createOrderAccountDto
.
setProductId
(
storeResponseDto
.
getBenefitCardDiscountAmount
()+
"00"
);
}
orderAccountDtos
.
add
(
createOrderAccountDto
);
orderAccountDtos
.
add
(
createOrderAccountDto
);
}
}
if
(
packageAmount
>
0
)
{
if
(
packageAmount
>
0
)
{
...
@@ -1109,6 +1117,10 @@ public class OrderAdapter {
...
@@ -1109,6 +1117,10 @@ public class OrderAdapter {
responseVo
.
setPayStatusDesc
(
Optional
.
ofNullable
(
PayStatus
.
getByCode
(
ordersBean
.
getPayStatus
()))
responseVo
.
setPayStatusDesc
(
Optional
.
ofNullable
(
PayStatus
.
getByCode
(
ordersBean
.
getPayStatus
()))
.
map
(
PayStatus:
:
getDesc
).
orElse
(
""
));
.
map
(
PayStatus:
:
getDesc
).
orElse
(
""
));
responseVo
.
setPayVoucher
(
orderExtInfoDto
!=
null
?
orderExtInfoDto
.
getPayTransId
()
:
""
);
responseVo
.
setPayVoucher
(
orderExtInfoDto
!=
null
?
orderExtInfoDto
.
getPayTransId
()
:
""
);
if
(
mcCafePartnerId
.
equals
(
ordersBean
.
getCompanyId
()))
{
responseVo
.
setPayVoucherBarCode
(
Base64
.
getEncoder
().
encodeToString
(
BarcodeUtil
.
generateBarCode128
(
responseVo
.
getPayVoucher
(),
null
,
null
,
true
,
true
)));
}
responseVo
.
setPayCreateTime
(
orderExtInfoDto
!=
null
?
orderExtInfoDto
.
getPayDate
()
:
""
);
responseVo
.
setPayCreateTime
(
orderExtInfoDto
!=
null
?
orderExtInfoDto
.
getPayDate
()
:
""
);
responseVo
.
setPayChannel
(
ordersBean
.
getPayChannel
());
responseVo
.
setPayChannel
(
ordersBean
.
getPayChannel
());
if
(
StringUtils
.
isNotBlank
(
ordersBean
.
getPayChannel
()))
{
if
(
StringUtils
.
isNotBlank
(
ordersBean
.
getPayChannel
()))
{
...
@@ -1156,7 +1168,7 @@ public class OrderAdapter {
...
@@ -1156,7 +1168,7 @@ public class OrderAdapter {
if
(
CollectionUtils
.
isNotEmpty
(
ordersBean
.
getRefundList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
ordersBean
.
getRefundList
()))
{
responseVo
.
setRefundTips
(
orderViewStatusDto
.
getRefundStatusText
());
responseVo
.
setRefundTips
(
orderViewStatusDto
.
getRefundStatusText
());
}
}
if
(
OrderStatus
.
COMPLETE
.
getCode
().
equals
(
ordersBean
.
getStatus
()))
{
if
(
OrderStatus
.
COMPLETE
.
getCode
().
equals
(
ordersBean
.
getStatus
())
&&
null
!=
ordersBean
.
getGmtCompleteTime
()
&&
0
l
!=
ordersBean
.
getGmtCompleteTime
()
)
{
responseVo
.
setCompleteTime
(
DateUtil
.
convert2String
(
new
Date
(
ordersBean
.
getGmtCompleteTime
()),
"yyyy-MM-dd HH:mm:ss"
));
responseVo
.
setCompleteTime
(
DateUtil
.
convert2String
(
new
Date
(
ordersBean
.
getGmtCompleteTime
()),
"yyyy-MM-dd HH:mm:ss"
));
}
}
responseVo
.
setTakeMealFlows
(
getTakeMealFlows
(
ordersBean
));
responseVo
.
setTakeMealFlows
(
getTakeMealFlows
(
ordersBean
));
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
View file @
ec761c0b
...
@@ -203,6 +203,10 @@ public class QueryOrderResponseVo {
...
@@ -203,6 +203,10 @@ public class QueryOrderResponseVo {
*/
*/
private
String
payVoucher
;
private
String
payVoucher
;
/**
/**
* 付款单号条形码
*/
private
String
payVoucherBarCode
;
/**
* 退款状态 enum refundStatus
* 退款状态 enum refundStatus
*/
*/
private
Integer
refundStatus
;
private
Integer
refundStatus
;
...
...
order-application-service/src/main/java/cn/freemud/utils/DateUtils.java
View file @
ec761c0b
...
@@ -14,7 +14,7 @@ public class DateUtils {
...
@@ -14,7 +14,7 @@ public class DateUtils {
if
(
date
==
null
){
if
(
date
==
null
){
return
null
;
return
null
;
}
}
String
[]
week
={
"(周
一)"
,
"(周二)"
,
"(周三)"
,
"(周四)"
,
"(周五)"
,
"(周六)"
,
"(周日
)"
};
String
[]
week
={
"(周
日)"
,
"(周一)"
,
"(周二)"
,
"(周三)"
,
"(周四)"
,
"(周五)"
,
"(周六
)"
};
Calendar
calendar
=
Calendar
.
getInstance
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
calendar
.
setTime
(
date
);
int
w
=
calendar
.
get
(
Calendar
.
DAY_OF_WEEK
)
-
1
;
int
w
=
calendar
.
get
(
Calendar
.
DAY_OF_WEEK
)
-
1
;
...
...
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