From ac404e7c895f3c8fce1c7bb17aec8ede48585a91 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 17:09:44 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=A1=B6=E7=BA=A7=E9=83=A8=E9=97=A8=E4=BF=A1=E6=81=AF=E6=97=B6?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index e7035fc8d..3f7204bcc 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -60,7 +60,7 @@ public class SysDeptServiceImpl implements ISysDeptService /** * 查询部门管理树(排除下级) * - * @param deptId 部门ID + * @param dept 部门 * @return 所有部门信息 */ @Override @@ -243,8 +243,10 @@ public class SysDeptServiceImpl implements ISysDeptService private void updateParentDeptStatusNormal(SysDept dept) { String ancestors = dept.getAncestors(); - Long[] deptIds = Convert.toLongArray(ancestors); - deptMapper.updateDeptStatusNormal(deptIds); + if(org.apache.commons.lang3.StringUtils.isNotBlank(ancestors)) { + Long[] deptIds = Convert.toLongArray(ancestors); + deptMapper.updateDeptStatusNormal(deptIds); + } } /** From 234bbebd417a295da5ab5a1d8c776e799acd52e7 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 17:20:49 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 30 +--- ruoyi-admin/pom.xml | 34 +---- .../main/java/com/ruoyi/RuoYiApplication.java | 14 +- .../com/ruoyi/RuoYiServletInitializer.java | 18 --- .../src/main/resources/application-druid.yml | 10 +- .../src/main/resources/application.yml | 4 +- ruoyi-admin/src/main/resources/banner.txt | 2 +- ruoyi-admin/src/main/resources/logback.xml | 2 +- ruoyi-common/pom.xml | 15 ++ ruoyi-framework/pom.xml | 141 ++++++++++-------- ruoyi-generator/pom.xml | 15 ++ ruoyi-system/pom.xml | 15 ++ 12 files changed, 148 insertions(+), 152 deletions(-) delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java diff --git a/pom.xml b/pom.xml index 5f81e13e3..648191d4e 100644 --- a/pom.xml +++ b/pom.xml @@ -232,9 +232,6 @@ pom - - - @@ -251,29 +248,12 @@ - + - public - aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ - - true - + wendu-release + wendu-release + http://repo.wendukeji.cn:6518/repository/maven-releases/ - - - - - public - aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ - - true - - - false - - - + \ No newline at end of file diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index e29eeaf3c..c2c0c516e 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -94,39 +94,7 @@ false ${project.artifactId} - - + ${project.artifactId} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index a0e726bd4..26aa83be7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -3,15 +3,16 @@ package com.ruoyi; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; /** * 启动程序 - * - * @author ruoyi */ @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) -public class RuoYiApplication -{ +public class RuoYiApplication extends SpringBootServletInitializer { + + public static void main(String[] args) { // System.setProperty("spring.devtools.restart.enabled", "false"); @@ -27,4 +28,9 @@ public class RuoYiApplication " | | \\ / \\ / \n" + " ''-' `'-' `-..-' "); } + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(RuoYiApplication.class); + } + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java deleted file mode 100644 index 9d82a2378..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.ruoyi; - -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; - -/** - * web容器中进行部署 - * - * @author ruoyi - */ -public class RuoYiServletInitializer extends SpringBootServletInitializer -{ - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) - { - return application.sources(RuoYiApplication.class); - } -} diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 3c46fd50b..7124e29b7 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,9 +6,9 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: password + url: jdbc:mysql://47.111.160.177:6321/zklz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: zklz + password: zKlz_2021! # 从库数据源 slave: # 从数据源开关/默认关闭 @@ -43,8 +43,8 @@ spring: allow: url-pattern: /druid/* # 控制台管理用户名和密码 - login-username: ruoyi - login-password: 123456 + login-username: root + login-password: jacobKing filter: stat: enabled: true diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index cf8cb187b..b927f8f04 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -9,14 +9,14 @@ ruoyi: # 实例演示开关 demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: D:/ruoyi/uploadPath + profile: /Volumes/T/oss/zklz/upload # 获取ip地址开关 addressEnabled: false # 开发环境配置 server: # 服务器的HTTP端口,默认为80 - port: 80 + port: 6030 servlet: # 应用的访问路径 context-path: / diff --git a/ruoyi-admin/src/main/resources/banner.txt b/ruoyi-admin/src/main/resources/banner.txt index 94662592f..80e8b0841 100644 --- a/ruoyi-admin/src/main/resources/banner.txt +++ b/ruoyi-admin/src/main/resources/banner.txt @@ -20,5 +20,5 @@ Spring Boot Version: ${spring-boot.version} // ========`-.____`-.___\_____/___.-`____.-'======== // // `=---=' // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// 佛祖保佑 永不宕机 永无BUG // +// 佛祖保佑 永不宕机 永无BUG // //////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/logback.xml b/ruoyi-admin/src/main/resources/logback.xml index d69a57207..d1432cd18 100644 --- a/ruoyi-admin/src/main/resources/logback.xml +++ b/ruoyi-admin/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - + diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index fd7b8bfe1..b8bedde6e 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -102,5 +102,20 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + + wendu-release + wendu-release + http://repo.wendukeji.cn:6518/repository/maven-releases/ + + \ No newline at end of file diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index 4785ff9eb..7768d17b7 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -2,81 +2,96 @@ - - ruoyi - com.ruoyi - 4.6.1 - - 4.0.0 + + ruoyi + com.ruoyi + 4.6.1 + + 4.0.0 - ruoyi-framework + ruoyi-framework - - framework框架核心 - + + framework框架核心 + - + - - - org.springframework.boot - spring-boot-starter-web - + + + org.springframework.boot + spring-boot-starter-web + - - - org.springframework.boot - spring-boot-starter-aop - + + + org.springframework.boot + spring-boot-starter-aop + - - - com.alibaba - druid-spring-boot-starter - + + + com.alibaba + druid-spring-boot-starter + - - - com.github.penggle - kaptcha - - - javax.servlet-api - javax.servlet - - - + + + com.github.penggle + kaptcha + + + javax.servlet-api + javax.servlet + + + - - - org.apache.shiro - shiro-spring - + + + org.apache.shiro + shiro-spring + - - - com.github.theborakompanioni - thymeleaf-extras-shiro - + + + com.github.theborakompanioni + thymeleaf-extras-shiro + - - - eu.bitwalker - UserAgentUtils - + + + eu.bitwalker + UserAgentUtils + - - - com.github.oshi - oshi-core - + + + com.github.oshi + oshi-core + - - - com.ruoyi - ruoyi-system - + + + com.ruoyi + ruoyi-system + - + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + + wendu-release + wendu-release + http://repo.wendukeji.cn:6518/repository/maven-releases/ + + \ No newline at end of file diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml index 233c57822..788b8042b 100644 --- a/ruoyi-generator/pom.xml +++ b/ruoyi-generator/pom.xml @@ -30,5 +30,20 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + + wendu-release + wendu-release + http://repo.wendukeji.cn:6518/repository/maven-releases/ + + \ No newline at end of file diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml index 71018fea1..7d250dfb6 100644 --- a/ruoyi-system/pom.xml +++ b/ruoyi-system/pom.xml @@ -24,5 +24,20 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + + wendu-release + wendu-release + http://repo.wendukeji.cn:6518/repository/maven-releases/ + + \ No newline at end of file From b8958c67f338160104b2fe1dbd04ba24f2a94b03 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 17:32:53 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=88=A4=E6=96=AD=E6=97=B6=E9=A1=BB=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E5=88=A0=E9=99=A4=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 0ea5f81b1..1254725c9 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + +
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + + + + + + \ 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 From 6c4b681f376ab7f5381382d358a3653be240f096 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:56:49 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0repo=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-common/pom.xml | 2 +- ruoyi-framework/pom.xml | 2 +- ruoyi-generator/pom.xml | 2 +- ruoyi-quartz/pom.xml | 2 +- ruoyi-system/pom.xml | 2 +- zklz-crm/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 96b4b3c75..7ed654483 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -114,7 +114,7 @@ wendu-release wendu-release - http://repo.wendu.cn/repository/maven-releases/ + http://repo.wd.cn/repository/maven-releases/ diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index ec3959e9b..73094f54c 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -90,7 +90,7 @@ wendu-release wendu-release - http://repo.wendu.cn/repository/maven-releases/ + http://repo.wd.cn/repository/maven-releases/ diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml index 799276eb5..8139bf0c4 100644 --- a/ruoyi-generator/pom.xml +++ b/ruoyi-generator/pom.xml @@ -42,7 +42,7 @@ wendu-release wendu-release - http://repo.wendu.cn/repository/maven-releases/ + http://repo.wd.cn/repository/maven-releases/ diff --git a/ruoyi-quartz/pom.xml b/ruoyi-quartz/pom.xml index 05117b6bd..c64a413e4 100644 --- a/ruoyi-quartz/pom.xml +++ b/ruoyi-quartz/pom.xml @@ -48,7 +48,7 @@ wendu-release wendu-release - http://repo.wendu.cn/repository/maven-releases/ + http://repo.wd.cn/repository/maven-releases/ \ No newline at end of file diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml index b93f4a0a0..f318a372d 100644 --- a/ruoyi-system/pom.xml +++ b/ruoyi-system/pom.xml @@ -36,7 +36,7 @@ wendu-release wendu-release - http://repo.wendu.cn/repository/maven-releases/ + http://repo.wd.cn/repository/maven-releases/ diff --git a/zklz-crm/pom.xml b/zklz-crm/pom.xml index 534f8aa4d..f77c9b1ec 100644 --- a/zklz-crm/pom.xml +++ b/zklz-crm/pom.xml @@ -33,7 +33,7 @@ wendu-release wendu-release - http://repo.wendu.cn/repository/maven-releases/ + http://repo.wd.cn/repository/maven-releases/ From 6974d66313f4ac7c0c4cb04f4e121b06c7a599d8 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:57:46 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0repo=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 556a9b5d3..4ce7c8339 100644 --- a/pom.xml +++ b/pom.xml @@ -253,7 +253,7 @@ wendu-release wendu-release - http://repo.wendu.cn/repository/maven-releases/ + http://repo.wd.cn/repository/maven-releases/