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
cc3e8841
Commit
cc3e8841
authored
Dec 01, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户商品关联表删除,直接用商品表记录用户id11
parent
74889956
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/CoinRequestDto.java
.../main/java/com/wwdz/ch/db/dto/request/CoinRequestDto.java
+6
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
+1
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
...main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
+4
-7
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/CoinRequestDto.java
View file @
cc3e8841
...
...
@@ -117,4 +117,10 @@ public class CoinRequestDto extends BaseRequestDto implements Entity {
* 成交时间
*/
private
String
bidTime
;
/**
* 上传商品的用户id
*/
private
Long
userId
;
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
View file @
cc3e8841
...
...
@@ -50,6 +50,7 @@ public class ItemDaoImpl implements ItemDao {
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getId
(),
criteria
::
andIdEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getIds
(),
criteria:
:
andIdIn
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getUserId
(),
criteria:
:
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getCid
(),
criteria
::
andCidEqualTo
);
if
(
StringUtils
.
hasLength
(
coinRequestDto
.
getName
()))
{
criteria
.
andNameLike
(
"%"
+
coinRequestDto
.
getName
()
+
"%"
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
View file @
cc3e8841
...
...
@@ -80,15 +80,12 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
if
(
StringUtils
.
hasLength
(
dto
.
getSearchParam
()))
{
//判断查询条件是否为中文,是的话就根据商品名称模糊查询
if
(
RegexUtil
.
isContainChinese
(
dto
.
getSearchParam
()))
{
//先查询该用户发布的商品id
List
<
UserItemsRelation
>
userItemsRelations
=
itemDao
.
listByUserIds
(
dto
.
getUserId
(),
null
);
List
<
Long
>
itemIds
=
userItemsRelations
.
stream
().
map
(
UserItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
coinRequestDto
.
set
Ids
(
itemIds
);
coinRequestDto
.
set
UserId
(
dto
.
getUserId
()
);
coinRequestDto
.
setName
(
dto
.
getSearchParam
());
List
<
Item
>
items
=
itemDao
.
findList
(
coinRequestDto
);
if
(!
CollectionUtils
.
isEmpty
(
items
))
{
itemIds
=
items
.
stream
().
map
(
Item:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
itemIds
=
items
.
stream
().
map
(
Item:
:
getId
).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
itemIds
))
{
dto
.
setItemIds
(
itemIds
);
}
}
else
{
...
...
@@ -115,7 +112,7 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
PageSearchResult
pageSearchResult
=
PageSearchResult
.
of
(
pageInfo
,
consignSaleVos
);
return
Result
.
success
(
pageSearchResult
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询
接收
单列表error : {}"
,
e
);
logger
.
error
(
"查询
寄售
单列表error : {}"
,
e
);
}
return
Result
.
failed
();
}
...
...
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