短剧比例
This commit is contained in:
parent
f7334eed46
commit
1ecf46b383
|
|
@ -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.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));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<!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>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<!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>
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<!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>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
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;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
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);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
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);
|
||||
}
|
||||
|
|
@ -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.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);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<?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>
|
||||
Loading…
Reference in New Issue