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
c5bd4f2b
Commit
c5bd4f2b
authored
Mar 26, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人藏馆2
parent
c8785638
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/SysSupplierItemController.java
...m/wwdz/ch/admin/controller/SysSupplierItemController.java
+1
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+3
-5
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/SysSupplierItemController.java
View file @
c5bd4f2b
...
@@ -33,6 +33,7 @@ public class SysSupplierItemController {
...
@@ -33,6 +33,7 @@ public class SysSupplierItemController {
logger
.
info
(
"新增商品,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"新增商品,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"name"
,
"商品名称"
).
must
().
string
()
validator
.
set
(
"name"
,
"商品名称"
).
must
().
string
()
.
set
(
"images"
,
"图片"
).
must
().
string
()
.
set
(
"type"
,
"商品类型"
).
must
().
number
()
.
set
(
"type"
,
"商品类型"
).
must
().
number
()
.
set
(
"buyLimitNum"
,
"限购数量"
).
must
().
number
()
.
set
(
"buyLimitNum"
,
"限购数量"
).
must
().
number
()
.
end
();
.
end
();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
c5bd4f2b
...
@@ -188,7 +188,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -188,7 +188,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
itemId
);
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
itemId
);
SupplierItemVo
supplierItemVo
=
new
SupplierItemVo
();
SupplierItemVo
supplierItemVo
=
new
SupplierItemVo
();
if
(
StringUtils
.
hasLength
(
shareRecordId
))
{
if
(
StringUtils
.
hasLength
(
shareRecordId
))
{
if
(
distributorShareRecord
.
getDistributorId
()
!=
dto
.
getUserId
())
{
if
(
distributorShareRecord
.
getDistributorId
()
.
longValue
()
!=
dto
.
getUserId
().
longValue
())
{
//做浏览记录
//做浏览记录
boolean
flag
=
userRecentBrowseDao
.
isExisted
(
dto
.
getUserId
(),
distributorShareRecord
.
getDistributorId
());
boolean
flag
=
userRecentBrowseDao
.
isExisted
(
dto
.
getUserId
(),
distributorShareRecord
.
getDistributorId
());
if
(!
flag
)
{
if
(!
flag
)
{
...
@@ -407,7 +407,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -407,7 +407,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
itemId
=
dto
.
getId
();
itemId
=
dto
.
getId
();
}
}
if
(
StringUtils
.
hasLength
(
shareRecordId
))
{
if
(
StringUtils
.
hasLength
(
shareRecordId
))
{
if
(
distributorShareRecord
.
getDistributorId
()
!=
dto
.
getUserId
())
{
if
(
distributorShareRecord
.
getDistributorId
()
.
longValue
()
!=
dto
.
getUserId
().
longValue
())
{
//做浏览记录
//做浏览记录
boolean
flag
=
userRecentBrowseDao
.
isExisted
(
dto
.
getUserId
(),
distributorShareRecord
.
getDistributorId
());
boolean
flag
=
userRecentBrowseDao
.
isExisted
(
dto
.
getUserId
(),
distributorShareRecord
.
getDistributorId
());
if
(!
flag
)
{
if
(!
flag
)
{
...
@@ -635,8 +635,6 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -635,8 +635,6 @@ public class SupplierItemServiceImpl implements SupplierItemService {
collectionShareRecord
=
collectionShareRecordDao
.
findById
(
dto
.
getShareRecordId
());
collectionShareRecord
=
collectionShareRecordDao
.
findById
(
dto
.
getShareRecordId
());
itemId
=
collectionShareRecord
.
getShareTargetId
();
itemId
=
collectionShareRecord
.
getShareTargetId
();
}
}
supplierItemVo
.
setIsCollected
(
true
);
supplierItemVo
.
setIsCollected
(
true
);
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
itemId
);
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
itemId
);
if
(
supplierItem
.
getCreatorId
().
longValue
()
!=
userId
)
{
if
(
supplierItem
.
getCreatorId
().
longValue
()
!=
userId
)
{
...
@@ -656,7 +654,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -656,7 +654,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
}
}
//如果是客态,需要记录浏览记录
//如果是客态,需要记录浏览记录
if
(
StringUtils
.
hasLength
(
dto
.
getShareRecordId
()))
{
if
(
StringUtils
.
hasLength
(
dto
.
getShareRecordId
()))
{
if
(
collectionShareRecord
.
getItemUserId
().
longValue
()
!=
dto
.
getUserId
())
{
if
(
collectionShareRecord
.
getItemUserId
().
longValue
()
!=
dto
.
getUserId
()
.
longValue
()
)
{
boolean
isExisted
=
userRecentBrowseDao
.
isExistedBySharedUserId
(
userId
,
collectionShareRecord
.
getItemUserId
());
boolean
isExisted
=
userRecentBrowseDao
.
isExistedBySharedUserId
(
userId
,
collectionShareRecord
.
getItemUserId
());
if
(!
isExisted
)
{
if
(!
isExisted
)
{
UserRecentBrowse
userRecentBrowse
=
new
UserRecentBrowse
();
UserRecentBrowse
userRecentBrowse
=
new
UserRecentBrowse
();
...
...
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