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
ae0c265c
Commit
ae0c265c
authored
Mar 22, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into quanku_v2.0
parents
9ce4cd60
149014e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/DistributorShareRecordMapper.xml
...h/db/mapper/distribution/DistributorShareRecordMapper.xml
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+4
-1
No files found.
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/DistributorShareRecordMapper.xml
View file @
ae0c265c
...
@@ -376,7 +376,7 @@
...
@@ -376,7 +376,7 @@
(SELECT item_id, MAX(price) as max_amount
(SELECT item_id, MAX(price) as max_amount
FROM distributor_share_record where `distributor_id` = #{distributorId} AND `type` = #{type} AND enabled =1
FROM distributor_share_record where `distributor_id` = #{distributorId} AND `type` = #{type} AND enabled =1
GROUP BY item_id) t
GROUP BY item_id) t
ON d.item_id = t.item_id AND price = t.max_amount where d.distributor_id = #{distributorId} AND d.type = #{type};
ON d.item_id = t.item_id AND price = t.max_amount where d.distributor_id = #{distributorId} AND d.type = #{type}
AND d.enabled =1
;
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
ae0c265c
...
@@ -278,6 +278,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -278,6 +278,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
Map
<
Long
,
DistributorShareRecord
>
map
=
distributorShareRecordList
.
stream
().
collect
(
Collectors
.
toMap
(
DistributorShareRecord:
:
getItemId
,
Function
.
identity
(),
(
k1
,
k2
)
->
k1
));
Map
<
Long
,
DistributorShareRecord
>
map
=
distributorShareRecordList
.
stream
().
collect
(
Collectors
.
toMap
(
DistributorShareRecord:
:
getItemId
,
Function
.
identity
(),
(
k1
,
k2
)
->
k1
));
logger
.
info
(
">>>>>>> map >>>>> : {}"
,
JsonUtils
.
from
(
map
));
logger
.
info
(
">>>>>>> map >>>>> : {}"
,
JsonUtils
.
from
(
map
));
List
<
Long
>
itemIds
=
distributorShareRecordList
.
stream
().
map
(
DistributorShareRecord:
:
getItemId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
itemIds
=
distributorShareRecordList
.
stream
().
map
(
DistributorShareRecord:
:
getItemId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
itemIds
))
{
return
Result
.
success
(
new
PageSearchResult
<>());
}
SupplierItemRequestDto
searchDto
=
new
SupplierItemRequestDto
();
SupplierItemRequestDto
searchDto
=
new
SupplierItemRequestDto
();
searchDto
.
setIsOnSale
(
true
);
searchDto
.
setIsOnSale
(
true
);
searchDto
.
setIsDeleted
(
false
);
searchDto
.
setIsDeleted
(
false
);
...
@@ -311,7 +314,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -311,7 +314,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
});
});
return
Result
.
success
(
PageSearchResult
.
of
(
pageInfo
,
supplierItemVos
));
return
Result
.
success
(
PageSearchResult
.
of
(
pageInfo
,
supplierItemVos
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询最近订单所属分销商的商品列表
error : {}"
,
e
);
logger
.
error
(
"查询最近订单所属分销商的商品列表
,商品类型为:{}, error : {}"
,
dto
.
getType
()
,
e
);
}
}
return
Result
.
failed
();
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