Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
9f0542f8
Commit
9f0542f8
authored
Oct 15, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加用户留言
parent
033aaf32
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
3 deletions
+111
-3
UserCommentFindDTO.java
...github/wxiaoqi/security/admin/dto/UserCommentFindDTO.java
+13
-0
UserCommentBiz.java
...com/github/wxiaoqi/security/admin/biz/UserCommentBiz.java
+8
-0
AdminUserCommentController.java
...security/admin/rest/admin/AdminUserCommentController.java
+60
-0
UserCommentMapper.xml
...ace-admin/src/main/resources/mapper/UserCommentMapper.xml
+30
-3
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/UserCommentFindDTO.java
View file @
9f0542f8
...
@@ -23,4 +23,17 @@ public class UserCommentFindDTO extends PageParam{
...
@@ -23,4 +23,17 @@ public class UserCommentFindDTO extends PageParam{
private
Integer
userId
;
private
Integer
userId
;
private
Integer
isGoods
;
private
Integer
isGoods
;
private
Long
startTime
;
private
Long
endTime
;
private
Integer
soureType
;
private
String
name
;
private
Integer
isShow
;
private
Integer
isDesc
;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/UserCommentBiz.java
View file @
9f0542f8
...
@@ -122,4 +122,12 @@ public class UserCommentBiz extends BaseBiz<UserCommentMapper, UserComment>{
...
@@ -122,4 +122,12 @@ public class UserCommentBiz extends BaseBiz<UserCommentMapper, UserComment>{
}
}
public
PageDataVO
<
UserCommentVo
>
selectListV2
(
UserCommentFindDTO
userCommentFindDTO
){
PageHelper
.
startPage
(
userCommentFindDTO
.
getPage
(),
userCommentFindDTO
.
getLimit
());
PageInfo
<
UserCommentVo
>
pageInfo
=
new
PageInfo
<>(
getList
(
userCommentFindDTO
));
PageDataVO
<
UserCommentVo
>
dataVO
=
PageDataVO
.
pageInfo
(
pageInfo
);
return
dataVO
;
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/admin/AdminUserCommentController.java
0 → 100644
View file @
9f0542f8
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
.
admin
;
import
com.github.wxiaoqi.security.admin.biz.UserCommentBiz
;
import
com.github.wxiaoqi.security.admin.dto.UserCommentFindDTO
;
import
com.github.wxiaoqi.security.admin.entity.UserComment
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @author Administrator
*/
@Slf4j
@RestController
@RequestMapping
(
"backstage/comment"
)
@Api
(
tags
=
{
"评论"
})
public
class
AdminUserCommentController
extends
BaseController
<
UserCommentBiz
,
UserComment
>
implements
UserRestInterface
{
@Autowired
UserFeign
userFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
@GetMapping
(
"selectList"
)
@ApiModelProperty
(
"列表"
)
@IgnoreUserToken
public
ObjectRestResponse
selectList
(
UserCommentFindDTO
commentFindDTO
)
{
commentFindDTO
.
setIsDesc
(
1
);
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectListV2
(
commentFindDTO
));
}
@PostMapping
(
"del"
)
@ApiModelProperty
(
"评论删除"
)
public
ObjectRestResponse
del
(
@RequestBody
UserComment
userComment
)
{
baseBiz
.
updateSelectiveById
(
userComment
);
return
ObjectRestResponse
.
succ
();
}
}
ace-modules/ace-admin/src/main/resources/mapper/UserCommentMapper.xml
View file @
9f0542f8
...
@@ -7,20 +7,47 @@
...
@@ -7,20 +7,47 @@
SELECT
SELECT
c.*,
c.*,
IFNULL(d1.realname,d1.nickname) as userName,
IFNULL(d1.realname,d1.nickname) as userName,
IFNULL(d2.realname,d2.nickname) as toUserName
IFNULL(d2.realname,d2.nickname) as toUserName,
b.`name`as companyName
FROM user_comment c
FROM user_comment c
LEFT JOIN app_user_detail d1 ON c.user_id=d1.userid
LEFT JOIN app_user_detail d1 ON c.user_id=d1.userid
LEFT JOIN app_user_detail d2 ON c.to_user_id=d2.userid
LEFT JOIN app_user_detail d2 ON c.to_user_id=d2.userid
LEFT JOIN branch_company b ON c.company_id=b.id
<where>
<where>
c.soure_id=#{soureId}
<if
test=
"soureId != null "
>
AND c.soure_id=#{soureId}
</if>
<if
test=
"parentId != null "
>
<if
test=
"parentId != null "
>
AND c.`parent_id`= #{parentId}
AND c.`parent_id`= #{parentId}
</if>
</if>
<if
test=
"rootParentId != null and rootParentId > 0 "
>
<if
test=
"rootParentId != null and rootParentId > 0 "
>
AND ( c.`parent_id` > 0 and c.root_parent_id = #{rootParentId} )
AND ( c.`parent_id` > 0 and c.root_parent_id = #{rootParentId} )
</if>
</if>
<if
test=
"startTime != null and startTime > 0"
>
AND c.`create_time`>= #{startTime}
</if>
<if
test=
"endTime != null and endTime > 0"
>
AND c.`create_time`
<
= #{endTime}
</if>
<if
test=
"soureType != null and soureType > 0"
>
AND c.`soure_type`= #{soureType}
</if>
<if
test=
"isShow != null "
>
AND c.`is_show`= #{isShow}
</if>
<if
test=
"name != null and name != '' "
>
AND IFNULL(d1.realname,d1.nickname) like concat('%', #{name}, '%')
</if>
</where>
</where>
order by c.create_time ASC
<choose>
<when
test=
"isDesc != null and isDesc == 1"
>
order by c.create_time desc
</when>
<otherwise>
order by c.create_time ASC
</otherwise>
</choose>
</select>
</select>
<select
id=
"selectListByToUserId"
resultType=
"com.github.wxiaoqi.security.admin.vo.UserCommentVo"
parameterType=
"com.github.wxiaoqi.security.admin.dto.UserCommentFindDTO"
>
<select
id=
"selectListByToUserId"
resultType=
"com.github.wxiaoqi.security.admin.vo.UserCommentVo"
parameterType=
"com.github.wxiaoqi.security.admin.dto.UserCommentFindDTO"
>
SELECT
SELECT
...
...
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