文章详情魔魁啊
This commit is contained in:
parent
9368e5e0d9
commit
a4579e01a2
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.playlet.web.controller.app;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.playlet.common.core.domain.Result;
|
||||||
|
import com.playlet.system.domain.PlayletPublicDetail;
|
||||||
|
import com.playlet.web.service.app.PlayletPublicDetailAppService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "公众号*文章详情接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/app/detail")
|
||||||
|
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||||
|
public class PlayletPublicDetailAppController {
|
||||||
|
|
||||||
|
private final PlayletPublicDetailAppService playletPublicDetailAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询任务列表
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@PostMapping("/getList")
|
||||||
|
@ApiOperation(value = "分页查询文章列表")
|
||||||
|
public Result<PageInfo<PlayletPublicDetail>> getList(@RequestBody PlayletPublicDetail playletPublicDetail,
|
||||||
|
@RequestParam(value = "pageNum") Integer pageNum,
|
||||||
|
@RequestParam(value = "pageSize") Integer pageSize) {
|
||||||
|
return Result.success(playletPublicDetailAppService.getList(playletPublicDetail, pageNum, pageSize));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务详情
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/getById")
|
||||||
|
@ApiOperation(value = "查询文章详情")
|
||||||
|
public Result<PlayletPublicDetail> getById(@RequestParam(value = "id") Long id) {
|
||||||
|
return Result.success(playletPublicDetailAppService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.playlet.web.controller.system;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.playlet.common.annotation.Log;
|
||||||
|
import com.playlet.common.enums.BusinessType;
|
||||||
|
import com.playlet.system.domain.PlayletPublicDetail;
|
||||||
|
import com.playlet.system.service.IPlayletPublicDetailService;
|
||||||
|
import com.playlet.common.core.controller.BaseController;
|
||||||
|
import com.playlet.common.core.domain.AjaxResult;
|
||||||
|
import com.playlet.common.utils.poi.ExcelUtil;
|
||||||
|
import com.playlet.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公众号文章详情Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-07
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/system/playlet/detail")
|
||||||
|
public class PlayletPublicDetailController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "system/playlet/detail";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPlayletPublicDetailService playletPublicDetailService;
|
||||||
|
|
||||||
|
@RequiresPermissions("playlet:detail:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String detail()
|
||||||
|
{
|
||||||
|
return prefix + "/detail";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公众号文章详情列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("playlet:detail:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(PlayletPublicDetail playletPublicDetail)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<PlayletPublicDetail> list = playletPublicDetailService.selectPlayletPublicDetailList(playletPublicDetail);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出公众号文章详情列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("playlet:detail:export")
|
||||||
|
@Log(title = "公众号文章详情", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(PlayletPublicDetail playletPublicDetail)
|
||||||
|
{
|
||||||
|
List<PlayletPublicDetail> list = playletPublicDetailService.selectPlayletPublicDetailList(playletPublicDetail);
|
||||||
|
ExcelUtil<PlayletPublicDetail> util = new ExcelUtil<PlayletPublicDetail>(PlayletPublicDetail.class);
|
||||||
|
return util.exportExcel(list, "公众号文章详情数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增公众号文章详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存公众号文章详情
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("playlet:detail:add")
|
||||||
|
@Log(title = "公众号文章详情", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(PlayletPublicDetail playletPublicDetail)
|
||||||
|
{
|
||||||
|
return toAjax(playletPublicDetailService.insertPlayletPublicDetail(playletPublicDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改公众号文章详情
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("playlet:detail:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
PlayletPublicDetail playletPublicDetail = playletPublicDetailService.selectPlayletPublicDetailById(id);
|
||||||
|
mmap.put("playletPublicDetail", playletPublicDetail);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存公众号文章详情
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("playlet:detail:edit")
|
||||||
|
@Log(title = "公众号文章详情", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(PlayletPublicDetail playletPublicDetail)
|
||||||
|
{
|
||||||
|
return toAjax(playletPublicDetailService.updatePlayletPublicDetail(playletPublicDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除公众号文章详情
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("playlet:detail:remove")
|
||||||
|
@Log(title = "公众号文章详情", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(playletPublicDetailService.deletePlayletPublicDetailByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.playlet.web.service.app;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.playlet.system.domain.PlayletPublicAccount;
|
||||||
|
import com.playlet.system.domain.PlayletPublicDetail;
|
||||||
|
|
||||||
|
public interface PlayletPublicDetailAppService {
|
||||||
|
PageInfo<PlayletPublicDetail> getList(PlayletPublicDetail playletPublicDetail, Integer pageNum, Integer pageSize);
|
||||||
|
|
||||||
|
PlayletPublicDetail getById(Long id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.playlet.web.service.app.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.playlet.system.domain.PlayletPublicAccount;
|
||||||
|
import com.playlet.system.domain.PlayletPublicDetail;
|
||||||
|
import com.playlet.system.service.IPlayletPublicDetailService;
|
||||||
|
import com.playlet.web.service.app.PlayletPublicDetailAppService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||||
|
public class PlayletPublicDetailAppServiceImpl implements PlayletPublicDetailAppService {
|
||||||
|
|
||||||
|
private final IPlayletPublicDetailService iPlayletPublicDetailService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<PlayletPublicDetail> getList(PlayletPublicDetail playletPublicDetail, Integer pageNum, Integer pageSize) {
|
||||||
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
|
List<PlayletPublicDetail> list = iPlayletPublicDetailService.selectPlayletPublicDetailList(playletPublicDetail);
|
||||||
|
return PageInfo.of(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlayletPublicDetail getById(Long id) {
|
||||||
|
return iPlayletPublicDetailService.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<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">
|
||||||
|
<form class="form-horizontal m" id="form-detail-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">公众号id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="publicId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">阅读人数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="readCount" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">详情(富文本):</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" class="form-control" name="content">
|
||||||
|
<div class="summernote" id="content"></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" />
|
||||||
|
<th:block th:include="include :: summernote-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/playlet/detail"
|
||||||
|
$("#form-detail-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-detail-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$('.summernote').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("图片上传失败。");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,102 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('公众号文章详情列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>公众号id:</label>
|
||||||
|
<input type="text" name="publicId"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>阅读人数:</label>
|
||||||
|
<input type="text" name="readCount"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="playlet:detail:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="playlet:detail:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="playlet:detail:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="playlet:detail:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('playlet:detail:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('playlet:detail:remove')}]];
|
||||||
|
var prefix = ctx + "system/playlet/detail";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "公众号文章详情",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '主键',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'publicId',
|
||||||
|
title: '公众号id'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'readCount',
|
||||||
|
title: '阅读人数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'content',
|
||||||
|
title: '详情(富文本)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
title: '备注'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
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>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<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">
|
||||||
|
<form class="form-horizontal m" id="form-detail-edit" th:object="${playletPublicDetail}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">公众号id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="publicId" th:field="*{publicId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">阅读人数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="readCount" th:field="*{readCount}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">详情(富文本):</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" class="form-control" th:field="*{content}">
|
||||||
|
<div class="summernote" id="content"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: summernote-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/playlet/detail";
|
||||||
|
$("#form-detail-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-detail-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>
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.playlet.system.domain;
|
package com.playlet.system.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.playlet.common.core.domain.BaseEntity;
|
import com.playlet.common.core.domain.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
|
@ -24,6 +26,7 @@ public class PlayletPublicAccount extends BaseEntity
|
||||||
|
|
||||||
/** 主键 */
|
/** 主键 */
|
||||||
@ApiModelProperty(value = "主键id")
|
@ApiModelProperty(value = "主键id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 公众号名称 */
|
/** 公众号名称 */
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.playlet.system.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.playlet.common.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import com.playlet.common.annotation.Excel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公众号文章详情对象 playlet_public_detail
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName(value = "playlet_public_detail")
|
||||||
|
@ApiModel(value = "文章详情")
|
||||||
|
public class PlayletPublicDetail extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
@ApiModelProperty(value = "主键id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 公众号id */
|
||||||
|
@Excel(name = "公众号id")
|
||||||
|
@ApiModelProperty(value = "公众号id")
|
||||||
|
private Long publicId;
|
||||||
|
|
||||||
|
/** 阅读人数 */
|
||||||
|
@Excel(name = "阅读人数")
|
||||||
|
@ApiModelProperty(value = "阅读人数")
|
||||||
|
private Long readCount;
|
||||||
|
|
||||||
|
/** 详情(富文本) */
|
||||||
|
@Excel(name = "详情(富文本)")
|
||||||
|
@ApiModelProperty(value = "详情(富文本)")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package com.playlet.system.domain;
|
package com.playlet.system.domain;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.playlet.common.core.domain.BaseEntity;
|
import com.playlet.common.core.domain.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -28,6 +30,7 @@ public class PlayletTask extends BaseEntity {
|
||||||
* 任务主键id
|
* 任务主键id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "任务主键id")
|
@ApiModelProperty(value = "任务主键id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.playlet.system.domain;
|
package com.playlet.system.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.playlet.common.core.domain.BaseEntity;
|
import com.playlet.common.core.domain.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -22,6 +24,7 @@ public class PlayletUserAccount extends BaseEntity {
|
||||||
* $column.columnComment
|
* $column.columnComment
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "主键id")
|
@ApiModelProperty(value = "主键id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.playlet.system.domain;
|
package com.playlet.system.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.playlet.common.core.domain.BaseEntity;
|
import com.playlet.common.core.domain.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -21,6 +23,7 @@ public class PlayletUserInvoice extends BaseEntity
|
||||||
|
|
||||||
/** 开票信息主键id */
|
/** 开票信息主键id */
|
||||||
@ApiModelProperty(value = "开票信息主键id")
|
@ApiModelProperty(value = "开票信息主键id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 开票公司名称 */
|
/** 开票公司名称 */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.playlet.system.domain;
|
package com.playlet.system.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.playlet.common.core.domain.BaseEntity;
|
import com.playlet.common.core.domain.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -26,6 +28,7 @@ public class PlayletUserTask extends BaseEntity {
|
||||||
* 短剧用户任务主键id
|
* 短剧用户任务主键id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "短剧用户任务主键id")
|
@ApiModelProperty(value = "短剧用户任务主键id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.playlet.system.domain;
|
package com.playlet.system.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.playlet.common.core.domain.BaseEntity;
|
import com.playlet.common.core.domain.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -24,6 +26,7 @@ public class PlayletUserWithdrawDepositRecord extends BaseEntity {
|
||||||
* 用户提现记录表主键id
|
* 用户提现记录表主键id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "用户提现记录表主键id")
|
@ApiModelProperty(value = "用户提现记录表主键id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.playlet.system.domain;
|
package com.playlet.system.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.playlet.common.core.domain.BaseEntity;
|
import com.playlet.common.core.domain.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -25,6 +27,7 @@ public class PlayletUserWithdrawalPassword extends BaseEntity {
|
||||||
* 用户提现密码主键自增id
|
* 用户提现密码主键自增id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "用户提现密码主键自增id")
|
@ApiModelProperty(value = "用户提现密码主键自增id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.playlet.system.domain;
|
package com.playlet.system.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.playlet.common.core.domain.BaseEntity;
|
import com.playlet.common.core.domain.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -23,6 +25,7 @@ public class PlayletWithdrawApproval extends BaseEntity {
|
||||||
* 提现审批记录主键自增id
|
* 提现审批记录主键自增id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "提现审批记录主键自增id")
|
@ApiModelProperty(value = "提现审批记录主键自增id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.playlet.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.playlet.system.domain.PlayletPublicDetail;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公众号文章详情Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-07
|
||||||
|
*/
|
||||||
|
public interface PlayletPublicDetailMapper extends BaseMapper<PlayletPublicDetail>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询公众号文章详情
|
||||||
|
*
|
||||||
|
* @param id 公众号文章详情主键
|
||||||
|
* @return 公众号文章详情
|
||||||
|
*/
|
||||||
|
public PlayletPublicDetail selectPlayletPublicDetailById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公众号文章详情列表
|
||||||
|
*
|
||||||
|
* @param playletPublicDetail 公众号文章详情
|
||||||
|
* @return 公众号文章详情集合
|
||||||
|
*/
|
||||||
|
public List<PlayletPublicDetail> selectPlayletPublicDetailList(PlayletPublicDetail playletPublicDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增公众号文章详情
|
||||||
|
*
|
||||||
|
* @param playletPublicDetail 公众号文章详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertPlayletPublicDetail(PlayletPublicDetail playletPublicDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改公众号文章详情
|
||||||
|
*
|
||||||
|
* @param playletPublicDetail 公众号文章详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updatePlayletPublicDetail(PlayletPublicDetail playletPublicDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除公众号文章详情
|
||||||
|
*
|
||||||
|
* @param id 公众号文章详情主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePlayletPublicDetailById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除公众号文章详情
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePlayletPublicDetailByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.playlet.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.playlet.system.domain.PlayletPublicDetail;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公众号文章详情Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-07
|
||||||
|
*/
|
||||||
|
public interface IPlayletPublicDetailService extends IService<PlayletPublicDetail>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询公众号文章详情
|
||||||
|
*
|
||||||
|
* @param id 公众号文章详情主键
|
||||||
|
* @return 公众号文章详情
|
||||||
|
*/
|
||||||
|
public PlayletPublicDetail selectPlayletPublicDetailById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公众号文章详情列表
|
||||||
|
*
|
||||||
|
* @param playletPublicDetail 公众号文章详情
|
||||||
|
* @return 公众号文章详情集合
|
||||||
|
*/
|
||||||
|
public List<PlayletPublicDetail> selectPlayletPublicDetailList(PlayletPublicDetail playletPublicDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增公众号文章详情
|
||||||
|
*
|
||||||
|
* @param playletPublicDetail 公众号文章详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertPlayletPublicDetail(PlayletPublicDetail playletPublicDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改公众号文章详情
|
||||||
|
*
|
||||||
|
* @param playletPublicDetail 公众号文章详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updatePlayletPublicDetail(PlayletPublicDetail playletPublicDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除公众号文章详情
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的公众号文章详情主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePlayletPublicDetailByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除公众号文章详情信息
|
||||||
|
*
|
||||||
|
* @param id 公众号文章详情主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePlayletPublicDetailById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.playlet.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.playlet.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.playlet.system.mapper.PlayletPublicDetailMapper;
|
||||||
|
import com.playlet.system.domain.PlayletPublicDetail;
|
||||||
|
import com.playlet.system.service.IPlayletPublicDetailService;
|
||||||
|
import com.playlet.common.core.text.Convert;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公众号文章详情Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PlayletPublicDetailServiceImpl extends ServiceImpl<PlayletPublicDetailMapper, PlayletPublicDetail> implements IPlayletPublicDetailService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private PlayletPublicDetailMapper playletPublicDetailMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公众号文章详情
|
||||||
|
*
|
||||||
|
* @param id 公众号文章详情主键
|
||||||
|
* @return 公众号文章详情
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PlayletPublicDetail selectPlayletPublicDetailById(Long id)
|
||||||
|
{
|
||||||
|
return playletPublicDetailMapper.selectPlayletPublicDetailById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公众号文章详情列表
|
||||||
|
*
|
||||||
|
* @param playletPublicDetail 公众号文章详情
|
||||||
|
* @return 公众号文章详情
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PlayletPublicDetail> selectPlayletPublicDetailList(PlayletPublicDetail playletPublicDetail)
|
||||||
|
{
|
||||||
|
return playletPublicDetailMapper.selectPlayletPublicDetailList(playletPublicDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增公众号文章详情
|
||||||
|
*
|
||||||
|
* @param playletPublicDetail 公众号文章详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertPlayletPublicDetail(PlayletPublicDetail playletPublicDetail)
|
||||||
|
{
|
||||||
|
playletPublicDetail.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return playletPublicDetailMapper.insertPlayletPublicDetail(playletPublicDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改公众号文章详情
|
||||||
|
*
|
||||||
|
* @param playletPublicDetail 公众号文章详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updatePlayletPublicDetail(PlayletPublicDetail playletPublicDetail)
|
||||||
|
{
|
||||||
|
playletPublicDetail.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return playletPublicDetailMapper.updatePlayletPublicDetail(playletPublicDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除公众号文章详情
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的公众号文章详情主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deletePlayletPublicDetailByIds(String ids)
|
||||||
|
{
|
||||||
|
return playletPublicDetailMapper.deletePlayletPublicDetailByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除公众号文章详情信息
|
||||||
|
*
|
||||||
|
* @param id 公众号文章详情主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deletePlayletPublicDetailById(Long id)
|
||||||
|
{
|
||||||
|
return playletPublicDetailMapper.deletePlayletPublicDetailById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
<?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.playlet.system.mapper.PlayletPublicDetailMapper">
|
||||||
|
|
||||||
|
<resultMap type="PlayletPublicDetail" id="PlayletPublicDetailResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="publicId" column="public_id" />
|
||||||
|
<result property="readCount" column="read_count" />
|
||||||
|
<result property="content" column="content" />
|
||||||
|
<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="selectPlayletPublicDetailVo">
|
||||||
|
select id, public_id, read_count, content, create_by, create_time, update_by, update_time, remark from playlet_public_detail
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectPlayletPublicDetailList" parameterType="PlayletPublicDetail" resultMap="PlayletPublicDetailResult">
|
||||||
|
<include refid="selectPlayletPublicDetailVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="publicId != null "> and public_id = #{publicId}</if>
|
||||||
|
<if test="readCount != null "> and read_count = #{readCount}</if>
|
||||||
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPlayletPublicDetailById" parameterType="Long" resultMap="PlayletPublicDetailResult">
|
||||||
|
<include refid="selectPlayletPublicDetailVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertPlayletPublicDetail" parameterType="PlayletPublicDetail" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into playlet_public_detail
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="publicId != null">public_id,</if>
|
||||||
|
<if test="readCount != null">read_count,</if>
|
||||||
|
<if test="content != null">content,</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="publicId != null">#{publicId},</if>
|
||||||
|
<if test="readCount != null">#{readCount},</if>
|
||||||
|
<if test="content != null">#{content},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updatePlayletPublicDetail" parameterType="PlayletPublicDetail">
|
||||||
|
update playlet_public_detail
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="publicId != null">public_id = #{publicId},</if>
|
||||||
|
<if test="readCount != null">read_count = #{readCount},</if>
|
||||||
|
<if test="content != null">content = #{content},</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}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deletePlayletPublicDetailById" parameterType="Long">
|
||||||
|
delete from playlet_public_detail where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deletePlayletPublicDetailByIds" parameterType="String">
|
||||||
|
delete from playlet_public_detail where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue