Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
6276aec5
Commit
6276aec5
authored
Sep 13, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
换藏发货
parent
bdf3617c
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
94 additions
and
31 deletions
+94
-31
ch-admin-api/src/main/java/com/wwdz/ch/admin/config/ShiroConfig.java
...i/src/main/java/com/wwdz/ch/admin/config/ShiroConfig.java
+4
-2
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysExchangeApplyOrderServiceImpl.java
.../wwdz/ch/admin/impl/SysExchangeApplyOrderServiceImpl.java
+2
-2
ch-core/src/main/java/com/wwdz/ch/core/consts/DistributionEnum.java
...c/main/java/com/wwdz/ch/core/consts/DistributionEnum.java
+0
-1
ch-core/src/main/java/com/wwdz/ch/core/consts/ExchangeApplyOrderEnum.java
.../java/com/wwdz/ch/core/consts/ExchangeApplyOrderEnum.java
+2
-1
ch-core/src/main/java/com/wwdz/ch/core/entity/exchange/ExchangeApplyOrderVo.java
...om/wwdz/ch/core/entity/exchange/ExchangeApplyOrderVo.java
+10
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
...ch/wx/impl/distribution/DistributionOrderServiceImpl.java
+4
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeApplyOrderServiceImpl.java
...h/wx/impl/distribution/ExchangeApplyOrderServiceImpl.java
+47
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeOrderServiceImpl.java
...wdz/ch/wx/impl/distribution/ExchangeOrderServiceImpl.java
+18
-18
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/ExchangeServiceImpl.java
+7
-4
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/config/ShiroConfig.java
View file @
6276aec5
...
@@ -128,10 +128,12 @@ public class ShiroConfig {
...
@@ -128,10 +128,12 @@ public class ShiroConfig {
filterChainDefinitionMap
.
put
(
"/admin/specialPerformance/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/admin/specialPerformance/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/admin/sysFinance/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/admin/sysFinance/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/admin/groupPurchase/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/admin/groupPurchase/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/admin/invitationCode/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/admin/invitationCode/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/admin/invitationCode/**"
,
"anon"
);
//
filterChainDefinitionMap.put("/admin/**", "anon");
filterChainDefinitionMap
.
put
(
"/admin/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/admin/**"
,
"authc"
);
//
filterChainDefinitionMap.put("/admin/**", "authc");
shiroFilterFactoryBean
.
setLoginUrl
(
"/admin/auth/401"
);
shiroFilterFactoryBean
.
setLoginUrl
(
"/admin/auth/401"
);
shiroFilterFactoryBean
.
setSuccessUrl
(
"/admin/auth/index"
);
shiroFilterFactoryBean
.
setSuccessUrl
(
"/admin/auth/index"
);
shiroFilterFactoryBean
.
setUnauthorizedUrl
(
"/admin/auth/403"
);
shiroFilterFactoryBean
.
setUnauthorizedUrl
(
"/admin/auth/403"
);
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysExchangeApplyOrderServiceImpl.java
View file @
6276aec5
...
@@ -185,8 +185,8 @@ public class SysExchangeApplyOrderServiceImpl implements SysExchangeApplyOrderSe
...
@@ -185,8 +185,8 @@ public class SysExchangeApplyOrderServiceImpl implements SysExchangeApplyOrderSe
DistributionOrder
commitOrder
=
new
DistributionOrder
();
DistributionOrder
commitOrder
=
new
DistributionOrder
();
if
(
StringUtils
.
hasLength
(
userOrderId
))
{
if
(
StringUtils
.
hasLength
(
userOrderId
))
{
commitOrder
=
distributionOrderDao
.
findById
(
userOrderId
);
commitOrder
=
distributionOrderDao
.
findById
(
userOrderId
);
}
EntityMapper
.
copyAttribute
(
commitOrder
,
commitOrderVo
);
EntityMapper
.
copyAttribute
(
commitOrder
,
commitOrderVo
);
}
//用户寄来平台的物流信息
//用户寄来平台的物流信息
List
<
ExchangeOrderSnapshot
>
commitExchangeOrderSnapshots
=
exchangeOrderSnapshotDao
.
findByOrderId
(
userOrderId
);
List
<
ExchangeOrderSnapshot
>
commitExchangeOrderSnapshots
=
exchangeOrderSnapshotDao
.
findByOrderId
(
userOrderId
);
if
(!
CollectionUtils
.
isEmpty
(
commitExchangeOrderSnapshots
))
{
if
(!
CollectionUtils
.
isEmpty
(
commitExchangeOrderSnapshots
))
{
...
@@ -216,8 +216,8 @@ public class SysExchangeApplyOrderServiceImpl implements SysExchangeApplyOrderSe
...
@@ -216,8 +216,8 @@ public class SysExchangeApplyOrderServiceImpl implements SysExchangeApplyOrderSe
DistributionOrder
receiveOrder
=
new
DistributionOrder
();
DistributionOrder
receiveOrder
=
new
DistributionOrder
();
if
(
StringUtils
.
hasLength
(
targetUserOrderId
))
{
if
(
StringUtils
.
hasLength
(
targetUserOrderId
))
{
receiveOrder
=
distributionOrderDao
.
findById
(
targetUserOrderId
);
receiveOrder
=
distributionOrderDao
.
findById
(
targetUserOrderId
);
}
EntityMapper
.
copyAttribute
(
receiveOrder
,
receiveOrderVo
);
EntityMapper
.
copyAttribute
(
receiveOrder
,
receiveOrderVo
);
}
//用户寄来平台的物流信息
//用户寄来平台的物流信息
List
<
ExchangeOrderSnapshot
>
receiveExchangeOrderSnapshots
=
exchangeOrderSnapshotDao
.
findByOrderId
(
targetUserOrderId
);
List
<
ExchangeOrderSnapshot
>
receiveExchangeOrderSnapshots
=
exchangeOrderSnapshotDao
.
findByOrderId
(
targetUserOrderId
);
if
(!
CollectionUtils
.
isEmpty
(
receiveExchangeOrderSnapshots
))
{
if
(!
CollectionUtils
.
isEmpty
(
receiveExchangeOrderSnapshots
))
{
...
...
ch-core/src/main/java/com/wwdz/ch/core/consts/DistributionEnum.java
View file @
6276aec5
...
@@ -29,7 +29,6 @@ public class DistributionEnum {
...
@@ -29,7 +29,6 @@ public class DistributionEnum {
}
}
public
static
String
getNameByCode
(
int
code
)
{
public
static
String
getNameByCode
(
int
code
)
{
for
(
DistributionEnum
.
DistributionOrderStateEnum
distributionOrderStateEnum
:
DistributionEnum
.
DistributionOrderStateEnum
.
values
())
{
for
(
DistributionEnum
.
DistributionOrderStateEnum
distributionOrderStateEnum
:
DistributionEnum
.
DistributionOrderStateEnum
.
values
())
{
if
(
code
==
distributionOrderStateEnum
.
getCode
())
{
if
(
code
==
distributionOrderStateEnum
.
getCode
())
{
return
distributionOrderStateEnum
.
getDes
();
return
distributionOrderStateEnum
.
getDes
();
...
...
ch-core/src/main/java/com/wwdz/ch/core/consts/ExchangeApplyOrderEnum.java
View file @
6276aec5
...
@@ -8,7 +8,8 @@ public class ExchangeApplyOrderEnum {
...
@@ -8,7 +8,8 @@ public class ExchangeApplyOrderEnum {
DISAGREE
(
2
,
"拒绝"
),
DISAGREE
(
2
,
"拒绝"
),
SYSTEM_AGREE
(
3
,
"平台检查后通过"
),
SYSTEM_AGREE
(
3
,
"平台检查后通过"
),
SYSTEM_DISAGREE
(
4
,
"平台检查后拒绝"
),
SYSTEM_DISAGREE
(
4
,
"平台检查后拒绝"
),
CANCEL
(-
1
,
"交换关闭"
),
USER_CANCEL
(-
1
,
"用户取消交换"
),
SYSTEM_CANCEL
(-
2
,
"系统取消交换"
),
FINISH
(
10
,
"交换完成"
),
FINISH
(
10
,
"交换完成"
),
;
;
...
...
ch-core/src/main/java/com/wwdz/ch/core/entity/exchange/ExchangeApplyOrderVo.java
View file @
6276aec5
...
@@ -52,6 +52,16 @@ public class ExchangeApplyOrderVo implements Entity {
...
@@ -52,6 +52,16 @@ public class ExchangeApplyOrderVo implements Entity {
private
String
stateName
;
private
String
stateName
;
/**
* 状态标题,用于前端展示
*/
private
String
stateTitle
;
/**
* 状态标题的描述
*/
private
String
stateDesc
;
/**
/**
* 处理截止时间
* 处理截止时间
*/
*/
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
View file @
6276aec5
...
@@ -1020,7 +1020,8 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -1020,7 +1020,8 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
dto
.
setDistributionOrderId
(
dto
.
getSearchParam
());
dto
.
setDistributionOrderId
(
dto
.
getSearchParam
());
}
}
}
}
//查询用户的购买订单
//查询用户的购买订单,排除换藏订单
dto
.
setFilterType
(
DistributionEnum
.
DistributionTypeEnum
.
EXCHANGE
.
getCode
());
List
<
DistributionOrder
>
distributionOrderList
=
distributionOrderDao
.
findByPage
(
dto
);
List
<
DistributionOrder
>
distributionOrderList
=
distributionOrderDao
.
findByPage
(
dto
);
PageInfo
pageInfo
=
new
PageInfo
<>(
distributionOrderList
);
PageInfo
pageInfo
=
new
PageInfo
<>(
distributionOrderList
);
for
(
DistributionOrder
distributionOrder
:
distributionOrderList
)
{
for
(
DistributionOrder
distributionOrder
:
distributionOrderList
)
{
...
@@ -1176,8 +1177,9 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -1176,8 +1177,9 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
dto
.
setDistributionOrderId
(
dto
.
getSearchParam
());
dto
.
setDistributionOrderId
(
dto
.
getSearchParam
());
}
}
}
}
//查询藏家订单
//查询藏家订单
,排除换藏订单
//dto.setTypeList(Arrays.asList(DistributionEnum.DistributionTypeEnum.AUCTION.getCode(), DistributionEnum.DistributionTypeEnum.COLLECT.getCode()));
//dto.setTypeList(Arrays.asList(DistributionEnum.DistributionTypeEnum.AUCTION.getCode(), DistributionEnum.DistributionTypeEnum.COLLECT.getCode()));
dto
.
setFilterType
(
DistributionEnum
.
DistributionTypeEnum
.
EXCHANGE
.
getCode
());
List
<
DistributionOrder
>
distributionOrderList
=
distributionOrderDao
.
findByPage
(
dto
);
List
<
DistributionOrder
>
distributionOrderList
=
distributionOrderDao
.
findByPage
(
dto
);
PageInfo
pageInfo
=
new
PageInfo
<>(
distributionOrderList
);
PageInfo
pageInfo
=
new
PageInfo
<>(
distributionOrderList
);
for
(
DistributionOrder
distributionOrder
:
distributionOrderList
)
{
for
(
DistributionOrder
distributionOrder
:
distributionOrderList
)
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeApplyOrderServiceImpl.java
View file @
6276aec5
...
@@ -210,7 +210,7 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
...
@@ -210,7 +210,7 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
try
{
try
{
String
orderId
=
dto
.
getExchangeApplyOrderId
();
String
orderId
=
dto
.
getExchangeApplyOrderId
();
//取消申请单,把订单明细设置为无效
//取消申请单,把订单明细设置为无效
exchangeApplyOrderDao
.
updateState
(
orderId
,
ExchangeApplyOrderEnum
.
StateEnum
.
CANCEL
.
getCode
());
exchangeApplyOrderDao
.
updateState
(
orderId
,
ExchangeApplyOrderEnum
.
StateEnum
.
USER_
CANCEL
.
getCode
());
exchangeApplyOrderDetailDao
.
updateInValid
(
orderId
);
exchangeApplyOrderDetailDao
.
updateInValid
(
orderId
);
return
Result
.
success
();
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -275,6 +275,28 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
...
@@ -275,6 +275,28 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
exchangeApplyOrderVo
.
setOrderType
(
ExchangeApplyOrderEnum
.
TypeEnum
.
COMMIT
.
getCode
());
exchangeApplyOrderVo
.
setOrderType
(
ExchangeApplyOrderEnum
.
TypeEnum
.
COMMIT
.
getCode
());
exchangeApplyOrderVo
.
setOrderTypeName
(
ExchangeApplyOrderEnum
.
TypeEnum
.
COMMIT
.
getDes
());
exchangeApplyOrderVo
.
setOrderTypeName
(
ExchangeApplyOrderEnum
.
TypeEnum
.
COMMIT
.
getDes
());
}
}
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
PRE_HANDLE
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"待处理"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
AGREE
.
getCode
()
||
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
SYSTEM_AGREE
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换中"
);
exchangeApplyOrderVo
.
setStateDesc
(
"同意交换"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
DISAGREE
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换关闭"
);
exchangeApplyOrderVo
.
setStateDesc
(
"拒绝交换,交换关闭"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
SYSTEM_DISAGREE
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换关闭"
);
exchangeApplyOrderVo
.
setStateDesc
(
"验货不通过,交换关闭"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
USER_CANCEL
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换关闭"
);
exchangeApplyOrderVo
.
setStateDesc
(
"取消申请,交换关闭"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
SYSTEM_CANCEL
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换关闭"
);
exchangeApplyOrderVo
.
setStateDesc
(
"超时未处理,交换关闭"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
FINISH
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换完成"
);
exchangeApplyOrderVo
.
setStateDesc
(
"交换完成"
);
}
//处理申请的截止时间 48小时内
//处理申请的截止时间 48小时内
Date
now
=
new
Date
();
Date
now
=
new
Date
();
...
@@ -333,6 +355,30 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
...
@@ -333,6 +355,30 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
exchangeApplyOrderVo
.
setOrderType
(
ExchangeApplyOrderEnum
.
TypeEnum
.
COMMIT
.
getCode
());
exchangeApplyOrderVo
.
setOrderType
(
ExchangeApplyOrderEnum
.
TypeEnum
.
COMMIT
.
getCode
());
exchangeApplyOrderVo
.
setOrderTypeName
(
ExchangeApplyOrderEnum
.
TypeEnum
.
COMMIT
.
getDes
());
exchangeApplyOrderVo
.
setOrderTypeName
(
ExchangeApplyOrderEnum
.
TypeEnum
.
COMMIT
.
getDes
());
}
}
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
PRE_HANDLE
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"待处理"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
AGREE
.
getCode
()
||
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
SYSTEM_AGREE
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换中"
);
exchangeApplyOrderVo
.
setStateDesc
(
"同意交换"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
DISAGREE
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换关闭"
);
exchangeApplyOrderVo
.
setStateDesc
(
"拒绝交换,交换关闭"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
SYSTEM_DISAGREE
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换关闭"
);
exchangeApplyOrderVo
.
setStateDesc
(
"验货不通过,交换关闭"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
USER_CANCEL
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换关闭"
);
exchangeApplyOrderVo
.
setStateDesc
(
"取消申请,交换关闭"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
SYSTEM_CANCEL
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换关闭"
);
exchangeApplyOrderVo
.
setStateDesc
(
"超时未处理,交换关闭"
);
}
else
if
(
exchangeApplyOrder
.
getState
()
==
ExchangeApplyOrderEnum
.
StateEnum
.
FINISH
.
getCode
())
{
exchangeApplyOrderVo
.
setStateTitle
(
"交换完成"
);
exchangeApplyOrderVo
.
setStateDesc
(
"交换完成"
);
}
//处理申请的截止时间 48小时内
//处理申请的截止时间 48小时内
Date
now
=
new
Date
();
Date
now
=
new
Date
();
Instant
instant
=
now
.
toInstant
().
plus
(
Duration
.
ofHours
(
48
));
Instant
instant
=
now
.
toInstant
().
plus
(
Duration
.
ofHours
(
48
));
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeOrderServiceImpl.java
View file @
6276aec5
...
@@ -262,8 +262,9 @@ public class ExchangeOrderServiceImpl implements ExchangeOrderService {
...
@@ -262,8 +262,9 @@ public class ExchangeOrderServiceImpl implements ExchangeOrderService {
if
(
diffInHours
>=
48
)
{
if
(
diffInHours
>=
48
)
{
distributionOrderDao
.
updateState
(
distributionOrder
.
getDistributionOrderId
(),
DistributionEnum
.
DistributionOrderStateEnum
.
CANCEL
.
getCode
());
distributionOrderDao
.
updateState
(
distributionOrder
.
getDistributionOrderId
(),
DistributionEnum
.
DistributionOrderStateEnum
.
CANCEL
.
getCode
());
//换藏的品取消订单后恢复库存
//换藏的品取消订单后恢复库存
if
(!
distributionOrder
.
getIsMultiple
())
{
ExchangeApplyOrder
exchangeApplyOrder
=
exchangeApplyOrderDao
.
findByExchangeOrderId
(
orderId
);
exchangeApplyOrderDetailDao
.
updateInValid
(
orderId
);
exchangeApplyOrderDao
.
updateState
(
exchangeApplyOrder
.
getExchangeApplyOrderId
(),
ExchangeApplyOrderEnum
.
StateEnum
.
SYSTEM_CANCEL
.
getCode
());
exchangeApplyOrderDetailDao
.
updateInValid
(
exchangeApplyOrder
.
getExchangeApplyOrderId
());
distributionOrderDao
.
updateState
(
orderId
,
DistributionEnum
.
DistributionOrderStateEnum
.
CANCEL
.
getCode
());
distributionOrderDao
.
updateState
(
orderId
,
DistributionEnum
.
DistributionOrderStateEnum
.
CANCEL
.
getCode
());
//查询交换订单商品快照
//查询交换订单商品快照
List
<
ExchangeOrderSnapshot
>
list
=
exchangeOrderSnapshotDao
.
findByOrderId
(
orderId
);
List
<
ExchangeOrderSnapshot
>
list
=
exchangeOrderSnapshotDao
.
findByOrderId
(
orderId
);
...
@@ -281,7 +282,6 @@ public class ExchangeOrderServiceImpl implements ExchangeOrderService {
...
@@ -281,7 +282,6 @@ public class ExchangeOrderServiceImpl implements ExchangeOrderService {
exchangeOrderSnapshot
.
setIsValid
(
false
);
exchangeOrderSnapshot
.
setIsValid
(
false
);
exchangeOrderSnapshotDao
.
update
(
exchangeOrderSnapshot
);
exchangeOrderSnapshotDao
.
update
(
exchangeOrderSnapshot
);
}
}
}
});
});
}
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeServiceImpl.java
View file @
6276aec5
...
@@ -109,7 +109,8 @@ public class ExchangeServiceImpl implements ExchangeService {
...
@@ -109,7 +109,8 @@ public class ExchangeServiceImpl implements ExchangeService {
//标签id为空则查询所有的藏品
//标签id为空则查询所有的藏品
if
(
dto
.
getCollectionBookId
()
==
null
)
{
if
(
dto
.
getCollectionBookId
()
==
null
)
{
//查询所有的上传藏品
//查询所有的上传藏品
supplierItemRequestDto
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
());
supplierItemRequestDto
.
setTypeList
(
Arrays
.
asList
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
(),
DistributionEnum
.
DistributionTypeEnum
.
EXCHANGE
.
getCode
()));
supplierItemRequestDto
.
setCreatorId
(
targetUserId
);
supplierItemRequestDto
.
setCreatorId
(
targetUserId
);
supplierItemRequestDto
.
setIsDeleted
(
false
);
supplierItemRequestDto
.
setIsDeleted
(
false
);
supplierItemList
=
supplierItemDao
.
findList
(
supplierItemRequestDto
);
supplierItemList
=
supplierItemDao
.
findList
(
supplierItemRequestDto
);
...
@@ -117,14 +118,16 @@ public class ExchangeServiceImpl implements ExchangeService {
...
@@ -117,14 +118,16 @@ public class ExchangeServiceImpl implements ExchangeService {
}
else
if
(
dto
.
getCollectionBookId
().
longValue
()
==
CollectionBookConstants
.
DefaultBookEnum
.
SALEING
.
getId
())
{
}
else
if
(
dto
.
getCollectionBookId
().
longValue
()
==
CollectionBookConstants
.
DefaultBookEnum
.
SALEING
.
getId
())
{
//换藏中, 表示上架售卖中
//换藏中, 表示上架售卖中
supplierItemRequestDto
.
setCreatorId
(
targetUserId
);
supplierItemRequestDto
.
setCreatorId
(
targetUserId
);
supplierItemRequestDto
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
());
supplierItemRequestDto
.
setTypeList
(
Arrays
.
asList
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
(),
DistributionEnum
.
DistributionTypeEnum
.
EXCHANGE
.
getCode
()));
supplierItemRequestDto
.
setIsOnSale
(
true
);
supplierItemRequestDto
.
setIsOnSale
(
true
);
supplierItemRequestDto
.
setIsDeleted
(
false
);
supplierItemRequestDto
.
setIsDeleted
(
false
);
supplierItemList
=
supplierItemDao
.
findList
(
supplierItemRequestDto
);
supplierItemList
=
supplierItemDao
.
findList
(
supplierItemRequestDto
);
pageInfo
=
new
PageInfo
<>(
supplierItemList
);
pageInfo
=
new
PageInfo
<>(
supplierItemList
);
}
else
if
(
dto
.
getCollectionBookId
().
longValue
()
==
CollectionBookConstants
.
DefaultBookEnum
.
FINISHED
.
getId
())
{
}
else
if
(
dto
.
getCollectionBookId
().
longValue
()
==
CollectionBookConstants
.
DefaultBookEnum
.
FINISHED
.
getId
())
{
//已结缘, 表示卖完了
//已结缘, 表示卖完了
supplierItemRequestDto
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
());
supplierItemRequestDto
.
setTypeList
(
Arrays
.
asList
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
(),
DistributionEnum
.
DistributionTypeEnum
.
EXCHANGE
.
getCode
()));
supplierItemRequestDto
.
setCreatorId
(
targetUserId
);
supplierItemRequestDto
.
setCreatorId
(
targetUserId
);
supplierItemRequestDto
.
setStock
(
0
);
supplierItemRequestDto
.
setStock
(
0
);
supplierItemList
=
supplierItemDao
.
findSellOutList
(
supplierItemRequestDto
);
supplierItemList
=
supplierItemDao
.
findSellOutList
(
supplierItemRequestDto
);
...
@@ -382,7 +385,7 @@ public class ExchangeServiceImpl implements ExchangeService {
...
@@ -382,7 +385,7 @@ public class ExchangeServiceImpl implements ExchangeService {
updateOrderDto
.
setReceiverAddress
(
dto
.
getReceiverAddress
());
updateOrderDto
.
setReceiverAddress
(
dto
.
getReceiverAddress
());
updateOrderDto
.
setReceiverName
(
dto
.
getReceiverName
());
updateOrderDto
.
setReceiverName
(
dto
.
getReceiverName
());
updateOrderDto
.
setReceiverPhone
(
dto
.
getReceiverPhone
());
updateOrderDto
.
setReceiverPhone
(
dto
.
getReceiverPhone
());
distributionOrderDao
.
update
(
distributionOrder
);
distributionOrderDao
.
update
(
updateOrderDto
);
}
}
return
Result
.
success
();
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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