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
b0a74ad7
Commit
b0a74ad7
authored
Jun 05, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享
parent
8e4df318
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributorShareRecordServiceImpl.java
.../impl/distribution/DistributorShareRecordServiceImpl.java
+1
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
+16
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+6
-3
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributorShareRecordServiceImpl.java
View file @
b0a74ad7
...
@@ -137,6 +137,7 @@ public class DistributorShareRecordServiceImpl implements DistributorShareRecord
...
@@ -137,6 +137,7 @@ public class DistributorShareRecordServiceImpl implements DistributorShareRecord
distributorShareRecord
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
AUCTION_PERFORMANCE
.
getCode
());
distributorShareRecord
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
AUCTION_PERFORMANCE
.
getCode
());
distributorShareRecordDao
.
insert
(
distributorShareRecord
);
distributorShareRecordDao
.
insert
(
distributorShareRecord
);
SpecialPerformanceConfigRequestDto
specialPerformanceConfigRequestDto
=
new
SpecialPerformanceConfigRequestDto
();
SpecialPerformanceConfigRequestDto
specialPerformanceConfigRequestDto
=
new
SpecialPerformanceConfigRequestDto
();
specialPerformanceConfigRequestDto
.
setSpecialPerformanceId
(
dto
.
getSpecialPerformanceId
());
specialPerformanceConfigRequestDto
.
setLimit
(
7
);
specialPerformanceConfigRequestDto
.
setLimit
(
7
);
List
<
SpecialPerformanceConfig
>
list
=
specialPerformanceConfigDao
.
findList
(
specialPerformanceConfigRequestDto
);
List
<
SpecialPerformanceConfig
>
list
=
specialPerformanceConfigDao
.
findList
(
specialPerformanceConfigRequestDto
);
PageInfo
pageInfo
=
new
PageInfo
(
list
);
PageInfo
pageInfo
=
new
PageInfo
(
list
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
View file @
b0a74ad7
...
@@ -167,6 +167,22 @@ public class SelfPageServiceImpl implements SelfPageService {
...
@@ -167,6 +167,22 @@ public class SelfPageServiceImpl implements SelfPageService {
s
.
setStateName
(
DistributionEnum
.
DistributionOrderStateEnum
.
getNameByCode
(
s
.
getState
()));
s
.
setStateName
(
DistributionEnum
.
DistributionOrderStateEnum
.
getNameByCode
(
s
.
getState
()));
});
});
selfPageInfoVo
.
setOrderNum
(
selfBuyNumList
);
selfPageInfoVo
.
setOrderNum
(
selfBuyNumList
);
//查询4天内出价记录
Date
now
=
new
Date
();
Instant
instant
=
now
.
toInstant
().
minus
(
Duration
.
ofDays
(
4
));
Date
queryStartTime
=
Date
.
from
(
instant
);
List
<
AuctionRecord
>
auctionRecords
=
auctionRecordDao
.
findRecordByUserId
(
dto
.
getUserId
(),
queryStartTime
,
now
);
List
<
Long
>
itemIds
=
auctionRecords
.
stream
().
map
(
AuctionRecord:
:
getItemId
).
distinct
().
collect
(
Collectors
.
toList
());
int
num
=
0
;
for
(
long
itemId
:
itemIds
)
{
AuctionConfig
auctionConfig
=
auctionConfigDao
.
findByItemId
(
itemId
);
if
(
auctionConfig
.
getRealEndTime
().
after
(
now
)
&&
auctionConfig
.
getIsValid
())
{
num
=
num
+
1
;
}
}
selfPageInfoVo
.
setUserOfferNum
(
num
);
return
Result
.
success
(
selfPageInfoVo
);
return
Result
.
success
(
selfPageInfoVo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询藏家个人主页失败 error : {}"
,
e
);
logger
.
error
(
"查询藏家个人主页失败 error : {}"
,
e
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
b0a74ad7
...
@@ -464,12 +464,12 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -464,12 +464,12 @@ public class SupplierItemServiceImpl implements SupplierItemService {
try
{
try
{
AuctionDetailVo
auctionDetailVo
=
new
AuctionDetailVo
();
AuctionDetailVo
auctionDetailVo
=
new
AuctionDetailVo
();
Date
now
=
new
Date
();
Date
now
=
new
Date
();
long
itemId
=
0
;
Long
itemId
;
String
shareRecordId
=
dto
.
getShareRecordId
();
String
shareRecordId
=
dto
.
getShareRecordId
();
DistributorShareRecord
distributorShareRecord
=
null
;
DistributorShareRecord
distributorShareRecord
=
null
;
if
(
StringUtils
.
isEmpty
(
shareRecordId
)
&&
dto
.
getId
()
==
null
)
{
if
(
StringUtils
.
isEmpty
(
shareRecordId
)
&&
dto
.
getId
()
==
null
)
{
return
Result
.
failed
(
"商品信息为空"
);
return
Result
.
failed
(
"商品信息为空"
);
}
else
if
(
StringUtils
.
hasLength
(
shareRecordId
))
{
}
else
if
(
StringUtils
.
hasLength
(
shareRecordId
)
&&
!
shareRecordId
.
equals
(
CommConsts
.
DEFAULT_SHARE_ID
)
)
{
distributorShareRecord
=
distributorShareRecordDao
.
findById
(
shareRecordId
);
distributorShareRecord
=
distributorShareRecordDao
.
findById
(
shareRecordId
);
if
(
distributorShareRecord
==
null
||
!
distributorShareRecord
.
getEnabled
())
{
if
(
distributorShareRecord
==
null
||
!
distributorShareRecord
.
getEnabled
())
{
return
Result
.
failed
(
"该商品已下架"
);
return
Result
.
failed
(
"该商品已下架"
);
...
@@ -479,7 +479,10 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -479,7 +479,10 @@ public class SupplierItemServiceImpl implements SupplierItemService {
}
else
{
}
else
{
itemId
=
dto
.
getId
();
itemId
=
dto
.
getId
();
}
}
if
(
StringUtils
.
hasLength
(
shareRecordId
))
{
if
(
itemId
==
null
)
{
return
Result
.
failed
(
"没有对应的商品id"
);
}
if
(
StringUtils
.
hasLength
(
shareRecordId
)
&&
!
shareRecordId
.
equals
(
CommConsts
.
DEFAULT_SHARE_ID
))
{
if
(
distributorShareRecord
.
getDistributorId
().
longValue
()
!=
dto
.
getUserId
().
longValue
())
{
if
(
distributorShareRecord
.
getDistributorId
().
longValue
()
!=
dto
.
getUserId
().
longValue
())
{
//做浏览记录
//做浏览记录
boolean
flag
=
userRecentBrowseDao
.
isExisted
(
dto
.
getUserId
(),
distributorShareRecord
.
getDistributorId
());
boolean
flag
=
userRecentBrowseDao
.
isExisted
(
dto
.
getUserId
(),
distributorShareRecord
.
getDistributorId
());
...
...
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