Compare commits
No commits in common. "7b41dd0bc4c1eb412a64ff795258596a96142ebe" and "f7334eed4660b8319d9cb9093aac089b2dbc4115" have entirely different histories.
7b41dd0bc4
...
f7334eed46
|
|
@ -1,41 +0,0 @@
|
|||
package com.playlet.web.controller.app;
|
||||
|
||||
import com.playlet.common.core.domain.Result;
|
||||
import com.playlet.system.domain.PlayletPublicUser;
|
||||
import com.playlet.web.service.app.PlayletPublicUserAppService;
|
||||
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/public/user")
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class PlayletPublicUserAppController {
|
||||
|
||||
private final PlayletPublicUserAppService publicUserAppService;
|
||||
|
||||
/**
|
||||
* 新增公众号用户信息
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "新增公众号用户信息")
|
||||
public Result<String> addSave(@RequestBody PlayletPublicUser publicUser) {
|
||||
publicUserAppService.addPublicUser(publicUser);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "查询公众号用户信息")
|
||||
@PostMapping("/findByUnionIdAndPublicId")
|
||||
public Result<PlayletPublicUser> findByUnionIdAndPublicId(@RequestBody PlayletPublicUser publicUser) {
|
||||
PlayletPublicUser user = publicUserAppService.findByUnionIdAndPublicId(publicUser);
|
||||
return Result.success(user);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
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.PlayletConfig;
|
||||
import com.playlet.system.service.IPlayletConfigService;
|
||||
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-06-04
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/playlet/config")
|
||||
public class PlayletConfigController extends BaseController
|
||||
{
|
||||
private String prefix = "system/playlet/config";
|
||||
|
||||
@Autowired
|
||||
private IPlayletConfigService playletConfigService;
|
||||
|
||||
@RequiresPermissions("playlet:config:view")
|
||||
@GetMapping()
|
||||
public String config()
|
||||
{
|
||||
return prefix + "/config";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全局配置列表
|
||||
*/
|
||||
@RequiresPermissions("playlet:config:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(PlayletConfig playletConfig)
|
||||
{
|
||||
startPage();
|
||||
List<PlayletConfig> list = playletConfigService.selectPlayletConfigList(playletConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出全局配置列表
|
||||
*/
|
||||
@RequiresPermissions("playlet:config:export")
|
||||
@Log(title = "全局配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(PlayletConfig playletConfig)
|
||||
{
|
||||
List<PlayletConfig> list = playletConfigService.selectPlayletConfigList(playletConfig);
|
||||
ExcelUtil<PlayletConfig> util = new ExcelUtil<PlayletConfig>(PlayletConfig.class);
|
||||
return util.exportExcel(list, "全局配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增全局配置
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存全局配置
|
||||
*/
|
||||
@RequiresPermissions("playlet:config:add")
|
||||
@Log(title = "全局配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(PlayletConfig playletConfig)
|
||||
{
|
||||
return toAjax(playletConfigService.insertPlayletConfig(playletConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改全局配置
|
||||
*/
|
||||
@RequiresPermissions("playlet:config:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
PlayletConfig playletConfig = playletConfigService.selectPlayletConfigById(id);
|
||||
mmap.put("playletConfig", playletConfig);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存全局配置
|
||||
*/
|
||||
@RequiresPermissions("playlet:config:edit")
|
||||
@Log(title = "全局配置", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(PlayletConfig playletConfig)
|
||||
{
|
||||
return toAjax(playletConfigService.updatePlayletConfig(playletConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除全局配置
|
||||
*/
|
||||
@RequiresPermissions("playlet:config:remove")
|
||||
@Log(title = "全局配置", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(playletConfigService.deletePlayletConfigByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
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.PlayletPublicUser;
|
||||
import com.playlet.system.service.IPlayletPublicUserService;
|
||||
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-06-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/public/user")
|
||||
public class PlayletPublicUserController extends BaseController
|
||||
{
|
||||
private String prefix = "system/public/user";
|
||||
|
||||
@Autowired
|
||||
private IPlayletPublicUserService playletPublicUserService;
|
||||
|
||||
@RequiresPermissions("public:user:view")
|
||||
@GetMapping()
|
||||
public String user()
|
||||
{
|
||||
return prefix + "/user";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公众号用户列表
|
||||
*/
|
||||
@RequiresPermissions("public:user:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(PlayletPublicUser playletPublicUser)
|
||||
{
|
||||
startPage();
|
||||
List<PlayletPublicUser> list = playletPublicUserService.selectPlayletPublicUserList(playletPublicUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出公众号用户列表
|
||||
*/
|
||||
@RequiresPermissions("public:user:export")
|
||||
@Log(title = "公众号用户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(PlayletPublicUser playletPublicUser)
|
||||
{
|
||||
List<PlayletPublicUser> list = playletPublicUserService.selectPlayletPublicUserList(playletPublicUser);
|
||||
ExcelUtil<PlayletPublicUser> util = new ExcelUtil<PlayletPublicUser>(PlayletPublicUser.class);
|
||||
return util.exportExcel(list, "公众号用户数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公众号用户
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存公众号用户
|
||||
*/
|
||||
@RequiresPermissions("public:user:add")
|
||||
@Log(title = "公众号用户", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(PlayletPublicUser playletPublicUser)
|
||||
{
|
||||
return toAjax(playletPublicUserService.insertPlayletPublicUser(playletPublicUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公众号用户
|
||||
*/
|
||||
@RequiresPermissions("public:user:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
PlayletPublicUser playletPublicUser = playletPublicUserService.selectPlayletPublicUserById(id);
|
||||
mmap.put("playletPublicUser", playletPublicUser);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存公众号用户
|
||||
*/
|
||||
@RequiresPermissions("public:user:edit")
|
||||
@Log(title = "公众号用户", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(PlayletPublicUser playletPublicUser)
|
||||
{
|
||||
return toAjax(playletPublicUserService.updatePlayletPublicUser(playletPublicUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公众号用户
|
||||
*/
|
||||
@RequiresPermissions("public:user:remove")
|
||||
@Log(title = "公众号用户", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(playletPublicUserService.deletePlayletPublicUserByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
package com.playlet.web.service.app;
|
||||
|
||||
import com.playlet.system.domain.PlayletPublicUser;
|
||||
|
||||
public interface PlayletPublicUserAppService {
|
||||
void addPublicUser(PlayletPublicUser publicUser);
|
||||
|
||||
PlayletPublicUser findByUnionIdAndPublicId(PlayletPublicUser publicUser);
|
||||
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package com.playlet.web.service.app.impl;
|
||||
|
||||
import com.playlet.system.domain.PlayletPublicUser;
|
||||
import com.playlet.system.service.IPlayletPublicUserService;
|
||||
import com.playlet.web.service.app.PlayletPublicUserAppService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class PlayletPublicUserAppServiceImpl implements PlayletPublicUserAppService {
|
||||
|
||||
private final IPlayletPublicUserService iPlayletPublicUserService;
|
||||
|
||||
@Override
|
||||
public void addPublicUser(PlayletPublicUser publicUser) {
|
||||
iPlayletPublicUserService.insertPlayletPublicUser(publicUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayletPublicUser findByUnionIdAndPublicId(PlayletPublicUser publicUser) {
|
||||
return iPlayletPublicUserService.lambdaQuery()
|
||||
.eq(PlayletPublicUser::getPublicId, publicUser.getPublicId())
|
||||
.eq(PlayletPublicUser::getUnionId, publicUser.getUnionId())
|
||||
.one();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增全局配置')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-config-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">提成比例:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="globalRate" 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="placeRate" 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="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/playlet/config"
|
||||
$("#form-config-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-config-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
<!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>提成比例:</label>
|
||||
<input type="text" name="globalRate"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>拉新比例:</label>
|
||||
<input type="text" name="placeRate"/>
|
||||
</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="system:config:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:config:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:config:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:config: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:config:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('playlet:config:remove')}]];
|
||||
var prefix = ctx + "system/playlet/config";
|
||||
|
||||
$(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: 'globalRate',
|
||||
title: '提成比例'
|
||||
},
|
||||
{
|
||||
field: 'placeRate',
|
||||
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>
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改全局配置')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-config-edit" th:object="${playletConfig}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">提成比例:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="globalRate" th:field="*{globalRate}" 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="placeRate" th:field="*{placeRate}" 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="remark" th:field="*{remark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/playlet/config";
|
||||
$("#form-config-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-config-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增公众号用户')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-user-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="name" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">微信unionId:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="unionId" 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="imgUrl" 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="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/user"
|
||||
$("#form-user-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-user-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改公众号用户')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-user-edit" th:object="${playletPublicUser}">
|
||||
<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="name" th:field="*{name}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">微信unionId:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="unionId" th:field="*{unionId}" 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="imgUrl" th:field="*{imgUrl}" 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="remark" th:field="*{remark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/user";
|
||||
$("#form-user-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-user-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
<!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="name"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>微信unionId:</label>
|
||||
<input type="text" name="unionId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>头像:</label>
|
||||
<input type="text" name="imgUrl"/>
|
||||
</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="system:user:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:user:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:user: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('system:user:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
|
||||
var prefix = ctx + "system/user";
|
||||
|
||||
$(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: 'name',
|
||||
title: '昵称'
|
||||
},
|
||||
{
|
||||
field: 'unionId',
|
||||
title: '微信unionId'
|
||||
},
|
||||
{
|
||||
field: 'imgUrl',
|
||||
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>
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
package com.playlet.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.playlet.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 全局配置对象 playlet_config
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName(value = "playlet_config")
|
||||
public class PlayletConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 提成比例 */
|
||||
@Excel(name = "提成比例")
|
||||
private BigDecimal globalRate;
|
||||
|
||||
/** 拉新比例 */
|
||||
@Excel(name = "拉新比例")
|
||||
private BigDecimal placeRate;
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
package com.playlet.system.domain;
|
||||
|
||||
import com.playlet.common.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.playlet.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 公众号用户对象 playlet_public_user
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName(value = "playlet_public_user")
|
||||
@ApiModel(value = "公众号用户")
|
||||
public class PlayletPublicUser extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 公众号id */
|
||||
@Excel(name = "公众号id")
|
||||
private Long publicId;
|
||||
|
||||
/** 昵称 */
|
||||
@Excel(name = "昵称")
|
||||
private String name;
|
||||
|
||||
/** 微信unionId */
|
||||
@Excel(name = "微信unionId")
|
||||
private String unionId;
|
||||
|
||||
/** 头像 */
|
||||
@Excel(name = "头像")
|
||||
private String imgUrl;
|
||||
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
package com.playlet.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.playlet.system.domain.PlayletConfig;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 全局配置Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-04
|
||||
*/
|
||||
public interface PlayletConfigMapper extends BaseMapper<PlayletConfig>
|
||||
{
|
||||
/**
|
||||
* 查询全局配置
|
||||
*
|
||||
* @param id 全局配置主键
|
||||
* @return 全局配置
|
||||
*/
|
||||
public PlayletConfig selectPlayletConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询全局配置列表
|
||||
*
|
||||
* @param playletConfig 全局配置
|
||||
* @return 全局配置集合
|
||||
*/
|
||||
public List<PlayletConfig> selectPlayletConfigList(PlayletConfig playletConfig);
|
||||
|
||||
/**
|
||||
* 新增全局配置
|
||||
*
|
||||
* @param playletConfig 全局配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPlayletConfig(PlayletConfig playletConfig);
|
||||
|
||||
/**
|
||||
* 修改全局配置
|
||||
*
|
||||
* @param playletConfig 全局配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePlayletConfig(PlayletConfig playletConfig);
|
||||
|
||||
/**
|
||||
* 删除全局配置
|
||||
*
|
||||
* @param id 全局配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePlayletConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除全局配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePlayletConfigByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
package com.playlet.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.playlet.system.domain.PlayletPublicUser;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 公众号用户Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
*/
|
||||
public interface PlayletPublicUserMapper extends BaseMapper<PlayletPublicUser>
|
||||
{
|
||||
/**
|
||||
* 查询公众号用户
|
||||
*
|
||||
* @param id 公众号用户主键
|
||||
* @return 公众号用户
|
||||
*/
|
||||
public PlayletPublicUser selectPlayletPublicUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询公众号用户列表
|
||||
*
|
||||
* @param playletPublicUser 公众号用户
|
||||
* @return 公众号用户集合
|
||||
*/
|
||||
public List<PlayletPublicUser> selectPlayletPublicUserList(PlayletPublicUser playletPublicUser);
|
||||
|
||||
/**
|
||||
* 新增公众号用户
|
||||
*
|
||||
* @param playletPublicUser 公众号用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPlayletPublicUser(PlayletPublicUser playletPublicUser);
|
||||
|
||||
/**
|
||||
* 修改公众号用户
|
||||
*
|
||||
* @param playletPublicUser 公众号用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePlayletPublicUser(PlayletPublicUser playletPublicUser);
|
||||
|
||||
/**
|
||||
* 删除公众号用户
|
||||
*
|
||||
* @param id 公众号用户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePlayletPublicUserById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除公众号用户
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePlayletPublicUserByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
package com.playlet.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.playlet.system.domain.PlayletConfig;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 全局配置Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-04
|
||||
*/
|
||||
public interface IPlayletConfigService extends IService<PlayletConfig>
|
||||
{
|
||||
/**
|
||||
* 查询全局配置
|
||||
*
|
||||
* @param id 全局配置主键
|
||||
* @return 全局配置
|
||||
*/
|
||||
public PlayletConfig selectPlayletConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询全局配置列表
|
||||
*
|
||||
* @param playletConfig 全局配置
|
||||
* @return 全局配置集合
|
||||
*/
|
||||
public List<PlayletConfig> selectPlayletConfigList(PlayletConfig playletConfig);
|
||||
|
||||
/**
|
||||
* 新增全局配置
|
||||
*
|
||||
* @param playletConfig 全局配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPlayletConfig(PlayletConfig playletConfig);
|
||||
|
||||
/**
|
||||
* 修改全局配置
|
||||
*
|
||||
* @param playletConfig 全局配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePlayletConfig(PlayletConfig playletConfig);
|
||||
|
||||
/**
|
||||
* 批量删除全局配置
|
||||
*
|
||||
* @param ids 需要删除的全局配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePlayletConfigByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除全局配置信息
|
||||
*
|
||||
* @param id 全局配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePlayletConfigById(Long id);
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
package com.playlet.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.playlet.system.domain.PlayletPublicUser;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 公众号用户Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
*/
|
||||
public interface IPlayletPublicUserService extends IService<PlayletPublicUser>
|
||||
{
|
||||
/**
|
||||
* 查询公众号用户
|
||||
*
|
||||
* @param id 公众号用户主键
|
||||
* @return 公众号用户
|
||||
*/
|
||||
public PlayletPublicUser selectPlayletPublicUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询公众号用户列表
|
||||
*
|
||||
* @param playletPublicUser 公众号用户
|
||||
* @return 公众号用户集合
|
||||
*/
|
||||
public List<PlayletPublicUser> selectPlayletPublicUserList(PlayletPublicUser playletPublicUser);
|
||||
|
||||
/**
|
||||
* 新增公众号用户
|
||||
*
|
||||
* @param playletPublicUser 公众号用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPlayletPublicUser(PlayletPublicUser playletPublicUser);
|
||||
|
||||
/**
|
||||
* 修改公众号用户
|
||||
*
|
||||
* @param playletPublicUser 公众号用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePlayletPublicUser(PlayletPublicUser playletPublicUser);
|
||||
|
||||
/**
|
||||
* 批量删除公众号用户
|
||||
*
|
||||
* @param ids 需要删除的公众号用户主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePlayletPublicUserByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除公众号用户信息
|
||||
*
|
||||
* @param id 公众号用户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePlayletPublicUserById(Long id);
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
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.PlayletConfigMapper;
|
||||
import com.playlet.system.domain.PlayletConfig;
|
||||
import com.playlet.system.service.IPlayletConfigService;
|
||||
import com.playlet.common.core.text.Convert;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* 全局配置Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-04
|
||||
*/
|
||||
@Service
|
||||
public class PlayletConfigServiceImpl extends ServiceImpl<PlayletConfigMapper, PlayletConfig> implements IPlayletConfigService
|
||||
{
|
||||
@Autowired
|
||||
private PlayletConfigMapper playletConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询全局配置
|
||||
*
|
||||
* @param id 全局配置主键
|
||||
* @return 全局配置
|
||||
*/
|
||||
@Override
|
||||
public PlayletConfig selectPlayletConfigById(Long id)
|
||||
{
|
||||
return playletConfigMapper.selectPlayletConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全局配置列表
|
||||
*
|
||||
* @param playletConfig 全局配置
|
||||
* @return 全局配置
|
||||
*/
|
||||
@Override
|
||||
public List<PlayletConfig> selectPlayletConfigList(PlayletConfig playletConfig)
|
||||
{
|
||||
return playletConfigMapper.selectPlayletConfigList(playletConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增全局配置
|
||||
*
|
||||
* @param playletConfig 全局配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPlayletConfig(PlayletConfig playletConfig)
|
||||
{
|
||||
playletConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return playletConfigMapper.insertPlayletConfig(playletConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改全局配置
|
||||
*
|
||||
* @param playletConfig 全局配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePlayletConfig(PlayletConfig playletConfig)
|
||||
{
|
||||
playletConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
return playletConfigMapper.updatePlayletConfig(playletConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除全局配置
|
||||
*
|
||||
* @param ids 需要删除的全局配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayletConfigByIds(String ids)
|
||||
{
|
||||
return playletConfigMapper.deletePlayletConfigByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除全局配置信息
|
||||
*
|
||||
* @param id 全局配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayletConfigById(Long id)
|
||||
{
|
||||
return playletConfigMapper.deletePlayletConfigById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
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.PlayletPublicUserMapper;
|
||||
import com.playlet.system.domain.PlayletPublicUser;
|
||||
import com.playlet.system.service.IPlayletPublicUserService;
|
||||
import com.playlet.common.core.text.Convert;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* 公众号用户Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
*/
|
||||
@Service
|
||||
public class PlayletPublicUserServiceImpl extends ServiceImpl<PlayletPublicUserMapper, PlayletPublicUser> implements IPlayletPublicUserService
|
||||
{
|
||||
@Autowired
|
||||
private PlayletPublicUserMapper playletPublicUserMapper;
|
||||
|
||||
/**
|
||||
* 查询公众号用户
|
||||
*
|
||||
* @param id 公众号用户主键
|
||||
* @return 公众号用户
|
||||
*/
|
||||
@Override
|
||||
public PlayletPublicUser selectPlayletPublicUserById(Long id)
|
||||
{
|
||||
return playletPublicUserMapper.selectPlayletPublicUserById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公众号用户列表
|
||||
*
|
||||
* @param playletPublicUser 公众号用户
|
||||
* @return 公众号用户
|
||||
*/
|
||||
@Override
|
||||
public List<PlayletPublicUser> selectPlayletPublicUserList(PlayletPublicUser playletPublicUser)
|
||||
{
|
||||
return playletPublicUserMapper.selectPlayletPublicUserList(playletPublicUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公众号用户
|
||||
*
|
||||
* @param playletPublicUser 公众号用户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPlayletPublicUser(PlayletPublicUser playletPublicUser)
|
||||
{
|
||||
playletPublicUser.setCreateTime(DateUtils.getNowDate());
|
||||
return playletPublicUserMapper.insertPlayletPublicUser(playletPublicUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公众号用户
|
||||
*
|
||||
* @param playletPublicUser 公众号用户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePlayletPublicUser(PlayletPublicUser playletPublicUser)
|
||||
{
|
||||
playletPublicUser.setUpdateTime(DateUtils.getNowDate());
|
||||
return playletPublicUserMapper.updatePlayletPublicUser(playletPublicUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除公众号用户
|
||||
*
|
||||
* @param ids 需要删除的公众号用户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayletPublicUserByIds(String ids)
|
||||
{
|
||||
return playletPublicUserMapper.deletePlayletPublicUserByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公众号用户信息
|
||||
*
|
||||
* @param id 公众号用户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayletPublicUserById(Long id)
|
||||
{
|
||||
return playletPublicUserMapper.deletePlayletPublicUserById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
<?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.PlayletConfigMapper">
|
||||
|
||||
<resultMap type="PlayletConfig" id="PlayletConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="globalRate" column="global_rate" />
|
||||
<result property="placeRate" column="place_rate" />
|
||||
<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="selectPlayletConfigVo">
|
||||
select id, global_rate, place_rate, create_by, create_time, update_by, update_time, remark from playlet_config
|
||||
</sql>
|
||||
|
||||
<select id="selectPlayletConfigList" parameterType="PlayletConfig" resultMap="PlayletConfigResult">
|
||||
<include refid="selectPlayletConfigVo"/>
|
||||
<where>
|
||||
<if test="globalRate != null "> and global_rate = #{globalRate}</if>
|
||||
<if test="placeRate != null "> and place_rate = #{placeRate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPlayletConfigById" parameterType="Long" resultMap="PlayletConfigResult">
|
||||
<include refid="selectPlayletConfigVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPlayletConfig" parameterType="PlayletConfig" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into playlet_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="globalRate != null">global_rate,</if>
|
||||
<if test="placeRate != null">place_rate,</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="globalRate != null">#{globalRate},</if>
|
||||
<if test="placeRate != null">#{placeRate},</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="updatePlayletConfig" parameterType="PlayletConfig">
|
||||
update playlet_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="globalRate != null">global_rate = #{globalRate},</if>
|
||||
<if test="placeRate != null">place_rate = #{placeRate},</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="deletePlayletConfigById" parameterType="Long">
|
||||
delete from playlet_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePlayletConfigByIds" parameterType="String">
|
||||
delete from playlet_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
<?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.PlayletPublicUserMapper">
|
||||
|
||||
<resultMap type="PlayletPublicUser" id="PlayletPublicUserResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="publicId" column="public_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="unionId" column="union_id" />
|
||||
<result property="imgUrl" column="img_url" />
|
||||
<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="selectPlayletPublicUserVo">
|
||||
select id, public_id, name, union_id, img_url, create_by, create_time, update_by, update_time, remark from playlet_public_user
|
||||
</sql>
|
||||
|
||||
<select id="selectPlayletPublicUserList" parameterType="PlayletPublicUser" resultMap="PlayletPublicUserResult">
|
||||
<include refid="selectPlayletPublicUserVo"/>
|
||||
<where>
|
||||
<if test="publicId != null "> and public_id = #{publicId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="unionId != null and unionId != ''"> and union_id = #{unionId}</if>
|
||||
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPlayletPublicUserById" parameterType="Long" resultMap="PlayletPublicUserResult">
|
||||
<include refid="selectPlayletPublicUserVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPlayletPublicUser" parameterType="PlayletPublicUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into playlet_public_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="publicId != null">public_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="unionId != null">union_id,</if>
|
||||
<if test="imgUrl != null">img_url,</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="name != null">#{name},</if>
|
||||
<if test="unionId != null">#{unionId},</if>
|
||||
<if test="imgUrl != null">#{imgUrl},</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="updatePlayletPublicUser" parameterType="PlayletPublicUser">
|
||||
update playlet_public_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="publicId != null">public_id = #{publicId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="unionId != null">union_id = #{unionId},</if>
|
||||
<if test="imgUrl != null">img_url = #{imgUrl},</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="deletePlayletPublicUserById" parameterType="Long">
|
||||
delete from playlet_public_user where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePlayletPublicUserByIds" parameterType="String">
|
||||
delete from playlet_public_user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue