Compare commits

..

2 Commits

Author SHA1 Message Date
kuang.yife fb4894b1da 优化后台页面 2024-04-27 23:36:45 +08:00
kuang.yife 7e92fa9417 优化后台页面 2024-04-25 22:19:38 +08:00
31 changed files with 422 additions and 113 deletions

View File

@ -34,6 +34,17 @@ public class PlayletUserAppController {
}
}
@ResponseBody
@PostMapping(value = "/onlyLoginByOpenid")
@ApiOperation(value = "单纯通过openid登录系统", httpMethod = "POST")
public Result<PlayletUser> onlyLoginByOpenid(@RequestParam(value = "openid") String openid){
try {
return Result.success(playletUserAppService.onlyLoginByOpenid(openid));
}catch (Exception e){
return Result.error(e.getMessage());
}
}
@ResponseBody
@PostMapping(value = "/loginByPhone")
@ApiOperation(value = "小程序通过手机验证码登录系统", httpMethod = "POST")
@ -56,6 +67,17 @@ public class PlayletUserAppController {
}
}
@ResponseBody
@PostMapping(value = "/addPlayletUser")
@ApiOperation(value = "新增短剧用户", httpMethod = "POST")
public Result<PlayletUser> addPlayletUser(@RequestBody PlayletUser playletUser){
try {
return Result.success(playletUserAppService.addPlayletUser(playletUser));
}catch (Exception e){
return Result.error(e.getMessage());
}
}
@ResponseBody
@PostMapping(value = "/updatePlayletUser")
@ApiOperation(value = "修改用户资料", httpMethod = "POST")

View File

@ -1,6 +1,9 @@
package com.playlet.web.controller.system;
import java.util.List;
import com.playlet.system.domain.PlayletUser;
import com.playlet.system.service.IPlayletUserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -34,6 +37,9 @@ public class PlayletAdviceFeedbackController extends BaseController
@Autowired
private IPlayletAdviceFeedbackService playletAdviceFeedbackService;
@Autowired
private IPlayletUserService iPlayletUserService;
@RequiresPermissions("playlet:feedback:view")
@GetMapping()
public String feedback()
@ -51,6 +57,15 @@ public class PlayletAdviceFeedbackController extends BaseController
{
startPage();
List<PlayletAdviceFeedback> list = playletAdviceFeedbackService.selectPlayletAdviceFeedbackList(playletAdviceFeedback);
list.forEach(model->{
if(model.getUserId() != null){
PlayletUser user = iPlayletUserService.getById(model.getUserId());
if(user != null){
model.setUserName(user.getNickName());
model.setUserPhone(user.getPhone());
}
}
});
return getDataTable(list);
}

View File

@ -26,7 +26,7 @@ import com.playlet.common.core.page.TableDataInfo;
* @date 2024-03-18
*/
@Controller
@RequestMapping("/system/playletType")
@RequestMapping("/system/playlet/type")
public class PlayletItemTypeController extends BaseController {
private String prefix = "system/playlet/type";

View File

@ -26,7 +26,7 @@ import com.playlet.common.core.page.TableDataInfo;
* @date 2024-03-10
*/
@Controller
@RequestMapping("/system/playletMessage")
@RequestMapping("/system/playlet/message")
public class PlayletMessageController extends BaseController
{
private String prefix = "system/playlet/message";

View File

@ -122,6 +122,6 @@ public class PlayletUserController extends BaseController
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(playletUserService.deletePlayletUserByIDs(ids));
return toAjax(playletUserService.deletePlayletUserByIds(ids));
}
}

View File

@ -8,6 +8,10 @@ import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* <p>文件上传</p>
@ -32,4 +36,19 @@ public class OssFileController {
}
}
@PostMapping(value = "/uploadFromPlaylet")
@ResponseBody
public Result<String> uploadFile(MultipartFile file) {
try {
// String name = request.getParameter("name");
// 转型为MultipartHttpRequest
// MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
// 获得实际
// MultipartFile file= multipartRequest.getFile(name);
// 上传后返回的文件路径
return Result.success(ossService.upload(file));
} catch (Exception e) {
return Result.error(e.getMessage());
}
}
}

View File

@ -44,4 +44,8 @@ public interface PlayletUserAppService {
*/
PageInfo<PlayletUser> getPlayletUserPage(PlayletUser playletUser, Integer pageNum, Integer pageSize);
PlayletUser onlyLoginByOpenid(String openid);
PlayletUser addPlayletUser(PlayletUser playletUser) throws Exception;
}

View File

@ -28,6 +28,24 @@ public class PlayletUserAppServiceImpl implements PlayletUserAppService {
private final StringRedisTemplate stringRedisTemplate;
@Override
public PlayletUser addPlayletUser(PlayletUser playletUser) throws Exception{
String alreadyCode = stringRedisTemplate.opsForValue().get(RedisConstants.SMS_CODE_PREFIX + playletUser.getPhone());
if(StringUtils.isEmpty(alreadyCode)){
throw new Exception("验证码已过期!");
}
if(!alreadyCode.equals(playletUser.getCode())){
throw new Exception("短信验证码错误!");
}
playletUser.setCreateBy(PlayletConstants.DEFAULT_CREATE);
playletUser.setCreateTime(new Date());
iPlayletUserService.save(playletUser);
playletUser.setCode("PLAYLET_" + playletUser.getId());
iPlayletUserService.updateById(playletUser);
return playletUser;
}
@Override
public PlayletUser getByOpenId(String openid, String parentId) {
PlayletUser playletUser = iPlayletUserService.lambdaQuery().eq(PlayletUser::getOpenId, openid).one();
@ -46,6 +64,11 @@ public class PlayletUserAppServiceImpl implements PlayletUserAppService {
return playletUser;
}
@Override
public PlayletUser onlyLoginByOpenid(String openid) {
return iPlayletUserService.lambdaQuery().eq(PlayletUser::getOpenId, openid).one();
}
@Override
public PlayletUser getByPhone(PlayUserReq playUserReq) throws Exception{
String alreadyCode = stringRedisTemplate.opsForValue().get(RedisConstants.SMS_CODE_PREFIX + playUserReq.getPhone());

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>追风者</title>
<meta name="description" content="登录麻雀短剧系统">
<meta name="description" content="登录种草达人系统">
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/>
@ -29,7 +29,7 @@
<!-- <h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>-->
<!-- </div>-->
<div class="m-b"></div>
<h4>欢迎使用 <strong>麻雀短剧 后台管理系统</strong></h4>
<h4>欢迎使用 <strong>种草达人 后台管理系统</strong></h4>
<ul class="m-b">
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> SpringBoot</li>
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Mybatis-plus</li>

View File

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增短剧广告管理')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -13,19 +14,25 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">广告url</label>
<label class="col-sm-3 control-label">广告:</label>
<div class="col-sm-8">
<input name="url" class="form-control" type="text">
<input name="url" type="text" hidden>
<div class="file-loading">
<input id="urlFile" name="file" type="file">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">详情页url</label>
<label class="col-sm-3 control-label">详情页:</label>
<div class="col-sm-8">
<input name="detailUrl" class="form-control" type="text">
<input name="detailUrl" type="text" hidden>
<div class="file-loading">
<input id="detailFile" name="file" type="file">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">号,1.2.3.4</label>
<label class="col-sm-3 control-label">序:</label>
<div class="col-sm-8">
<input name="seq" class="form-control" type="text">
</div>
@ -39,6 +46,7 @@
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript">
var prefix = ctx + "system/playlet/banner"
$("#form-banner-add").validate({
@ -50,6 +58,44 @@
$.operate.save(prefix + "/add", $('#form-banner-add').serialize());
}
}
// 详情页
// 单图上传
$("#urlFile").fileinput({
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
maxFileCount: 1,
dropZoneEnabled: false, //是否显示拖拽区域
showPreview: false,
autoReplace: true
}).on('fileuploaded', function (event, data, previewId, index) {
console.log(data);
if(data.response.success){
$("input[name='url']").val(data.response.msg)
}else {
alert("上传失败!");
}
}).on('fileremoved', function (event, id, index) {
$("input[name='" + event.currentTarget.id + "']").val('')
$("input[name='url']").val('')
})
// 详情页
$("#detailFile").fileinput({
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
maxFileCount: 1,
dropZoneEnabled: false, //是否显示拖拽区域
showPreview: false,
autoReplace: true
}).on('fileuploaded', function (event, data, previewId, index) {
if(data.response.success){
$("input[name='detailUrl']").val(data.response.msg)
}else {
alert("上传失败!");
}
}).on('fileremoved', function (event, id, index) {
$("input[name='" + event.currentTarget.id + "']").val('')
$("input[name='detailUrl']").val('')
})
</script>
</body>
</html>

View File

@ -27,9 +27,9 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:banner:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:banner:edit">
<i class="fa fa-edit"></i> 修改
</a>
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:banner:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:banner:remove">
<i class="fa fa-remove"></i> 删除
</a>
@ -70,11 +70,19 @@
},
{
field: 'url',
title: '广告封面'
title: '广告封面',
formatter: function(value) {
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">封面图片<a/>';}
else {return '<a><a/>'}
}
},
{
field: 'detailUrl',
title: '详情页'
title: '详情页',
formatter: function(value) {
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">详情图片<a/>';}
else {return '<a><a/>'}
}
},
{
field: 'seq',
@ -105,7 +113,7 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}

View File

@ -69,6 +69,7 @@
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
height: 300,
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {

View File

@ -51,6 +51,7 @@
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
height: 300,
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {

View File

@ -67,7 +67,16 @@
},
{
field: 'userId',
title: '反馈用户id'
title: '反馈用户id',
visible: false
},
{
field: 'userName',
title: '反馈人名称'
},
{
field: 'userPhone',
title: '反馈人电话'
},
{
field: 'type',

View File

@ -39,6 +39,7 @@
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
height: 300,
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {

View File

@ -7,12 +7,6 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-item-add">
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">视频名称:</label>
<div class="col-sm-8">
@ -76,6 +70,12 @@
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />

View File

@ -82,11 +82,19 @@
},
{
field: 'coverPic',
title: '视频封面图'
title: '视频封面图',
formatter: function(value) {
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">详情图片<a/>';}
else {return '<a><a/>'}
}
},
{
field: 'connectSite',
title: '连接地址'
title: '连接地址',
formatter: function(value) {
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">详情图片<a/>';}
else {return '<a><a/>'}
}
},
{
field: 'releaseDate',

View File

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增短剧公告')" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -18,10 +19,19 @@
<input name="title" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">消息类型:</label>
<div class="col-sm-8">
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('sys_message_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公告详情:</label>
<div class="col-sm-8">
<input name="detail" class="form-control" type="text">
<input type="hidden" class="form-control" name="content">
<div class="summernote" id="detail"></div>
</div>
</div>
<div class="form-group">
@ -33,6 +43,7 @@
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "system/playlet/message"
$("#form-message-add").validate({
@ -44,6 +55,44 @@
$.operate.save(prefix + "/add", $('#form-message-add').serialize());
}
}
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
dialogsInBody: true,
height : 300,
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
});
</script>
</body>
</html>

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: summernote-css" />
<th:block th:include="include :: header('修改短剧公告')" />
</head>
<body class="white-bg">
@ -19,10 +20,19 @@
<input name="title" th:field="*{title}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">消息类型:</label>
<div class="col-sm-8">
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('sys_message_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公告详情:</label>
<div class="col-sm-8">
<input name="detail" th:field="*{detail}" class="form-control" type="text">
<input type="hidden" class="form-control" th:field="*{detail}">
<div class="summernote" id="detail"></div>
</div>
</div>
<div class="form-group">
@ -34,6 +44,7 @@
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "system/playlet/message";
$("#form-message-edit").validate({
@ -45,6 +56,46 @@
$.operate.save(prefix + "/edit", $('#form-message-edit').serialize());
}
}
$(function() {
$('.summernote').each(function(i) {
$('#' + this.id).summernote({
lang: 'zh-CN',
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
var content = $("input[name='" + this.id + "']").val();
$('#' + this.id).summernote('code', content);
})
});
</script>
</body>
</html>

View File

@ -50,6 +50,7 @@
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:message:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:message:remove')}]];
var typeDict = [[${@dict.getType('sys_message_type')}]];
var prefix = ctx + "system/playlet/message";
$(function() {
@ -82,7 +83,11 @@
},
{
field: 'type',
title: '弹出显示'
title: '弹出显示',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(typeDict, value);
}
},
{
field: 'createBy',

View File

@ -63,6 +63,7 @@
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
height : 300,
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {

View File

@ -114,7 +114,8 @@
},
{
field: 'detailContent',
title: '富文本详情'
title: '富文本详情',
visible: false
},
{
field: 'relativeUrl',

View File

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增短剧客服管理')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -13,9 +14,12 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">添加图片地址</label>
<label class="col-sm-3 control-label">客服二维码</label>
<div class="col-sm-8">
<input name="url" class="form-control" type="text">
<input name="url" type="text" hidden>
<div class="file-loading">
<input id="urlFile" name="file" type="file">
</div>
</div>
</div>
<div class="form-group">
@ -27,6 +31,7 @@
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript">
var prefix = ctx + "system/playlet/service"
$("#form-service-add").validate({
@ -38,6 +43,25 @@
$.operate.save(prefix + "/add", $('#form-service-add').serialize());
}
}
// 详情页
$("#urlFile").fileinput({
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
maxFileCount: 1,
dropZoneEnabled: false, //是否显示拖拽区域
showPreview: false,
autoReplace: true
}).on('fileuploaded', function (event, data, previewId, index) {
console.log(data);
if(data.response.success){
$("input[name='url']").val(data.response.msg)
}else {
alert("上传失败!");
}
}).on('fileremoved', function (event, id, index) {
$("input[name='" + event.currentTarget.id + "']").val('')
$("input[name='url']").val('')
})
</script>
</body>
</html>

View File

@ -27,9 +27,9 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="playlet:service:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="playlet:service:edit">
<i class="fa fa-edit"></i> 修改
</a>
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="playlet:service:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="playlet:service:remove">
<i class="fa fa-remove"></i> 删除
</a>
@ -101,7 +101,7 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}

View File

@ -51,6 +51,7 @@
var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
var prefix = ctx + "system/playlet/user";
var statusDict = [[${@dict.getType('playlet_status')}]];
$(function() {
var options = {
@ -68,6 +69,10 @@
title: '主键',
visible: false
},
{
field: 'code',
title: '编码'
},
{
field: 'phone',
title: '手机号'
@ -92,6 +97,14 @@
field: 'parentId',
title: '父级代理'
},
{
field: 'status',
title: '短剧状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(statusDict, value);
}
},
{
field: 'createBy',
title: '创建人'
@ -117,8 +130,8 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.ID + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.ID + '\')"><i class="fa fa-remove"></i>删除</a>');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]

View File

@ -1,6 +1,7 @@
package com.playlet.system.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.playlet.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
@ -33,6 +34,12 @@ public class PlayletAdviceFeedback extends BaseEntity
@ApiModelProperty(value = "反馈用户id")
private Long userId;
@TableField(exist = false)
private String userName;
@TableField(exist = false)
private String userPhone;
/** 类型 01.功能建议 02.客服投诉 03.其他 */
@Excel(name = "类型 01.功能建议 02.客服投诉 03.其他")
@ApiModelProperty(value = "类型 01.功能建议 02.客服投诉 03.其他")

View File

@ -15,10 +15,10 @@ public interface PlayletUserMapper extends BaseMapper<PlayletUser>
/**
* 查询短剧用户
*
* @param ID 短剧用户主键
* @param id 短剧用户主键
* @return 短剧用户
*/
public PlayletUser selectPlayletUserByID(Long ID);
public PlayletUser selectPlayletUserById(Long id);
/**
* 查询短剧用户列表
@ -47,16 +47,16 @@ public interface PlayletUserMapper extends BaseMapper<PlayletUser>
/**
* 删除短剧用户
*
* @param ID 短剧用户主键
* @param id 短剧用户主键
* @return 结果
*/
public int deletePlayletUserByID(Long ID);
public int deletePlayletUserById(Long id);
/**
* 批量删除短剧用户
*
* @param IDs 需要删除的数据主键集合
* @param Ids 需要删除的数据主键集合
* @return 结果
*/
public int deletePlayletUserByIDs(String[] IDs);
public int deletePlayletUserByIds(String[] ids);
}

View File

@ -15,10 +15,10 @@ public interface IPlayletUserService extends IService<PlayletUser>
/**
* 查询短剧用户
*
* @param ID 短剧用户主键
* @param id 短剧用户主键
* @return 短剧用户
*/
public PlayletUser selectPlayletUserByID(Long ID);
public PlayletUser selectPlayletUserByID(Long id);
/**
* 查询短剧用户列表
@ -47,16 +47,16 @@ public interface IPlayletUserService extends IService<PlayletUser>
/**
* 批量删除短剧用户
*
* @param IDs 需要删除的短剧用户主键集合
* @param ids 需要删除的短剧用户主键集合
* @return 结果
*/
public int deletePlayletUserByIDs(String IDs);
public int deletePlayletUserByIds(String ids);
/**
* 删除短剧用户信息
*
* @param ID 短剧用户主键
* @param id 短剧用户主键
* @return 结果
*/
public int deletePlayletUserByID(Long ID);
public int deletePlayletUserById(Long id);
}

View File

@ -25,13 +25,13 @@ public class PlayletUserServiceImpl extends ServiceImpl<PlayletUserMapper, Playl
/**
* 查询短剧用户
*
* @param ID 短剧用户主键
* @param id 短剧用户主键
* @return 短剧用户
*/
@Override
public PlayletUser selectPlayletUserByID(Long ID)
public PlayletUser selectPlayletUserByID(Long id)
{
return playletUserMapper.selectPlayletUserByID(ID);
return playletUserMapper.selectPlayletUserById(id);
}
/**
@ -75,24 +75,24 @@ public class PlayletUserServiceImpl extends ServiceImpl<PlayletUserMapper, Playl
/**
* 批量删除短剧用户
*
* @param IDs 需要删除的短剧用户主键
* @param ids 需要删除的短剧用户主键
* @return 结果
*/
@Override
public int deletePlayletUserByIDs(String IDs)
public int deletePlayletUserByIds(String ids)
{
return playletUserMapper.deletePlayletUserByIDs(Convert.toStrArray(IDs));
return playletUserMapper.deletePlayletUserByIds(Convert.toStrArray(ids));
}
/**
* 删除短剧用户信息
*
* @param ID 短剧用户主键
* @param id 短剧用户主键
* @return 结果
*/
@Override
public int deletePlayletUserByID(Long ID)
public int deletePlayletUserById(Long id)
{
return playletUserMapper.deletePlayletUserByID(ID);
return playletUserMapper.deletePlayletUserById(id);
}
}

View File

@ -34,6 +34,7 @@
<if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
<if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
</where>
order by seq asc
</select>
<select id="selectPlayletBannerById" parameterType="Long" resultMap="PlayletBannerResult">

View File

@ -5,62 +5,62 @@
<mapper namespace="com.playlet.system.mapper.PlayletUserMapper">
<resultMap type="PlayletUser" id="PlayletUserResult">
<result property="id" column="ID" />
<result property="id" column="id" />
<result property="code" column="code" />
<result property="phone" column="PHONE" />
<result property="nickName" column="NICK_NAME" />
<result property="password" column="PASSWORD" />
<result property="icon" column="ICON" />
<result property="agencyId" column="AGENCY_ID" />
<result property="parentId" column="PARENT_ID" />
<result property="phone" column="phone" />
<result property="nickName" column="nick_name" />
<result property="password" column="password" />
<result property="icon" column="icon" />
<result property="agencyId" column="agency_id" />
<result property="parentId" column="parent_id" />
<result property="status" column="status" />
<result property="createBy" column="CREATE_BY" />
<result property="createTime" column="CREATE_TIME" />
<result property="updateBy" column="UPDATE_BY" />
<result property="updateTime" column="UPDATE_TIME" />
<result property="remark" column="REMARK" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectPlayletUserVo">
select ID, code, PHONE, NICK_NAME, PASSWORD, ICON, AGENCY_ID, PARENT_ID, status, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK from playlet_user
select id, code, phone, nick_name, password, icon, agency_id, parent_id, status, create_by, create_time, update_by, update_time, remark from playlet_user
</sql>
<select id="selectPlayletUserList" parameterType="PlayletUser" resultMap="PlayletUserResult">
<include refid="selectPlayletUserVo"/>
<where>
<if test="phone != null and phone != ''"> and PHONE = #{phone}</if>
<if test="nickName != null and nickName != ''"> and NICK_NAME like concat('%', #{nickName}, '%')</if>
<if test="password != null and password != ''"> and PASSWORD = #{password}</if>
<if test="icon != null and icon != ''"> and ICON = #{icon}</if>
<if test="agencyId != null and agencyId != ''"> and AGENCY_ID = #{agencyId}</if>
<if test="parentId != null and parentId != ''"> and PARENT_ID = #{parentId}</if>
<if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
<if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
<if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
<if test="remark != null and REMARK != ''"> and REMARK = #{REMARK}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
<if test="password != null and password != ''"> and password = #{password}</if>
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
<if test="agencyId != null and agencyId != ''"> and agency_id = #{agencyId}</if>
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
</where>
</select>
<select id="selectPlayletUserByID" parameterType="Long" resultMap="PlayletUserResult">
<select id="selectPlayletUserById" parameterType="Long" resultMap="PlayletUserResult">
<include refid="selectPlayletUserVo"/>
where ID = #{ID}
where id = #{id}
</select>
<insert id="insertPlayletUser" parameterType="PlayletUser" useGeneratedKeys="true" keyProperty="ID">
insert into playlet_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="phone != null">PHONE,</if>
<if test="nickName != null">NICK_NAME,</if>
<if test="password != null">PASSWORD,</if>
<if test="icon != null">ICON,</if>
<if test="agencyId != null">AGENCY_ID,</if>
<if test="parentId != null">PARENT_ID,</if>
<if test="createBy != null">CREATE_BY,</if>
<if test="createTime != null">CREATE_TIME,</if>
<if test="updateBy != null">UPDATE_BY,</if>
<if test="updateTime != null">UPDATE_TIME,</if>
<if test="remark != null">REMARK,</if>
<if test="phone != null">phone,</if>
<if test="nickName != null">nick_name,</if>
<if test="password != null">password,</if>
<if test="icon != null">icon,</if>
<if test="agencyId != null">agency_id,</if>
<if test="parentId != null">parent_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="phone != null">#{phone},</if>
@ -80,30 +80,30 @@
<update id="updatePlayletUser" parameterType="PlayletUser">
update playlet_user
<trim prefix="SET" suffixOverrides=",">
<if test="phone != null">PHONE = #{phone},</if>
<if test="nickName != null">NICK_NAME = #{nickName},</if>
<if test="password != null">PASSWORD = #{password},</if>
<if test="icon != null">ICON = #{icon},</if>
<if test="agencyId != null">AGENCY_ID = #{agencyId},</if>
<if test="parentId != null">PARENT_ID = #{parentId},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="nickName != null">nick_name = #{nickName},</if>
<if test="password != null">password = #{password},</if>
<if test="icon != null">icon = #{icon},</if>
<if test="agencyId != null">agency_id = #{agencyId},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="status != null">status = #{status},</if>
<if test="createBy != null">CREATE_BY = #{createBy},</if>
<if test="createTime != null">CREATE_TIME = #{createTime},</if>
<if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
<if test="remark != null">REMARK = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where ID = #{id}
where id = #{id}
</update>
<delete id="deletePlayletUserByID" parameterType="Long">
delete from playlet_user where ID = #{id}
<delete id="deletePlayletUserById" parameterType="Long">
delete from playlet_user where id = #{id}
</delete>
<delete id="deletePlayletUserByIDs" parameterType="String">
delete from playlet_user where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
<delete id="deletePlayletUserByIds" parameterType="String">
delete from playlet_user where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>