Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
465775ae
提交
465775ae
authored
6月 23, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
举报管理
上级
ecfeb646
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
511 行增加
和
437 行删除
+511
-437
ComplainController.java
...main/java/com/platform/controller/ComplainController.java
+22
-0
DealController.java
...src/main/java/com/platform/controller/DealController.java
+0
-109
ComplainDao.java
...orm-admin/src/main/java/com/platform/dao/ComplainDao.java
+2
-0
DealDao.java
platform-admin/src/main/java/com/platform/dao/DealDao.java
+0
-13
CommentEntity.java
...dmin/src/main/java/com/platform/entity/CommentEntity.java
+221
-0
ComplainEntity.java
...min/src/main/java/com/platform/entity/ComplainEntity.java
+84
-39
ComplainService.java
...n/src/main/java/com/platform/service/ComplainService.java
+12
-0
DealService.java
...admin/src/main/java/com/platform/service/DealService.java
+0
-71
ComplainServiceImpl.java
...n/java/com/platform/service/impl/ComplainServiceImpl.java
+50
-5
DealServiceImpl.java
.../main/java/com/platform/service/impl/DealServiceImpl.java
+0
-65
ComplainDao.xml
...admin/src/main/resources/com/platform/dao/ComplainDao.xml
+34
-10
DealDao.xml
...orm-admin/src/main/resources/com/platform/dao/DealDao.xml
+0
-107
complain.html
...form-admin/src/main/webapp/WEB-INF/page/sys/complain.html
+5
-3
complain.js
platform-admin/src/main/webapp/js/sys/complain.js
+81
-2
ComplainDao.java
...rm-common/src/main/java/com/platform/dao/ComplainDao.java
+0
-13
没有找到文件。
platform-admin/src/main/java/com/platform/controller/ComplainController.java
浏览文件 @
465775ae
...
...
@@ -6,6 +6,7 @@ import com.platform.service.ComplainService;
import
com.platform.utils.PageUtils
;
import
com.platform.utils.Query
;
import
com.platform.utils.R
;
import
io.swagger.models.auth.In
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -107,4 +108,25 @@ public class ComplainController {
return
R
.
ok
().
put
(
"list"
,
list
);
}
/**
* 修改状态
*
* @param id
* @param type
* @param archived
* @return 记录数
*/
@RequestMapping
(
"/changeStatus"
)
@ResponseBody
public
R
changeStatus
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"type"
)
Integer
type
,
@RequestParam
(
"archived"
)
Integer
archived
)
{
int
res
=
complainService
.
changeStatus
(
id
,
type
,
archived
);
if
(
res
>
0
)
{
return
R
.
ok
();
}
else
{
return
R
.
error
(
"操作失败"
);
}
}
}
platform-admin/src/main/java/com/platform/controller/DealController.java
deleted
100644 → 0
浏览文件 @
ecfeb646
package
com
.
platform
.
controller
;
import
com.platform.entity.DealEntity
;
import
com.platform.service.DealService
;
import
com.platform.utils.PageUtils
;
import
com.platform.utils.Query
;
import
com.platform.utils.R
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
import
java.util.Map
;
/**
* Controller
*
* @author lipengjun
* @date 2020-06-22 11:09:19
*/
@Controller
@RequestMapping
(
"deal"
)
public
class
DealController
{
@Autowired
private
DealService
dealService
;
/**
* 查看列表
*/
@RequestMapping
(
"/list"
)
@RequiresPermissions
(
"deal:list"
)
@ResponseBody
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
//查询列表数据
Query
query
=
new
Query
(
params
);
List
<
DealEntity
>
dealList
=
dealService
.
queryList
(
query
);
int
total
=
dealService
.
queryTotal
(
query
);
PageUtils
pageUtil
=
new
PageUtils
(
dealList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
return
R
.
ok
().
put
(
"page"
,
pageUtil
);
}
/**
* 查看信息
*/
@RequestMapping
(
"/info/{id}"
)
@RequiresPermissions
(
"deal:info"
)
@ResponseBody
public
R
info
(
@PathVariable
(
"id"
)
String
id
)
{
DealEntity
deal
=
dealService
.
queryObject
(
id
);
return
R
.
ok
().
put
(
"deal"
,
deal
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"deal:save"
)
@ResponseBody
public
R
save
(
@RequestBody
DealEntity
deal
)
{
dealService
.
save
(
deal
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"deal:update"
)
@ResponseBody
public
R
update
(
@RequestBody
DealEntity
deal
)
{
dealService
.
update
(
deal
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
@RequiresPermissions
(
"deal:delete"
)
@ResponseBody
public
R
delete
(
@RequestBody
String
[]
ids
)
{
dealService
.
deleteBatch
(
ids
);
return
R
.
ok
();
}
/**
* 查看所有列表
*/
@RequestMapping
(
"/queryAll"
)
@ResponseBody
public
R
queryAll
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
List
<
DealEntity
>
list
=
dealService
.
queryList
(
params
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
platform-admin/src/main/java/com/platform/dao/ComplainDao.java
浏览文件 @
465775ae
...
...
@@ -2,6 +2,7 @@ package com.platform.dao;
import
com.platform.entity.ComplainEntity
;
import
com.platform.entity.ComplainVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -16,4 +17,5 @@ public interface ComplainDao extends BaseDao<ComplainEntity> {
List
<
ComplainVo
>
queryComplainList
(
Map
<
String
,
Object
>
map
);
int
changeStatus
(
@Param
(
"id"
)
String
id
,
@Param
(
"archived"
)
Integer
archived
);
}
platform-admin/src/main/java/com/platform/dao/DealDao.java
deleted
100644 → 0
浏览文件 @
ecfeb646
package
com
.
platform
.
dao
;
import
com.platform.entity.DealEntity
;
/**
* Dao
*
* @author lipengjun
* @date 2020-06-22 11:09:19
*/
public
interface
DealDao
extends
BaseDao
<
DealEntity
>
{
}
platform-admin/src/main/java/com/platform/entity/
Deal
Entity.java
→
platform-admin/src/main/java/com/platform/entity/
Comment
Entity.java
浏览文件 @
465775ae
...
...
@@ -5,132 +5,217 @@ import java.util.Date;
/**
* 实体
* 表名
deal
* 表名
comment
*
* @author lipengjun
* @date 2020-06-2
2 11:09:19
* @date 2020-06-2
3 11:46:51
*/
public
class
Deal
Entity
implements
Serializable
{
public
class
Comment
Entity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
处理ID
*
*/
private
String
id
;
/**
*
被处理人
*
*/
private
String
userI
d
;
private
Integer
archive
d
;
/**
*
1:不处理 2:禁言 3:禁帖 4:禁言/禁帖
*
*/
private
Integer
result
;
private
String
archivedBy
;
/**
*
处理人
*
*/
private
String
dealUserId
;
private
Date
archivedDate
;
/**
*
处理原因
*
*/
private
String
reason
;
private
Date
createDate
;
/**
*
创建时间
*
*/
private
Date
createTime
;
private
String
createdBy
;
/**
*
更新时间
*
*/
private
Date
updateDate
;
/**
*
*/
private
String
updatedBy
;
/**
*
*/
private
Integer
version
;
/**
*
*/
private
String
content
;
/**
*
*/
private
String
postId
;
/**
*
*/
private
String
userId
;
/**
* 设置:
处理ID
* 设置:
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* 获取:
处理ID
* 获取:
*/
public
String
getId
()
{
return
id
;
}
/**
* 设置:
被处理人
* 设置:
*/
public
void
set
UserId
(
String
userI
d
)
{
this
.
userId
=
userI
d
;
public
void
set
Archived
(
Integer
archive
d
)
{
this
.
archived
=
archive
d
;
}
/**
* 获取:
被处理人
* 获取:
*/
public
String
getUserI
d
()
{
return
userI
d
;
public
Integer
getArchive
d
()
{
return
archive
d
;
}
/**
* 设置:
1:不处理 2:禁言 3:禁帖 4:禁言/禁帖
* 设置:
*/
public
void
set
Result
(
Integer
result
)
{
this
.
result
=
result
;
public
void
set
ArchivedBy
(
String
archivedBy
)
{
this
.
archivedBy
=
archivedBy
;
}
/**
* 获取:
1:不处理 2:禁言 3:禁帖 4:禁言/禁帖
* 获取:
*/
public
Integer
getResult
()
{
return
result
;
public
String
getArchivedBy
()
{
return
archivedBy
;
}
/**
* 设置:
处理人
* 设置:
*/
public
void
set
DealUserId
(
String
dealUserId
)
{
this
.
dealUserId
=
dealUserId
;
public
void
set
ArchivedDate
(
Date
archivedDate
)
{
this
.
archivedDate
=
archivedDate
;
}
/**
* 获取:
处理人
* 获取:
*/
public
String
getDealUserId
()
{
return
dealUserId
;
public
Date
getArchivedDate
()
{
return
archivedDate
;
}
/**
* 设置:
处理原因
* 设置:
*/
public
void
set
Reason
(
String
reason
)
{
this
.
reason
=
reason
;
public
void
set
CreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
}
/**
* 获取:
处理原因
* 获取:
*/
public
String
getReason
()
{
return
reason
;
public
Date
getCreateDate
()
{
return
createDate
;
}
/**
* 设置:
创建时间
* 设置:
*/
public
void
setCreate
Time
(
Date
createTime
)
{
this
.
create
Time
=
createTime
;
public
void
setCreate
dBy
(
String
createdBy
)
{
this
.
create
dBy
=
createdBy
;
}
/**
* 获取:
创建时间
* 获取:
*/
public
Date
getCreateTime
()
{
return
create
Time
;
public
String
getCreatedBy
()
{
return
create
dBy
;
}
/**
* 设置:
更新时间
* 设置:
*/
public
void
setUpdateDate
(
Date
updateDate
)
{
this
.
updateDate
=
updateDate
;
}
/**
* 获取:
更新时间
* 获取:
*/
public
Date
getUpdateDate
()
{
return
updateDate
;
}
/**
* 设置:
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* 获取:
*/
public
String
getUpdatedBy
()
{
return
updatedBy
;
}
/**
* 设置:
*/
public
void
setVersion
(
Integer
version
)
{
this
.
version
=
version
;
}
/**
* 获取:
*/
public
Integer
getVersion
()
{
return
version
;
}
/**
* 设置:
*/
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
/**
* 获取:
*/
public
String
getContent
()
{
return
content
;
}
/**
* 设置:
*/
public
void
setPostId
(
String
postId
)
{
this
.
postId
=
postId
;
}
/**
* 获取:
*/
public
String
getPostId
()
{
return
postId
;
}
/**
* 设置:
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
/**
* 获取:
*/
public
String
getUserId
()
{
return
userId
;
}
}
platform-admin/src/main/java/com/platform/entity/ComplainEntity.java
浏览文件 @
465775ae
...
...
@@ -8,7 +8,7 @@ import java.util.Date;
* 表名 complain
*
* @author lipengjun
* @date 2020-06-
19 16:57:1
0
* @date 2020-06-
22 13:00:0
0
*/
public
class
ComplainEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -61,6 +61,10 @@ public class ComplainEntity implements Serializable {
* 帖子ID
*/
private
String
postId
;
/**
* 状态 0:待审核 1:不处理 2:禁言 3:禁止发帖
*/
private
Integer
status
;
/**
* 评论ID
*/
...
...
@@ -70,35 +74,25 @@ public class ComplainEntity implements Serializable {
*/
private
String
replyId
;
/**
* 举报
人
* 举报
者ID
*/
private
String
userId
;
/**
*
状态 0:待审核 1:不处理 2:禁言 3:禁止发帖
*
被举报者ID
*/
private
Integer
status
;
private
String
complainUserId
;
/**
*
被举报人
*
处理原因
*/
private
String
complainUserId
;
public
String
getComplainUserId
()
{
return
complainUserId
;
}
public
void
setComplainUserId
(
String
complainUserId
)
{
this
.
complainUserId
=
complainUserId
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
private
String
reason
;
/**
* 禁言时间
*/
private
Date
speakTime
;
/**
* 禁帖时间
*/
private
Date
postTime
;
/**
* 设置:举报ID
...
...
@@ -113,7 +107,6 @@ public class ComplainEntity implements Serializable {
public
String
getId
()
{
return
id
;
}
/**
* 设置:举报类型 0:帖子 1:评论 2:回复
*/
...
...
@@ -127,7 +120,6 @@ public class ComplainEntity implements Serializable {
public
Integer
getType
()
{
return
type
;
}
/**
* 设置:0:已删除 1:正常
*/
...
...
@@ -141,7 +133,6 @@ public class ComplainEntity implements Serializable {
public
Integer
getArchived
()
{
return
archived
;
}
/**
* 设置:删除人
*/
...
...
@@ -155,7 +146,6 @@ public class ComplainEntity implements Serializable {
public
String
getArchivedBy
()
{
return
archivedBy
;
}
/**
* 设置:删除时间
*/
...
...
@@ -169,7 +159,6 @@ public class ComplainEntity implements Serializable {
public
Date
getArchivedDate
()
{
return
archivedDate
;
}
/**
* 设置:创建时间
*/
...
...
@@ -183,7 +172,6 @@ public class ComplainEntity implements Serializable {
public
Date
getCreateDate
()
{
return
createDate
;
}
/**
* 设置:创建人
*/
...
...
@@ -197,7 +185,6 @@ public class ComplainEntity implements Serializable {
public
String
getCreatedBy
()
{
return
createdBy
;
}
/**
* 设置:更新时间
*/
...
...
@@ -211,7 +198,6 @@ public class ComplainEntity implements Serializable {
public
Date
getUpdateDate
()
{
return
updateDate
;
}
/**
* 设置:更新人
*/
...
...
@@ -225,7 +211,6 @@ public class ComplainEntity implements Serializable {
public
String
getUpdatedBy
()
{
return
updatedBy
;
}
/**
* 设置:版本
*/
...
...
@@ -239,7 +224,6 @@ public class ComplainEntity implements Serializable {
public
Integer
getVersion
()
{
return
version
;
}
/**
* 设置:举报信息
*/
...
...
@@ -253,7 +237,6 @@ public class ComplainEntity implements Serializable {
public
String
getDescription
()
{
return
description
;
}
/**
* 设置:帖子ID
*/
...
...
@@ -267,7 +250,19 @@ public class ComplainEntity implements Serializable {
public
String
getPostId
()
{
return
postId
;
}
/**
* 设置:状态 0:待审核 1:不处理 2:禁言 3:禁止发帖
*/
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/**
* 获取:状态 0:待审核 1:不处理 2:禁言 3:禁止发帖
*/
public
Integer
getStatus
()
{
return
status
;
}
/**
* 设置:评论ID
*/
...
...
@@ -281,7 +276,6 @@ public class ComplainEntity implements Serializable {
public
String
getCommentId
()
{
return
commentId
;
}
/**
* 设置:回复ID
*/
...
...
@@ -295,18 +289,69 @@ public class ComplainEntity implements Serializable {
public
String
getReplyId
()
{
return
replyId
;
}
/**
* 设置:举报
人
* 设置:举报
者ID
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
/**
* 获取:举报
人
* 获取:举报
者ID
*/
public
String
getUserId
()
{
return
userId
;
}
/**
* 设置:被举报者ID
*/
public
void
setComplainUserId
(
String
complainUserId
)
{
this
.
complainUserId
=
complainUserId
;
}
/**
* 获取:被举报者ID
*/
public
String
getComplainUserId
()
{
return
complainUserId
;
}
/**
* 设置:处理原因
*/
public
void
setReason
(
String
reason
)
{
this
.
reason
=
reason
;
}
/**
* 获取:处理原因
*/
public
String
getReason
()
{
return
reason
;
}
/**
* 设置:禁言时间
*/
public
void
setSpeakTime
(
Date
speakTime
)
{
this
.
speakTime
=
speakTime
;
}
/**
* 获取:禁言时间
*/
public
Date
getSpeakTime
()
{
return
speakTime
;
}
/**
* 设置:禁帖时间
*/
public
void
setPostTime
(
Date
postTime
)
{
this
.
postTime
=
postTime
;
}
/**
* 获取:禁帖时间
*/
public
Date
getPostTime
()
{
return
postTime
;
}
}
platform-admin/src/main/java/com/platform/service/ComplainService.java
浏览文件 @
465775ae
...
...
@@ -2,6 +2,8 @@ package com.platform.service;
import
com.platform.entity.ComplainEntity
;
import
com.platform.entity.ComplainVo
;
import
com.platform.utils.R
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -69,4 +71,14 @@ public interface ComplainService {
* @return 删除条数
*/
int
deleteBatch
(
String
[]
ids
);
/**
* 根据ID修改状态
*
* @param id
* @param type
* @param archived
* @return
*/
int
changeStatus
(
String
id
,
Integer
type
,
Integer
archived
);
}
platform-admin/src/main/java/com/platform/service/DealService.java
deleted
100644 → 0
浏览文件 @
ecfeb646
package
com
.
platform
.
service
;
import
com.platform.entity.DealEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service接口
*
* @author lipengjun
* @date 2020-06-22 11:09:19
*/
public
interface
DealService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
DealEntity
queryObject
(
String
id
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
DealEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param deal 实体
* @return 保存条数
*/
int
save
(
DealEntity
deal
);
/**
* 根据主键更新实体
*
* @param deal 实体
* @return 更新条数
*/
int
update
(
DealEntity
deal
);
/**
* 根据主键删除
*
* @param id
* @return 删除条数
*/
int
delete
(
String
id
);
/**
* 根据主键批量删除
*
* @param ids
* @return 删除条数
*/
int
deleteBatch
(
String
[]
ids
);
}
platform-admin/src/main/java/com/platform/service/impl/ComplainServiceImpl.java
浏览文件 @
465775ae
...
...
@@ -5,8 +5,6 @@ import com.platform.dao.PostDao;
import
com.platform.dao.TbCfUserInfoDao
;
import
com.platform.entity.ComplainEntity
;
import
com.platform.entity.ComplainVo
;
import
com.platform.entity.PostEntity
;
import
com.platform.entity.TbCfUserInfoEntity
;
import
com.platform.service.ComplainService
;
import
com.platform.utils.IdUtil
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -14,7 +12,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.
ArrayList
;
import
java.util.
Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -37,7 +35,16 @@ public class ComplainServiceImpl implements ComplainService {
@Override
public
ComplainEntity
queryObject
(
String
id
)
{
return
complainDao
.
queryObject
(
id
);
ComplainEntity
complainEntity
=
complainDao
.
queryObject
(
id
);
ComplainVo
complain
=
new
ComplainVo
();
BeanUtils
.
copyProperties
(
complainEntity
,
complain
);
if
(
"1"
.
equals
(
complain
.
getType
()))
{
//查询被举报的评论
}
else
if
(
"2"
.
equals
(
complain
.
getType
()))
{
//查询被举报的回复信息
}
return
complainEntity
;
}
@Override
...
...
@@ -66,7 +73,15 @@ public class ComplainServiceImpl implements ComplainService {
@Override
public
int
update
(
ComplainEntity
complain
)
{
return
complainDao
.
update
(
complain
);
ComplainEntity
complainEntity
=
new
ComplainEntity
();
complainEntity
.
setId
(
complain
.
getId
());
complainEntity
.
setStatus
(
complain
.
getStatus
());
complainEntity
.
setVersion
(
complain
.
getVersion
()
+
1
);
complainEntity
.
setReason
(
complain
.
getReason
());
complainEntity
.
setSpeakTime
(
complain
.
getSpeakTime
());
complainEntity
.
setPostTime
(
complain
.
getPostTime
());
complainEntity
.
setUpdateDate
(
new
Date
());
return
complainDao
.
update
(
complainEntity
);
}
@Override
...
...
@@ -78,4 +93,34 @@ public class ComplainServiceImpl implements ComplainService {
public
int
deleteBatch
(
String
[]
ids
)
{
return
complainDao
.
deleteBatch
(
ids
);
}
/**
* ============================
* 类型(type)
* 0):帖子 1):评论 2):回复
* 状态(archived)
* 0):已删除 1):正常 2):下线
* ============================
*
* @param id
* @param type
* @param archived
* @return 修改记录数
*/
@Override
public
int
changeStatus
(
String
id
,
Integer
type
,
Integer
archived
)
{
int
res
=
0
;
//帖子
if
(
"0"
.
equals
(
type
.
toString
()))
{
res
=
complainDao
.
changeStatus
(
id
,
archived
);
}
else
if
(
"1"
.
equals
(
type
.
toString
()))
{
//评论
res
=
complainDao
.
changeStatus
(
id
,
archived
);
}
else
if
(
"2"
.
equals
(
type
.
toString
()))
{
//回复
res
=
complainDao
.
changeStatus
(
id
,
archived
);
}
return
res
;
}
}
platform-admin/src/main/java/com/platform/service/impl/DealServiceImpl.java
deleted
100644 → 0
浏览文件 @
ecfeb646
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.DealDao
;
import
com.platform.entity.DealEntity
;
import
com.platform.service.DealService
;
import
com.platform.utils.IdUtil
;
import
com.platform.utils.ShiroUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service实现类
*
* @author lipengjun
* @date 2020-06-22 11:09:19
*/
@Service
(
"dealService"
)
public
class
DealServiceImpl
implements
DealService
{
@Autowired
private
DealDao
dealDao
;
@Override
public
DealEntity
queryObject
(
String
id
)
{
return
dealDao
.
queryObject
(
id
);
}
@Override
public
List
<
DealEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
dealDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
dealDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
DealEntity
deal
)
{
deal
.
setId
(
IdUtil
.
createIdbyUUID
());
deal
.
setDealUserId
(
ShiroUtils
.
getUserId
());
deal
.
setCreateTime
(
new
Date
());
deal
.
setUpdateDate
(
new
Date
());
return
dealDao
.
save
(
deal
);
}
@Override
public
int
update
(
DealEntity
deal
)
{
deal
.
setUpdateDate
(
new
Date
());
return
dealDao
.
update
(
deal
);
}
@Override
public
int
delete
(
String
id
)
{
return
dealDao
.
delete
(
id
);
}
@Override
public
int
deleteBatch
(
String
[]
ids
)
{
return
dealDao
.
deleteBatch
(
ids
);
}
}
platform-admin/src/main/resources/com/platform/dao/ComplainDao.xml
浏览文件 @
465775ae
...
...
@@ -21,6 +21,9 @@
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"complainUserId"
column=
"complain_user_id"
/>
<result
property=
"reason"
column=
"reason"
/>
<result
property=
"speakTime"
column=
"speak_time"
/>
<result
property=
"postTime"
column=
"post_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.ComplainVo"
>
...
...
@@ -44,7 +47,10 @@
u1.nick complainByUser,
p.caption caption,
c.status,
complain_user_id
c.complain_user_id,
c.reason,
c.`speak_time`,
c.`post_time`
from complain c
left join tb_cf_user_info u
on c.user_id=u.user_id
...
...
@@ -117,7 +123,10 @@
u1.nick complainByUser,
p.caption caption,
c.status,
complain_user_id
complain_user_id,
c.reason,
c.`speak_time`,
c.`post_time`
from complain c
left join tb_cf_user_info u
on c.user_id=u.user_id
...
...
@@ -175,11 +184,14 @@
`version`,
`description`,
`post_id`,
`status`,
`comment_id`,
`reply_id`,
`user_id`,
status,
complain_user_id)
`complain_user_id`,
`reason`,
`speak_time`,
`post_time`)
values(
#{id},
#{type},
...
...
@@ -193,11 +205,14 @@
#{version},
#{description},
#{postId},
#{status},
#{commentId},
#{replyId},
#{userId},
#{status},
#{complainUserId})
#{complainUserId},
#{reason},
#{speakTime},
#{postTime})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.ComplainEntity"
>
...
...
@@ -214,15 +229,24 @@
<if
test=
"version != null"
>
`version` = #{version},
</if>
<if
test=
"description != null"
>
`description` = #{description},
</if>
<if
test=
"postId != null"
>
`post_id` = #{postId},
</if>
<if
test=
"status != null"
>
`status` = #{status},
</if>
<if
test=
"commentId != null"
>
`comment_id` = #{commentId},
</if>
<if
test=
"replyId != null"
>
`reply_id` = #{replyId},
</if>
<if
test=
"userId != null"
>
`user_id` = #{userId}
</if>
<if
test=
"status != null"
>
`status` = #{status}
</if>
<if
test=
"complainUserId != null"
>
`complain_user_id` = #{complainUserId}
</if>
<if
test=
"userId != null"
>
`user_id` = #{userId},
</if>
<if
test=
"complainUserId != null"
>
`complain_user_id` = #{complainUserId},
</if>
<if
test=
"reason != null"
>
`reason` = #{reason},
</if>
<if
test=
"speakTime != null"
>
`speak_time` = #{speakTime},
</if>
<if
test=
"postTime != null"
>
`post_time` = #{postTime}
</if>
</set>
where id = #{id}
</update>
<update
id=
"changeStatus"
>
update complain
<set>
<if
test=
"archived != null"
>
`archived` = #{archived}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from complain where id = #{value}
</delete>
...
...
platform-admin/src/main/resources/com/platform/dao/DealDao.xml
deleted
100644 → 0
浏览文件 @
ecfeb646
<?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.platform.dao.DealDao"
>
<resultMap
type=
"com.platform.entity.DealEntity"
id=
"dealMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"result"
column=
"result"
/>
<result
property=
"dealUserId"
column=
"deal_user_id"
/>
<result
property=
"reason"
column=
"reason"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateDate"
column=
"update_date"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.DealEntity"
>
select
`id`,
`user_id`,
`result`,
`deal_user_id`,
`reason`,
`create_time`,
`update_date`
from deal
where id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.DealEntity"
>
select
`id`,
`user_id`,
`result`,
`deal_user_id`,
`reason`,
`create_time`,
`update_date`
from deal
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from deal
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.DealEntity"
>
insert into deal(
`id`,
`user_id`,
`result`,
`deal_user_id`,
`reason`,
`create_time`,
`update_date`)
values(
#{id},
#{userId},
#{result},
#{dealUserId},
#{reason},
#{createTime},
#{updateDate})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.DealEntity"
>
update deal
<set>
<if
test=
"userId != null"
>
`user_id` = #{userId},
</if>
<if
test=
"result != null"
>
`result` = #{result},
</if>
<if
test=
"dealUserId != null"
>
`deal_user_id` = #{dealUserId},
</if>
<if
test=
"reason != null"
>
`reason` = #{reason},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateDate != null"
>
`update_date` = #{updateDate}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from deal where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from deal where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/webapp/WEB-INF/page/sys/complain.html
浏览文件 @
465775ae
...
...
@@ -72,16 +72,18 @@
</Form-item>
<Form-item
v-show=
"prohibitSpeak"
label=
"禁言时间:"
>
<i-col
span=
"12"
>
<Date-picker
type=
"datetime"
placeholder=
"选择日期和时间"
style=
"width: 200px"
></Date-picker>
<Date-picker
type=
"datetime"
v-model=
"complain.speakTime"
placeholder=
"选择日期和时间"
style=
"width: 200px"
></Date-picker>
</i-col>
</Form-item>
<Form-item
v-show=
"prohibitPost"
label=
"禁帖时间:"
>
<i-col
span=
"12"
>
<Date-picker
type=
"datetime"
placeholder=
"选择日期和时间"
style=
"width: 200px"
></Date-picker>
<Date-picker
type=
"datetime"
v-model=
"complain.postTime"
placeholder=
"选择日期和时间"
style=
"width: 200px"
></Date-picker>
</i-col>
</Form-item>
<Form-item
label=
"处理原因:"
prop=
"reason"
>
<textarea
v-model=
"reason"
style=
"width: 300px;height: 200px;"
></textarea>
<textarea
v-model=
"
complain.
reason"
style=
"width: 300px;height: 200px;"
></textarea>
</Form-item>
</i-form>
</Modal>
...
...
platform-admin/src/main/webapp/js/sys/complain.js
浏览文件 @
465775ae
...
...
@@ -8,7 +8,16 @@ $(function () {
{
label
:
'举报信息'
,
name
:
'description'
,
index
:
'description'
,
width
:
80
},
{
label
:
'举报人'
,
name
:
'complainUser'
,
index
:
'complainUser'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'status'
,
index
:
'status'
,
width
:
60
,
formatter
:
function
(
value
,
options
,
row
)
{
label
:
'状态'
,
name
:
'archived'
,
index
:
'archived'
,
width
:
50
,
formatter
:
function
(
value
,
options
,
row
)
{
if
(
value
===
1
)
{
return
'<span class="label label-success">正常</span>'
}
else
if
(
value
===
2
)
{
return
'<span class="label label-warning">下线</span>'
}
}
},
{
label
:
'处理结果'
,
name
:
'status'
,
index
:
'status'
,
width
:
60
,
formatter
:
function
(
value
,
options
,
row
)
{
if
(
value
===
0
)
{
return
'<span class="label label-primary">待审核</span>'
}
else
if
(
value
===
1
)
{
...
...
@@ -17,6 +26,8 @@ $(function () {
return
'<span class="label label-warning">禁止发言</span>'
}
else
if
(
value
===
3
)
{
return
'<span class="label label-danger">禁止发帖</span>'
}
else
if
(
value
===
4
)
{
return
'<span class="label label-danger">禁止发言/发帖</span>'
}
}
...
...
@@ -24,7 +35,9 @@ $(function () {
{
label
:
'创建时间'
,
name
:
'createDate'
,
index
:
'create_date'
,
width
:
80
},
{
label
:
'操作'
,
index
:
'operate'
,
width
:
80
,
formatter
:
function
(
value
,
grid
,
rows
)
{
return
'<span class="label label-info pointer" onclick="vm.audit('
+
rows
.
id
+
')">审核</span>'
;
return
'<span class="label label-info pointer" onclick="vm.audit('
+
rows
.
id
+
')">审核</span> '
+
'<span class="label label-warning pointer" onclick="vm.off('
+
rows
.
id
+
')" ">下线</span> '
+
'<span class="label label-success pointer" onclick="vm.activate('
+
rows
.
id
+
')" ">激活</span>'
;
}
}]
});
...
...
@@ -34,6 +47,9 @@ $(function () {
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
noSpeack
:
''
,
noPost
:
''
,
noDispose
:
''
,
reason
:
''
,
prohibitSpeak
:
false
,
prohibitPost
:
false
,
...
...
@@ -55,6 +71,28 @@ let vm = new Vue({
},
methods
:
{
off
:
function
(
id
)
{
let
url
=
'../complain/changeStatus?id='
+
id
+
'&type=0&archived=2'
;
Ajax
.
request
({
url
:
url
,
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
vm
.
reload
();
}
});
},
activate
:
function
(
id
)
{
let
url
=
'../complain/changeStatus?id='
+
id
+
'&type=0&archived=1'
;
Ajax
.
request
({
url
:
url
,
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
vm
.
reload
();
}
});
},
change
:
function
()
{
let
resArr
=
this
.
result
;
vm
.
prohibitSpeak
=
false
;
...
...
@@ -71,9 +109,33 @@ let vm = new Vue({
audit
:
function
(
id
)
{
vm
.
modal1
=
true
;
vm
.
getInfo
(
id
);
},
deal
:
function
()
{
let
url
=
"../complain/update"
;
let
status
=
1
if
(
vm
.
prohibitSpeak
)
{
status
=
2
}
if
(
vm
.
prohibitPost
)
{
status
=
3
}
if
(
vm
.
prohibitSpeak
&&
vm
.
prohibitPost
)
{
status
=
4
}
vm
.
complain
.
status
=
status
;
console
.
log
(
123
,
vm
.
complain
);
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
complain
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
)
vm
.
reload
();
}
});
},
cancel
:
function
()
{
...
...
@@ -136,6 +198,23 @@ let vm = new Vue({
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
complain
=
r
.
complain
;
let
status
=
vm
.
complain
.
status
;
vm
.
prohibitSpeak
=
false
vm
.
prohibitPost
=
false
vm
.
result
=
[]
if
(
status
===
1
)
{
vm
.
result
=
[
'不处理'
]
}
else
if
(
status
===
2
)
{
vm
.
result
=
[
'禁止发言'
]
vm
.
prohibitSpeak
=
true
;
}
else
if
(
status
===
3
)
{
vm
.
result
=
[
'禁止发帖'
]
vm
.
prohibitPost
=
true
;
}
else
if
(
status
===
4
)
{
vm
.
result
=
[
'禁止发言'
,
'禁止发帖'
]
vm
.
prohibitSpeak
=
true
;
vm
.
prohibitPost
=
true
;
}
}
});
},
...
...
platform-common/src/main/java/com/platform/dao/ComplainDao.java
deleted
100644 → 0
浏览文件 @
ecfeb646
package
com
.
platform
.
dao
;
import
com.platform.entity.ComplainEntity
;
/**
* Dao
*
* @author lipengjun
* @date 2020-06-19 16:57:10
*/
public
interface
ComplainDao
extends
BaseDao
<
ComplainEntity
>
{
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论