新增crm模块
This commit is contained in:
parent
b8958c67f3
commit
d236c93f4d
3
pom.xml
3
pom.xml
|
|
@ -228,6 +228,7 @@
|
|||
<module>ruoyi-quartz</module>
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>zklz-crm</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
|
@ -252,7 +253,7 @@
|
|||
<repository>
|
||||
<id>wendu-release</id>
|
||||
<name>wendu-release</name>
|
||||
<url>http://repo.wendukeji.cn:6518/repository/maven-releases/</url>
|
||||
<url>http://repo.wendu.cn/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,12 @@
|
|||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>zklz-crm</artifactId>
|
||||
<version>4.6.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,172 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增代理商管理')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-agent-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">代理商名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="agentName" 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">
|
||||
<select name="agentType" class="form-control m-b" required>
|
||||
<option value="">所有</option>
|
||||
</select>
|
||||
<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">代理商级别:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="agentLevel" 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="saleAddr" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">授权开始时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="authStartTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">授权结束时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="authEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">授权有效性(0:失效;1:有效):</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box">
|
||||
<input type="radio" name="authStatus" value="">
|
||||
<label th:for="authStatus" 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">首次提货量:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="firstSale" 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="agentCode" 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="tycUri" 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="createDate" 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="capital" 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="memberNum" 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="legalPerson" 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="contactName" 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="contactTel" 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="contactName2" 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="contactTel2" 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="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "crm/agent"
|
||||
$("#form-agent-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-agent-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='authStartTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("input[name='authEndTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,232 @@
|
|||
<!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="agentName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>代理商类型:</label>
|
||||
<select name="agentType">
|
||||
<option value="">所有</option>
|
||||
<option value="-1">代码生成请选择字典属性</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>代理商级别:</label>
|
||||
<input type="text" name="agentLevel"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>销售地址:</label>
|
||||
<input type="text" name="saleAddr"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>授权开始时间:</label>
|
||||
<input type="text" class="time-input" placeholder="请选择授权开始时间" name="authStartTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>授权结束时间:</label>
|
||||
<input type="text" class="time-input" placeholder="请选择授权结束时间" name="authEndTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>授权有效性(0:失效;1:有效):</label>
|
||||
<select name="authStatus">
|
||||
<option value="">所有</option>
|
||||
<option value="-1">代码生成请选择字典属性</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>首次提货量:</label>
|
||||
<input type="text" name="firstSale"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>统一社会信用代码:</label>
|
||||
<input type="text" name="agentCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>天眼查地址:</label>
|
||||
<input type="text" name="tycUri"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>成立日期:</label>
|
||||
<input type="text" name="createDate"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>注册资本(万元):</label>
|
||||
<input type="text" name="capital"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>员工数量:</label>
|
||||
<input type="text" name="memberNum"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>法人姓名:</label>
|
||||
<input type="text" name="legalPerson"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>第一联系人:</label>
|
||||
<input type="text" name="contactName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>第一联系人电话:</label>
|
||||
<input type="text" name="contactTel"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>第二联系人:</label>
|
||||
<input type="text" name="contactName2"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>第二联系人电话:</label>
|
||||
<input type="text" name="contactTel2"/>
|
||||
</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="crm:agent:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="crm:agent:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="crm:agent:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="crm:agent: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('crm:agent:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('crm:agent:remove')}]];
|
||||
var prefix = ctx + "crm/agent";
|
||||
|
||||
$(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: 'agentName',
|
||||
title: '代理商名称'
|
||||
},
|
||||
{
|
||||
field: 'agentType',
|
||||
title: '代理商类型'
|
||||
},
|
||||
{
|
||||
field: 'agentLevel',
|
||||
title: '代理商级别'
|
||||
},
|
||||
{
|
||||
field: 'saleAddr',
|
||||
title: '销售地址'
|
||||
},
|
||||
{
|
||||
field: 'authStartTime',
|
||||
title: '授权开始时间'
|
||||
},
|
||||
{
|
||||
field: 'authEndTime',
|
||||
title: '授权结束时间'
|
||||
},
|
||||
{
|
||||
field: 'authStatus',
|
||||
title: '授权有效性(0:失效;1:有效)'
|
||||
},
|
||||
{
|
||||
field: 'firstSale',
|
||||
title: '首次提货量'
|
||||
},
|
||||
{
|
||||
field: 'agentCode',
|
||||
title: '统一社会信用代码'
|
||||
},
|
||||
{
|
||||
field: 'tycUri',
|
||||
title: '天眼查地址'
|
||||
},
|
||||
{
|
||||
field: 'createDate',
|
||||
title: '成立日期'
|
||||
},
|
||||
{
|
||||
field: 'capital',
|
||||
title: '注册资本(万元)'
|
||||
},
|
||||
{
|
||||
field: 'memberNum',
|
||||
title: '员工数量'
|
||||
},
|
||||
{
|
||||
field: 'legalPerson',
|
||||
title: '法人姓名'
|
||||
},
|
||||
{
|
||||
field: 'contactName',
|
||||
title: '第一联系人'
|
||||
},
|
||||
{
|
||||
field: 'contactTel',
|
||||
title: '第一联系人电话'
|
||||
},
|
||||
{
|
||||
field: 'contactName2',
|
||||
title: '第二联系人'
|
||||
},
|
||||
{
|
||||
field: 'contactTel2',
|
||||
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,167 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改代理商管理')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-agent-edit" th:object="${crmAgent}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">代理商名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="agentName" th:field="*{agentName}" 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">
|
||||
<select name="agentType" class="form-control m-b" required>
|
||||
<option value="">所有</option>
|
||||
</select>
|
||||
<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">代理商级别:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="agentLevel" th:field="*{agentLevel}" 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="saleAddr" th:field="*{saleAddr}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">授权开始时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="authStartTime" th:value="${#dates.format(crmAgent.authStartTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">授权结束时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="authEndTime" th:value="${#dates.format(crmAgent.authEndTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">授权有效性(0:失效;1:有效):</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box">
|
||||
<input type="radio" name="authStatus" value="">
|
||||
<label th:for="authStatus" 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">首次提货量:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="firstSale" th:field="*{firstSale}" 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="agentCode" th:field="*{agentCode}" 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="tycUri" th:field="*{tycUri}" 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="createDate" th:field="*{createDate}" 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="capital" th:field="*{capital}" 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="memberNum" th:field="*{memberNum}" 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="legalPerson" th:field="*{legalPerson}" 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="contactName" th:field="*{contactName}" 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="contactTel" th:field="*{contactTel}" 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="contactName2" th:field="*{contactName2}" 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="contactTel2" th:field="*{contactTel2}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "crm/agent";
|
||||
$("#form-agent-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-agent-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='authStartTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("input[name='authEndTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
<repository>
|
||||
<id>wendu-release</id>
|
||||
<name>wendu-release</name>
|
||||
<url>http://repo.wendukeji.cn:6518/repository/maven-releases/</url>
|
||||
<url>http://repo.wendu.cn/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
<repository>
|
||||
<id>wendu-release</id>
|
||||
<name>wendu-release</name>
|
||||
<url>http://repo.wendukeji.cn:6518/repository/maven-releases/</url>
|
||||
<url>http://repo.wendu.cn/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<repository>
|
||||
<id>wendu-release</id>
|
||||
<name>wendu-release</name>
|
||||
<url>http://repo.wendukeji.cn:6518/repository/maven-releases/</url>
|
||||
<url>http://repo.wendu.cn/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
|
|
|
|||
|
|
@ -257,8 +257,8 @@ public class GenTableServiceImpl implements IGenTableService
|
|||
List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory());
|
||||
for (String template : templates)
|
||||
{
|
||||
if (!StringUtils.contains(template, "sql.vm"))
|
||||
{
|
||||
// if (!StringUtils.contains(template, "sql.vm"))
|
||||
// {
|
||||
// 渲染模板
|
||||
StringWriter sw = new StringWriter();
|
||||
Template tpl = Velocity.getTemplate(template, Constants.UTF8);
|
||||
|
|
@ -272,7 +272,7 @@ public class GenTableServiceImpl implements IGenTableService
|
|||
{
|
||||
throw new BusinessException("渲染模板失败,表名:" + table.getTableName());
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# 代码生成
|
||||
gen:
|
||||
# 作者
|
||||
author: ruoyi
|
||||
author: wendukeji
|
||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||
packageName: com.ruoyi.system
|
||||
# 自动去除表前缀,默认是false
|
||||
|
|
|
|||
|
|
@ -36,5 +36,19 @@
|
|||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>wendu-release</id>
|
||||
<name>wendu-release</name>
|
||||
<url>http://repo.wendu.cn/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<repository>
|
||||
<id>wendu-release</id>
|
||||
<name>wendu-release</name>
|
||||
<url>http://repo.wendukeji.cn:6518/repository/maven-releases/</url>
|
||||
<url>http://repo.wendu.cn/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.6.1</version>
|
||||
</parent>
|
||||
<artifactId>zklz-crm</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>4.6.1</version>
|
||||
</dependency> <!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
<version>4.6.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>wendu-release</id>
|
||||
<name>wendu-release</name>
|
||||
<url>http://repo.wendu.cn/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package com.ruoyi.crm.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.crm.domain.CrmAgent;
|
||||
import com.ruoyi.crm.service.ICrmAgentService;
|
||||
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 wendukeji.cn
|
||||
* @date 2021-06-30
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/crm/agent")
|
||||
public class CrmAgentController extends BaseController
|
||||
{
|
||||
private String prefix = "crm/agent";
|
||||
|
||||
@Autowired
|
||||
private ICrmAgentService crmAgentService;
|
||||
|
||||
@RequiresPermissions("crm:agent:view")
|
||||
@GetMapping()
|
||||
public String agent()
|
||||
{
|
||||
return prefix + "/agent";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询代理商管理列表
|
||||
*/
|
||||
@RequiresPermissions("crm:agent:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(CrmAgent crmAgent)
|
||||
{
|
||||
startPage();
|
||||
List<CrmAgent> list = crmAgentService.selectCrmAgentList(crmAgent);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出代理商管理列表
|
||||
*/
|
||||
@RequiresPermissions("crm:agent:export")
|
||||
@Log(title = "代理商管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(CrmAgent crmAgent)
|
||||
{
|
||||
List<CrmAgent> list = crmAgentService.selectCrmAgentList(crmAgent);
|
||||
ExcelUtil<CrmAgent> util = new ExcelUtil<CrmAgent>(CrmAgent.class);
|
||||
return util.exportExcel(list, "代理商管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增代理商管理
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存代理商管理
|
||||
*/
|
||||
@RequiresPermissions("crm:agent:add")
|
||||
@Log(title = "代理商管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(CrmAgent crmAgent)
|
||||
{
|
||||
return toAjax(crmAgentService.insertCrmAgent(crmAgent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改代理商管理
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
CrmAgent crmAgent = crmAgentService.selectCrmAgentById(id);
|
||||
mmap.put("crmAgent", crmAgent);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存代理商管理
|
||||
*/
|
||||
@RequiresPermissions("crm:agent:edit")
|
||||
@Log(title = "代理商管理", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(CrmAgent crmAgent)
|
||||
{
|
||||
return toAjax(crmAgentService.updateCrmAgent(crmAgent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除代理商管理
|
||||
*/
|
||||
@RequiresPermissions("crm:agent:remove")
|
||||
@Log(title = "代理商管理", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(crmAgentService.deleteCrmAgentByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,311 @@
|
|||
package com.ruoyi.crm.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 代理商管理对象 crm_agent
|
||||
*
|
||||
* @author wendukeji.cn
|
||||
* @date 2021-06-30
|
||||
*/
|
||||
public class CrmAgent extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 数据编号 */
|
||||
private Long id;
|
||||
|
||||
/** 代理商名称 */
|
||||
@Excel(name = "代理商名称")
|
||||
private String agentName;
|
||||
|
||||
/** 代理商类型 */
|
||||
@Excel(name = "代理商类型")
|
||||
private String agentType;
|
||||
|
||||
/** 代理商级别 */
|
||||
@Excel(name = "代理商级别")
|
||||
private String agentLevel;
|
||||
|
||||
/** 销售地址 */
|
||||
@Excel(name = "销售地址")
|
||||
private String saleAddr;
|
||||
|
||||
/** 授权开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "授权开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date authStartTime;
|
||||
|
||||
/** 授权结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "授权结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date authEndTime;
|
||||
|
||||
/** 授权有效性(0:失效;1:有效) */
|
||||
@Excel(name = "授权有效性(0:失效;1:有效)")
|
||||
private String authStatus;
|
||||
|
||||
/** 首次提货量 */
|
||||
@Excel(name = "首次提货量")
|
||||
private Long firstSale;
|
||||
|
||||
/** 统一社会信用代码 */
|
||||
@Excel(name = "统一社会信用代码")
|
||||
private String agentCode;
|
||||
|
||||
/** 天眼查地址 */
|
||||
@Excel(name = "天眼查地址")
|
||||
private String tycUri;
|
||||
|
||||
/** 成立日期 */
|
||||
@Excel(name = "成立日期")
|
||||
private String createDate;
|
||||
|
||||
/** 注册资本(万元) */
|
||||
@Excel(name = "注册资本(万元)")
|
||||
private Long capital;
|
||||
|
||||
/** 员工数量 */
|
||||
@Excel(name = "员工数量")
|
||||
private Long memberNum;
|
||||
|
||||
/** 法人姓名 */
|
||||
@Excel(name = "法人姓名")
|
||||
private String legalPerson;
|
||||
|
||||
/** 第一联系人 */
|
||||
@Excel(name = "第一联系人")
|
||||
private String contactName;
|
||||
|
||||
/** 第一联系人电话 */
|
||||
@Excel(name = "第一联系人电话")
|
||||
private String contactTel;
|
||||
|
||||
/** 第二联系人 */
|
||||
@Excel(name = "第二联系人")
|
||||
private String contactName2;
|
||||
|
||||
/** 第二联系人电话 */
|
||||
@Excel(name = "第二联系人电话")
|
||||
private String contactTel2;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAgentName(String agentName)
|
||||
{
|
||||
this.agentName = agentName;
|
||||
}
|
||||
|
||||
public String getAgentName()
|
||||
{
|
||||
return agentName;
|
||||
}
|
||||
public void setAgentType(String agentType)
|
||||
{
|
||||
this.agentType = agentType;
|
||||
}
|
||||
|
||||
public String getAgentType()
|
||||
{
|
||||
return agentType;
|
||||
}
|
||||
public void setAgentLevel(String agentLevel)
|
||||
{
|
||||
this.agentLevel = agentLevel;
|
||||
}
|
||||
|
||||
public String getAgentLevel()
|
||||
{
|
||||
return agentLevel;
|
||||
}
|
||||
public void setSaleAddr(String saleAddr)
|
||||
{
|
||||
this.saleAddr = saleAddr;
|
||||
}
|
||||
|
||||
public String getSaleAddr()
|
||||
{
|
||||
return saleAddr;
|
||||
}
|
||||
public void setAuthStartTime(Date authStartTime)
|
||||
{
|
||||
this.authStartTime = authStartTime;
|
||||
}
|
||||
|
||||
public Date getAuthStartTime()
|
||||
{
|
||||
return authStartTime;
|
||||
}
|
||||
public void setAuthEndTime(Date authEndTime)
|
||||
{
|
||||
this.authEndTime = authEndTime;
|
||||
}
|
||||
|
||||
public Date getAuthEndTime()
|
||||
{
|
||||
return authEndTime;
|
||||
}
|
||||
public void setAuthStatus(String authStatus)
|
||||
{
|
||||
this.authStatus = authStatus;
|
||||
}
|
||||
|
||||
public String getAuthStatus()
|
||||
{
|
||||
return authStatus;
|
||||
}
|
||||
public void setFirstSale(Long firstSale)
|
||||
{
|
||||
this.firstSale = firstSale;
|
||||
}
|
||||
|
||||
public Long getFirstSale()
|
||||
{
|
||||
return firstSale;
|
||||
}
|
||||
public void setAgentCode(String agentCode)
|
||||
{
|
||||
this.agentCode = agentCode;
|
||||
}
|
||||
|
||||
public String getAgentCode()
|
||||
{
|
||||
return agentCode;
|
||||
}
|
||||
public void setTycUri(String tycUri)
|
||||
{
|
||||
this.tycUri = tycUri;
|
||||
}
|
||||
|
||||
public String getTycUri()
|
||||
{
|
||||
return tycUri;
|
||||
}
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
public void setCapital(Long capital)
|
||||
{
|
||||
this.capital = capital;
|
||||
}
|
||||
|
||||
public Long getCapital()
|
||||
{
|
||||
return capital;
|
||||
}
|
||||
public void setMemberNum(Long memberNum)
|
||||
{
|
||||
this.memberNum = memberNum;
|
||||
}
|
||||
|
||||
public Long getMemberNum()
|
||||
{
|
||||
return memberNum;
|
||||
}
|
||||
public void setLegalPerson(String legalPerson)
|
||||
{
|
||||
this.legalPerson = legalPerson;
|
||||
}
|
||||
|
||||
public String getLegalPerson()
|
||||
{
|
||||
return legalPerson;
|
||||
}
|
||||
public void setContactName(String contactName)
|
||||
{
|
||||
this.contactName = contactName;
|
||||
}
|
||||
|
||||
public String getContactName()
|
||||
{
|
||||
return contactName;
|
||||
}
|
||||
public void setContactTel(String contactTel)
|
||||
{
|
||||
this.contactTel = contactTel;
|
||||
}
|
||||
|
||||
public String getContactTel()
|
||||
{
|
||||
return contactTel;
|
||||
}
|
||||
public void setContactName2(String contactName2)
|
||||
{
|
||||
this.contactName2 = contactName2;
|
||||
}
|
||||
|
||||
public String getContactName2()
|
||||
{
|
||||
return contactName2;
|
||||
}
|
||||
public void setContactTel2(String contactTel2)
|
||||
{
|
||||
this.contactTel2 = contactTel2;
|
||||
}
|
||||
|
||||
public String getContactTel2()
|
||||
{
|
||||
return contactTel2;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("agentName", getAgentName())
|
||||
.append("agentType", getAgentType())
|
||||
.append("agentLevel", getAgentLevel())
|
||||
.append("saleAddr", getSaleAddr())
|
||||
.append("authStartTime", getAuthStartTime())
|
||||
.append("authEndTime", getAuthEndTime())
|
||||
.append("authStatus", getAuthStatus())
|
||||
.append("firstSale", getFirstSale())
|
||||
.append("agentCode", getAgentCode())
|
||||
.append("tycUri", getTycUri())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("capital", getCapital())
|
||||
.append("memberNum", getMemberNum())
|
||||
.append("legalPerson", getLegalPerson())
|
||||
.append("contactName", getContactName())
|
||||
.append("contactTel", getContactTel())
|
||||
.append("contactName2", getContactName2())
|
||||
.append("contactTel2", getContactTel2())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.crm.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.crm.domain.CrmAgent;
|
||||
|
||||
/**
|
||||
* 代理商管理Mapper接口
|
||||
*
|
||||
* @author wendukeji.cn
|
||||
* @date 2021-06-30
|
||||
*/
|
||||
public interface CrmAgentMapper
|
||||
{
|
||||
/**
|
||||
* 查询代理商管理
|
||||
*
|
||||
* @param id 代理商管理ID
|
||||
* @return 代理商管理
|
||||
*/
|
||||
public CrmAgent selectCrmAgentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询代理商管理列表
|
||||
*
|
||||
* @param crmAgent 代理商管理
|
||||
* @return 代理商管理集合
|
||||
*/
|
||||
public List<CrmAgent> selectCrmAgentList(CrmAgent crmAgent);
|
||||
|
||||
/**
|
||||
* 新增代理商管理
|
||||
*
|
||||
* @param crmAgent 代理商管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCrmAgent(CrmAgent crmAgent);
|
||||
|
||||
/**
|
||||
* 修改代理商管理
|
||||
*
|
||||
* @param crmAgent 代理商管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCrmAgent(CrmAgent crmAgent);
|
||||
|
||||
/**
|
||||
* 删除代理商管理
|
||||
*
|
||||
* @param id 代理商管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCrmAgentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除代理商管理
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCrmAgentByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.crm.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.crm.domain.CrmAgent;
|
||||
|
||||
/**
|
||||
* 代理商管理Service接口
|
||||
*
|
||||
* @author wendukeji.cn
|
||||
* @date 2021-06-30
|
||||
*/
|
||||
public interface ICrmAgentService
|
||||
{
|
||||
/**
|
||||
* 查询代理商管理
|
||||
*
|
||||
* @param id 代理商管理ID
|
||||
* @return 代理商管理
|
||||
*/
|
||||
public CrmAgent selectCrmAgentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询代理商管理列表
|
||||
*
|
||||
* @param crmAgent 代理商管理
|
||||
* @return 代理商管理集合
|
||||
*/
|
||||
public List<CrmAgent> selectCrmAgentList(CrmAgent crmAgent);
|
||||
|
||||
/**
|
||||
* 新增代理商管理
|
||||
*
|
||||
* @param crmAgent 代理商管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCrmAgent(CrmAgent crmAgent);
|
||||
|
||||
/**
|
||||
* 修改代理商管理
|
||||
*
|
||||
* @param crmAgent 代理商管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCrmAgent(CrmAgent crmAgent);
|
||||
|
||||
/**
|
||||
* 批量删除代理商管理
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCrmAgentByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除代理商管理信息
|
||||
*
|
||||
* @param id 代理商管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCrmAgentById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.ruoyi.crm.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.crm.mapper.CrmAgentMapper;
|
||||
import com.ruoyi.crm.domain.CrmAgent;
|
||||
import com.ruoyi.crm.service.ICrmAgentService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 代理商管理Service业务层处理
|
||||
*
|
||||
* @author wendukeji.cn
|
||||
* @date 2021-06-30
|
||||
*/
|
||||
@Service
|
||||
public class CrmAgentServiceImpl implements ICrmAgentService
|
||||
{
|
||||
@Autowired
|
||||
private CrmAgentMapper crmAgentMapper;
|
||||
|
||||
/**
|
||||
* 查询代理商管理
|
||||
*
|
||||
* @param id 代理商管理ID
|
||||
* @return 代理商管理
|
||||
*/
|
||||
@Override
|
||||
public CrmAgent selectCrmAgentById(Long id)
|
||||
{
|
||||
return crmAgentMapper.selectCrmAgentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询代理商管理列表
|
||||
*
|
||||
* @param crmAgent 代理商管理
|
||||
* @return 代理商管理
|
||||
*/
|
||||
@Override
|
||||
public List<CrmAgent> selectCrmAgentList(CrmAgent crmAgent)
|
||||
{
|
||||
return crmAgentMapper.selectCrmAgentList(crmAgent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增代理商管理
|
||||
*
|
||||
* @param crmAgent 代理商管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCrmAgent(CrmAgent crmAgent)
|
||||
{
|
||||
crmAgent.setCreateTime(DateUtils.getNowDate());
|
||||
return crmAgentMapper.insertCrmAgent(crmAgent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改代理商管理
|
||||
*
|
||||
* @param crmAgent 代理商管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCrmAgent(CrmAgent crmAgent)
|
||||
{
|
||||
crmAgent.setUpdateTime(DateUtils.getNowDate());
|
||||
return crmAgentMapper.updateCrmAgent(crmAgent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除代理商管理对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCrmAgentByIds(String ids)
|
||||
{
|
||||
return crmAgentMapper.deleteCrmAgentByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除代理商管理信息
|
||||
*
|
||||
* @param id 代理商管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCrmAgentById(Long id)
|
||||
{
|
||||
return crmAgentMapper.deleteCrmAgentById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
<?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.crm.mapper.CrmAgentMapper">
|
||||
|
||||
<resultMap type="CrmAgent" id="CrmAgentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="agentName" column="agent_name" />
|
||||
<result property="agentType" column="agent_type" />
|
||||
<result property="agentLevel" column="agent_level" />
|
||||
<result property="saleAddr" column="sale_addr" />
|
||||
<result property="authStartTime" column="auth_start_time" />
|
||||
<result property="authEndTime" column="auth_end_time" />
|
||||
<result property="authStatus" column="auth_status" />
|
||||
<result property="firstSale" column="first_sale" />
|
||||
<result property="agentCode" column="agent_code" />
|
||||
<result property="tycUri" column="tyc_uri" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="capital" column="capital" />
|
||||
<result property="memberNum" column="member_num" />
|
||||
<result property="legalPerson" column="legal_person" />
|
||||
<result property="contactName" column="contact_name" />
|
||||
<result property="contactTel" column="contact_tel" />
|
||||
<result property="contactName2" column="contact_name2" />
|
||||
<result property="contactTel2" column="contact_tel2" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<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="selectCrmAgentVo">
|
||||
select id, agent_name, agent_type, agent_level, sale_addr, auth_start_time, auth_end_time, auth_status, first_sale, agent_code, tyc_uri, create_date, capital, member_num, legal_person, contact_name, contact_tel, contact_name2, contact_tel2, del_flag, create_by, create_time, update_by, update_time, remark from crm_agent
|
||||
</sql>
|
||||
|
||||
<select id="selectCrmAgentList" parameterType="CrmAgent" resultMap="CrmAgentResult">
|
||||
<include refid="selectCrmAgentVo"/>
|
||||
<where>
|
||||
<if test="agentName != null and agentName != ''"> and agent_name like concat('%', #{agentName}, '%')</if>
|
||||
<if test="agentType != null and agentType != ''"> and agent_type = #{agentType}</if>
|
||||
<if test="agentLevel != null and agentLevel != ''"> and agent_level = #{agentLevel}</if>
|
||||
<if test="saleAddr != null and saleAddr != ''"> and sale_addr = #{saleAddr}</if>
|
||||
<if test="authStartTime != null "> and auth_start_time = #{authStartTime}</if>
|
||||
<if test="authEndTime != null "> and auth_end_time = #{authEndTime}</if>
|
||||
<if test="authStatus != null and authStatus != ''"> and auth_status = #{authStatus}</if>
|
||||
<if test="firstSale != null "> and first_sale = #{firstSale}</if>
|
||||
<if test="agentCode != null and agentCode != ''"> and agent_code = #{agentCode}</if>
|
||||
<if test="tycUri != null and tycUri != ''"> and tyc_uri = #{tycUri}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
|
||||
<if test="capital != null "> and capital = #{capital}</if>
|
||||
<if test="memberNum != null "> and member_num = #{memberNum}</if>
|
||||
<if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
|
||||
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
||||
<if test="contactTel != null and contactTel != ''"> and contact_tel = #{contactTel}</if>
|
||||
<if test="contactName2 != null and contactName2 != ''"> and contact_name2 = #{contactName2}</if>
|
||||
<if test="contactTel2 != null and contactTel2 != ''"> and contact_tel2 = #{contactTel2}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCrmAgentById" parameterType="Long" resultMap="CrmAgentResult">
|
||||
<include refid="selectCrmAgentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCrmAgent" parameterType="CrmAgent">
|
||||
insert into crm_agent
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="agentName != null and agentName != ''">agent_name,</if>
|
||||
<if test="agentType != null and agentType != ''">agent_type,</if>
|
||||
<if test="agentLevel != null">agent_level,</if>
|
||||
<if test="saleAddr != null">sale_addr,</if>
|
||||
<if test="authStartTime != null">auth_start_time,</if>
|
||||
<if test="authEndTime != null">auth_end_time,</if>
|
||||
<if test="authStatus != null">auth_status,</if>
|
||||
<if test="firstSale != null">first_sale,</if>
|
||||
<if test="agentCode != null">agent_code,</if>
|
||||
<if test="tycUri != null">tyc_uri,</if>
|
||||
<if test="createDate != null">create_date,</if>
|
||||
<if test="capital != null">capital,</if>
|
||||
<if test="memberNum != null">member_num,</if>
|
||||
<if test="legalPerson != null">legal_person,</if>
|
||||
<if test="contactName != null">contact_name,</if>
|
||||
<if test="contactTel != null">contact_tel,</if>
|
||||
<if test="contactName2 != null">contact_name2,</if>
|
||||
<if test="contactTel2 != null">contact_tel2,</if>
|
||||
<if test="delFlag != null">del_flag,</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="id != null">#{id},</if>
|
||||
<if test="agentName != null and agentName != ''">#{agentName},</if>
|
||||
<if test="agentType != null and agentType != ''">#{agentType},</if>
|
||||
<if test="agentLevel != null">#{agentLevel},</if>
|
||||
<if test="saleAddr != null">#{saleAddr},</if>
|
||||
<if test="authStartTime != null">#{authStartTime},</if>
|
||||
<if test="authEndTime != null">#{authEndTime},</if>
|
||||
<if test="authStatus != null">#{authStatus},</if>
|
||||
<if test="firstSale != null">#{firstSale},</if>
|
||||
<if test="agentCode != null">#{agentCode},</if>
|
||||
<if test="tycUri != null">#{tycUri},</if>
|
||||
<if test="createDate != null">#{createDate},</if>
|
||||
<if test="capital != null">#{capital},</if>
|
||||
<if test="memberNum != null">#{memberNum},</if>
|
||||
<if test="legalPerson != null">#{legalPerson},</if>
|
||||
<if test="contactName != null">#{contactName},</if>
|
||||
<if test="contactTel != null">#{contactTel},</if>
|
||||
<if test="contactName2 != null">#{contactName2},</if>
|
||||
<if test="contactTel2 != null">#{contactTel2},</if>
|
||||
<if test="delFlag != null">#{delFlag},</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="updateCrmAgent" parameterType="CrmAgent">
|
||||
update crm_agent
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="agentName != null and agentName != ''">agent_name = #{agentName},</if>
|
||||
<if test="agentType != null and agentType != ''">agent_type = #{agentType},</if>
|
||||
<if test="agentLevel != null">agent_level = #{agentLevel},</if>
|
||||
<if test="saleAddr != null">sale_addr = #{saleAddr},</if>
|
||||
<if test="authStartTime != null">auth_start_time = #{authStartTime},</if>
|
||||
<if test="authEndTime != null">auth_end_time = #{authEndTime},</if>
|
||||
<if test="authStatus != null">auth_status = #{authStatus},</if>
|
||||
<if test="firstSale != null">first_sale = #{firstSale},</if>
|
||||
<if test="agentCode != null">agent_code = #{agentCode},</if>
|
||||
<if test="tycUri != null">tyc_uri = #{tycUri},</if>
|
||||
<if test="createDate != null">create_date = #{createDate},</if>
|
||||
<if test="capital != null">capital = #{capital},</if>
|
||||
<if test="memberNum != null">member_num = #{memberNum},</if>
|
||||
<if test="legalPerson != null">legal_person = #{legalPerson},</if>
|
||||
<if test="contactName != null">contact_name = #{contactName},</if>
|
||||
<if test="contactTel != null">contact_tel = #{contactTel},</if>
|
||||
<if test="contactName2 != null">contact_name2 = #{contactName2},</if>
|
||||
<if test="contactTel2 != null">contact_tel2 = #{contactTel2},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</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="deleteCrmAgentById" parameterType="Long">
|
||||
delete from crm_agent where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCrmAgentByIds" parameterType="String">
|
||||
delete from crm_agent where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue