This commit is contained in:
王泽斌 2021-04-07 09:41:36 +08:00
parent 2dc534389c
commit 3fe333922a
13 changed files with 1083 additions and 5 deletions

View File

@ -0,0 +1,126 @@
package com.ruoyi.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.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.WkCrmCustomerPool;
import com.ruoyi.system.service.IWkCrmCustomerPoolService;
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 2021-04-06
*/
@Controller
@RequestMapping("/system/pool")
public class WkCrmCustomerPoolController extends BaseController
{
private String prefix = "system/pool";
@Autowired
private IWkCrmCustomerPoolService wkCrmCustomerPoolService;
@RequiresPermissions("system:pool:view")
@GetMapping()
public String pool()
{
return prefix + "/pool";
}
/**
* 查询公海列表
*/
@RequiresPermissions("system:pool:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(WkCrmCustomerPool wkCrmCustomerPool)
{
startPage();
List<WkCrmCustomerPool> list = wkCrmCustomerPoolService.selectWkCrmCustomerPoolList(wkCrmCustomerPool);
return getDataTable(list);
}
/**
* 导出公海列表
*/
@RequiresPermissions("system:pool:export")
@Log(title = "公海", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(WkCrmCustomerPool wkCrmCustomerPool)
{
List<WkCrmCustomerPool> list = wkCrmCustomerPoolService.selectWkCrmCustomerPoolList(wkCrmCustomerPool);
ExcelUtil<WkCrmCustomerPool> util = new ExcelUtil<WkCrmCustomerPool>(WkCrmCustomerPool.class);
return util.exportExcel(list, "pool");
}
/**
* 新增公海
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存公海
*/
@RequiresPermissions("system:pool:add")
@Log(title = "公海", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(WkCrmCustomerPool wkCrmCustomerPool)
{
return toAjax(wkCrmCustomerPoolService.insertWkCrmCustomerPool(wkCrmCustomerPool));
}
/**
* 修改公海
*/
@GetMapping("/edit/{poolId}")
public String edit(@PathVariable("poolId") Long poolId, ModelMap mmap)
{
WkCrmCustomerPool wkCrmCustomerPool = wkCrmCustomerPoolService.selectWkCrmCustomerPoolById(poolId);
mmap.put("wkCrmCustomerPool", wkCrmCustomerPool);
return prefix + "/edit";
}
/**
* 修改保存公海
*/
@RequiresPermissions("system:pool:edit")
@Log(title = "公海", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(WkCrmCustomerPool wkCrmCustomerPool)
{
return toAjax(wkCrmCustomerPoolService.updateWkCrmCustomerPool(wkCrmCustomerPool));
}
/**
* 删除公海
*/
@RequiresPermissions("system:pool:remove")
@Log(title = "公海", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(wkCrmCustomerPoolService.deleteWkCrmCustomerPoolByIds(ids));
}
}

View File

@ -148,10 +148,10 @@
field: 'ownerUserId', field: 'ownerUserId',
title: '负责人ID' title: '负责人ID'
}, },
{ /*{
field: 'batchId', field: 'batchId',
title: '批次' title: '批次'
}, },*/
{ {
field: 'lastTime', field: 'lastTime',
title: '最后跟进时间' title: '最后跟进时间'

View File

@ -81,6 +81,11 @@
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li> </li>
<li>
<button style="font-size: 20px" >
<a href="/system/pool">进入公海</a>
</button>
</li>
</ul> </ul>
</div> </div>
</form> </form>

View File

@ -100,10 +100,10 @@
title: '', title: '',
visible: false visible: false
}, },
{ /*{
field: 'followup', field: 'followup',
title: '跟进状态 0未跟进1已跟进' title: '跟进状态 0未跟进1已跟进'
}, },*/
{ {
field: 'leadsName', field: 'leadsName',
title: '线索名称' title: '线索名称'

View File

@ -0,0 +1,107 @@
<!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-pool-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">公海名称:</label>
<div class="col-sm-8">
<input name="poolName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">管理员 “,”分割:</label>
<div class="col-sm-8">
<textarea name="adminUserId" class="form-control" required></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公海规则员工成员 “,”分割:</label>
<div class="col-sm-8">
<textarea name="memberUserId" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公海规则部门成员 “,”分割:</label>
<div class="col-sm-8">
<textarea name="memberDeptId" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">状态 0 停用 1启用</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" name="status" value="" required>
<label th:for="status" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">前负责人领取规则 0不限制 1限制</label>
<div class="col-sm-8">
<input name="preOwnerSetting" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">前负责人领取规则限制天数:</label>
<div class="col-sm-8">
<input name="preOwnerSettingDay" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否限制领取频率 0不限制 1限制</label>
<div class="col-sm-8">
<input name="receiveSetting" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">领取频率规则:</label>
<div class="col-sm-8">
<input name="receiveNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否设置提前提醒 0不开启 1开启</label>
<div class="col-sm-8">
<input name="remindSetting" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">提醒规则天数:</label>
<div class="col-sm-8">
<input name="remindDay" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">收回规则 0不自动收回 1自动收回</label>
<div class="col-sm-8">
<input name="putInRule" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="createUserId" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/pool"
$("#form-pool-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-pool-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,108 @@
<!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-pool-edit" th:object="${wkCrmCustomerPool}">
<input name="poolId" th:field="*{poolId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">公海名称:</label>
<div class="col-sm-8">
<input name="poolName" th:field="*{poolName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">管理员 “,”分割:</label>
<div class="col-sm-8">
<textarea name="adminUserId" class="form-control" required>[[*{adminUserId}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公海规则员工成员 “,”分割:</label>
<div class="col-sm-8">
<textarea name="memberUserId" class="form-control">[[*{memberUserId}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公海规则部门成员 “,”分割:</label>
<div class="col-sm-8">
<textarea name="memberDeptId" class="form-control">[[*{memberDeptId}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">状态 0 停用 1启用</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" name="status" value="" required>
<label th:for="status" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">前负责人领取规则 0不限制 1限制</label>
<div class="col-sm-8">
<input name="preOwnerSetting" th:field="*{preOwnerSetting}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">前负责人领取规则限制天数:</label>
<div class="col-sm-8">
<input name="preOwnerSettingDay" th:field="*{preOwnerSettingDay}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否限制领取频率 0不限制 1限制</label>
<div class="col-sm-8">
<input name="receiveSetting" th:field="*{receiveSetting}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">领取频率规则:</label>
<div class="col-sm-8">
<input name="receiveNum" th:field="*{receiveNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否设置提前提醒 0不开启 1开启</label>
<div class="col-sm-8">
<input name="remindSetting" th:field="*{remindSetting}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">提醒规则天数:</label>
<div class="col-sm-8">
<input name="remindDay" th:field="*{remindDay}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">收回规则 0不自动收回 1自动收回</label>
<div class="col-sm-8">
<input name="putInRule" th:field="*{putInRule}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="createUserId" th:field="*{createUserId}" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/pool";
$("#form-pool-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-pool-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,173 @@
<!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="poolName"/>
</li>
<!--<li>
<label>状态 0 停用 1启用</label>
<select name="status">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>前负责人领取规则 0不限制 1限制</label>
<input type="text" name="preOwnerSetting"/>
</li>
<li>
<label>前负责人领取规则限制天数:</label>
<input type="text" name="preOwnerSettingDay"/>
</li>
<li>
<label>是否限制领取频率 0不限制 1限制</label>
<input type="text" name="receiveSetting"/>
</li>
<li>
<label>领取频率规则:</label>
<input type="text" name="receiveNum"/>
</li>
<li>
<label>是否设置提前提醒 0不开启 1开启</label>
<input type="text" name="remindSetting"/>
</li>
<li>
<label>提醒规则天数:</label>
<input type="text" name="remindDay"/>
</li>
<li>
<label>收回规则 0不自动收回 1自动收回</label>
<input type="text" name="putInRule"/>
</li>
<li>
<label></label>
<input type="text" name="createUserId"/>
</li>-->
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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:pool:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:pool:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:pool:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:pool: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:pool:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:pool:remove')}]];
var prefix = ctx + "system/pool";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "公海",
columns: [{
checkbox: true
},
{
field: 'poolId',
title: '公海id',
visible: false
},
{
field: 'poolName',
title: '公海名称'
},
{
field: 'adminUserId',
title: '管理员 '
},
{
field: 'memberUserId',
title: '公海规则员工成员'
},
{
field: 'memberDeptId',
title: '公海规则部门成员'
},
{
field: 'status',
title: '状态 0 停用 1启用'
},
{
field: 'preOwnerSetting',
title: '前负责人领取规则 0不限制 1限制'
},
{
field: 'preOwnerSettingDay',
title: '前负责人领取规则限制天数'
},
{
field: 'receiveSetting',
title: '是否限制领取频率 0不限制 1限制'
},
{
field: 'receiveNum',
title: '领取频率规则'
},
{
field: 'remindSetting',
title: '是否设置提前提醒 0不开启 1开启'
},
{
field: 'remindDay',
title: '提醒规则天数'
},
{
field: 'putInRule',
title: '收回规则 0不自动收回 1自动收回'
},
{
field: 'createUserId',
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.poolId + '\')"><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.poolId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,220 @@
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;
/**
* 公海对象 wk_crm_customer_pool
*
* @author ruoyi
* @date 2021-04-06
*/
public class WkCrmCustomerPool extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 公海id */
private Long poolId;
/** 公海名称 */
@Excel(name = "公海名称")
private String poolName;
/** 管理员 “,”分割 */
@Excel(name = "管理员 “,”分割")
private String adminUserId;
/** 公海规则员工成员 “,”分割 */
@Excel(name = "公海规则员工成员 “,”分割")
private String memberUserId;
/** 公海规则部门成员 “,”分割 */
@Excel(name = "公海规则部门成员 “,”分割")
private String memberDeptId;
/** 状态 0 停用 1启用 */
@Excel(name = "状态 0 停用 1启用")
private Integer status;
/** 前负责人领取规则 0不限制 1限制 */
@Excel(name = "前负责人领取规则 0不限制 1限制")
private Integer preOwnerSetting;
/** 前负责人领取规则限制天数 */
@Excel(name = "前负责人领取规则限制天数")
private Integer preOwnerSettingDay;
/** 是否限制领取频率 0不限制 1限制 */
@Excel(name = "是否限制领取频率 0不限制 1限制")
private Integer receiveSetting;
/** 领取频率规则 */
@Excel(name = "领取频率规则")
private Integer receiveNum;
/** 是否设置提前提醒 0不开启 1开启 */
@Excel(name = "是否设置提前提醒 0不开启 1开启")
private Integer remindSetting;
/** 提醒规则天数 */
@Excel(name = "提醒规则天数")
private Long remindDay;
/** 收回规则 0不自动收回 1自动收回 */
@Excel(name = "收回规则 0不自动收回 1自动收回")
private Integer putInRule;
/** */
@Excel(name = "")
private Long createUserId;
public void setPoolId(Long poolId)
{
this.poolId = poolId;
}
public Long getPoolId()
{
return poolId;
}
public void setPoolName(String poolName)
{
this.poolName = poolName;
}
public String getPoolName()
{
return poolName;
}
public void setAdminUserId(String adminUserId)
{
this.adminUserId = adminUserId;
}
public String getAdminUserId()
{
return adminUserId;
}
public void setMemberUserId(String memberUserId)
{
this.memberUserId = memberUserId;
}
public String getMemberUserId()
{
return memberUserId;
}
public void setMemberDeptId(String memberDeptId)
{
this.memberDeptId = memberDeptId;
}
public String getMemberDeptId()
{
return memberDeptId;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setPreOwnerSetting(Integer preOwnerSetting)
{
this.preOwnerSetting = preOwnerSetting;
}
public Integer getPreOwnerSetting()
{
return preOwnerSetting;
}
public void setPreOwnerSettingDay(Integer preOwnerSettingDay)
{
this.preOwnerSettingDay = preOwnerSettingDay;
}
public Integer getPreOwnerSettingDay()
{
return preOwnerSettingDay;
}
public void setReceiveSetting(Integer receiveSetting)
{
this.receiveSetting = receiveSetting;
}
public Integer getReceiveSetting()
{
return receiveSetting;
}
public void setReceiveNum(Integer receiveNum)
{
this.receiveNum = receiveNum;
}
public Integer getReceiveNum()
{
return receiveNum;
}
public void setRemindSetting(Integer remindSetting)
{
this.remindSetting = remindSetting;
}
public Integer getRemindSetting()
{
return remindSetting;
}
public void setRemindDay(Long remindDay)
{
this.remindDay = remindDay;
}
public Long getRemindDay()
{
return remindDay;
}
public void setPutInRule(Integer putInRule)
{
this.putInRule = putInRule;
}
public Integer getPutInRule()
{
return putInRule;
}
public void setCreateUserId(Long createUserId)
{
this.createUserId = createUserId;
}
public Long getCreateUserId()
{
return createUserId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("poolId", getPoolId())
.append("poolName", getPoolName())
.append("adminUserId", getAdminUserId())
.append("memberUserId", getMemberUserId())
.append("memberDeptId", getMemberDeptId())
.append("status", getStatus())
.append("preOwnerSetting", getPreOwnerSetting())
.append("preOwnerSettingDay", getPreOwnerSettingDay())
.append("receiveSetting", getReceiveSetting())
.append("receiveNum", getReceiveNum())
.append("remindSetting", getRemindSetting())
.append("remindDay", getRemindDay())
.append("putInRule", getPutInRule())
.append("createUserId", getCreateUserId())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.WkCrmCustomerPool;
/**
* 公海Mapper接口
*
* @author ruoyi
* @date 2021-04-06
*/
public interface WkCrmCustomerPoolMapper
{
/**
* 查询公海
*
* @param poolId 公海ID
* @return 公海
*/
public WkCrmCustomerPool selectWkCrmCustomerPoolById(Long poolId);
/**
* 查询公海列表
*
* @param wkCrmCustomerPool 公海
* @return 公海集合
*/
public List<WkCrmCustomerPool> selectWkCrmCustomerPoolList(WkCrmCustomerPool wkCrmCustomerPool);
/**
* 新增公海
*
* @param wkCrmCustomerPool 公海
* @return 结果
*/
public int insertWkCrmCustomerPool(WkCrmCustomerPool wkCrmCustomerPool);
/**
* 修改公海
*
* @param wkCrmCustomerPool 公海
* @return 结果
*/
public int updateWkCrmCustomerPool(WkCrmCustomerPool wkCrmCustomerPool);
/**
* 删除公海
*
* @param poolId 公海ID
* @return 结果
*/
public int deleteWkCrmCustomerPoolById(Long poolId);
/**
* 批量删除公海
*
* @param poolIds 需要删除的数据ID
* @return 结果
*/
public int deleteWkCrmCustomerPoolByIds(String[] poolIds);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.WkCrmCustomerPool;
/**
* 公海Service接口
*
* @author ruoyi
* @date 2021-04-06
*/
public interface IWkCrmCustomerPoolService
{
/**
* 查询公海
*
* @param poolId 公海ID
* @return 公海
*/
public WkCrmCustomerPool selectWkCrmCustomerPoolById(Long poolId);
/**
* 查询公海列表
*
* @param wkCrmCustomerPool 公海
* @return 公海集合
*/
public List<WkCrmCustomerPool> selectWkCrmCustomerPoolList(WkCrmCustomerPool wkCrmCustomerPool);
/**
* 新增公海
*
* @param wkCrmCustomerPool 公海
* @return 结果
*/
public int insertWkCrmCustomerPool(WkCrmCustomerPool wkCrmCustomerPool);
/**
* 修改公海
*
* @param wkCrmCustomerPool 公海
* @return 结果
*/
public int updateWkCrmCustomerPool(WkCrmCustomerPool wkCrmCustomerPool);
/**
* 批量删除公海
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWkCrmCustomerPoolByIds(String ids);
/**
* 删除公海信息
*
* @param poolId 公海ID
* @return 结果
*/
public int deleteWkCrmCustomerPoolById(Long poolId);
}

View File

@ -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.WkCrmCustomerPoolMapper;
import com.ruoyi.system.domain.WkCrmCustomerPool;
import com.ruoyi.system.service.IWkCrmCustomerPoolService;
import com.ruoyi.common.core.text.Convert;
/**
* 公海Service业务层处理
*
* @author ruoyi
* @date 2021-04-06
*/
@Service
public class WkCrmCustomerPoolServiceImpl implements IWkCrmCustomerPoolService
{
@Autowired
private WkCrmCustomerPoolMapper wkCrmCustomerPoolMapper;
/**
* 查询公海
*
* @param poolId 公海ID
* @return 公海
*/
@Override
public WkCrmCustomerPool selectWkCrmCustomerPoolById(Long poolId)
{
return wkCrmCustomerPoolMapper.selectWkCrmCustomerPoolById(poolId);
}
/**
* 查询公海列表
*
* @param wkCrmCustomerPool 公海
* @return 公海
*/
@Override
public List<WkCrmCustomerPool> selectWkCrmCustomerPoolList(WkCrmCustomerPool wkCrmCustomerPool)
{
return wkCrmCustomerPoolMapper.selectWkCrmCustomerPoolList(wkCrmCustomerPool);
}
/**
* 新增公海
*
* @param wkCrmCustomerPool 公海
* @return 结果
*/
@Override
public int insertWkCrmCustomerPool(WkCrmCustomerPool wkCrmCustomerPool)
{
wkCrmCustomerPool.setCreateTime(DateUtils.getNowDate());
return wkCrmCustomerPoolMapper.insertWkCrmCustomerPool(wkCrmCustomerPool);
}
/**
* 修改公海
*
* @param wkCrmCustomerPool 公海
* @return 结果
*/
@Override
public int updateWkCrmCustomerPool(WkCrmCustomerPool wkCrmCustomerPool)
{
return wkCrmCustomerPoolMapper.updateWkCrmCustomerPool(wkCrmCustomerPool);
}
/**
* 删除公海对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteWkCrmCustomerPoolByIds(String ids)
{
return wkCrmCustomerPoolMapper.deleteWkCrmCustomerPoolByIds(Convert.toStrArray(ids));
}
/**
* 删除公海信息
*
* @param poolId 公海ID
* @return 结果
*/
@Override
public int deleteWkCrmCustomerPoolById(Long poolId)
{
return wkCrmCustomerPoolMapper.deleteWkCrmCustomerPoolById(poolId);
}
}

View File

@ -0,0 +1,121 @@
<?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.WkCrmCustomerPoolMapper">
<resultMap type="WkCrmCustomerPool" id="WkCrmCustomerPoolResult">
<result property="poolId" column="pool_id" />
<result property="poolName" column="pool_name" />
<result property="adminUserId" column="admin_user_id" />
<result property="memberUserId" column="member_user_id" />
<result property="memberDeptId" column="member_dept_id" />
<result property="status" column="status" />
<result property="preOwnerSetting" column="pre_owner_setting" />
<result property="preOwnerSettingDay" column="pre_owner_setting_day" />
<result property="receiveSetting" column="receive_setting" />
<result property="receiveNum" column="receive_num" />
<result property="remindSetting" column="remind_setting" />
<result property="remindDay" column="remind_day" />
<result property="putInRule" column="put_in_rule" />
<result property="createUserId" column="create_user_id" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectWkCrmCustomerPoolVo">
select pool_id, pool_name, admin_user_id, member_user_id, member_dept_id, status, pre_owner_setting, pre_owner_setting_day, receive_setting, receive_num, remind_setting, remind_day, put_in_rule, create_user_id, create_time from wk_crm_customer_pool
</sql>
<select id="selectWkCrmCustomerPoolList" parameterType="WkCrmCustomerPool" resultMap="WkCrmCustomerPoolResult">
<include refid="selectWkCrmCustomerPoolVo"/>
<where>
<if test="poolName != null and poolName != ''"> and pool_name like concat('%', #{poolName}, '%')</if>
<if test="adminUserId != null and adminUserId != ''"> and admin_user_id = #{adminUserId}</if>
<if test="memberUserId != null and memberUserId != ''"> and member_user_id = #{memberUserId}</if>
<if test="memberDeptId != null and memberDeptId != ''"> and member_dept_id = #{memberDeptId}</if>
<if test="status != null "> and status = #{status}</if>
<if test="preOwnerSetting != null "> and pre_owner_setting = #{preOwnerSetting}</if>
<if test="preOwnerSettingDay != null "> and pre_owner_setting_day = #{preOwnerSettingDay}</if>
<if test="receiveSetting != null "> and receive_setting = #{receiveSetting}</if>
<if test="receiveNum != null "> and receive_num = #{receiveNum}</if>
<if test="remindSetting != null "> and remind_setting = #{remindSetting}</if>
<if test="remindDay != null "> and remind_day = #{remindDay}</if>
<if test="putInRule != null "> and put_in_rule = #{putInRule}</if>
<if test="createUserId != null "> and create_user_id = #{createUserId}</if>
</where>
</select>
<select id="selectWkCrmCustomerPoolById" parameterType="Long" resultMap="WkCrmCustomerPoolResult">
<include refid="selectWkCrmCustomerPoolVo"/>
where pool_id = #{poolId}
</select>
<insert id="insertWkCrmCustomerPool" parameterType="WkCrmCustomerPool" useGeneratedKeys="true" keyProperty="poolId">
insert into wk_crm_customer_pool
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="poolName != null and poolName != ''">pool_name,</if>
<if test="adminUserId != null and adminUserId != ''">admin_user_id,</if>
<if test="memberUserId != null">member_user_id,</if>
<if test="memberDeptId != null">member_dept_id,</if>
<if test="status != null">status,</if>
<if test="preOwnerSetting != null">pre_owner_setting,</if>
<if test="preOwnerSettingDay != null">pre_owner_setting_day,</if>
<if test="receiveSetting != null">receive_setting,</if>
<if test="receiveNum != null">receive_num,</if>
<if test="remindSetting != null">remind_setting,</if>
<if test="remindDay != null">remind_day,</if>
<if test="putInRule != null">put_in_rule,</if>
<if test="createUserId != null">create_user_id,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="poolName != null and poolName != ''">#{poolName},</if>
<if test="adminUserId != null and adminUserId != ''">#{adminUserId},</if>
<if test="memberUserId != null">#{memberUserId},</if>
<if test="memberDeptId != null">#{memberDeptId},</if>
<if test="status != null">#{status},</if>
<if test="preOwnerSetting != null">#{preOwnerSetting},</if>
<if test="preOwnerSettingDay != null">#{preOwnerSettingDay},</if>
<if test="receiveSetting != null">#{receiveSetting},</if>
<if test="receiveNum != null">#{receiveNum},</if>
<if test="remindSetting != null">#{remindSetting},</if>
<if test="remindDay != null">#{remindDay},</if>
<if test="putInRule != null">#{putInRule},</if>
<if test="createUserId != null">#{createUserId},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateWkCrmCustomerPool" parameterType="WkCrmCustomerPool">
update wk_crm_customer_pool
<trim prefix="SET" suffixOverrides=",">
<if test="poolName != null and poolName != ''">pool_name = #{poolName},</if>
<if test="adminUserId != null and adminUserId != ''">admin_user_id = #{adminUserId},</if>
<if test="memberUserId != null">member_user_id = #{memberUserId},</if>
<if test="memberDeptId != null">member_dept_id = #{memberDeptId},</if>
<if test="status != null">status = #{status},</if>
<if test="preOwnerSetting != null">pre_owner_setting = #{preOwnerSetting},</if>
<if test="preOwnerSettingDay != null">pre_owner_setting_day = #{preOwnerSettingDay},</if>
<if test="receiveSetting != null">receive_setting = #{receiveSetting},</if>
<if test="receiveNum != null">receive_num = #{receiveNum},</if>
<if test="remindSetting != null">remind_setting = #{remindSetting},</if>
<if test="remindDay != null">remind_day = #{remindDay},</if>
<if test="putInRule != null">put_in_rule = #{putInRule},</if>
<if test="createUserId != null">create_user_id = #{createUserId},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where pool_id = #{poolId}
</update>
<delete id="deleteWkCrmCustomerPoolById" parameterType="Long">
delete from wk_crm_customer_pool where pool_id = #{poolId}
</delete>
<delete id="deleteWkCrmCustomerPoolByIds" parameterType="String">
delete from wk_crm_customer_pool where pool_id in
<foreach item="poolId" collection="array" open="(" separator="," close=")">
#{poolId}
</foreach>
</delete>
</mapper>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.WkCrmLeadsMapper"> <mapper namespace="com.ruoyi.system.mapper.WkCrmLeadsMapper">
<resultMap type="WkCrmLeads" id="WkCrmLeadsResult"> <resultMap type="com.ruoyi.system.domain.WkCrmLeads" id="WkCrmLeadsResult">
<result property="leadsId" column="leads_id" /> <result property="leadsId" column="leads_id" />
<result property="followup" column="followup" /> <result property="followup" column="followup" />
<result property="leadsName" column="leads_name" /> <result property="leadsName" column="leads_name" />