Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PeiZhen-Java
peizhen-java
Commits
92d322a5
Commit
92d322a5
authored
Sep 20, 2023
by
sdif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户端代码提交
parent
e5230c34
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
11 deletions
+24
-11
pz-applet/src/main/java/com/pz/applet/AppletCarouselController.java
+2
-1
pz-applet/src/main/java/com/pz/applet/AppletStoreGoodsController.java
+4
-3
pz-system/src/main/java/com/pz/system/mapper/ArticleCommentMapper.java
+4
-1
pz-system/src/main/java/com/pz/system/service/IStoreGoodsService.java
+1
-1
pz-system/src/main/java/com/pz/system/service/impl/ArticleServiceImpl.java
+3
-4
pz-system/src/main/java/com/pz/system/service/impl/StoreGoodsServiceImpl.java
+2
-1
pz-system/src/main/resources/mapper/system/ArticleCommentMapper.xml
+8
-0
No files found.
pz-applet/src/main/java/com/pz/applet/AppletCarouselController.java
View file @
92d322a5
package
com
.
pz
.
applet
;
package
com
.
pz
.
applet
;
import
com.pz.applet.util.CityIdUtils
;
import
com.pz.common.core.controller.BaseController
;
import
com.pz.common.core.controller.BaseController
;
import
com.pz.common.core.domain.PageQuery
;
import
com.pz.common.core.domain.PageQuery
;
import
com.pz.common.core.domain.R
;
import
com.pz.common.core.domain.R
;
...
@@ -35,7 +36,7 @@ public class AppletCarouselController extends BaseController {
...
@@ -35,7 +36,7 @@ public class AppletCarouselController extends BaseController {
*/
*/
@GetMapping
(
"/home"
)
@GetMapping
(
"/home"
)
public
R
<
HomeVo
>
getHome
(
HttpServletRequest
reques
)
{
public
R
<
HomeVo
>
getHome
(
HttpServletRequest
reques
)
{
return
R
.
ok
(
iCarouselService
.
selectHome
(
Integer
.
parseInt
(
reques
.
getHeader
(
"city_id"
)
)));
return
R
.
ok
(
iCarouselService
.
selectHome
(
CityIdUtils
.
setCityIdPasInteger
(
reques
)));
}
}
/**
/**
* 查询轮播图列表
* 查询轮播图列表
...
...
pz-applet/src/main/java/com/pz/applet/AppletStoreGoodsController.java
View file @
92d322a5
...
@@ -54,7 +54,8 @@ public class AppletStoreGoodsController extends BaseController {
...
@@ -54,7 +54,8 @@ public class AppletStoreGoodsController extends BaseController {
* 搜索商品
* 搜索商品
*/
*/
@GetMapping
(
"/searchShop"
)
@GetMapping
(
"/searchShop"
)
public
TableDataInfo
<
StoreGoodsVo
>
searchShop
(
StoreGoodsBo
bo
,
PageQuery
pageQuery
)
{
public
TableDataInfo
<
StoreGoodsVo
>
searchShop
(
StoreGoodsBo
bo
,
PageQuery
pageQuery
,
HttpServletRequest
reques
)
{
bo
.
setCityId
(
CityIdUtils
.
setCityIdPasLong
(
reques
));
return
iStoreGoodsService
.
searchAppShop
(
bo
,
pageQuery
);
return
iStoreGoodsService
.
searchAppShop
(
bo
,
pageQuery
);
}
}
...
@@ -62,8 +63,8 @@ public class AppletStoreGoodsController extends BaseController {
...
@@ -62,8 +63,8 @@ public class AppletStoreGoodsController extends BaseController {
* 商城商品分类列表
* 商城商品分类列表
*/
*/
@GetMapping
(
"/shopGoodsClassify"
)
@GetMapping
(
"/shopGoodsClassify"
)
public
R
<
List
<
StoreApplyVo
>>
shopGoodsClassify
()
{
public
R
<
List
<
StoreApplyVo
>>
shopGoodsClassify
(
HttpServletRequest
reques
)
{
return
R
.
ok
(
iStoreGoodsService
.
shopGoodsClassify
());
return
R
.
ok
(
iStoreGoodsService
.
shopGoodsClassify
(
CityIdUtils
.
setCityIdPasInteger
(
reques
)
));
}
}
/**
/**
...
...
pz-system/src/main/java/com/pz/system/mapper/ArticleCommentMapper.java
View file @
92d322a5
...
@@ -3,6 +3,9 @@ package com.pz.system.mapper;
...
@@ -3,6 +3,9 @@ package com.pz.system.mapper;
import
com.pz.system.domain.ArticleComment
;
import
com.pz.system.domain.ArticleComment
;
import
com.pz.system.domain.vo.ArticleCommentVo
;
import
com.pz.system.domain.vo.ArticleCommentVo
;
import
com.pz.common.core.mapper.BaseMapperPlus
;
import
com.pz.common.core.mapper.BaseMapperPlus
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* 文章评论Mapper接口
* 文章评论Mapper接口
...
@@ -11,5 +14,5 @@ import com.pz.common.core.mapper.BaseMapperPlus;
...
@@ -11,5 +14,5 @@ import com.pz.common.core.mapper.BaseMapperPlus;
* @date 2023-09-07
* @date 2023-09-07
*/
*/
public
interface
ArticleCommentMapper
extends
BaseMapperPlus
<
ArticleCommentMapper
,
ArticleComment
,
ArticleCommentVo
>
{
public
interface
ArticleCommentMapper
extends
BaseMapperPlus
<
ArticleCommentMapper
,
ArticleComment
,
ArticleCommentVo
>
{
List
<
ArticleCommentVo
>
selectByArticleComment
(
@Param
(
"aid"
)
Integer
aid
,
@Param
(
"uid"
)
Integer
uid
);
}
}
pz-system/src/main/java/com/pz/system/service/IStoreGoodsService.java
View file @
92d322a5
...
@@ -45,7 +45,7 @@ public interface IStoreGoodsService {
...
@@ -45,7 +45,7 @@ public interface IStoreGoodsService {
/**
/**
*查询商品分类
*查询商品分类
*/
*/
List
<
StoreApplyVo
>
shopGoodsClassify
();
List
<
StoreApplyVo
>
shopGoodsClassify
(
int
cityId
);
/**
/**
* 查询商品列表
* 查询商品列表
...
...
pz-system/src/main/java/com/pz/system/service/impl/ArticleServiceImpl.java
View file @
92d322a5
...
@@ -80,11 +80,10 @@ public class ArticleServiceImpl implements IArticleService {
...
@@ -80,11 +80,10 @@ public class ArticleServiceImpl implements IArticleService {
articleVo
.
setCollectNum
(
Math
.
toIntExact
(
collectCount
));
articleVo
.
setCollectNum
(
Math
.
toIntExact
(
collectCount
));
// 查询用户评论
// 查询用户评论
List
<
ArticleCommentVo
>
articleCommentVos
=
articleCommentMapper
.
selectVoList
(
Wrappers
.<
ArticleComment
>
lambdaQuery
()
List
<
ArticleCommentVo
>
articleCommentVos
=
articleCommentMapper
.
selectByArticleComment
(
id
,
loginUser
.
getUserId
().
intValue
());
.
eq
(
ArticleComment:
:
getAid
,
id
).
eq
(
ArticleComment:
:
getUid
,
loginUser
.
getUserId
()));
// 查询用户信息并设置到评论中
// 查询用户信息并设置到评论中
if
(
articleCommentVos
!=
null
&&
!
articleCommentVos
.
isEmpty
())
{
/*
if (articleCommentVos != null && !articleCommentVos.isEmpty()) {
Set<Long> userIds = new HashSet<>();
Set<Long> userIds = new HashSet<>();
for (ArticleCommentVo articleCommentVo : articleCommentVos) {
for (ArticleCommentVo articleCommentVo : articleCommentVos) {
Long uid = articleCommentVo.getUid();
Long uid = articleCommentVo.getUid();
...
@@ -112,7 +111,7 @@ public class ArticleServiceImpl implements IArticleService {
...
@@ -112,7 +111,7 @@ public class ArticleServiceImpl implements IArticleService {
}
}
}
}
}
}
*/
articleVo
.
setComment
(
articleCommentVos
);
articleVo
.
setComment
(
articleCommentVos
);
return
articleVo
;
return
articleVo
;
}
}
...
...
pz-system/src/main/java/com/pz/system/service/impl/StoreGoodsServiceImpl.java
View file @
92d322a5
...
@@ -144,11 +144,12 @@ public class StoreGoodsServiceImpl implements IStoreGoodsService {
...
@@ -144,11 +144,12 @@ public class StoreGoodsServiceImpl implements IStoreGoodsService {
}
}
@Override
@Override
public
List
<
StoreApplyVo
>
shopGoodsClassify
()
{
public
List
<
StoreApplyVo
>
shopGoodsClassify
(
int
cityId
)
{
//查询所有商户分类
//查询所有商户分类
List
<
StoreApplyVo
>
storeApplies
=
storeApplyMapper
.
selectVoList
(
List
<
StoreApplyVo
>
storeApplies
=
storeApplyMapper
.
selectVoList
(
new
LambdaQueryWrapper
<
StoreApply
>().
eq
(
StoreApply:
:
getStatus
,
1
)
new
LambdaQueryWrapper
<
StoreApply
>().
eq
(
StoreApply:
:
getStatus
,
1
)
.
eq
(
StoreApply:
:
getCityId
,
cityId
)
);
);
//查询商户下面的商品
//查询商户下面的商品
for
(
StoreApplyVo
storeApply
:
storeApplies
)
{
for
(
StoreApplyVo
storeApply
:
storeApplies
)
{
...
...
pz-system/src/main/resources/mapper/system/ArticleCommentMapper.xml
0 → 100644
View file @
92d322a5
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pz.system.mapper.ArticleCommentMapper"
>
<select
id=
"selectByArticleComment"
resultType=
"com.pz.system.domain.vo.ArticleCommentVo"
>
SELECT a.*,s.avatar,s.user_name FROM article_comment a left join sys_user s on s.user_id = a.uid
WHERE a.aid = #{aid} and a.uid = #{uid}
</select>
</mapper>
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