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
1b3f8854
Commit
1b3f8854
authored
Sep 02, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询商品不强制登录
parent
d651eb99
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
8 deletions
+34
-8
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
...ore/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
+5
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
.../main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
+2
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+3
-5
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/SupplierItemController.java
...m/wwdz/ch/wx/web/distribution/SupplierItemController.java
+24
-2
No files found.
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
View file @
1b3f8854
...
@@ -49,6 +49,11 @@ public interface CommConsts {
...
@@ -49,6 +49,11 @@ public interface CommConsts {
public
static
final
Long
SYSTEM_ACCOUNT
=
8888888888L
;
public
static
final
Long
SYSTEM_ACCOUNT
=
8888888888L
;
/**
* 用户未登录的默认账号
*/
public
static
final
Long
SYSTEM_ACCOUNT_FOR_UNLOGIN
=
999999999999L
;
public
static
final
String
DEFAULT_SHARE_ID
=
"DA"
+
SYSTEM_ACCOUNT
;
public
static
final
String
DEFAULT_SHARE_ID
=
"DA"
+
SYSTEM_ACCOUNT
;
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
View file @
1b3f8854
...
@@ -45,7 +45,8 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
...
@@ -45,7 +45,8 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
"/wx/returnOrder/**"
,
"/wx/distributionOrder/confirmSigned"
,
"/wx/distributionOrder/delivery"
,
"/wx/distributionOrder/cancel"
,
"/wx/returnOrder/**"
,
"/wx/distributionOrder/confirmSigned"
,
"/wx/distributionOrder/delivery"
,
"/wx/distributionOrder/cancel"
,
"/wx/distributionOrder/refund"
,
"/wx/distributionOrder/refund"
,
"/wx/supplierItem/findItemsOfCurrentDistributor"
,
"/wx/selfPage/updateSwitch"
,
"/wx/supplierItem/findHomePage"
,
"/wx/supplierItem/findItemsOfCurrentDistributor"
,
"/wx/selfPage/updateSwitch"
,
"/wx/supplierItem/findHomePage"
,
"/wx/specialPerformance/sendMsg"
,
"/wx/specialPerformance/sendMsgTest"
,
"/wx/groupPurchase/systemAddRecord"
,
"/wx/officialAccount/**"
"/wx/specialPerformance/sendMsg"
,
"/wx/specialPerformance/sendMsgTest"
,
"/wx/groupPurchase/systemAddRecord"
,
"/wx/officialAccount/**"
,
"/wx/supplierItem/**"
//下列路径上线注释
//下列路径上线注释
/* ,"/wx/specialPerformance/**"
/* ,"/wx/specialPerformance/**"
, "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**",
, "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**",
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
1b3f8854
...
@@ -1091,9 +1091,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -1091,9 +1091,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
List
<
SupplierItemVo
>
supplierItemVos
=
new
ArrayList
<>();
List
<
SupplierItemVo
>
supplierItemVos
=
new
ArrayList
<>();
//为了小程序过审,关闭列表展示,0关闭,1打开,展示一个默认
//为了小程序过审,关闭列表展示,0关闭,1打开,展示一个默认
Switch
sswitch
=
switchDao
.
find
();
Switch
sswitch
=
switchDao
.
find
();
//当前用户
/* if (sswitch.getState() == 0) {
Long
userId
=
dto
.
getUserId
();
if
(
sswitch
.
getState
()
==
0
)
{
//开关关闭状态,检查是否有用户id,有的话检查是否有浏览记录
//开关关闭状态,检查是否有用户id,有的话检查是否有浏览记录
if (ObjectUtils.isEmpty(userId)) {
if (ObjectUtils.isEmpty(userId)) {
SupplierItem supplierItem = supplierItemDao.findById(3289012L);
SupplierItem supplierItem = supplierItemDao.findById(3289012L);
...
@@ -1115,7 +1113,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -1115,7 +1113,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
if (ObjectUtils.isEmpty(userId)) {
if (ObjectUtils.isEmpty(userId)) {
return Result.failed(ResultCode.UNLOGIN);
return Result.failed(ResultCode.UNLOGIN);
}
}
}
}
*/
//从首页的分享链接进入,保存分享记录
//从首页的分享链接进入,保存分享记录
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getIntroducerId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getIntroducerId
()))
{
if
(!
introduceRecordDao
.
isExisted
(
dto
.
getUserId
()))
{
if
(!
introduceRecordDao
.
isExisted
(
dto
.
getUserId
()))
{
...
@@ -1154,7 +1152,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -1154,7 +1152,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
searchDto
.
setIsDeleted
(
false
);
searchDto
.
setIsDeleted
(
false
);
searchDto
.
setPage
(
dto
.
getPage
());
searchDto
.
setPage
(
dto
.
getPage
());
searchDto
.
setLimit
(
dto
.
getLimit
());
searchDto
.
setLimit
(
dto
.
getLimit
());
String
viewKey
=
userId
+
":homepage"
;
String
viewKey
=
dto
.
getUserId
()
+
":homepage"
;
if
(
dto
.
getPage
()
==
1
)
{
if
(
dto
.
getPage
()
==
1
)
{
if
(
redisUtils
.
hasKey
(
viewKey
))
{
if
(
redisUtils
.
hasKey
(
viewKey
))
{
redisUtils
.
delete
(
viewKey
);
redisUtils
.
delete
(
viewKey
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/SupplierItemController.java
View file @
1b3f8854
package
com.wwdz.ch.wx.web.distribution
;
package
com.wwdz.ch.wx.web.distribution
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.distribution.SupplierItemRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SupplierItemRequestDto
;
...
@@ -36,6 +37,9 @@ public class SupplierItemController {
...
@@ -36,6 +37,9 @@ public class SupplierItemController {
@PostMapping
(
"/findList"
)
@PostMapping
(
"/findList"
)
public
Result
findList
(
@RequestBody
SupplierItemRequestDto
dto
)
{
public
Result
findList
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"查询供货商品列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"查询供货商品列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
dto
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT_FOR_UNLOGIN
);
}
return
supplierItemService
.
findList
(
dto
);
return
supplierItemService
.
findList
(
dto
);
}
}
...
@@ -43,6 +47,9 @@ public class SupplierItemController {
...
@@ -43,6 +47,9 @@ public class SupplierItemController {
@PostMapping
(
"/findDiscountList"
)
@PostMapping
(
"/findDiscountList"
)
public
Result
findDiscountList
(
@RequestBody
SupplierItemRequestDto
dto
)
{
public
Result
findDiscountList
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"查询首页促销商品列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"查询首页促销商品列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
dto
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT_FOR_UNLOGIN
);
}
return
supplierItemService
.
findDiscountList
(
dto
);
return
supplierItemService
.
findDiscountList
(
dto
);
}
}
...
@@ -51,6 +58,9 @@ public class SupplierItemController {
...
@@ -51,6 +58,9 @@ public class SupplierItemController {
@PostMapping
(
"/findDetail"
)
@PostMapping
(
"/findDetail"
)
public
Result
findDetail
(
@RequestBody
SupplierItemRequestDto
dto
)
{
public
Result
findDetail
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"查询供货商品详情,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"查询供货商品详情,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
dto
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT_FOR_UNLOGIN
);
}
return
supplierItemService
.
findDetail
(
dto
);
return
supplierItemService
.
findDetail
(
dto
);
}
}
...
@@ -86,6 +96,9 @@ public class SupplierItemController {
...
@@ -86,6 +96,9 @@ public class SupplierItemController {
@PostMapping
(
"/findAuctionDetail"
)
@PostMapping
(
"/findAuctionDetail"
)
public
Result
findAuctionDetail
(
@RequestBody
SupplierItemRequestDto
dto
)
{
public
Result
findAuctionDetail
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"查询竞拍商品详情,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"查询竞拍商品详情,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
dto
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT_FOR_UNLOGIN
);
}
return
supplierItemService
.
findAuctionDetail
(
dto
);
return
supplierItemService
.
findAuctionDetail
(
dto
);
}
}
...
@@ -123,7 +136,7 @@ public class SupplierItemController {
...
@@ -123,7 +136,7 @@ public class SupplierItemController {
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
}
if
(
dto
.
getUserId
()
==
null
)
{
if
(
dto
.
getUserId
()
==
null
)
{
return
Result
.
failed
(
"用户id不能为空"
);
dto
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT_FOR_UNLOGIN
);
}
}
return
supplierItemService
.
findCollectionItemDetail
(
dto
);
return
supplierItemService
.
findCollectionItemDetail
(
dto
);
}
}
...
@@ -144,6 +157,9 @@ public class SupplierItemController {
...
@@ -144,6 +157,9 @@ public class SupplierItemController {
@PostMapping
(
"/findHomePage"
)
@PostMapping
(
"/findHomePage"
)
public
Result
findHomePage
(
@RequestBody
SupplierItemRequestDto
dto
)
{
public
Result
findHomePage
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"查询主页列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"查询主页列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
dto
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT_FOR_UNLOGIN
);
}
return
supplierItemService
.
findHomePage
(
dto
);
return
supplierItemService
.
findHomePage
(
dto
);
}
}
...
@@ -152,6 +168,9 @@ public class SupplierItemController {
...
@@ -152,6 +168,9 @@ public class SupplierItemController {
@PostMapping
(
"/getExpectAmount"
)
@PostMapping
(
"/getExpectAmount"
)
public
Result
getExpectAmount
(
@RequestBody
SupplierItemRequestDto
dto
)
{
public
Result
getExpectAmount
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"获取商品预计分佣金额,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"获取商品预计分佣金额,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
dto
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT_FOR_UNLOGIN
);
}
return
distributorProfitService
.
getExpectAmount
(
dto
);
return
distributorProfitService
.
getExpectAmount
(
dto
);
}
}
...
@@ -160,6 +179,9 @@ public class SupplierItemController {
...
@@ -160,6 +179,9 @@ public class SupplierItemController {
@PostMapping
(
"/findItemList"
)
@PostMapping
(
"/findItemList"
)
public
Result
findItemList
(
@RequestBody
SupplierItemRequestDto
dto
)
{
public
Result
findItemList
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"查询商品列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"查询商品列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
dto
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT_FOR_UNLOGIN
);
}
return
supplierItemService
.
findItemList
(
dto
);
return
supplierItemService
.
findItemList
(
dto
);
}
}
...
@@ -169,7 +191,7 @@ public class SupplierItemController {
...
@@ -169,7 +191,7 @@ public class SupplierItemController {
public
Result
findItemCommission
(
@RequestBody
SupplierItemRequestDto
dto
)
{
public
Result
findItemCommission
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"查询商品服务费和佣金,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"查询商品服务费和佣金,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
if
(
dto
.
getUserId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
dto
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT_FOR_UNLOGIN
);
}
}
return
supplierItemService
.
findItemCommission
(
dto
);
return
supplierItemService
.
findItemCommission
(
dto
);
}
}
...
...
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