Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
6d339e73
提交
6d339e73
authored
6月 19, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
举报信息
上级
af7c8a85
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
1113 行增加
和
3 行删除
+1113
-3
ComplainController.java
...main/java/com/platform/controller/ComplainController.java
+110
-0
ComplainDao.java
...orm-admin/src/main/java/com/platform/dao/ComplainDao.java
+19
-0
TbCfUserInfoDao.java
...admin/src/main/java/com/platform/dao/TbCfUserInfoDao.java
+4
-0
ComplainEntity.java
...min/src/main/java/com/platform/entity/ComplainEntity.java
+312
-0
ComplainVo.java
...m-admin/src/main/java/com/platform/entity/ComplainVo.java
+47
-0
ComplainService.java
...n/src/main/java/com/platform/service/ComplainService.java
+72
-0
ComplainServiceImpl.java
...n/java/com/platform/service/impl/ComplainServiceImpl.java
+81
-0
ComplainDao.xml
...admin/src/main/resources/com/platform/dao/ComplainDao.xml
+227
-0
TbCfUserInfoDao.xml
...n/src/main/resources/com/platform/dao/TbCfUserInfoDao.xml
+4
-3
complain.html
...form-admin/src/main/webapp/WEB-INF/page/sys/complain.html
+100
-0
complain.js
platform-admin/src/main/webapp/js/sys/complain.js
+137
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/ComplainController.java
0 → 100644
浏览文件 @
6d339e73
package
com
.
platform
.
controller
;
import
com.platform.entity.ComplainEntity
;
import
com.platform.entity.ComplainVo
;
import
com.platform.service.ComplainService
;
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-19 16:57:10
*/
@Controller
@RequestMapping
(
"complain"
)
public
class
ComplainController
{
@Autowired
private
ComplainService
complainService
;
/**
* 查看列表
*/
@RequestMapping
(
"/list"
)
@RequiresPermissions
(
"complain:list"
)
@ResponseBody
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
//查询列表数据
Query
query
=
new
Query
(
params
);
List
<
ComplainVo
>
complainList
=
complainService
.
queryList
(
query
);
int
total
=
complainService
.
queryTotal
(
query
);
PageUtils
pageUtil
=
new
PageUtils
(
complainList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
return
R
.
ok
().
put
(
"page"
,
pageUtil
);
}
/**
* 查看信息
*/
@RequestMapping
(
"/info/{id}"
)
@RequiresPermissions
(
"complain:info"
)
@ResponseBody
public
R
info
(
@PathVariable
(
"id"
)
String
id
)
{
ComplainEntity
complain
=
complainService
.
queryObject
(
id
);
return
R
.
ok
().
put
(
"complain"
,
complain
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"complain:save"
)
@ResponseBody
public
R
save
(
@RequestBody
ComplainEntity
complain
)
{
complainService
.
save
(
complain
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"complain:update"
)
@ResponseBody
public
R
update
(
@RequestBody
ComplainEntity
complain
)
{
complainService
.
update
(
complain
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
@RequiresPermissions
(
"complain:delete"
)
@ResponseBody
public
R
delete
(
@RequestBody
String
[]
ids
)
{
complainService
.
deleteBatch
(
ids
);
return
R
.
ok
();
}
/**
* 查看所有列表
*/
@RequestMapping
(
"/queryAll"
)
@ResponseBody
public
R
queryAll
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
List
<
ComplainVo
>
list
=
complainService
.
queryList
(
params
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
platform-admin/src/main/java/com/platform/dao/ComplainDao.java
0 → 100644
浏览文件 @
6d339e73
package
com
.
platform
.
dao
;
import
com.platform.entity.ComplainEntity
;
import
com.platform.entity.ComplainVo
;
import
java.util.List
;
import
java.util.Map
;
/**
* Dao
*
* @author lipengjun
* @date 2020-06-19 16:57:10
*/
public
interface
ComplainDao
extends
BaseDao
<
ComplainEntity
>
{
List
<
ComplainVo
>
queryComplainList
(
Map
<
String
,
Object
>
map
);
}
platform-admin/src/main/java/com/platform/dao/TbCfUserInfoDao.java
浏览文件 @
6d339e73
...
...
@@ -2,6 +2,8 @@ package com.platform.dao;
import
com.platform.entity.TbCfUserInfoEntity
;
import
java.util.List
;
/**
* 用户表Dao
*
...
...
@@ -14,4 +16,6 @@ public interface TbCfUserInfoDao extends BaseDao<TbCfUserInfoEntity> {
String
queryById
(
String
account
);
long
queryUserTotal
();
List
<
String
>
getUserIdsByNick
(
String
nick
);
}
platform-admin/src/main/java/com/platform/entity/ComplainEntity.java
0 → 100644
浏览文件 @
6d339e73
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 实体
* 表名 complain
*
* @author lipengjun
* @date 2020-06-19 16:57:10
*/
public
class
ComplainEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 举报ID
*/
private
String
id
;
/**
* 举报类型 0:帖子 1:评论 2:回复
*/
private
Integer
type
;
/**
* 0:已删除 1:正常
*/
private
Integer
archived
;
/**
* 删除人
*/
private
String
archivedBy
;
/**
* 删除时间
*/
private
Date
archivedDate
;
/**
* 创建时间
*/
private
Date
createDate
;
/**
* 创建人
*/
private
String
createdBy
;
/**
* 更新时间
*/
private
Date
updateDate
;
/**
* 更新人
*/
private
String
updatedBy
;
/**
* 版本
*/
private
Integer
version
;
/**
* 举报信息
*/
private
String
description
;
/**
* 帖子ID
*/
private
String
postId
;
/**
* 评论ID
*/
private
String
commentId
;
/**
* 回复ID
*/
private
String
replyId
;
/**
* 举报人
*/
private
String
userId
;
/**
* 状态 0:待审核 1:不处理 2:禁言 3:禁止发帖
*/
private
Integer
status
;
/**
* 被举报人
*/
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
;
}
/**
* 设置:举报ID
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* 获取:举报ID
*/
public
String
getId
()
{
return
id
;
}
/**
* 设置:举报类型 0:帖子 1:评论 2:回复
*/
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
/**
* 获取:举报类型 0:帖子 1:评论 2:回复
*/
public
Integer
getType
()
{
return
type
;
}
/**
* 设置:0:已删除 1:正常
*/
public
void
setArchived
(
Integer
archived
)
{
this
.
archived
=
archived
;
}
/**
* 获取:0:已删除 1:正常
*/
public
Integer
getArchived
()
{
return
archived
;
}
/**
* 设置:删除人
*/
public
void
setArchivedBy
(
String
archivedBy
)
{
this
.
archivedBy
=
archivedBy
;
}
/**
* 获取:删除人
*/
public
String
getArchivedBy
()
{
return
archivedBy
;
}
/**
* 设置:删除时间
*/
public
void
setArchivedDate
(
Date
archivedDate
)
{
this
.
archivedDate
=
archivedDate
;
}
/**
* 获取:删除时间
*/
public
Date
getArchivedDate
()
{
return
archivedDate
;
}
/**
* 设置:创建时间
*/
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
}
/**
* 获取:创建时间
*/
public
Date
getCreateDate
()
{
return
createDate
;
}
/**
* 设置:创建人
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* 获取:创建人
*/
public
String
getCreatedBy
()
{
return
createdBy
;
}
/**
* 设置:更新时间
*/
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
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
/**
* 获取:举报信息
*/
public
String
getDescription
()
{
return
description
;
}
/**
* 设置:帖子ID
*/
public
void
setPostId
(
String
postId
)
{
this
.
postId
=
postId
;
}
/**
* 获取:帖子ID
*/
public
String
getPostId
()
{
return
postId
;
}
/**
* 设置:评论ID
*/
public
void
setCommentId
(
String
commentId
)
{
this
.
commentId
=
commentId
;
}
/**
* 获取:评论ID
*/
public
String
getCommentId
()
{
return
commentId
;
}
/**
* 设置:回复ID
*/
public
void
setReplyId
(
String
replyId
)
{
this
.
replyId
=
replyId
;
}
/**
* 获取:回复ID
*/
public
String
getReplyId
()
{
return
replyId
;
}
/**
* 设置:举报人
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
/**
* 获取:举报人
*/
public
String
getUserId
()
{
return
userId
;
}
}
platform-admin/src/main/java/com/platform/entity/ComplainVo.java
0 → 100644
浏览文件 @
6d339e73
package
com
.
platform
.
entity
;
/**
* @Auther: wudepeng
* @Date: 2020/06/19
* @Description:
*/
public
class
ComplainVo
extends
ComplainEntity
{
/**
* 帖子标题
*/
private
String
caption
;
/**
* 举报者
*/
private
String
complainUser
;
/**
* 被举报者
*/
private
String
complainByUser
;
public
String
getCaption
()
{
return
caption
;
}
public
void
setCaption
(
String
caption
)
{
this
.
caption
=
caption
;
}
public
String
getComplainUser
()
{
return
complainUser
;
}
public
void
setComplainUser
(
String
complainUser
)
{
this
.
complainUser
=
complainUser
;
}
public
String
getComplainByUser
()
{
return
complainByUser
;
}
public
void
setComplainByUser
(
String
complainByUser
)
{
this
.
complainByUser
=
complainByUser
;
}
}
platform-admin/src/main/java/com/platform/service/ComplainService.java
0 → 100644
浏览文件 @
6d339e73
package
com
.
platform
.
service
;
import
com.platform.entity.ComplainEntity
;
import
com.platform.entity.ComplainVo
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service接口
*
* @author lipengjun
* @date 2020-06-19 16:57:10
*/
public
interface
ComplainService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
ComplainEntity
queryObject
(
String
id
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
ComplainVo
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param complain 实体
* @return 保存条数
*/
int
save
(
ComplainEntity
complain
);
/**
* 根据主键更新实体
*
* @param complain 实体
* @return 更新条数
*/
int
update
(
ComplainEntity
complain
);
/**
* 根据主键删除
*
* @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
0 → 100644
浏览文件 @
6d339e73
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.ComplainDao
;
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
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service实现类
*
* @author lipengjun
* @date 2020-06-19 16:57:10
*/
@Service
(
"complainService"
)
public
class
ComplainServiceImpl
implements
ComplainService
{
@Autowired
private
ComplainDao
complainDao
;
@Autowired
private
PostDao
postDao
;
@Autowired
private
TbCfUserInfoDao
tbCfUserInfoDao
;
@Override
public
ComplainEntity
queryObject
(
String
id
)
{
return
complainDao
.
queryObject
(
id
);
}
@Override
public
List
<
ComplainVo
>
queryList
(
Map
<
String
,
Object
>
map
)
{
//按作者/发言人查询
String
name
=
(
String
)
map
.
get
(
"name"
);
if
(!
StringUtils
.
isBlank
(
name
))
{
List
<
String
>
idList
=
tbCfUserInfoDao
.
getUserIdsByNick
(
name
);
String
[]
idArray
=
idList
.
toArray
(
new
String
[
idList
.
size
()]);
map
.
put
(
"ids"
,
idArray
);
}
List
<
ComplainVo
>
complainList
=
complainDao
.
queryComplainList
(
map
);
return
complainList
;
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
complainDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
ComplainEntity
complain
)
{
complain
.
setId
(
IdUtil
.
createIdbyUUID
());
return
complainDao
.
save
(
complain
);
}
@Override
public
int
update
(
ComplainEntity
complain
)
{
return
complainDao
.
update
(
complain
);
}
@Override
public
int
delete
(
String
id
)
{
return
complainDao
.
delete
(
id
);
}
@Override
public
int
deleteBatch
(
String
[]
ids
)
{
return
complainDao
.
deleteBatch
(
ids
);
}
}
platform-admin/src/main/resources/com/platform/dao/ComplainDao.xml
0 → 100644
浏览文件 @
6d339e73
<?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.ComplainDao"
>
<resultMap
type=
"com.platform.entity.ComplainEntity"
id=
"complainMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"archived"
column=
"archived"
/>
<result
property=
"archivedBy"
column=
"archived_by"
/>
<result
property=
"archivedDate"
column=
"archived_date"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"createdBy"
column=
"created_by"
/>
<result
property=
"updateDate"
column=
"update_date"
/>
<result
property=
"updatedBy"
column=
"updated_by"
/>
<result
property=
"version"
column=
"version"
/>
<result
property=
"description"
column=
"description"
/>
<result
property=
"postId"
column=
"post_id"
/>
<result
property=
"commentId"
column=
"comment_id"
/>
<result
property=
"replyId"
column=
"reply_id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"complainUserId"
column=
"complain_user_id"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.ComplainEntity"
>
select
`id`,
`type`,
`archived`,
`archived_by`,
`archived_date`,
`create_date`,
`created_by`,
`update_date`,
`updated_by`,
`version`,
`description`,
`post_id`,
`comment_id`,
`reply_id`,
`user_id`,
status
from complain
where id = #{id}
</select>
<!-- <select id="queryList" resultType="com.platform.entity.ComplainVo">-->
<!-- select-->
<!-- `id`,-->
<!-- `type`,-->
<!-- `archived`,-->
<!-- `archived_by`,-->
<!-- `archived_date`,-->
<!-- `create_date`,-->
<!-- `created_by`,-->
<!-- `update_date`,-->
<!-- `updated_by`,-->
<!-- `version`,-->
<!-- `description`,-->
<!-- `post_id`,-->
<!-- `comment_id`,-->
<!-- `reply_id`,-->
<!-- c.`user_id`,-->
<!-- u.nick complainUser,-->
<!-- status-->
<!-- from complain c-->
<!-- left join tb_cf_user_info u-->
<!-- on c.user_id=u.user_id-->
<!-- WHERE 1=1-->
<!-- <if test="name != null and name.trim() != ''">-->
<!-- AND name LIKE concat('%',#{name},'%')-->
<!-- </if>-->
<!-- <if test="status != null and status.trim() != ''">-->
<!-- AND type =#{status}-->
<!-- </if>-->
<!-- <choose>-->
<!-- <when test="sidx != null and sidx.trim() != ''">-->
<!-- order by ${sidx} ${order}-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- order by create_date desc-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- <if test="offset != null and limit != null">-->
<!-- limit #{offset}, #{limit}-->
<!-- </if>-->
<!-- </select>-->
<select
id=
"queryComplainList"
resultType=
"com.platform.entity.ComplainVo"
>
select
c.`id`,
c.`type`,
c.`archived`,
c.`archived_by`,
c.`archived_date`,
c.`create_date`,
c.`created_by`,
c.`update_date`,
c.`updated_by`,
c.`version`,
c.`description`,
c.`post_id`,
c.`comment_id`,
c.`reply_id`,
c.`user_id`,
u.nick complainUser,
u1.nick complainByUser,
p.caption caption,
c.status,
complain_user_id
from complain c
left join tb_cf_user_info u
on c.user_id=u.user_id
left join tb_cf_user_info u1
on c.complain_user_id=u1.user_id
left join post p
on c.post_id=p.id
WHERE 1=1
<if
test=
"status != null and status.trim() != ''"
>
AND type =#{status}
</if>
<if
test=
"ids != null "
>
AND complain_user_id in
<foreach
item=
"id"
collection=
"ids"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by create_date desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from complain
WHERE 1=1
<if
test=
"status != null and status.trim() != ''"
>
AND type =#{status}
</if>
<if
test=
"ids != null "
>
AND complain_user_id in
<foreach
item=
"id"
collection=
"ids"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.ComplainEntity"
>
insert into complain(
`id`,
`type`,
`archived`,
`archived_by`,
`archived_date`,
`create_date`,
`created_by`,
`update_date`,
`updated_by`,
`version`,
`description`,
`post_id`,
`comment_id`,
`reply_id`,
`user_id`,
status,
complain_user_id)
values(
#{id},
#{type},
#{archived},
#{archivedBy},
#{archivedDate},
#{createDate},
#{createdBy},
#{updateDate},
#{updatedBy},
#{version},
#{description},
#{postId},
#{commentId},
#{replyId},
#{userId},
#{status},
#{complainUserId})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.ComplainEntity"
>
update complain
<set>
<if
test=
"type != null"
>
`type` = #{type},
</if>
<if
test=
"archived != null"
>
`archived` = #{archived},
</if>
<if
test=
"archivedBy != null"
>
`archived_by` = #{archivedBy},
</if>
<if
test=
"archivedDate != null"
>
`archived_date` = #{archivedDate},
</if>
<if
test=
"createDate != null"
>
`create_date` = #{createDate},
</if>
<if
test=
"createdBy != null"
>
`created_by` = #{createdBy},
</if>
<if
test=
"updateDate != null"
>
`update_date` = #{updateDate},
</if>
<if
test=
"updatedBy != null"
>
`updated_by` = #{updatedBy},
</if>
<if
test=
"version != null"
>
`version` = #{version},
</if>
<if
test=
"description != null"
>
`description` = #{description},
</if>
<if
test=
"postId != null"
>
`post_id` = #{postId},
</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>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from complain where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from complain 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/resources/com/platform/dao/TbCfUserInfoDao.xml
浏览文件 @
6d339e73
...
...
@@ -52,8 +52,7 @@
`email_flag`
from tb_cf_user_info
where user_id = #{id}
</select>
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfUserInfoEntityExtends"
>
SELECT
u.*,
...
...
@@ -94,7 +93,9 @@
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"getUserIdsByNick"
resultType=
"string"
>
select user_id from tb_cf_user_info where nick LIKE concat('%',#{name},'%')
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_user_info
WHERE 1=1
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/complain.html
0 → 100644
浏览文件 @
6d339e73
<!DOCTYPE html>
<html>
<head>
<title></title>
#parse("sys/header.html")
</head>
<body>
<div
id=
"rrapp"
v-cloak
style=
"height: calc(100% - 15px);"
>
<div
v-show=
"showList"
style=
"height: 100%;"
>
<Row
:gutter=
"16"
>
<div
class=
"search-group"
>
<span>
作者:
<i-input
v-model=
"q.name"
@
on-enter=
"query"
placeholder=
"作者/发言人"
style=
"width:160px"
>
</i-input>
</span>
<span>
类型:
<i-select
v-model=
"q.status"
@
on-enter=
"query"
placeholder=
"类型"
style=
"width:160px"
>
<i-option
value=
"0"
>
帖子
</i-option>
<i-option
value=
"1"
>
评论
</i-option>
<i-option
value=
"2"
>
回复
</i-option>
</i-select>
</span>
<i-button
@
click=
"query"
>
查询
</i-button>
<i-button
@
click=
"reloadSearch"
>
重置
</i-button>
</div>
<div
class=
"buttons-group"
>
<!-- #if($shiro.hasPermission("complain:save"))-->
<!-- <i-button type="info" @click="add"><i class="fa fa-plus"></i> 新增</i-button>-->
<!-- #end-->
<!-- #if($shiro.hasPermission("complain:update"))-->
<!-- <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i> 修改</i-button>-->
<!-- #end-->
<!-- #if($shiro.hasPermission("complain:delete"))-->
<!-- <i-button type="error" @click="del"><i class="fa fa-trash-o"></i> 删除</i-button>-->
<!-- #end-->
</div>
</Row>
<table
id=
"jqGrid"
></table>
</div>
<Card
v-show=
"!showList"
>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate"
:model=
"complain"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"举报类型 0:帖子 1:评论 2:回复"
prop=
"type"
>
<i-input
v-model=
"complain.type"
placeholder=
"举报类型 0:帖子 1:评论 2:回复"
/>
</Form-item>
<Form-item
label=
"0:已删除 1:正常"
prop=
"archived"
>
<i-input
v-model=
"complain.archived"
placeholder=
"0:已删除 1:正常"
/>
</Form-item>
<Form-item
label=
"删除人"
prop=
"archivedBy"
>
<i-input
v-model=
"complain.archivedBy"
placeholder=
"删除人"
/>
</Form-item>
<Form-item
label=
"删除时间"
prop=
"archivedDate"
>
<i-input
v-model=
"complain.archivedDate"
placeholder=
"删除时间"
/>
</Form-item>
<Form-item
label=
"创建时间"
prop=
"createDate"
>
<i-input
v-model=
"complain.createDate"
placeholder=
"创建时间"
/>
</Form-item>
<Form-item
label=
"创建人"
prop=
"createdBy"
>
<i-input
v-model=
"complain.createdBy"
placeholder=
"创建人"
/>
</Form-item>
<Form-item
label=
"更新时间"
prop=
"updateDate"
>
<i-input
v-model=
"complain.updateDate"
placeholder=
"更新时间"
/>
</Form-item>
<Form-item
label=
"更新人"
prop=
"updatedBy"
>
<i-input
v-model=
"complain.updatedBy"
placeholder=
"更新人"
/>
</Form-item>
<Form-item
label=
"版本"
prop=
"version"
>
<i-input
v-model=
"complain.version"
placeholder=
"版本"
/>
</Form-item>
<Form-item
label=
"举报信息"
prop=
"description"
>
<i-input
v-model=
"complain.description"
placeholder=
"举报信息"
/>
</Form-item>
<Form-item
label=
"帖子ID"
prop=
"postId"
>
<i-input
v-model=
"complain.postId"
placeholder=
"帖子ID"
/>
</Form-item>
<Form-item
label=
"评论ID"
prop=
"commentId"
>
<i-input
v-model=
"complain.commentId"
placeholder=
"评论ID"
/>
</Form-item>
<Form-item
label=
"回复ID"
prop=
"replyId"
>
<i-input
v-model=
"complain.replyId"
placeholder=
"回复ID"
/>
</Form-item>
<Form-item
label=
"举报人"
prop=
"userId"
>
<i-input
v-model=
"complain.userId"
placeholder=
"举报人"
/>
</Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"ghost"
@
click=
"handleReset('formValidate')"
style=
"margin-left: 8px"
>
重置
</i-button>
</Form-item>
</i-form>
</Card>
</div>
<script
src=
"${rc.contextPath}/js/sys/complain.js?_${date.systemTime}"
></script>
</body>
</html>
\ No newline at end of file
platform-admin/src/main/webapp/js/sys/complain.js
0 → 100644
浏览文件 @
6d339e73
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../complain/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'帖子标题'
,
name
:
'caption'
,
index
:
'caption'
,
width
:
80
},
{
label
:
'被举报者'
,
name
:
'complainByUser'
,
index
:
'complainByUser'
,
width
:
80
},
{
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
)
{
if
(
value
===
0
)
{
return
'<span class="label label-primary">待审核</span>'
}
else
if
(
value
===
1
)
{
return
'<span class="label label-success">不处理</span>'
}
else
if
(
value
===
2
)
{
return
'<span class="label label-warning">禁止发言</span>'
}
else
if
(
value
===
3
)
{
return
'<span class="label label-danger">禁止发帖</span>'
}
}
},
{
label
:
'创建时间'
,
name
:
'createDate'
,
index
:
'create_date'
,
width
:
80
},
{
label
:
'操作'
,
index
:
'operate'
,
width
:
80
,
formatter
:
function
(
value
,
grid
,
rows
)
{
return
"<i-button class=
\"
ivu-btn ivu-btn-info
\"
type=
\"
info
\"
>审核</i-button>"
;
}
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
complain
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
,
status
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
complain
=
{};
},
update
:
function
(
event
)
{
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
complain
.
id
==
null
?
"../complain/save"
:
"../complain/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
complain
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../complain/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
)
{
Ajax
.
request
({
url
:
"../complain/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
complain
=
r
.
complain
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
,
'status'
:
vm
.
q
.
status
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
,
status
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论