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
a5cd578e
Commit
a5cd578e
authored
Apr 23, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人主页商品列表排序
parent
f36b7de3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
11 deletions
+51
-11
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SupplierItemDao.java
...java/com/wwdz/ch/db/dao/distribution/SupplierItemDao.java
+9
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
...com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
+18
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/DeliveryNoticeMsg.java
...rc/main/java/com/wwdz/ch/wx/entity/DeliveryNoticeMsg.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/SignedNoticeMsg.java
.../src/main/java/com/wwdz/ch/wx/entity/SignedNoticeMsg.java
+10
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionBookServiceImpl.java
...dz/ch/wx/impl/distribution/CollectionBookServiceImpl.java
+5
-7
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionItemsRelationServiceImpl.java
...impl/distribution/CollectionItemsRelationServiceImpl.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
...ch/wx/impl/distribution/DistributionOrderServiceImpl.java
+6
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SendMsgServiceImpl.java
.../com/wwdz/ch/wx/impl/distribution/SendMsgServiceImpl.java
+1
-1
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SupplierItemDao.java
View file @
a5cd578e
...
@@ -20,6 +20,15 @@ public interface SupplierItemDao {
...
@@ -20,6 +20,15 @@ public interface SupplierItemDao {
*/
*/
List
<
SupplierItem
>
findList
(
SupplierItemRequestDto
supplierItemRequestDto
);
List
<
SupplierItem
>
findList
(
SupplierItemRequestDto
supplierItemRequestDto
);
/**
* 个人主页查询商品列表
* 特殊排序
* @param supplierItemRequestDto
* @return
*/
List
<
SupplierItem
>
findListForSort
(
SupplierItemRequestDto
supplierItemRequestDto
);
/**
/**
* 查询用户上传的已经售罄的商品
* 查询用户上传的已经售罄的商品
* @param dto
* @param dto
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
View file @
a5cd578e
...
@@ -48,6 +48,24 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
...
@@ -48,6 +48,24 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
}
}
@Override
public
List
<
SupplierItem
>
findListForSort
(
SupplierItemRequestDto
dto
)
{
SupplierItemExample
supplierItemExample
=
new
SupplierItemExample
();
SupplierItemExample
.
Criteria
criteria
=
supplierItemExample
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getCreatorId
(),
criteria:
:
andCreatorIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getId
(),
criteria:
:
andIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getIds
(),
criteria:
:
andIdIn
);
if
(
StringUtils
.
hasLength
(
dto
.
getName
()))
{
criteria
.
andNameLike
(
"%"
+
dto
.
getName
()
+
"%"
);
}
JdbcHelper
.
ifPresent
(
dto
.
getType
(),
criteria:
:
andTypeEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getStock
(),
criteria:
:
andStockGreaterThan
);
JdbcHelper
.
ifPresent
(
dto
.
getIsOnSale
(),
criteria:
:
andIsOnSaleEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getIsDeleted
(),
criteria:
:
andIsDeletedEqualTo
);
supplierItemExample
.
setOrderByClause
(
" is_on_sale desc, stock desc, create_time desc"
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
return
supplierItemMapper
.
selectByExampleWithBLOBs
(
supplierItemExample
);
}
@Override
@Override
public
List
<
SupplierItem
>
findSellOutList
(
SupplierItemRequestDto
dto
)
{
public
List
<
SupplierItem
>
findSellOutList
(
SupplierItemRequestDto
dto
)
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/DeliveryNoticeMsg.java
View file @
a5cd578e
...
@@ -42,7 +42,7 @@ public class DeliveryNoticeMsg implements Entity, AbstractSubscribeMsg {
...
@@ -42,7 +42,7 @@ public class DeliveryNoticeMsg implements Entity, AbstractSubscribeMsg {
private
Date
deliveryTime
;
private
Date
deliveryTime
;
/**
/**
* 1商家2用户
* 1商家2用户
3藏家
*/
*/
private
Integer
shopState
;
private
Integer
shopState
;
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/SignedNoticeMsg.java
View file @
a5cd578e
...
@@ -36,6 +36,16 @@ public class SignedNoticeMsg implements Entity, AbstractSubscribeMsg {
...
@@ -36,6 +36,16 @@ public class SignedNoticeMsg implements Entity, AbstractSubscribeMsg {
*/
*/
private
Date
signedTime
;
private
Date
signedTime
;
/**
* 跳转地址
*/
private
String
url
;
/**
* 1商家2用户3藏家
*/
private
Integer
shopState
;
@Override
@Override
public
Map
<
String
,
Object
>
getTempletParam
()
{
public
Map
<
String
,
Object
>
getTempletParam
()
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionBookServiceImpl.java
View file @
a5cd578e
...
@@ -123,13 +123,11 @@ public class CollectionBookServiceImpl implements CollectionBookService {
...
@@ -123,13 +123,11 @@ public class CollectionBookServiceImpl implements CollectionBookService {
//查询藏家白名单, 在白名单中说是藏家,需要加上默认标签
//查询藏家白名单, 在白名单中说是藏家,需要加上默认标签
if
(
dto
.
getViewLabelType
().
intValue
()
==
1
)
{
if
(
dto
.
getViewLabelType
().
intValue
()
==
1
)
{
if
(
collectorWhiteListDao
.
isExisted
(
userId
))
{
if
(
collectorWhiteListDao
.
isExisted
(
userId
))
{
if
(
dto
.
getViewLabelType
().
intValue
()
==
1
)
{
for
(
CollectionBookConstants
.
DefaultBookEnum
defaultBookEnum
:
CollectionBookConstants
.
DefaultBookEnum
.
values
())
{
for
(
CollectionBookConstants
.
DefaultBookEnum
defaultBookEnum
:
CollectionBookConstants
.
DefaultBookEnum
.
values
())
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
defaultBookEnum
.
getId
());
map
.
put
(
"id"
,
defaultBookEnum
.
getId
());
map
.
put
(
"title"
,
defaultBookEnum
.
getName
());
map
.
put
(
"title"
,
defaultBookEnum
.
getName
());
list
.
add
(
map
);
list
.
add
(
map
);
}
}
}
}
}
}
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionItemsRelationServiceImpl.java
View file @
a5cd578e
...
@@ -130,7 +130,7 @@ public class CollectionItemsRelationServiceImpl implements CollectionItemsRelati
...
@@ -130,7 +130,7 @@ public class CollectionItemsRelationServiceImpl implements CollectionItemsRelati
supplierItemRequestDto
.
setIsDeleted
(
false
);
supplierItemRequestDto
.
setIsDeleted
(
false
);
supplierItemRequestDto
.
setPage
(
dto
.
getPage
());
supplierItemRequestDto
.
setPage
(
dto
.
getPage
());
supplierItemRequestDto
.
setLimit
(
dto
.
getLimit
());
supplierItemRequestDto
.
setLimit
(
dto
.
getLimit
());
List
<
SupplierItem
>
supplierItemList
=
supplierItemDao
.
findList
(
supplierItemRequestDto
);
List
<
SupplierItem
>
supplierItemList
=
supplierItemDao
.
findList
ForSort
(
supplierItemRequestDto
);
List
<
SupplierItemVo
>
list
=
new
ArrayList
<>();
List
<
SupplierItemVo
>
list
=
new
ArrayList
<>();
PageInfo
<
SupplierItem
>
pageInfo
=
new
PageInfo
<>(
supplierItemList
);
PageInfo
<
SupplierItem
>
pageInfo
=
new
PageInfo
<>(
supplierItemList
);
supplierItemList
.
forEach
(
supplierItem
->
{
supplierItemList
.
forEach
(
supplierItem
->
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
View file @
a5cd578e
...
@@ -395,7 +395,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -395,7 +395,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
if
(
collectionShareRecord
==
null
||
collectionShareRecord
.
getType
()
==
DistributionEnum
.
CollectionShareTypeEnum
.
PAGE
.
getCode
())
{
if
(
collectionShareRecord
==
null
||
collectionShareRecord
.
getType
()
==
DistributionEnum
.
CollectionShareTypeEnum
.
PAGE
.
getCode
())
{
return
Result
.
failed
(
"该分享链接无效"
);
return
Result
.
failed
(
"该分享链接无效"
);
}
}
if
(
!
collectionShareRecord
.
getIsDeleted
())
{
if
(
collectionShareRecord
.
getIsDeleted
())
{
return
Result
.
failed
(
"该分享链接已失效"
);
return
Result
.
failed
(
"该分享链接已失效"
);
}
}
itemId
=
collectionShareRecord
.
getShareTargetId
();
itemId
=
collectionShareRecord
.
getShareTargetId
();
...
@@ -659,6 +659,11 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -659,6 +659,11 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
//发送给卖家
//发送给卖家
String
sellerOpenId
=
sendMsgService
.
getOpenIdByUserId
(
distributionOrder
.
getSellerId
());
String
sellerOpenId
=
sendMsgService
.
getOpenIdByUserId
(
distributionOrder
.
getSellerId
());
if
(
com
.
xxdxxs
.
utils
.
StringUtils
.
hasLength
(
sellerOpenId
))
{
if
(
com
.
xxdxxs
.
utils
.
StringUtils
.
hasLength
(
sellerOpenId
))
{
if
(
distributionOrder
.
getType
().
intValue
()
==
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
())
{
signedNoticeMsg
.
setShopState
(
2
);
}
else
{
signedNoticeMsg
.
setShopState
(
1
);
}
sendMsgService
.
sendSignedTempletMsg
(
sellerOpenId
,
signedNoticeMsg
);
sendMsgService
.
sendSignedTempletMsg
(
sellerOpenId
,
signedNoticeMsg
);
}
else
{
}
else
{
logger
.
info
(
">>>>> 分销商id :{}, 获取openid失败,无法发送模板信息 <<<<<"
,
distributionOrder
.
getSellerId
());
logger
.
info
(
">>>>> 分销商id :{}, 获取openid失败,无法发送模板信息 <<<<<"
,
distributionOrder
.
getSellerId
());
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SendMsgServiceImpl.java
View file @
a5cd578e
...
@@ -142,7 +142,7 @@ public class SendMsgServiceImpl implements SendMsgService {
...
@@ -142,7 +142,7 @@ public class SendMsgServiceImpl implements SendMsgService {
miniprogramMap
.
put
(
"appid"
,
APPLET_APPID
);
miniprogramMap
.
put
(
"appid"
,
APPLET_APPID
);
StringBuffer
stringBuffer
=
new
StringBuffer
(
DISTRIBUTION_MSG_URL
);
StringBuffer
stringBuffer
=
new
StringBuffer
(
DISTRIBUTION_MSG_URL
);
stringBuffer
.
append
(
"?orderId="
+
signedNoticeMsg
.
getDistributionOrderId
());
stringBuffer
.
append
(
"?orderId="
+
signedNoticeMsg
.
getDistributionOrderId
());
stringBuffer
.
append
(
"&shopState=
1"
);
stringBuffer
.
append
(
"&shopState=
"
+
signedNoticeMsg
.
getShopState
()
);
miniprogramMap
.
put
(
"pagepath"
,
stringBuffer
.
toString
());
miniprogramMap
.
put
(
"pagepath"
,
stringBuffer
.
toString
());
map
.
put
(
"miniprogram"
,
miniprogramMap
);
map
.
put
(
"miniprogram"
,
miniprogramMap
);
map
.
put
(
"data"
,
signedNoticeMsg
.
getTempletParam
());
map
.
put
(
"data"
,
signedNoticeMsg
.
getTempletParam
());
...
...
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