记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
c51580bd
Commit
c51580bd
authored
Jan 24, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改出货接口 和 汇付支付回调(回调成功直接出货)
parent
35e33853
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
13 deletions
+86
-13
GoblinZhengzaiPushVo.java
...liquidnet/service/goblin/dto/vo/GoblinZhengzaiPushVo.java
+2
-0
IGoblinAppZhengzaiService.java
...net/service/goblin/service/IGoblinAppZhengzaiService.java
+8
-1
GoblinAppZhengzaiController.java
...ervice/goblin/controller/GoblinAppZhengzaiController.java
+18
-4
GoblinAppZhengzaiServiceImpl.java
...ice/goblin/service/impl/GoblinAppZhengzaiServiceImpl.java
+58
-8
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinZhengzaiPushVo.java
View file @
c51580bd
...
...
@@ -18,6 +18,8 @@ public class GoblinZhengzaiPushVo implements Serializable, Cloneable {
private
String
skuSpecs
;
@ApiModelProperty
(
position
=
11
,
value
=
"数量"
)
private
Integer
num
;
@ApiModelProperty
(
position
=
11
,
value
=
"状态[同订单状态]"
)
private
int
status
;
private
static
final
GoblinZhengzaiPushVo
obj
=
new
GoblinZhengzaiPushVo
();
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/IGoblinAppZhengzaiService.java
View file @
c51580bd
...
...
@@ -40,7 +40,14 @@ public interface IGoblinAppZhengzaiService {
* @param offCode 出货码
* @return
*/
ResponseDto
<
List
<
GoblinZhengzaiPushVo
>>
orderPush
(
String
offCode
);
ResponseDto
<
Boolean
>
orderPush
(
String
offCode
,
String
marketId
);
/**
* 正在下单出货详情
* @param offCode 出货码
* @return
*/
ResponseDto
<
List
<
GoblinZhengzaiPushVo
>>
orderPushDetails
(
String
offCode
,
String
marketId
);
/**
* 订单绑定
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinAppZhengzaiController.java
View file @
c51580bd
...
...
@@ -92,17 +92,31 @@ public class GoblinAppZhengzaiController {
return
goblinOrderAppService
.
orderDetails
(
orderId
,
uid
);
}
@PostMapping
(
"
checkPayment_dup1
"
)
@PostMapping
(
"
orderPush
"
)
@ApiOperation
(
"正在下单-出货"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"offCode"
,
value
=
"取货码"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"marketId"
,
value
=
"活动id"
,
example
=
"1"
),
})
public
ResponseDto
<
Boolean
>
orderPush
(
@RequestParam
(
"offCode"
)
@Valid
String
offCode
,
@RequestParam
(
"marketId"
)
@Valid
String
marketId
)
{
return
goblinAppZhengzaiService
.
orderPush
(
offCode
,
marketId
);
}
@PostMapping
(
"orderPushDetails"
)
@ApiOperation
(
"正在下单-出货详情"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"offCode"
,
value
=
"取货码"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"marketId"
,
value
=
"活动id"
,
example
=
"1"
),
})
public
ResponseDto
<
List
<
GoblinZhengzaiPushVo
>>
orderPush
(
@RequestParam
(
"offCode"
)
@Valid
String
offCode
)
{
return
goblinAppZhengzaiService
.
orderPush
(
offCode
);
public
ResponseDto
<
List
<
GoblinZhengzaiPushVo
>>
orderPushDetails
(
@RequestParam
(
"offCode"
)
@Valid
String
offCode
,
@RequestParam
(
"marketId"
)
@Valid
String
marketId
)
{
return
goblinAppZhengzaiService
.
orderPushDetails
(
offCode
,
marketId
);
}
@PostMapping
(
"
checkPayment_dup2
"
)
@PostMapping
(
"
orderBind
"
)
@ApiOperation
(
"正在下单-绑定订单号"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinAppZhengzaiServiceImpl.java
View file @
c51580bd
package
com
.
liquidnet
.
service
.
goblin
.
service
.
impl
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.SqlMapping
;
import
com.liquidnet.service.base.constant.MQConst
;
...
...
@@ -82,23 +83,36 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
}
@Override
public
ResponseDto
<
List
<
GoblinZhengzaiPushVo
>>
orderPush
(
String
offCode
)
{
public
ResponseDto
<
Boolean
>
orderPush
(
String
offCode
,
String
marketId
)
{
String
[]
orderIds
=
redisUtils
.
getOffCode
(
offCode
);
List
<
GoblinZhengzaiPushVo
>
listVo
=
ObjectUtil
.
getGoblinZhengzaiPushVoArrayList
();
LocalDateTime
now
=
LocalDateTime
.
now
();
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
Object
[]>
sqlDataOrder
=
CollectionUtil
.
linkedListObjectArr
();
LinkedList
<
Object
[]>
sqlDataSku
=
CollectionUtil
.
linkedListObjectArr
();
sqls
.
add
(
SqlMapping
.
get
(
"goblin_order.store.orderStatus"
));
sqls
.
add
(
SqlMapping
.
get
(
"goblin_order.store.orderSkuStatus"
));
String
uid
=
CurrentUtil
.
getCurrentUid
();
GoblinStoreInfoVo
storeInfoVo
=
redisUtils
.
getStoreInfoVoByUid
(
uid
);
if
(
storeInfoVo
==
null
)
{
return
ResponseDto
.
failure
(
"参数错误"
);
}
if
(
orderIds
==
null
)
{
return
ResponseDto
.
failure
(
"订单不存在"
);
}
else
{
for
(
String
orderId
:
orderIds
)
{
GoblinStoreOrderVo
storeOrderVo
=
redisUtils
.
getGoblinOrder
(
orderId
);
if
(!
storeOrderVo
.
getStatus
().
equals
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_2
.
getValue
()))
{
if
(!
storeInfoVo
.
getStoreId
().
equals
(
storeOrderVo
.
getStoreId
()))
{
return
ResponseDto
.
failure
(
"店铺异常"
);
}
if
(
storeOrderVo
.
getStatus
().
equals
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_0
.
getValue
()))
{
return
ResponseDto
.
failure
(
"出货失败,订单未支付"
);
}
if
(
storeOrderVo
.
getStatus
().
equals
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_4
.
getValue
()))
{
return
ResponseDto
.
failure
(
"出货失败,订单已核销"
);
}
if
(!
storeOrderVo
.
getMarketId
().
equals
(
marketId
))
{
return
ResponseDto
.
failure
(
"出货失败,活动不符"
);
}
storeOrderVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_4
.
getValue
());
sqlDataOrder
.
add
(
new
Object
[]{
storeOrderVo
.
getStatus
(),
now
,
...
...
@@ -106,12 +120,7 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
});
List
<
String
>
skuIds
=
storeOrderVo
.
getOrderSkuVoIds
();
for
(
String
skuId
:
skuIds
)
{
GoblinZhengzaiPushVo
vo
=
GoblinZhengzaiPushVo
.
getNew
();
GoblinOrderSkuVo
skuInfoVo
=
redisUtils
.
getGoblinOrderSkuVo
(
skuId
);
vo
.
setSkuName
(
skuInfoVo
.
getSkuName
());
vo
.
setNum
(
skuInfoVo
.
getNum
());
vo
.
setSkuSpecs
(
skuInfoVo
.
getSkuSpecs
());
vo
.
setSpuName
(
skuInfoVo
.
getSpuName
());
skuInfoVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_4
.
getValue
());
sqlDataSku
.
add
(
new
Object
[]{
skuInfoVo
.
getStatus
(),
now
,
...
...
@@ -126,6 +135,47 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_ORDER_CREATE_PAY
.
getKey
(),
SqlMapping
.
gets
(
sqls
,
sqlDataOrder
,
sqlDataSku
));
}
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
List
<
GoblinZhengzaiPushVo
>>
orderPushDetails
(
String
offCode
,
String
marketId
)
{
String
[]
orderIds
=
redisUtils
.
getOffCode
(
offCode
);
List
<
GoblinZhengzaiPushVo
>
listVo
=
ObjectUtil
.
getGoblinZhengzaiPushVoArrayList
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
GoblinStoreInfoVo
storeInfoVo
=
redisUtils
.
getStoreInfoVoByUid
(
uid
);
if
(
storeInfoVo
==
null
)
{
return
ResponseDto
.
failure
(
"参数错误"
);
}
if
(
orderIds
==
null
)
{
return
ResponseDto
.
failure
(
"订单不存在"
);
}
else
{
for
(
String
orderId
:
orderIds
)
{
GoblinStoreOrderVo
storeOrderVo
=
redisUtils
.
getGoblinOrder
(
orderId
);
if
(!
storeInfoVo
.
getStoreId
().
equals
(
storeOrderVo
.
getStoreId
()))
{
return
ResponseDto
.
failure
(
"店铺异常"
);
}
if
(
storeOrderVo
.
getStatus
().
equals
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_0
.
getValue
()))
{
return
ResponseDto
.
failure
(
"出货失败,订单未支付"
);
}
if
(
storeOrderVo
.
getStatus
().
equals
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_4
.
getValue
()))
{
return
ResponseDto
.
failure
(
"出货失败,订单已核销"
);
}
if
(!
storeOrderVo
.
getMarketId
().
equals
(
marketId
))
{
return
ResponseDto
.
failure
(
"出货失败,活动不符"
);
}
List
<
String
>
skuIds
=
storeOrderVo
.
getOrderSkuVoIds
();
for
(
String
skuId
:
skuIds
)
{
GoblinZhengzaiPushVo
vo
=
GoblinZhengzaiPushVo
.
getNew
();
GoblinOrderSkuVo
skuInfoVo
=
redisUtils
.
getGoblinOrderSkuVo
(
skuId
);
vo
.
setSkuName
(
skuInfoVo
.
getSkuName
());
vo
.
setNum
(
skuInfoVo
.
getNum
());
vo
.
setSkuSpecs
(
skuInfoVo
.
getSkuSpecs
());
vo
.
setSpuName
(
skuInfoVo
.
getSpuName
());
vo
.
setStatus
(
skuInfoVo
.
getStatus
());
}
}
}
return
ResponseDto
.
success
(
listVo
);
}
...
...
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