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
d064ec23
Commit
d064ec23
authored
Sep 12, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
藏品详情加上是否为官方商品的字段
parent
50065c7d
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
318 additions
and
11 deletions
+318
-11
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/SysExchangeApplyOrderController.java
.../ch/admin/controller/SysExchangeApplyOrderController.java
+68
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysExchangeApplyOrderServiceImpl.java
.../wwdz/ch/admin/impl/SysExchangeApplyOrderServiceImpl.java
+205
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/SysExchangeApplyOrderService.java
...m/wwdz/ch/admin/service/SysExchangeApplyOrderService.java
+32
-0
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
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeApplyOrderServiceImpl.java
...h/wx/impl/distribution/ExchangeApplyOrderServiceImpl.java
+4
-7
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+4
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/ExchangeApplyOrderController.java
.../ch/wx/web/distribution/ExchangeApplyOrderController.java
+2
-2
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/SysExchangeApplyOrderController.java
0 → 100644
View file @
d064ec23
package
com.wwdz.ch.admin.controller
;
import
com.alibaba.fastjson.JSON
;
import
com.wwdz.ch.admin.service.SysExchangeApplyOrderService
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.exchange.ExchangeApplyOrderRequestDto
;
import
com.xxdxxs.service.FormHandler
;
import
com.xxdxxs.validation.Validator
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/admin/exchangeApplyOrder"
)
public
class
SysExchangeApplyOrderController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
SysExchangeApplyOrderController
.
class
);
@Autowired
SysExchangeApplyOrderService
sysExchangeApplyOrderService
;
@ApiOperation
(
value
=
"平台审核申请单"
)
@PostMapping
(
"/handleApplyOrder"
)
public
Result
handleApplyOrder
(
@RequestBody
ExchangeApplyOrderRequestDto
dto
)
{
logger
.
info
(
"处理申请单,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"exchangeApplyOrderId"
,
"交换申请单号"
).
must
().
string
()
.
set
(
"state"
,
"状态"
).
must
().
number
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
validator
.
getErrorInfo
());
}
return
sysExchangeApplyOrderService
.
handleApplyOrder
(
dto
);
}
@ApiOperation
(
value
=
"查询交换单列表"
)
@PostMapping
(
"/findList"
)
public
Result
findList
(
@RequestBody
ExchangeApplyOrderRequestDto
dto
)
{
logger
.
info
(
"查询交换单列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
return
sysExchangeApplyOrderService
.
findList
(
dto
);
}
@ApiOperation
(
value
=
"查询交换单详情"
)
@PostMapping
(
"/findDetail"
)
public
Result
findDetail
(
@RequestBody
ExchangeApplyOrderRequestDto
dto
)
{
logger
.
info
(
"查询交换单详情,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"exchangeApplyOrderId"
,
"交换申请单号"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
validator
.
getErrorInfo
());
}
return
sysExchangeApplyOrderService
.
findDetail
(
dto
);
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysExchangeApplyOrderServiceImpl.java
0 → 100644
View file @
d064ec23
This diff is collapsed.
Click to expand it.
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/SysExchangeApplyOrderService.java
0 → 100644
View file @
d064ec23
package
com.wwdz.ch.admin.service
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.exchange.ExchangeApplyOrderRequestDto
;
public
interface
SysExchangeApplyOrderService
{
/**
* 处理申请单
* @param dto
* @return
*/
Result
handleApplyOrder
(
ExchangeApplyOrderRequestDto
dto
);
/**
* 查询交换单列表
* @param dto
* @return
*/
Result
findList
(
ExchangeApplyOrderRequestDto
dto
);
/**
* 查询交换单详情
* @param dto
* @return
*/
Result
findDetail
(
ExchangeApplyOrderRequestDto
dto
);
}
ch-core/src/main/java/com/wwdz/ch/core/consts/ExchangeApplyOrderEnum.java
View file @
d064ec23
...
...
@@ -6,7 +6,8 @@ public class ExchangeApplyOrderEnum {
PRE_HANDLE
(
0
,
"待处理"
),
AGREE
(
1
,
"同意"
),
DISAGREE
(
2
,
"拒绝"
),
SYSTEM_DISAGREE
(
3
,
"平台鉴定后拒绝"
),
SYSTEM_AGREE
(
3
,
"平台鉴定后通过"
),
SYSTEM_DISAGREE
(
4
,
"平台鉴定后拒绝"
),
CANCEL
(-
1
,
"取消"
),
;
...
...
ch-core/src/main/java/com/wwdz/ch/core/entity/exchange/ExchangeApplyOrderVo.java
View file @
d064ec23
...
...
@@ -28,7 +28,7 @@ public class ExchangeApplyOrderVo implements Entity {
/**
* 想要换的目标商品id
*/
private
SupplierItemVo
targetItemInfo
;
private
List
<
SupplierItemVo
>
targetItemList
;
/**
* 目标用户id
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeApplyOrderServiceImpl.java
View file @
d064ec23
...
...
@@ -34,16 +34,13 @@ import org.springframework.util.CollectionUtils;
import
java.time.Duration
;
import
java.time.Instant
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
ExchangeApplyOrderServiceImpl
implements
ExchangeApplyOrderService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
DistributorProfit
ServiceImpl
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ExchangeApplyOrder
ServiceImpl
.
class
);
@Autowired
ExchangeApplyOrderDetailDao
exchangeApplyOrderDetailDao
;
...
...
@@ -252,7 +249,7 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
targetItemVo
.
setDistributionPrice
(
PriceUtil
.
convertPriceFenToYuan
(
targetItem
.
getDistributionPrice
()));
targetItemVo
.
setOfficialEstimatedPrice
(
PriceUtil
.
convertPriceFenToYuan
(
targetItem
.
getOfficialEstimatedPrice
()));
targetItemVo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
targetItem
.
getImages
(),
targetItem
.
getVideos
()));
exchangeApplyOrderVo
.
setTargetItem
Info
(
targetItemVo
);
exchangeApplyOrderVo
.
setTargetItem
List
(
Arrays
.
asList
(
targetItemVo
)
);
List
<
ExchangeApplyOrderDetail
>
detailList
=
exchangeApplyOrderDetailDao
.
findByOrderId
(
exchangeApplyOrder
.
getExchangeApplyOrderId
());
List
<
SupplierItemVo
>
userItemList
=
new
ArrayList
<>();
...
...
@@ -310,7 +307,7 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
targetItemVo
.
setDistributionPrice
(
PriceUtil
.
convertPriceFenToYuan
(
targetItem
.
getDistributionPrice
()));
targetItemVo
.
setOfficialEstimatedPrice
(
PriceUtil
.
convertPriceFenToYuan
(
targetItem
.
getOfficialEstimatedPrice
()));
targetItemVo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
targetItem
.
getImages
(),
targetItem
.
getVideos
()));
exchangeApplyOrderVo
.
setTargetItem
Info
(
targetItemVo
);
exchangeApplyOrderVo
.
setTargetItem
List
(
Arrays
.
asList
(
targetItemVo
)
);
List
<
ExchangeApplyOrderDetail
>
detailList
=
exchangeApplyOrderDetailDao
.
findByOrderId
(
exchangeApplyOrder
.
getExchangeApplyOrderId
());
List
<
SupplierItemVo
>
userItemList
=
new
ArrayList
<>();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
d064ec23
...
...
@@ -1020,6 +1020,10 @@ public class SupplierItemServiceImpl implements SupplierItemService {
String
shareTip
=
"分享藏品,成交最高可得3%("
+
PriceUtil
.
convertDoubleToString
(
introduceCost
)
+
")的介绍佣金"
;
supplierItemVo
.
setShareTip
(
shareTip
);
if
(
CommConsts
.
SELF_SUPPORT_ACCOUNT
.
longValue
()
==
supplierItem
.
getCreatorId
())
{
supplierItemVo
.
setIsOfficialItem
(
true
);
}
//查询商品所属标签
List
<
CollectionItemsRelation
>
collectionItemsRelations
=
collectionItemsRelationDao
.
findByItemId
(
itemId
);
List
<
Long
>
collectBookIds
=
collectionItemsRelations
.
stream
().
map
(
CollectionItemsRelation:
:
getCollectionBookId
).
collect
(
Collectors
.
toList
());
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/ExchangeApplyOrderController.java
View file @
d064ec23
...
...
@@ -60,7 +60,7 @@ public class ExchangeApplyOrderController {
@ApiOperation
(
value
=
"用户取消交换申请"
)
@PostMapping
(
"/cancel"
)
public
Result
cancel
(
@RequestBody
ExchangeApplyOrderRequestDto
dto
)
{
logger
.
info
(
"用户
申请以物换物
,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"用户
取消交换申请
,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"exchangeApplyOrderId"
,
"交换申请单号"
).
must
().
string
()
.
end
();
...
...
@@ -74,7 +74,7 @@ public class ExchangeApplyOrderController {
@ApiOperation
(
value
=
"查询交换单列表"
)
@PostMapping
(
"/findList"
)
public
Result
findList
(
@RequestBody
ExchangeApplyOrderRequestDto
dto
)
{
logger
.
info
(
"
用户申请以物换物
,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"
查询交换单列表
,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"userId"
,
"用户ID"
).
must
().
number
()
.
set
(
"type"
,
"类型"
).
must
().
number
()
...
...
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