From d236c93f4d9f61850c255ec9711e4141224535d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=9B=85=E5=90=84=E5=B8=83=E5=A5=87?= <676422208@qq.com>
Date: Wed, 30 Jun 2021 18:54:40 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Ecrm=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 3 +-
ruoyi-admin/pom.xml | 6 +
.../resources/templates/crm/agent/add.html | 172 ++++++++++
.../resources/templates/crm/agent/agent.html | 232 +++++++++++++
.../resources/templates/crm/agent/edit.html | 167 ++++++++++
ruoyi-common/pom.xml | 2 +-
ruoyi-framework/pom.xml | 2 +-
ruoyi-generator/pom.xml | 2 +-
.../service/impl/GenTableServiceImpl.java | 6 +-
.../src/main/resources/generator.yml | 2 +-
ruoyi-quartz/pom.xml | 16 +-
ruoyi-system/pom.xml | 2 +-
zklz-crm/pom.xml | 39 +++
.../crm/controller/CrmAgentController.java | 126 +++++++
.../java/com/ruoyi/crm/domain/CrmAgent.java | 311 ++++++++++++++++++
.../com/ruoyi/crm/mapper/CrmAgentMapper.java | 61 ++++
.../ruoyi/crm/service/ICrmAgentService.java | 61 ++++
.../crm/service/impl/CrmAgentServiceImpl.java | 97 ++++++
.../resources/mapper/crm/CrmAgentMapper.xml | 168 ++++++++++
19 files changed, 1465 insertions(+), 10 deletions(-)
create mode 100644 ruoyi-admin/src/main/resources/templates/crm/agent/add.html
create mode 100644 ruoyi-admin/src/main/resources/templates/crm/agent/agent.html
create mode 100644 ruoyi-admin/src/main/resources/templates/crm/agent/edit.html
create mode 100644 zklz-crm/pom.xml
create mode 100644 zklz-crm/src/main/java/com/ruoyi/crm/controller/CrmAgentController.java
create mode 100644 zklz-crm/src/main/java/com/ruoyi/crm/domain/CrmAgent.java
create mode 100644 zklz-crm/src/main/java/com/ruoyi/crm/mapper/CrmAgentMapper.java
create mode 100644 zklz-crm/src/main/java/com/ruoyi/crm/service/ICrmAgentService.java
create mode 100644 zklz-crm/src/main/java/com/ruoyi/crm/service/impl/CrmAgentServiceImpl.java
create mode 100644 zklz-crm/src/main/resources/mapper/crm/CrmAgentMapper.xml
diff --git a/pom.xml b/pom.xml
index 648191d4e..556a9b5d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -228,6 +228,7 @@
ruoyi-quartz
ruoyi-generator
ruoyi-common
+ zklz-crm
pom
@@ -252,7 +253,7 @@
wendu-release
wendu-release
- http://repo.wendukeji.cn:6518/repository/maven-releases/
+ http://repo.wendu.cn/repository/maven-releases/
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index c2c0c516e..38e808e29 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -67,6 +67,12 @@
ruoyi-generator
+
+ com.ruoyi
+ zklz-crm
+ 4.6.1
+
+
diff --git a/ruoyi-admin/src/main/resources/templates/crm/agent/add.html b/ruoyi-admin/src/main/resources/templates/crm/agent/add.html
new file mode 100644
index 000000000..e4e462870
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/crm/agent/add.html
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/crm/agent/agent.html b/ruoyi-admin/src/main/resources/templates/crm/agent/agent.html
new file mode 100644
index 000000000..b98e97b97
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/crm/agent/agent.html
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/crm/agent/edit.html b/ruoyi-admin/src/main/resources/templates/crm/agent/edit.html
new file mode 100644
index 000000000..a7ceac4b3
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/crm/agent/edit.html
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml
index b8bedde6e..96b4b3c75 100644
--- a/ruoyi-common/pom.xml
+++ b/ruoyi-common/pom.xml
@@ -114,7 +114,7 @@
wendu-release
wendu-release
- http://repo.wendukeji.cn:6518/repository/maven-releases/
+ http://repo.wendu.cn/repository/maven-releases/
diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml
index 7768d17b7..ec3959e9b 100644
--- a/ruoyi-framework/pom.xml
+++ b/ruoyi-framework/pom.xml
@@ -90,7 +90,7 @@
wendu-release
wendu-release
- http://repo.wendukeji.cn:6518/repository/maven-releases/
+ http://repo.wendu.cn/repository/maven-releases/
diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml
index 788b8042b..799276eb5 100644
--- a/ruoyi-generator/pom.xml
+++ b/ruoyi-generator/pom.xml
@@ -42,7 +42,7 @@
wendu-release
wendu-release
- http://repo.wendukeji.cn:6518/repository/maven-releases/
+ http://repo.wendu.cn/repository/maven-releases/
diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java
index b809d6a37..05949b0b5 100644
--- a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java
+++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java
@@ -257,8 +257,8 @@ public class GenTableServiceImpl implements IGenTableService
List 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());
}
- }
+// }
}
}
diff --git a/ruoyi-generator/src/main/resources/generator.yml b/ruoyi-generator/src/main/resources/generator.yml
index f3792cdc6..989f2d7d4 100644
--- a/ruoyi-generator/src/main/resources/generator.yml
+++ b/ruoyi-generator/src/main/resources/generator.yml
@@ -2,7 +2,7 @@
# 代码生成
gen:
# 作者
- author: ruoyi
+ author: wendukeji
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.system
# 自动去除表前缀,默认是false
diff --git a/ruoyi-quartz/pom.xml b/ruoyi-quartz/pom.xml
index 24448704a..05117b6bd 100644
--- a/ruoyi-quartz/pom.xml
+++ b/ruoyi-quartz/pom.xml
@@ -36,5 +36,19 @@
-
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+
+
+
+ wendu-release
+ wendu-release
+ http://repo.wendu.cn/repository/maven-releases/
+
+
\ No newline at end of file
diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml
index 7d250dfb6..b93f4a0a0 100644
--- a/ruoyi-system/pom.xml
+++ b/ruoyi-system/pom.xml
@@ -36,7 +36,7 @@
wendu-release
wendu-release
- http://repo.wendukeji.cn:6518/repository/maven-releases/
+ http://repo.wendu.cn/repository/maven-releases/
diff --git a/zklz-crm/pom.xml b/zklz-crm/pom.xml
new file mode 100644
index 000000000..534f8aa4d
--- /dev/null
+++ b/zklz-crm/pom.xml
@@ -0,0 +1,39 @@
+
+
+
+ 4.0.0
+
+ ruoyi
+ com.ruoyi
+ 4.6.1
+
+ zklz-crm
+
+
+ com.ruoyi
+ ruoyi-common
+ 4.6.1
+
+
+ com.ruoyi
+ ruoyi-framework
+ 4.6.1
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+
+
+
+ wendu-release
+ wendu-release
+ http://repo.wendu.cn/repository/maven-releases/
+
+
+
diff --git a/zklz-crm/src/main/java/com/ruoyi/crm/controller/CrmAgentController.java b/zklz-crm/src/main/java/com/ruoyi/crm/controller/CrmAgentController.java
new file mode 100644
index 000000000..5f1022b3c
--- /dev/null
+++ b/zklz-crm/src/main/java/com/ruoyi/crm/controller/CrmAgentController.java
@@ -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 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 list = crmAgentService.selectCrmAgentList(crmAgent);
+ ExcelUtil util = new ExcelUtil(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));
+ }
+}
diff --git a/zklz-crm/src/main/java/com/ruoyi/crm/domain/CrmAgent.java b/zklz-crm/src/main/java/com/ruoyi/crm/domain/CrmAgent.java
new file mode 100644
index 000000000..3170f25c8
--- /dev/null
+++ b/zklz-crm/src/main/java/com/ruoyi/crm/domain/CrmAgent.java
@@ -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();
+ }
+}
diff --git a/zklz-crm/src/main/java/com/ruoyi/crm/mapper/CrmAgentMapper.java b/zklz-crm/src/main/java/com/ruoyi/crm/mapper/CrmAgentMapper.java
new file mode 100644
index 000000000..89cc5d84d
--- /dev/null
+++ b/zklz-crm/src/main/java/com/ruoyi/crm/mapper/CrmAgentMapper.java
@@ -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 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);
+}
diff --git a/zklz-crm/src/main/java/com/ruoyi/crm/service/ICrmAgentService.java b/zklz-crm/src/main/java/com/ruoyi/crm/service/ICrmAgentService.java
new file mode 100644
index 000000000..0a8a2bedb
--- /dev/null
+++ b/zklz-crm/src/main/java/com/ruoyi/crm/service/ICrmAgentService.java
@@ -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 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);
+}
diff --git a/zklz-crm/src/main/java/com/ruoyi/crm/service/impl/CrmAgentServiceImpl.java b/zklz-crm/src/main/java/com/ruoyi/crm/service/impl/CrmAgentServiceImpl.java
new file mode 100644
index 000000000..d946610bc
--- /dev/null
+++ b/zklz-crm/src/main/java/com/ruoyi/crm/service/impl/CrmAgentServiceImpl.java
@@ -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 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);
+ }
+}
diff --git a/zklz-crm/src/main/resources/mapper/crm/CrmAgentMapper.xml b/zklz-crm/src/main/resources/mapper/crm/CrmAgentMapper.xml
new file mode 100644
index 000000000..d48dc8f5a
--- /dev/null
+++ b/zklz-crm/src/main/resources/mapper/crm/CrmAgentMapper.xml
@@ -0,0 +1,168 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+
+
+
+
+
+ insert into crm_agent
+
+ 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,
+
+
+ #{id},
+ #{agentName},
+ #{agentType},
+ #{agentLevel},
+ #{saleAddr},
+ #{authStartTime},
+ #{authEndTime},
+ #{authStatus},
+ #{firstSale},
+ #{agentCode},
+ #{tycUri},
+ #{createDate},
+ #{capital},
+ #{memberNum},
+ #{legalPerson},
+ #{contactName},
+ #{contactTel},
+ #{contactName2},
+ #{contactTel2},
+ #{delFlag},
+ #{createBy},
+ #{createTime},
+ #{updateBy},
+ #{updateTime},
+ #{remark},
+
+
+
+
+ update crm_agent
+
+ agent_name = #{agentName},
+ agent_type = #{agentType},
+ agent_level = #{agentLevel},
+ sale_addr = #{saleAddr},
+ auth_start_time = #{authStartTime},
+ auth_end_time = #{authEndTime},
+ auth_status = #{authStatus},
+ first_sale = #{firstSale},
+ agent_code = #{agentCode},
+ tyc_uri = #{tycUri},
+ create_date = #{createDate},
+ capital = #{capital},
+ member_num = #{memberNum},
+ legal_person = #{legalPerson},
+ contact_name = #{contactName},
+ contact_tel = #{contactTel},
+ contact_name2 = #{contactName2},
+ contact_tel2 = #{contactTel2},
+ del_flag = #{delFlag},
+ create_by = #{createBy},
+ create_time = #{createTime},
+ update_by = #{updateBy},
+ update_time = #{updateTime},
+ remark = #{remark},
+
+ where id = #{id}
+
+
+
+ delete from crm_agent where id = #{id}
+
+
+
+ delete from crm_agent where id in
+
+ #{id}
+
+
+
+
\ No newline at end of file