修改 展示看板
parent
c61b302001
commit
b2a334b510
@ -0,0 +1,31 @@
|
||||
<!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-base_plan-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">计划数量:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="planNumber" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/base_plan"
|
||||
$("#form-base_plan-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-base_plan-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,90 @@
|
||||
<!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="planNumber"/>
|
||||
</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:base_plan:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:base_plan:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:base_plan:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:base_plan: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:base_plan:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:base_plan:remove')}]];
|
||||
var prefix = ctx + "system/base_plan";
|
||||
|
||||
$(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: 'planNumber',
|
||||
title: '计划数量'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
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,32 @@
|
||||
<!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-base_plan-edit" th:object="${baseBoxPlan}">
|
||||
<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="planNumber" th:field="*{planNumber}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/base_plan";
|
||||
$("#form-base_plan-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-base_plan-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.BaseBoxPlan;
|
||||
import com.ruoyi.system.service.IBaseBoxPlanService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 箱壳计划数量维护Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-15
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/base_plan")
|
||||
public class BaseBoxPlanController extends BaseController
|
||||
{
|
||||
private String prefix = "system/base_plan";
|
||||
|
||||
@Autowired
|
||||
private IBaseBoxPlanService baseBoxPlanService;
|
||||
|
||||
@RequiresPermissions("system:base_plan:view")
|
||||
@GetMapping()
|
||||
public String base_plan()
|
||||
{
|
||||
return prefix + "/base_plan";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询箱壳计划数量维护列表
|
||||
*/
|
||||
@RequiresPermissions("system:base_plan:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BaseBoxPlan baseBoxPlan)
|
||||
{
|
||||
startPage();
|
||||
List<BaseBoxPlan> list = baseBoxPlanService.selectBaseBoxPlanList(baseBoxPlan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出箱壳计划数量维护列表
|
||||
*/
|
||||
@RequiresPermissions("system:base_plan:export")
|
||||
@Log(title = "箱壳计划数量维护", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseBoxPlan baseBoxPlan)
|
||||
{
|
||||
List<BaseBoxPlan> list = baseBoxPlanService.selectBaseBoxPlanList(baseBoxPlan);
|
||||
ExcelUtil<BaseBoxPlan> util = new ExcelUtil<BaseBoxPlan>(BaseBoxPlan.class);
|
||||
return util.exportExcel(list, "箱壳计划数量维护数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增箱壳计划数量维护
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存箱壳计划数量维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_plan:add")
|
||||
@Log(title = "箱壳计划数量维护", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BaseBoxPlan baseBoxPlan)
|
||||
{
|
||||
return toAjax(baseBoxPlanService.insertBaseBoxPlan(baseBoxPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改箱壳计划数量维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_plan:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
BaseBoxPlan baseBoxPlan = baseBoxPlanService.selectBaseBoxPlanById(id);
|
||||
mmap.put("baseBoxPlan", baseBoxPlan);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存箱壳计划数量维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_plan:edit")
|
||||
@Log(title = "箱壳计划数量维护", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BaseBoxPlan baseBoxPlan)
|
||||
{
|
||||
return toAjax(baseBoxPlanService.updateBaseBoxPlan(baseBoxPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除箱壳计划数量维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_plan:remove")
|
||||
@Log(title = "箱壳计划数量维护", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(baseBoxPlanService.deleteBaseBoxPlanByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 箱壳计划数量维护对象 base_box_plan
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-15
|
||||
*/
|
||||
public class BaseBoxPlan extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 计划数量 */
|
||||
@Excel(name = "计划数量")
|
||||
private String planNumber;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPlanNumber(String planNumber)
|
||||
{
|
||||
this.planNumber = planNumber;
|
||||
}
|
||||
|
||||
public String getPlanNumber()
|
||||
{
|
||||
return planNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("planNumber", getPlanNumber())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseBoxPlan;
|
||||
|
||||
/**
|
||||
* 箱壳计划数量维护Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-15
|
||||
*/
|
||||
public interface BaseBoxPlanMapper
|
||||
{
|
||||
/**
|
||||
* 查询箱壳计划数量维护
|
||||
*
|
||||
* @param id 箱壳计划数量维护主键
|
||||
* @return 箱壳计划数量维护
|
||||
*/
|
||||
public BaseBoxPlan selectBaseBoxPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询箱壳计划数量维护列表
|
||||
*
|
||||
* @param baseBoxPlan 箱壳计划数量维护
|
||||
* @return 箱壳计划数量维护集合
|
||||
*/
|
||||
public List<BaseBoxPlan> selectBaseBoxPlanList(BaseBoxPlan baseBoxPlan);
|
||||
|
||||
/**
|
||||
* 新增箱壳计划数量维护
|
||||
*
|
||||
* @param baseBoxPlan 箱壳计划数量维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseBoxPlan(BaseBoxPlan baseBoxPlan);
|
||||
|
||||
/**
|
||||
* 修改箱壳计划数量维护
|
||||
*
|
||||
* @param baseBoxPlan 箱壳计划数量维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseBoxPlan(BaseBoxPlan baseBoxPlan);
|
||||
|
||||
/**
|
||||
* 删除箱壳计划数量维护
|
||||
*
|
||||
* @param id 箱壳计划数量维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBoxPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除箱壳计划数量维护
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBoxPlanByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseBoxPlan;
|
||||
|
||||
/**
|
||||
* 箱壳计划数量维护Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-15
|
||||
*/
|
||||
public interface IBaseBoxPlanService
|
||||
{
|
||||
/**
|
||||
* 查询箱壳计划数量维护
|
||||
*
|
||||
* @param id 箱壳计划数量维护主键
|
||||
* @return 箱壳计划数量维护
|
||||
*/
|
||||
public BaseBoxPlan selectBaseBoxPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询箱壳计划数量维护列表
|
||||
*
|
||||
* @param baseBoxPlan 箱壳计划数量维护
|
||||
* @return 箱壳计划数量维护集合
|
||||
*/
|
||||
public List<BaseBoxPlan> selectBaseBoxPlanList(BaseBoxPlan baseBoxPlan);
|
||||
|
||||
/**
|
||||
* 新增箱壳计划数量维护
|
||||
*
|
||||
* @param baseBoxPlan 箱壳计划数量维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseBoxPlan(BaseBoxPlan baseBoxPlan);
|
||||
|
||||
/**
|
||||
* 修改箱壳计划数量维护
|
||||
*
|
||||
* @param baseBoxPlan 箱壳计划数量维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseBoxPlan(BaseBoxPlan baseBoxPlan);
|
||||
|
||||
/**
|
||||
* 批量删除箱壳计划数量维护
|
||||
*
|
||||
* @param ids 需要删除的箱壳计划数量维护主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBoxPlanByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除箱壳计划数量维护信息
|
||||
*
|
||||
* @param id 箱壳计划数量维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBoxPlanById(Long id);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BaseBoxPlanMapper;
|
||||
import com.ruoyi.system.domain.BaseBoxPlan;
|
||||
import com.ruoyi.system.service.IBaseBoxPlanService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 箱壳计划数量维护Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-15
|
||||
*/
|
||||
@Service
|
||||
public class BaseBoxPlanServiceImpl implements IBaseBoxPlanService
|
||||
{
|
||||
@Autowired
|
||||
private BaseBoxPlanMapper baseBoxPlanMapper;
|
||||
|
||||
/**
|
||||
* 查询箱壳计划数量维护
|
||||
*
|
||||
* @param id 箱壳计划数量维护主键
|
||||
* @return 箱壳计划数量维护
|
||||
*/
|
||||
@Override
|
||||
public BaseBoxPlan selectBaseBoxPlanById(Long id)
|
||||
{
|
||||
return baseBoxPlanMapper.selectBaseBoxPlanById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询箱壳计划数量维护列表
|
||||
*
|
||||
* @param baseBoxPlan 箱壳计划数量维护
|
||||
* @return 箱壳计划数量维护
|
||||
*/
|
||||
@Override
|
||||
public List<BaseBoxPlan> selectBaseBoxPlanList(BaseBoxPlan baseBoxPlan)
|
||||
{
|
||||
return baseBoxPlanMapper.selectBaseBoxPlanList(baseBoxPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增箱壳计划数量维护
|
||||
*
|
||||
* @param baseBoxPlan 箱壳计划数量维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseBoxPlan(BaseBoxPlan baseBoxPlan)
|
||||
{
|
||||
baseBoxPlan.setCreateTime(DateUtils.getNowDate());
|
||||
return baseBoxPlanMapper.insertBaseBoxPlan(baseBoxPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改箱壳计划数量维护
|
||||
*
|
||||
* @param baseBoxPlan 箱壳计划数量维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseBoxPlan(BaseBoxPlan baseBoxPlan)
|
||||
{
|
||||
return baseBoxPlanMapper.updateBaseBoxPlan(baseBoxPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除箱壳计划数量维护
|
||||
*
|
||||
* @param ids 需要删除的箱壳计划数量维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBoxPlanByIds(String ids)
|
||||
{
|
||||
return baseBoxPlanMapper.deleteBaseBoxPlanByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除箱壳计划数量维护信息
|
||||
*
|
||||
* @param id 箱壳计划数量维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBoxPlanById(Long id)
|
||||
{
|
||||
return baseBoxPlanMapper.deleteBaseBoxPlanById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
<?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.ruoyi.system.mapper.BaseBoxPlanMapper">
|
||||
|
||||
<resultMap type="BaseBoxPlan" id="BaseBoxPlanResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="planNumber" column="plan_number" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseBoxPlanVo">
|
||||
select id, plan_number, create_time from base_box_plan
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseBoxPlanList" parameterType="BaseBoxPlan" resultMap="BaseBoxPlanResult">
|
||||
<include refid="selectBaseBoxPlanVo"/>
|
||||
<where>
|
||||
<if test="planNumber != null and planNumber != ''"> and plan_number = #{planNumber}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseBoxPlanById" parameterType="Long" resultMap="BaseBoxPlanResult">
|
||||
<include refid="selectBaseBoxPlanVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseBoxPlan" parameterType="BaseBoxPlan">
|
||||
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
||||
SELECT seq_base_box_plan.NEXTVAL as id FROM DUAL
|
||||
</selectKey>
|
||||
insert into base_box_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="planNumber != null">plan_number,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="planNumber != null">#{planNumber},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseBoxPlan" parameterType="BaseBoxPlan">
|
||||
update base_box_plan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planNumber != null">plan_number = #{planNumber},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseBoxPlanById" parameterType="Long">
|
||||
delete from base_box_plan where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseBoxPlanByIds" parameterType="String">
|
||||
delete from base_box_plan where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue