Browse Source

QXP 28号接口提交

qxp192083 4 years ago
parent
commit
96271a9dc7
38 changed files with 1711 additions and 953 deletions
  1. 78 83
      dgtly-admin/src/main/java/com/dgtly/web/controller/system/SysCompanyController.java
  2. 3 29
      dgtly-admin/src/main/java/com/dgtly/web/controller/companyext/CompanyExamineController.java
  3. 17 17
      dgtly-admin/src/main/java/com/dgtly/web/controller/companyext/CompanyExtInfoController.java
  4. 5 21
      dgtly-admin/src/main/resources/templates/system/company/company.html
  5. 0 0
      dgtly-admin/src/main/resources/templates/company/edit.html
  6. 79 0
      dgtly-admin/src/main/resources/templates/company/enterexamine/add.html
  7. 63 0
      dgtly-admin/src/main/resources/templates/company/enterexamine/approve.html
  8. 80 0
      dgtly-admin/src/main/resources/templates/company/enterexamine/edit.html
  9. 117 0
      dgtly-admin/src/main/resources/templates/company/enterexamine/examine.html
  10. 153 0
      dgtly-admin/src/main/resources/templates/company/enterexamine/reviewed.html
  11. 147 0
      dgtly-admin/src/main/resources/templates/company/enterexamine/yesExamine.html
  12. 1 1
      dgtly-admin/src/main/resources/templates/system/company/tree.html
  13. 0 68
      dgtly-admin/src/main/resources/templates/system/company/add.html
  14. 18 58
      dgtly-api/src/main/java/com/dgtly/api/controller/CommonController.java
  15. 16 27
      dgtly-api/src/main/java/com/dgtly/api/controller/SysCompanyController.java
  16. 1 1
      dgtly-goods/dgtly-goods-admin/src/main/resources/templates/goods/info/add.html
  17. 7 177
      dgtly-system/src/main/java/com/dgtly/companyext/domain/CompanyExamine.java
  18. 64 6
      dgtly-system/src/main/java/com/dgtly/companyext/domain/CompanyExtInfo.java
  19. 1 7
      dgtly-system/src/main/java/com/dgtly/companyext/mapper/CompanyExamineMapper.java
  20. 0 69
      dgtly-system/src/main/java/com/dgtly/companyext/mapper/CompanyExtInfoMapper.java
  21. 87 0
      dgtly-system/src/main/java/com/dgtly/companyext/mapper/CompanyReviewedMapper.java
  22. 0 7
      dgtly-system/src/main/java/com/dgtly/companyext/service/ICompanyExamineService.java
  23. 0 69
      dgtly-system/src/main/java/com/dgtly/companyext/service/ICompanyExtInfoService.java
  24. 99 0
      dgtly-system/src/main/java/com/dgtly/companyext/service/ICompanyReviewedService.java
  25. 1 11
      dgtly-system/src/main/java/com/dgtly/companyext/service/impl/CompanyExamineServiceImpl.java
  26. 0 108
      dgtly-system/src/main/java/com/dgtly/companyext/service/impl/CompanyExtInfoServiceImpl.java
  27. 166 0
      dgtly-system/src/main/java/com/dgtly/companyext/service/impl/CompanyReviewedServiceImpl.java
  28. 188 25
      dgtly-system/src/main/java/com/dgtly/system/domain/SysCompany.java
  29. 9 0
      dgtly-system/src/main/java/com/dgtly/system/mapper/SysCompanyMapper.java
  30. 9 0
      dgtly-system/src/main/java/com/dgtly/system/mapper/SysDictDataMapper.java
  31. 18 5
      dgtly-system/src/main/java/com/dgtly/system/service/ISysCompanyService.java
  32. 10 1
      dgtly-system/src/main/java/com/dgtly/system/service/ISysDictDataService.java
  33. 93 43
      dgtly-system/src/main/java/com/dgtly/system/service/impl/SysCompanyServiceImpl.java
  34. 12 0
      dgtly-system/src/main/java/com/dgtly/system/service/impl/SysDictDataServiceImpl.java
  35. 11 87
      dgtly-system/src/main/resources/mapper/companyext/CompanyExamineMapper.xml
  36. 74 18
      dgtly-system/src/main/resources/mapper/companyext/CompanyExtInfoMapper.xml
  37. 78 15
      dgtly-system/src/main/resources/mapper/system/SysCompanyMapper.xml
  38. 6 0
      dgtly-system/src/main/resources/mapper/system/SysDictDataMapper.xml

+ 78 - 83
dgtly-admin/src/main/java/com/dgtly/web/controller/system/SysCompanyController.java

@@ -1,4 +1,4 @@
-package com.dgtly.web.controller.system;
+package com.dgtly.web.controller.company;
 
 import java.util.Date;
 import java.util.List;
@@ -6,6 +6,10 @@ import java.util.List;
 import com.dgtly.common.constant.UserConstants;
 import com.dgtly.common.core.domain.Ztree;
 import com.dgtly.common.utils.security.EncryptPassWordClass;
+import com.dgtly.companyext.domain.CompanyExamine;
+import com.dgtly.companyext.domain.CompanyReviewed;
+import com.dgtly.companyext.service.ICompanyExamineService;
+import com.dgtly.companyext.service.ICompanyReviewedService;
 import com.dgtly.framework.util.ShiroUtils;
 import com.dgtly.system.domain.SysDept;
 import com.dgtly.system.domain.SysUser;
@@ -37,10 +41,10 @@ import com.dgtly.common.core.page.TableDataInfo;
  * @date 2020-01-08
  */
 @Controller
-@RequestMapping("/system/company")
-public class SysCompanyController extends BaseController
+@RequestMapping("/company")
+public class CompanyController extends BaseController
 {
-    private String prefix = "system/company";
+    private String prefix = "company";
 
     @Autowired
     private ISysCompanyService sysCompanyService;
@@ -49,8 +53,15 @@ public class SysCompanyController extends BaseController
     @Autowired
     private ISysUserService userService;
 
-    @RequiresPermissions("system:company:view")
-    @GetMapping()
+
+    @Autowired
+    private ICompanyReviewedService companyReviewedService;
+
+    @Autowired
+    private ICompanyExamineService companyExamineService;
+
+    @RequiresPermissions("company:info:view")
+    @GetMapping("/company")
     public String company()
     {
         return prefix + "/company";
@@ -65,116 +76,100 @@ public class SysCompanyController extends BaseController
     public TableDataInfo list(SysCompany sysCompany)
     {
         startPage();
-        List<SysCompany> list = sysCompanyService.selectSysCompanyList(sysCompany);
+        List<SysCompany> list = sysCompanyService.selectSysCompanyListExRoot(sysCompany);
         return getDataTable(list);
     }
 
-    @PostMapping("/changeStatus")
-    @ResponseBody
-    public AjaxResult changeStatus(SysCompany sysCompany)
-    {
-        int rows = sysCompanyService.updateSysCompany(sysCompany);
-        if(rows>0){
-            if(sysCompany.getStatus()==0){
-                userService.changeStatus(sysCompany.getId(),0);
-            }else if(sysCompany.getStatus()==1){
-                userService.changeStatus(sysCompany.getId(),3);
-            }
-        }
-        return AjaxResult.success();
-    }
-
-    /**
-     * 导出公司表列表
-     */
-    @RequiresPermissions("system:company:export")
-    @PostMapping("/export")
-    @ResponseBody
-    public AjaxResult export(SysCompany sysCompany)
-    {
-        List<SysCompany> list = sysCompanyService.selectSysCompanyList(sysCompany);
-        ExcelUtil<SysCompany> util = new ExcelUtil<SysCompany>(SysCompany.class);
-        return util.exportExcel(list, "company");
-    }
-
     /**
-     * 新增公司
+     * 查询公司表列表
      */
-    @GetMapping("/add")
-    public String add()
+    @GetMapping("/tree")
+    public Object select(SysCompany sysCompany)
     {
-        return prefix + "/add";
-    }
-
+        return prefix + "/tree";
+    };
     /**
-     * 新增保存公司
+     * 查询公司表列表
      */
-    @RequiresPermissions("system:company:add")
-    @Log(title = "公司表", businessType = BusinessType.INSERT)
-    @PostMapping("/add")
+    @GetMapping("/treeData")
     @ResponseBody
-    @Transactional
-    public AjaxResult addSave(SysCompany sysCompany,SysUser user)
+    public Object treeData(SysCompany sysCompany)
     {
-        sysCompany.setCreateBy(ShiroUtils.getLoginName());
-        user.setCreateBy(ShiroUtils.getLoginName());
-        int rows = sysCompanyService.addCompany(sysCompany,user);
-        return toAjax(rows);
+        List<Ztree> list = sysCompanyService.selectSysCompanyTree(sysCompany);
+        return list;
     }
 
+
     /**
-     * 修改公司表
+     * @descption: 商户入驻审核
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
      */
-    @GetMapping("/edit/{id}")
-    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    @RequiresPermissions("company:enterexamine:view")
+    @GetMapping("/enterexamine")
+    public String enterexamine()
     {
-        SysCompany sysCompany = sysCompanyService.selectSysCompanyById(id);
-        mmap.put("sysCompany", sysCompany);
-        return prefix + "/edit";
+        return prefix + "/enterexamine/reviewed";
     }
 
     /**
-     * 修改保存公司
+     * 查询商户扩展信息列
      */
-    @RequiresPermissions("system:company:edit")
-    @Log(title = "公司表", businessType = BusinessType.UPDATE)
-    @PostMapping("/edit")
+    @RequiresPermissions("company:enterexamine:list")
+    @PostMapping("/enterexamine/list")
     @ResponseBody
-    public AjaxResult editSave(SysCompany sysCompany)
+    public TableDataInfo list(CompanyReviewed companyReviewed)
     {
-        return toAjax(sysCompanyService.updateSysCompany(sysCompany));
+        startPage();
+        companyReviewed.setReason("0");
+        List<CompanyReviewed> list = companyReviewedService.selectCompanyReviewedListWiteAudit(companyReviewed);
+        return getDataTable(list);
     }
 
     /**
-     * 删除公司表
+     * @descption: 商户审核
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
      */
-    @RequiresPermissions("system:company:remove")
-    @Log(title = "公司表", businessType = BusinessType.DELETE)
-    @PostMapping( "/remove")
-    @ResponseBody
-    public AjaxResult remove(String ids)
+    @RequiresPermissions("company:enterexamine:approve")
+    @GetMapping("/enterexamine/approvePage/{id}")
+    public String approvePage(@PathVariable("id") Long id, ModelMap mmap)
     {
-        return toAjax(sysCompanyService.deleteSysCompanyByIds(ids));
+        CompanyReviewed companyReviewed = companyReviewedService.selectCompanyReviewedById(id);
+        mmap.put("companyReviewed", companyReviewed);
+        return prefix + "/enterexamine/approve";
     }
 
 
-    /**
-     * 查询公司表列表
-     */
-    @GetMapping("/tree")
-    public Object select(SysCompany sysCompany)
-    {
 
-        return prefix + "/tree";
-    };
     /**
-     * 查询公司表列表
+     * 审核商户入驻
      */
-    @GetMapping("/treeData")
+    @RequiresPermissions("companyext:enterexamine:approve")
+    @Log(title = "审核商户入驻", businessType = BusinessType.UPDATE)
+    @PostMapping("/enterexamine/approve")
     @ResponseBody
-    public Object treeData(SysCompany sysCompany)
+    public AjaxResult approve(CompanyExamine companyExamine)
     {
-        List<Ztree> list = sysCompanyService.selectSysCompanyTree(sysCompany);
-        return list;
+        companyExamine.setCreateBy(ShiroUtils.getLoginName());
+        int i =0;
+        if(companyExamine.getStatus().equals(1)){
+            /*审核通过*/
+            i=sysCompanyService.allowEnter(companyExamine);
+
+        }else{
+            /*审核拒绝*/
+            i=companyReviewedService.refuseEnter(companyExamine);
+        }
+        return toAjax(i);
     }
+
+
+
+
+
 }

+ 3 - 29
dgtly-admin/src/main/java/com/dgtly/web/controller/companyext/CompanyExamineController.java

@@ -1,4 +1,4 @@
-package com.dgtly.web.controller.companyext;
+package com.dgtly.web.controller.company;
 
 import com.dgtly.framework.util.ShiroUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -48,7 +48,7 @@ public class CompanyExamineController extends BaseController
      * @Author: koucx
      * @Date: 2020-02-13
     **/
-    @RequiresPermissions("companyext:noexamine:view")
+    @RequiresPermissions("company:noexamine:view")
     @GetMapping("/noexamine")
     public String noexamine()
     {
@@ -67,34 +67,8 @@ public class CompanyExamineController extends BaseController
         return prefix + "/yesexamine";
     }
 
-    /**
-     * 查询商户审核列表
-     */
-    @RequiresPermissions("companyext:examine:list")
-    @PostMapping("/list")
-    @ResponseBody
-    public TableDataInfo list(CompanyExamine companyExamine)
-    {
-        startPage();
-        if(companyExamine.getStatus()==null){
-            companyExamine.setStatus(3);
-        }
-        List<CompanyExamine> list = companyExamineService.selectCompanyExamineList(companyExamine);
-        return getDataTable(list);
-    }
 
-    /**
-     * 导出商户审核列表
-     */
-    @RequiresPermissions("companyext:examine:export")
-    @PostMapping("/export")
-    @ResponseBody
-    public AjaxResult export(CompanyExamine companyExamine)
-    {
-        List<CompanyExamine> list = companyExamineService.selectCompanyExamineList(companyExamine);
-        ExcelUtil<CompanyExamine> util = new ExcelUtil<CompanyExamine>(CompanyExamine.class);
-        return util.exportExcel(list, "examine");
-    }
+
 
     /**
      * 新增商户审核

+ 17 - 17
dgtly-admin/src/main/java/com/dgtly/web/controller/companyext/CompanyExtInfoController.java

@@ -1,4 +1,4 @@
-package com.dgtly.web.controller.companyext;
+package com.dgtly.web.controller.company;
 
 import java.util.List;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -12,8 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import com.dgtly.common.annotation.Log;
 import com.dgtly.common.enums.BusinessType;
-import com.dgtly.companyext.domain.CompanyExtInfo;
-import com.dgtly.companyext.service.ICompanyExtInfoService;
+import com.dgtly.companyext.domain.CompanyReviewed;
+import com.dgtly.companyext.service.ICompanyReviewedService;
 import com.dgtly.common.core.controller.BaseController;
 import com.dgtly.common.core.domain.AjaxResult;
 import com.dgtly.common.utils.poi.ExcelUtil;
@@ -27,12 +27,12 @@ import com.dgtly.common.core.page.TableDataInfo;
  */
 @Controller
 @RequestMapping("/companyext/info")
-public class CompanyExtInfoController extends BaseController
+public class CompanyReviewedController extends BaseController
 {
     private String prefix = "companyext/info";
 
     @Autowired
-    private ICompanyExtInfoService companyExtInfoService;
+    private ICompanyReviewedService companyReviewedService;
 
     @RequiresPermissions("companyext:info:view")
     @GetMapping()
@@ -47,10 +47,10 @@ public class CompanyExtInfoController extends BaseController
     @RequiresPermissions("companyext:info:list")
     @PostMapping("/list")
     @ResponseBody
-    public TableDataInfo list(CompanyExtInfo companyExtInfo)
+    public TableDataInfo list(CompanyReviewed companyReviewed)
     {
         startPage();
-        List<CompanyExtInfo> list = companyExtInfoService.selectCompanyExtInfoList(companyExtInfo);
+        List<CompanyReviewed> list = companyReviewedService.selectCompanyReviewedList(companyReviewed);
         return getDataTable(list);
     }
 
@@ -60,10 +60,10 @@ public class CompanyExtInfoController extends BaseController
     @RequiresPermissions("companyext:info:export")
     @PostMapping("/export")
     @ResponseBody
-    public AjaxResult export(CompanyExtInfo companyExtInfo)
+    public AjaxResult export(CompanyReviewed companyReviewed)
     {
-        List<CompanyExtInfo> list = companyExtInfoService.selectCompanyExtInfoList(companyExtInfo);
-        ExcelUtil<CompanyExtInfo> util = new ExcelUtil<CompanyExtInfo>(CompanyExtInfo.class);
+        List<CompanyReviewed> list = companyReviewedService.selectCompanyReviewedList(companyReviewed);
+        ExcelUtil<CompanyReviewed> util = new ExcelUtil<CompanyReviewed>(CompanyReviewed.class);
         return util.exportExcel(list, "info");
     }
 
@@ -83,9 +83,9 @@ public class CompanyExtInfoController extends BaseController
     @Log(title = "商户扩展信息", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     @ResponseBody
-    public AjaxResult addSave(CompanyExtInfo companyExtInfo)
+    public AjaxResult addSave(CompanyReviewed companyReviewed)
     {
-        return toAjax(companyExtInfoService.insertCompanyExtInfo(companyExtInfo));
+        return toAjax(companyReviewedService.insertCompanyReviewed(companyReviewed));
     }
 
     /**
@@ -94,8 +94,8 @@ public class CompanyExtInfoController extends BaseController
     @GetMapping("/edit/{id}")
     public String edit(@PathVariable("id") Long id, ModelMap mmap)
     {
-        CompanyExtInfo companyExtInfo = companyExtInfoService.selectCompanyExtInfoById(id);
-        mmap.put("companyExtInfo", companyExtInfo);
+        CompanyReviewed companyReviewed = companyReviewedService.selectCompanyReviewedById(id);
+        mmap.put("companyReviewed", companyReviewed);
         return prefix + "/edit";
     }
 
@@ -106,9 +106,9 @@ public class CompanyExtInfoController extends BaseController
     @Log(title = "商户扩展信息", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")
     @ResponseBody
-    public AjaxResult editSave(CompanyExtInfo companyExtInfo)
+    public AjaxResult editSave(CompanyReviewed companyReviewed)
     {
-        return toAjax(companyExtInfoService.updateCompanyExtInfo(companyExtInfo));
+        return toAjax(companyReviewedService.updateCompanyReviewed(companyReviewed));
     }
 
     /**
@@ -120,6 +120,6 @@ public class CompanyExtInfoController extends BaseController
     @ResponseBody
     public AjaxResult remove(String ids)
     {
-        return toAjax(companyExtInfoService.deleteCompanyExtInfoByIds(ids));
+        return toAjax(companyReviewedService.deleteCompanyReviewedByIds(ids));
     }
 }

+ 5 - 21
dgtly-admin/src/main/resources/templates/system/company/company.html

@@ -24,7 +24,7 @@
             </div>
 
             <div class="btn-group-sm" id="toolbar" role="group">
-                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:company:add">
+                <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:company:add">
                     <i class="fa fa-plus"></i> 添加
                 </a>
                 <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:company:edit">
@@ -35,7 +35,7 @@
                 </a>
                 <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:company:export">
                     <i class="fa fa-download"></i> 导出
-                 </a>
+                 </a>-->
             </div>
             <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
@@ -46,15 +46,11 @@
     <script th:inline="javascript">
         var editFlag = [[${@permission.hasPermi('system:company:edit')}]];
         var removeFlag = [[${@permission.hasPermi('system:company:remove')}]];
-        var prefix = ctx + "system/company";
+        var prefix = ctx + "company";
 
         $(function() {
             var options = {
                 url: prefix + "/list",
-                createUrl: prefix + "/add",
-                updateUrl: prefix + "/edit/{id}",
-                removeUrl: prefix + "/remove",
-                exportUrl: prefix + "/export",
                 modalName: "公司表",
                 columns: [{
                     checkbox: true
@@ -81,7 +77,7 @@
                         title: '创建时间',
                         align: 'center'
                     },
-                {
+                /*{
                     title: '操作',
                     align: 'center',
                     formatter: function(value, row, index) {
@@ -90,7 +86,7 @@
                         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);
 
@@ -106,19 +102,7 @@
                 return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id + '\')"></i> ';
             }
         }
-        /* 公司管理-停用 */
-        function disable(id) {
-            $.modal.confirm("确认要停用角色吗?", function() {
-                $.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
-            })
-        }
 
-        /* 公司管理启用 */
-        function enable(id) {
-            $.modal.confirm("确认要启用角色吗?", function() {
-                $.operate.post(prefix + "/changeStatus", { "id": id, "status": 0 });
-            })
-        }
     </script>
 </body>
 </html>

dgtly-admin/src/main/resources/templates/system/company/edit.html → dgtly-admin/src/main/resources/templates/company/edit.html


+ 79 - 0
dgtly-admin/src/main/resources/templates/company/enterexamine/add.html

@@ -0,0 +1,79 @@
+<!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-examine-add">
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">商户(公司)Id:</label>
+                <div class="col-sm-8">
+                    <span class="help-block m-b-none">审核状态</span>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">审核状态:</label>
+                <div class="col-sm-8">
+                    <div class="radio-box">
+                        <input type="radio" name="status" value="" required>
+                        <label th:for="status" th:text="未知"></label>
+                    </div>
+                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">申请日期:</label>
+                <div class="col-sm-8">
+                    <div class="input-group date">
+                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        <input name="applyDate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
+                    </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">
+                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        <input name="examineDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">驳回理由:</label>
+                <div class="col-sm-8">
+                    <textarea name="rejectReason" class="form-control"></textarea>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: datetimepicker-js" />
+    <script type="text/javascript">
+        var prefix = ctx + "system/examine"
+        $("#form-examine-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-examine-add').serialize());
+            }
+        }
+
+        $("input[name='applyDate']").datetimepicker({
+            format: "yyyy-mm-dd",
+            minView: "month",
+            autoclose: true
+        });
+
+        $("input[name='examineDate']").datetimepicker({
+            format: "yyyy-mm-dd",
+            minView: "month",
+            autoclose: true
+        });
+    </script>
+</body>
+</html>

+ 63 - 0
dgtly-admin/src/main/resources/templates/company/enterexamine/approve.html

@@ -0,0 +1,63 @@
+<!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-examine-edit">
+            <input name="companyReviewedId" th:value="*{companyReviewed.id}" type="hidden">
+            <input name="status" id="input_status" type="hidden">
+            <div class="form-group">
+
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">审核结论:</label>
+                <div class="col-sm-8">
+                    <textarea name="rejectReason" class="form-control" maxlength="250"></textarea>
+                </div>
+            </div>
+        </form>
+        <div class="col-sm-8">
+            <a class="btn btn-primary single " href="javascript:void(0)" onclick="approve(1)" >
+                <i class="fa fa-edit"></i> 通过
+            </a>
+            <a class="btn btn-danger multiple " href="javascript:void(0)" onclick="approve(0)" >
+                <i class="fa fa-remove"></i> 拒绝
+            </a>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: datetimepicker-js" />
+    <script type="text/javascript">
+        var prefix = ctx + "company/enterexamine";
+
+
+        function approve(status){
+            $("#input_status").val(status);
+            $.ajax({
+                type: "POST",
+                url: prefix + "/approve",
+                data: $('#form-examine-edit').serialize(),
+                processData: false,
+                dataType: 'json',
+                success: function(result) {
+                    if (result.code == web_status.SUCCESS) {
+
+                    } else {
+                        $.modal.alertError(result.msg);
+                    }
+                },
+                error: function(error) {
+                    $.modal.alertWarning("审核失败。");
+                }
+            });
+        }
+
+    </script>
+</body>
+</html>

+ 80 - 0
dgtly-admin/src/main/resources/templates/company/enterexamine/edit.html

@@ -0,0 +1,80 @@
+<!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-examine-edit" th:object="${companyExamine}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">商户(公司)Id:</label>
+                <div class="col-sm-8">
+                    <input name="companyId" th:field="*{companyId}" class="form-control" type="text" required>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">审核状态:</label>
+                <div class="col-sm-8">
+                    <div class="radio-box">
+                        <input type="radio" name="status" value="" required>
+                        <label th:for="status" th:text="未知"></label>
+                    </div>
+                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">申请日期:</label>
+                <div class="col-sm-8">
+                    <div class="input-group date">
+                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        <input name="applyDate" th:value="${#dates.format(companyExamine.applyDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
+                    </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">
+                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        <input name="examineDate" th:value="${#dates.format(companyExamine.examineDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">驳回理由:</label>
+                <div class="col-sm-8">
+                    <textarea name="rejectReason" class="form-control">[[*{rejectReason}]]</textarea>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: datetimepicker-js" />
+    <script type="text/javascript">
+        var prefix = ctx + "system/examine";
+        $("#form-examine-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-examine-edit').serialize());
+            }
+        }
+
+        $("input[name='applyDate']").datetimepicker({
+            format: "yyyy-mm-dd",
+            minView: "month",
+            autoclose: true
+        });
+
+        $("input[name='examineDate']").datetimepicker({
+            format: "yyyy-mm-dd",
+            minView: "month",
+            autoclose: true
+        });
+    </script>
+</body>
+</html>

+ 117 - 0
dgtly-admin/src/main/resources/templates/company/enterexamine/examine.html

@@ -0,0 +1,117 @@
+<!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>
+                                <p>商户(公司)Id:</p>
+                                <input type="text" name="companyId"/>
+                            </li>
+                            <li>
+                                <p>审核状态:</p>
+                                <select name="status">
+                                    <option value="">所有</option>
+                                </select>
+                            </li>
+                            <li class="select-time">
+                                <p>申请日期:</p>
+                                <input type="text" class="time-input" id="beginApplyDate" placeholder="开始时间" name="params[beginApplyDate]"/>
+                                <span>-</span>
+                                <input type="text" class="time-input" id="endApplyDate" placeholder="结束时间" name="params[endApplyDate]"/>
+                            </li>
+                            <li class="select-time">
+                                <p>审核日期:</p>
+                                <input type="text" class="time-input" id="beginExamineDate" placeholder="开始时间" name="params[beginExamineDate]"/>
+                                <span>-</span>
+                                <input type="text" class="time-input" id="endExamineDate" placeholder="结束时间" name="params[endExamineDate]"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:examine:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:examine:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:examine:remove">
+                    <i class="fa fa-remove"></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 prefix = ctx + "/enterexamine/list";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                modalName: "商户审核",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field : 'id', 
+                    title : '主键',
+                    visible: false
+                },
+                {
+                    field : 'companyId', 
+                    title : '商户(公司)Id',
+                    visible: false
+                },
+                {
+                    field : 'status', 
+                    title : '审核状态'
+                },
+                {
+                    field : 'applyDate', 
+                    title : '申请日期'
+                },
+                {
+                    field : 'examineDate', 
+                    title : '审核日期'
+                },
+                {
+                    field : 'rejectReason', 
+                    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>

+ 153 - 0
dgtly-admin/src/main/resources/templates/company/enterexamine/reviewed.html

@@ -0,0 +1,153 @@
+<!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>
+                                <p>企业名称:</p>
+                                <input type="text" name="companyName"/>
+                            </li>
+                            <li>
+                                <p>企业类型:</p>
+                                <select name="companyType" th:with="type=${@dict.getType('company_type')}">
+                                    <option value="">所有</option>
+                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                                </select>
+                            </li>
+                            <li>
+                                <p>企业法人:</p>
+                                <input type="text" name="legalPerson"/>
+                            </li>
+                            <li class="select-time">
+                                <p>申请日期:</p>
+                                <input type="text" class="time-input" id="applyDate" placeholder="申请日期" name="applyDate"/>
+                            </li>
+                            <li class="select-time">
+                                <p>审核日期:</p>
+                                <input type="text" class="time-input" id="examineDate" placeholder="审核日期" name="examineDate"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:examine:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:examine:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:examine:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="companyext:examine: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 approveFlag = [[${@permission.hasPermi('companyext:noexamine:approve')}]];
+        var companyTypes = [[${@dict.getType('company_type')}]];
+        var examineStatus = [[${@dict.getType('examine_status')}]];
+        var prefix = ctx + "company/enterexamine";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                modalName: "商户审核",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field : 'id', 
+                    title : '主键',
+                    visible: false
+                },
+                {
+                    field : 'companyId', 
+                    title : '商户(公司)Id',
+                    visible: false
+                },
+                {
+                    field : 'companyName',
+                    title : '企业名称'
+                },
+                {
+                    field : 'companyType',
+                    title : '企业类型',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        return $.table.selectDictLabel(companyTypes, value);
+                    }
+                },
+                {
+                    field : 'legalPerson',
+                    title : '企业法人'
+                },
+                {
+                    field : 'contactNumber',
+                    title : '联系电话'
+                },
+                {
+                    field : 'status', 
+                    title : '审核状态',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        return $.table.selectDictLabel(examineStatus, value);
+                    }
+                },
+                {
+                    field : 'applyDate', 
+                    title : '申请日期'
+                },
+                {
+                    field : 'examineDate', 
+                    title : '审核日期'
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        if(row.status=="0"){
+                            actions.push('<a class="btn btn-primary btn-xs ' + approveFlag + '" href="javascript:void(0)" onclick="approve(\'' + row.id + '\')"><i class="fa fa-edit"></i>审核</a> ');
+                        }else{
+                            actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick=""><i class="fa fa-edit"></i>查看详情</a> ');
+                        }
+
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+
+            approve=function(id){
+                if(id==null && id==""){
+                    return;
+                }
+                $.modal.open("审核商户" , prefix + "/approvePage/"+id);
+            }
+
+
+        });
+    </script>
+</body>
+</html>

+ 147 - 0
dgtly-admin/src/main/resources/templates/company/enterexamine/yesExamine.html

@@ -0,0 +1,147 @@
+<!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>
+                                <p>企业名称:</p>
+                                <input type="text" name="companyName"/>
+                            </li>
+                            <li>
+                                <p>企业类型:</p>
+                                <select name="companyType" th:with="type=${@dict.getType('company_type')}">
+                                    <option value="">所有</option>
+                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                                </select>
+                            </li>
+                            <li>
+                                <p>审核状态:</p>
+                                <select name="status">
+                                    <option value="">所有</option>
+                                    <option value="1">已通过</option>
+                                    <option value="2">已驳回</option>
+                                </select>
+                            </li>
+                            <li>
+                                <p>企业法人:</p>
+                                <input type="text" name="legalPerson"/>
+                            </li>
+                            <li class="select-time">
+                                <p>申请日期:</p>
+                                <input type="text" class="time-input" id="applyDate" placeholder="申请日期" name="applyDate"/>
+                            </li>
+                            <li class="select-time">
+                                <p>审核日期:</p>
+                                <input type="text" class="time-input" id="examineDate" placeholder="审核日期" name="examineDate"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:examine:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>-->
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:examine:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:examine:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:examine: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 companyTypes = [[${@dict.getType('company_type')}]];
+        var examineStatus = [[${@dict.getType('examine_status')}]];
+        var prefix = ctx + "companyext/examine";
+        $(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 : 'companyId',
+                        title : '商户(公司)Id',
+                        visible: false
+                    },
+                    {
+                        field : 'companyName',
+                        title : '企业名称'
+                    },
+                    {
+                        field : 'companyType',
+                        title : '企业类型',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            return $.table.selectDictLabel(companyTypes, value);
+                        }
+                    },
+                    {
+                        field : 'legalPerson',
+                        title : '企业法人'
+                    },
+                    {
+                        field : 'contactNumber',
+                        title : '联系电话'
+                    },
+                    {
+                        field : 'status',
+                        title : '审核状态',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            return $.table.selectDictLabel(examineStatus, value);
+                        }
+                    },
+                    {
+                        field : 'applyDate',
+                        title : '申请日期'
+                    },
+                    {
+                        field : 'examineDate',
+                        title : '审核日期'
+                    },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                       return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>

+ 1 - 1
dgtly-admin/src/main/resources/templates/system/company/tree.html

@@ -29,7 +29,7 @@
     <th:block th:include="include :: footer" />
     <th:block th:include="include :: ztree-js" />
     <script th:inline="javascript">
-        var prefix = ctx + "system/company";
+        var prefix = ctx + "company";
 
         $(function() {
             var options = {

+ 0 - 68
dgtly-admin/src/main/resources/templates/system/company/add.html

@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
-<head>
-    <th:block th:include="include :: header('新增公司表')" />
-</head>
-<body class="white-bg">
-    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
-        <form class="form-horizontal m" id="form-company-add">
-            <div class="form-group">
-                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>公司名称:</label>
-                <div class="col-sm-8">
-                    <input name="companyName" id="companyName" class="form-control" type="text" required>
-                </div>
-            </div>
-            <div class="form-group">
-                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>管理员名称:</label>
-                <div class="col-sm-8">
-                    <input name="userName" id="userName" class="form-control" type="text" required>
-                </div>
-            </div>
-            <div class="form-group">
-                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>管理员手机号:</label>
-                <div class="col-sm-8">
-                    <input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" required>
-                </div>
-            </div>
-            <div class="form-group">
-                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>管理员账号:</label>
-                <div class="col-sm-8">
-                    <input name="loginName" id="loginName" class="form-control" type="text" required>
-                </div>
-            </div>
-            <div class="form-group">
-                <label class="col-sm-3 control-label">密码:</label>
-                <div class="col-sm-8">
-                    <input name="password" id="password" class="form-control" type="text" required>
-                </div>
-            </div>
-
-        </form>
-    </div>
-    <th:block th:include="include :: footer" />
-    <script type="text/javascript">
-        var prefix = ctx + "system/company"
-        $("#form-company-add").validate({
-            focusCleanup: true
-        });
-
-        function submitHandler() {
-            if ($.validate.form()) {
-                if($("#companyName").val()==""){
-                    alert("")
-                    return;
-                }
-                if($("#loginName").val()==""){
-                    alert("")
-                    return;
-                }
-                if($("#password").val()==""){
-                    alert("")
-                    return;
-                }
-                $.operate.save(prefix + "/add", $('#form-company-add').serialize());
-            }
-        }
-    </script>
-</body>
-</html>

+ 18 - 58
dgtly-api/src/main/java/com/dgtly/api/controller/CommonController.java

@@ -5,22 +5,23 @@ import com.dgtly.common.annotation.ApiPassToken;
 import com.dgtly.common.config.Global;
 import com.dgtly.common.config.ServerConfig;
 import com.dgtly.common.constant.Constants;
+import com.dgtly.common.core.controller.ApiBaseController;
 import com.dgtly.common.core.domain.AjaxResult;
+import com.dgtly.common.core.domain.ParameterObject;
 import com.dgtly.common.utils.StringUtils;
 import com.dgtly.common.utils.file.FileUploadUtils;
 import com.dgtly.common.utils.file.FileUtils;
+import com.dgtly.system.service.ISysDictDataService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.websocket.server.PathParam;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -32,54 +33,31 @@ import java.util.Map;
 @ApiNoCheckSign
 @ApiPassToken
 @RestController("/common")
-public class CommonController
+public class CommonController extends ApiBaseController
 {
     private static final Logger log = LoggerFactory.getLogger(CommonController.class);
 
     @Autowired
     private ServerConfig serverConfig;
 
-    /**
-     * 通用下载请求
-     * 
-     * @param fileName 文件名称
-     * @param delete 是否删除
-     */
-    @GetMapping("download")
-    public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
-    {
-        try
-        {
-            if (!FileUtils.isValidFilename(fileName))
-            {
-                throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
-            }
-            String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
-            String filePath = Global.getDownloadPath() + fileName;
+    @Autowired
+    private ISysDictDataService dictDataService;
 
-            response.setCharacterEncoding("utf-8");
-            response.setContentType("multipart/form-data");
-            response.setHeader("Content-Disposition",
-                    "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, realFileName));
-            FileUtils.writeBytes(filePath, response.getOutputStream());
-            if (delete)
-            {
-                FileUtils.deleteFile(filePath);
-            }
-        }
-        catch (Exception e)
-        {
-            log.error("下载文件失败", e);
-        }
+
+    @PostMapping("/dict")
+    public Object getDict(){
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("dictType");
+        String dictType = obj.getString("dictType");
+        return AjaxResult.success().putKV("list", dictDataService.selectSimpleDictDataByType(dictType));
     }
 
+
     /**
      * 通用上传请求
      */
     @PostMapping("/upload")
-    @ResponseBody
-    public AjaxResult uploadFile(MultipartFile file) throws Exception
-    {
+    public AjaxResult uploadFile(MultipartFile file) throws Exception{
         try
         {
             // 上传文件路径
@@ -99,23 +77,5 @@ public class CommonController
     }
 
 
-    /**
-     * 本地资源通用下载
-     */
-    @GetMapping("/download/resource")
-    public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
-            throws Exception
-    {
-        // 本地资源路径
-        String localPath = Global.getProfile();
-        // 数据库资源地址
-        String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
-        // 下载名称
-        String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
-        response.setCharacterEncoding("utf-8");
-        response.setContentType("multipart/form-data");
-        response.setHeader("Content-Disposition",
-                "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, downloadName));
-        FileUtils.writeBytes(downloadPath, response.getOutputStream());
-    }
+
 }

+ 16 - 27
dgtly-api/src/main/java/com/dgtly/api/controller/SysCompanyController.java

@@ -7,13 +7,11 @@ import com.dgtly.common.core.controller.ApiBaseController;
 import com.dgtly.common.core.domain.AjaxResult;
 import com.dgtly.common.core.domain.ParameterObject;
 import com.dgtly.common.core.domain.ResultType;
-import com.dgtly.companyext.domain.CompanyExtInfo;
-import com.dgtly.companyext.service.ICompanyExtInfoService;
-import com.dgtly.goods.domain.GoodsInfo;
+import com.dgtly.companyext.domain.CompanyReviewed;
+import com.dgtly.companyext.service.ICompanyReviewedService;
 import com.dgtly.member.domain.MemberFollow;
 import com.dgtly.member.service.IMemberFollowService;
 import com.dgtly.system.domain.SysCompany;
-import com.dgtly.system.domain.SysUser;
 import com.dgtly.system.service.ISysCompanyService;
 import com.dgtly.system.service.ISysUserService;
 import io.swagger.annotations.ApiImplicitParam;
@@ -41,7 +39,7 @@ public class SysCompanyController extends ApiBaseController {
     private IMemberFollowService memberFollowService;
 
     @Autowired
-    private ICompanyExtInfoService companyExtInfoService;
+    private ICompanyReviewedService companyReviewedService;
 
     @ApiOperation(value = "商家详情")
     @ApiImplicitParam(name = "params" , paramType = "body")
@@ -50,7 +48,7 @@ public class SysCompanyController extends ApiBaseController {
         ParameterObject obj =  getParameterObject();
         obj.checkParameterNotNull("id");
         Long companyId = obj.getLong(" id");
-        CompanyExtInfo  companyExtInfo =  companyExtInfoService.selectCompanyExtInfoByCompanyId(companyId);
+        SysCompany sysCompany =  companyService.selectSysCompanyById(companyId);
         int isFollow = 0;
         /*判断用户是否关注商户*/
         String memberId = TokenUtil.getTokenUserId();
@@ -63,8 +61,8 @@ public class SysCompanyController extends ApiBaseController {
                 isFollow=1;
             }
         }
-        if(companyExtInfo!=null){
-            return AjaxResult.success(companyExtInfo).putKV("isFollow",isFollow);
+        if(sysCompany!=null){
+            return AjaxResult.success(sysCompany).putKV("isFollow",isFollow);
         }else{
             return AjaxResult.error(ResultType.NUll);
         }
@@ -85,34 +83,25 @@ public class SysCompanyController extends ApiBaseController {
     @PostMapping("/enter")
     public Object enter(){
         ParameterObject obj =  getParameterObject();
-        obj.checkParameterNotNull("loginName,phonenumber,companyName");
+        obj.checkParameterNotNull("loginName,password,companyName");
+        CompanyReviewed cr = obj.parseBean(CompanyReviewed.class);
 
-        SysUser sysUser  = obj.parseBean(SysUser.class);
-
-        if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(sysUser.getLoginName())))
+        if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(cr.getLoginName())))
         {
-            return AjaxResult.error(300,"新增用户'" + sysUser.getLoginName() + "'失败,登录账号已存在");
+            return AjaxResult.error(300,"新增用户'" + cr.getLoginName() + "'失败,登录账号已存在");
         }
-        else if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(sysUser)))
+        else if (UserConstants.USER_NAME_NOT_UNIQUE.equals(companyReviewedService.checkLoginNameUnique(cr.getLoginName())))
         {
-            return AjaxResult.error(301,"新增用户'" + sysUser.getLoginName() + "'失败,手机号码已存在");
+            return AjaxResult.error(301,"新增用户'" + cr.getLoginName() + "'失败,登录账号在审核列表中已存在");
         }
-        else if (sysUser.getPassword().length() < UserConstants.PASSWORD_MIN_LENGTH
-                || sysUser.getPassword().length() > UserConstants.PASSWORD_MAX_LENGTH)
+        else if (cr.getPassword().length() < UserConstants.PASSWORD_MIN_LENGTH
+                || cr.getPassword().length() > UserConstants.PASSWORD_MAX_LENGTH)
         {
             return  AjaxResult.error(302,"密码长度为6-19,请重新设置!!");
         }
+        int i=  companyReviewedService.insertCompanyReviewed(cr);
 
-
-
-        SysCompany sysCompany  = obj.parseBean(SysCompany.class);
-        CompanyExtInfo cei  = obj.parseBean(CompanyExtInfo.class);
-
-        companyService.apiAddCompany(sysUser,sysCompany,cei);
-
-
-
-        return AjaxResult.success();
+        return toAjax(i);
     }
 
 }

+ 1 - 1
dgtly-goods/dgtly-goods-admin/src/main/resources/templates/goods/info/add.html

@@ -425,7 +425,7 @@
 
         /******************选择公司列表**********************************/
         function selectCompanyList() {
-            var url = ctx + "system/company/tree";
+            var url = ctx + "company/tree";
             var options2 = {
                 title: '选择公司',
                 width: "700",

+ 7 - 177
dgtly-system/src/main/java/com/dgtly/companyext/domain/CompanyExamine.java

@@ -19,16 +19,13 @@ public class CompanyExamine extends BaseEntity
     /** 主键 */
     private Long id;
 
-    /** 商户(公司)Id */
-    private Long companyId;
+    /** 审核信息Id */
+    private Long companyReviewedId;
 
     /** 审核状态 */
     @Excel(name = "审核状态")
     private Integer status;
 
-    /** 申请日期 */
-    @Excel(name = "申请日期")
-    private String applyDate;
 
     /** 审核日期 */
     @Excel(name = "审核日期")
@@ -47,14 +44,14 @@ public class CompanyExamine extends BaseEntity
     {
         return id;
     }
-    public void setCompanyId(Long companyId) 
+    public void setCompanyReviewedId(Long companyReviewedId)
     {
-        this.companyId = companyId;
+        this.companyReviewedId = companyReviewedId;
     }
 
-    public Long getCompanyId() 
+    public Long getCompanyReviewedId()
     {
-        return companyId;
+        return companyReviewedId;
     }
     public void setStatus(Integer status) 
     {
@@ -66,13 +63,6 @@ public class CompanyExamine extends BaseEntity
         return status;
     }
 
-    public String getApplyDate() {
-        return applyDate;
-    }
-
-    public void setApplyDate(String applyDate) {
-        this.applyDate = applyDate;
-    }
 
     public String getExamineDate() {
         return examineDate;
@@ -92,174 +82,14 @@ public class CompanyExamine extends BaseEntity
         return rejectReason;
     }
 
-    @Excel(name = "企业名称")
-    private String companyName;
-
-    /** 企业类型 */
-    @Excel(name = "企业类型")
-    private Integer companyType;
-
-    /** 详细地址 */
-    @Excel(name = "详细地址")
-    private String detailAddress;
-
-    /** 经度 */
-    private String longitude;
-
-    /** 纬度 */
-    private String latitude;
-
-    /** 企业法人 */
-    @Excel(name = "企业法人")
-    private String legalPerson;
-
-    /** 联系电话 */
-    @Excel(name = "联系电话")
-    private String contactNumber;
-
-    /** 成立日期 */
-    @Excel(name = "成立日期")
-    private String establishDate;
-
-    /** 统一社会信用代码 */
-    @Excel(name = "统一社会信用代码")
-    private String unifiedSocialCreditCode;
-
-    /** 营业执照 */
-    private String businessLicenseUrl;
-
-    /** 企业默认图片 */
-    private String defaultImgUrl;
-
-    /** 企业宣传图片 */
-    private String propagandaImgUrl;
-
-    /** 企业介绍 */
-    @Excel(name = "企业介绍")
-    private String companyIntroduce;
-
-    /** 版本号 */
-    private Integer versionNum;
-
-    public String getCompanyName() {
-        return companyName;
-    }
-
-    public void setCompanyName(String companyName) {
-        this.companyName = companyName;
-    }
-
-    public Integer getCompanyType() {
-        return companyType;
-    }
-
-    public void setCompanyType(Integer companyType) {
-        this.companyType = companyType;
-    }
-
-    public String getLegalPerson() {
-        return legalPerson;
-    }
-
-    public void setLegalPerson(String legalPerson) {
-        this.legalPerson = legalPerson;
-    }
-
-    public String getContactNumber() {
-        return contactNumber;
-    }
-
-    public void setContactNumber(String contactNumber) {
-        this.contactNumber = contactNumber;
-    }
-
-    public String getDetailAddress() {
-        return detailAddress;
-    }
-
-    public void setDetailAddress(String detailAddress) {
-        this.detailAddress = detailAddress;
-    }
 
-    public String getLongitude() {
-        return longitude;
-    }
-
-    public void setLongitude(String longitude) {
-        this.longitude = longitude;
-    }
-
-    public String getLatitude() {
-        return latitude;
-    }
-
-    public void setLatitude(String latitude) {
-        this.latitude = latitude;
-    }
-
-    public String getEstablishDate() {
-        return establishDate;
-    }
-
-    public void setEstablishDate(String establishDate) {
-        this.establishDate = establishDate;
-    }
-
-    public String getUnifiedSocialCreditCode() {
-        return unifiedSocialCreditCode;
-    }
-
-    public void setUnifiedSocialCreditCode(String unifiedSocialCreditCode) {
-        this.unifiedSocialCreditCode = unifiedSocialCreditCode;
-    }
-
-    public String getBusinessLicenseUrl() {
-        return businessLicenseUrl;
-    }
-
-    public void setBusinessLicenseUrl(String businessLicenseUrl) {
-        this.businessLicenseUrl = businessLicenseUrl;
-    }
-
-    public String getDefaultImgUrl() {
-        return defaultImgUrl;
-    }
-
-    public void setDefaultImgUrl(String defaultImgUrl) {
-        this.defaultImgUrl = defaultImgUrl;
-    }
-
-    public String getPropagandaImgUrl() {
-        return propagandaImgUrl;
-    }
-
-    public void setPropagandaImgUrl(String propagandaImgUrl) {
-        this.propagandaImgUrl = propagandaImgUrl;
-    }
-
-    public String getCompanyIntroduce() {
-        return companyIntroduce;
-    }
-
-    public void setCompanyIntroduce(String companyIntroduce) {
-        this.companyIntroduce = companyIntroduce;
-    }
-
-    public Integer getVersionNum() {
-        return versionNum;
-    }
-
-    public void setVersionNum(Integer versionNum) {
-        this.versionNum = versionNum;
-    }
 
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
-            .append("companyId", getCompanyId())
+            .append("companyId", getCompanyReviewedId())
             .append("status", getStatus())
-            .append("applyDate", getApplyDate())
             .append("examineDate", getExamineDate())
             .append("rejectReason", getRejectReason())
             .append("createBy", getCreateBy())

+ 64 - 6
dgtly-system/src/main/java/com/dgtly/companyext/domain/CompanyExtInfo.java

@@ -1,5 +1,6 @@
 package com.dgtly.companyext.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.dgtly.common.annotation.Excel;
@@ -7,12 +8,12 @@ import com.dgtly.common.core.domain.BaseEntity;
 import java.util.Date;
 
 /**
- * 商户扩展信息对象 company_ext_info
+ * 商户待审核信息 company_reviewed
  * 
  * @author dgtly
  * @date 2020-02-13
  */
-public class CompanyExtInfo extends BaseEntity
+public class CompanyReviewed extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
@@ -29,7 +30,7 @@ public class CompanyExtInfo extends BaseEntity
 
     /** 企业类型 */
     @Excel(name = "企业类型")
-    private Integer companyType;
+    private String companyType;
 
     /** 详细地址 */
     @Excel(name = "详细地址")
@@ -53,6 +54,7 @@ public class CompanyExtInfo extends BaseEntity
 
     /** 成立日期 */
     @Excel(name = "成立日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date establishDate;
 
     /** 统一社会信用代码 */
@@ -79,7 +81,39 @@ public class CompanyExtInfo extends BaseEntity
     @Excel(name = "版本号")
     private Integer versionNum;
 
-    public void setId(Long id) 
+    /** 登录名称 */
+    @Excel(name = "登录名称")
+    private String loginName;
+
+    /** 密码 */
+    private String password;
+    /** 记录的原因,0为入驻,1为更新*/
+    private String reason;
+    /** 记录状态,0未处理,1已处理*/
+    private String status;
+
+
+
+    /** 主营业务*/
+    private String primaryBusiness;
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public void setId(Long id)
     {
         this.id = id;
     }
@@ -106,12 +140,12 @@ public class CompanyExtInfo extends BaseEntity
     {
         return companyName;
     }
-    public void setCompanyType(Integer companyType) 
+    public void setCompanyType(String companyType)
     {
         this.companyType = companyType;
     }
 
-    public Integer getCompanyType() 
+    public String getCompanyType()
     {
         return companyType;
     }
@@ -224,6 +258,30 @@ public class CompanyExtInfo extends BaseEntity
         return versionNum;
     }
 
+    public String getLoginName() {
+        return loginName;
+    }
+
+    public void setLoginName(String loginName) {
+        this.loginName = loginName;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getPrimaryBusiness() {
+        return primaryBusiness;
+    }
+
+    public void setPrimaryBusiness(String primaryBusiness) {
+        this.primaryBusiness = primaryBusiness;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 1 - 7
dgtly-system/src/main/java/com/dgtly/companyext/mapper/CompanyExamineMapper.java

@@ -19,13 +19,7 @@ public interface CompanyExamineMapper
      */
     public CompanyExamine selectCompanyExamineById(Long id);
 
-    /**
-     * 查询商户审核列表
-     * 
-     * @param companyExamine 商户审核
-     * @return 商户审核集合
-     */
-    public List<CompanyExamine> selectCompanyExamineList(CompanyExamine companyExamine);
+
 
     /**
      * 新增商户审核

+ 0 - 69
dgtly-system/src/main/java/com/dgtly/companyext/mapper/CompanyExtInfoMapper.java

@@ -1,69 +0,0 @@
-package com.dgtly.companyext.mapper;
-
-import com.dgtly.companyext.domain.CompanyExtInfo;
-import java.util.List;
-
-/**
- * 商户扩展信息Mapper接口
- * 
- * @author dgtly
- * @date 2020-02-13
- */
-public interface CompanyExtInfoMapper 
-{
-    /**
-     * 查询商户扩展信息
-     * 
-     * @param id 商户扩展信息ID
-     * @return 商户扩展信息
-     */
-    public CompanyExtInfo selectCompanyExtInfoById(Long id);
-
-    /**
-     * 查询商户扩展信息
-     *
-     * @param companyId 商户ID
-     * @return 商户扩展信息
-     */
-    public CompanyExtInfo selectCompanyExtInfoByCompanyId(Long companyId);
-
-    /**
-     * 查询商户扩展信息列表
-     * 
-     * @param companyExtInfo 商户扩展信息
-     * @return 商户扩展信息集合
-     */
-    public List<CompanyExtInfo> selectCompanyExtInfoList(CompanyExtInfo companyExtInfo);
-
-    /**
-     * 新增商户扩展信息
-     * 
-     * @param companyExtInfo 商户扩展信息
-     * @return 结果
-     */
-    public int insertCompanyExtInfo(CompanyExtInfo companyExtInfo);
-
-    /**
-     * 修改商户扩展信息
-     * 
-     * @param companyExtInfo 商户扩展信息
-     * @return 结果
-     */
-    public int updateCompanyExtInfo(CompanyExtInfo companyExtInfo);
-
-    /**
-     * 删除商户扩展信息
-     * 
-     * @param id 商户扩展信息ID
-     * @return 结果
-     */
-    public int deleteCompanyExtInfoById(Long id);
-
-    /**
-     * 批量删除商户扩展信息
-     * 
-     * @param ids 需要删除的数据ID
-     * @return 结果
-     */
-    public int deleteCompanyExtInfoByIds(String[] ids);
-}

+ 87 - 0
dgtly-system/src/main/java/com/dgtly/companyext/mapper/CompanyReviewedMapper.java

@@ -0,0 +1,87 @@
+package com.dgtly.companyext.mapper;
+
+import com.dgtly.companyext.domain.CompanyReviewed;
+import java.util.List;
+
+/**
+ * 商户扩展信息Mapper接口
+ * 
+ * @author dgtly
+ * @date 2020-02-13
+ */
+public interface CompanyReviewedMapper
+{
+    /**
+     * 查询商户扩展信息
+     * 
+     * @param id 商户扩展信息ID
+     * @return 商户扩展信息
+     */
+    public CompanyReviewed selectCompanyReviewedById(Long id);
+
+    /**
+     * 查询商户扩展信息
+     *
+     * @param companyId 商户ID
+     * @return 商户扩展信息
+     */
+    public CompanyReviewed selectCompanyReviewedByCompanyId(Long companyId);
+
+    /**
+     * 查询商户扩展信息列表
+     * 
+     * @param companyReviewed 商户扩展信息
+     * @return 商户扩展信息集合
+     */
+    public List<CompanyReviewed> selectCompanyReviewedList(CompanyReviewed companyReviewed);
+
+    /**
+     * 新增商户扩展信息
+     * 
+     * @param companyReviewed 商户扩展信息
+     * @return 结果
+     */
+    public int insertCompanyReviewed(CompanyReviewed companyReviewed);
+
+    /**
+     * 修改商户扩展信息
+     * 
+     * @param companyReviewed 商户扩展信息
+     * @return 结果
+     */
+    public int updateCompanyReviewed(CompanyReviewed companyReviewed);
+
+    /**
+     * 删除商户扩展信息
+     * 
+     * @param id 商户扩展信息ID
+     * @return 结果
+     */
+    public int deleteCompanyReviewedById(Long id);
+
+    /**
+     * 批量删除商户扩展信息
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCompanyReviewedByIds(String[] ids);
+
+    /**
+     * @descption: 商家入驻时检测商户管理员是否在企业待审核未处理的列表中存在
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    public int checkLoginNameUnique(String loginName);
+
+    /**
+     * @descption: 查询待审核列表,未审核排在前面
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    List<CompanyReviewed> selectCompanyReviewedListWiteAudit(CompanyReviewed companyReviewed);
+}

+ 0 - 7
dgtly-system/src/main/java/com/dgtly/companyext/service/ICompanyExamineService.java

@@ -19,13 +19,6 @@ public interface ICompanyExamineService
      */
     public CompanyExamine selectCompanyExamineById(Long id);
 
-    /**
-     * 查询商户审核列表
-     * 
-     * @param companyExamine 商户审核
-     * @return 商户审核集合
-     */
-    public List<CompanyExamine> selectCompanyExamineList(CompanyExamine companyExamine);
 
     /**
      * 新增商户审核

+ 0 - 69
dgtly-system/src/main/java/com/dgtly/companyext/service/ICompanyExtInfoService.java

@@ -1,69 +0,0 @@
-package com.dgtly.companyext.service;
-
-import com.dgtly.companyext.domain.CompanyExtInfo;
-import java.util.List;
-
-/**
- * 商户扩展信息Service接口
- * 
- * @author dgtly
- * @date 2020-02-13
- */
-public interface ICompanyExtInfoService 
-{
-    /**
-     * 查询商户扩展信息
-     * 
-     * @param id 商户扩展信息ID
-     * @return 商户扩展信息
-     */
-    public CompanyExtInfo selectCompanyExtInfoById(Long id);
-
-    /**
-     * 查询商户扩展信息列表
-     * 
-     * @param companyExtInfo 商户扩展信息
-     * @return 商户扩展信息集合
-     */
-    public List<CompanyExtInfo> selectCompanyExtInfoList(CompanyExtInfo companyExtInfo);
-
-    /**
-     * 新增商户扩展信息
-     * 
-     * @param companyExtInfo 商户扩展信息
-     * @return 结果
-     */
-    public int insertCompanyExtInfo(CompanyExtInfo companyExtInfo);
-
-    /**
-     * 修改商户扩展信息
-     * 
-     * @param companyExtInfo 商户扩展信息
-     * @return 结果
-     */
-    public int updateCompanyExtInfo(CompanyExtInfo companyExtInfo);
-
-    /**
-     * 批量删除商户扩展信息
-     * 
-     * @param ids 需要删除的数据ID
-     * @return 结果
-     */
-    public int deleteCompanyExtInfoByIds(String ids);
-
-    /**
-     * 删除商户扩展信息信息
-     * 
-     * @param id 商户扩展信息ID
-     * @return 结果
-     */
-    public int deleteCompanyExtInfoById(Long id);
-
-    /**
-     * 查询商户扩展信息
-     *
-     * @param companyId 商户ID
-     * @return 商户扩展信息
-     */
-    public CompanyExtInfo selectCompanyExtInfoByCompanyId(Long companyId);
-}

+ 99 - 0
dgtly-system/src/main/java/com/dgtly/companyext/service/ICompanyReviewedService.java

@@ -0,0 +1,99 @@
+package com.dgtly.companyext.service;
+
+import com.dgtly.companyext.domain.CompanyExamine;
+import com.dgtly.companyext.domain.CompanyReviewed;
+import java.util.List;
+
+/**
+ * 商户扩展信息Service接口
+ * 
+ * @author dgtly
+ * @date 2020-02-13
+ */
+public interface ICompanyReviewedService
+{
+    /**
+     * 查询商户扩展信息
+     * 
+     * @param id 商户扩展信息ID
+     * @return 商户扩展信息
+     */
+    public CompanyReviewed selectCompanyReviewedById(Long id);
+
+    /**
+     * 查询商户扩展信息列表
+     * 
+     * @param companyReviewed 商户扩展信息
+     * @return 商户扩展信息集合
+     */
+    public List<CompanyReviewed> selectCompanyReviewedList(CompanyReviewed companyReviewed);
+
+    /**
+     * 新增商户扩展信息
+     * 
+     * @param companyReviewed 商户扩展信息
+     * @return 结果
+     */
+    public int insertCompanyReviewed(CompanyReviewed companyReviewed);
+
+    /**
+     * 修改商户扩展信息
+     * 
+     * @param companyReviewed 商户扩展信息
+     * @return 结果
+     */
+    public int updateCompanyReviewed(CompanyReviewed companyReviewed);
+
+    /**
+     * 批量删除商户扩展信息
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCompanyReviewedByIds(String ids);
+
+    /**
+     * 删除商户扩展信息信息
+     * 
+     * @param id 商户扩展信息ID
+     * @return 结果
+     */
+    public int deleteCompanyReviewedById(Long id);
+
+    /**
+     * 查询商户扩展信息
+     *
+     * @param companyId 商户ID
+     * @return 商户扩展信息
+     */
+    public CompanyReviewed selectCompanyReviewedByCompanyId(Long companyId);
+
+    /**
+     * @descption: 商家入驻时检测商户管理员是否在企业待审核列表中存在
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    public String checkLoginNameUnique(String loginName);
+
+
+    /**
+     * @descption: 查询待审核列表,未审核排在前面
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    public List<CompanyReviewed> selectCompanyReviewedListWiteAudit(CompanyReviewed companyReviewed);
+
+
+    /**
+     * @descption: 拒绝入驻申请
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    public int refuseEnter(CompanyExamine companyExamine);
+}

+ 1 - 11
dgtly-system/src/main/java/com/dgtly/companyext/service/impl/CompanyExamineServiceImpl.java

@@ -33,17 +33,7 @@ public class CompanyExamineServiceImpl implements ICompanyExamineService
         return companyExamineMapper.selectCompanyExamineById(id);
     }
 
-    /**
-     * 查询商户审核列表
-     * 
-     * @param companyExamine 商户审核
-     * @return 商户审核
-     */
-    @Override
-    public List<CompanyExamine> selectCompanyExamineList(CompanyExamine companyExamine)
-    {
-        return companyExamineMapper.selectCompanyExamineList(companyExamine);
-    }
+
 
     /**
      * 新增商户审核

+ 0 - 108
dgtly-system/src/main/java/com/dgtly/companyext/service/impl/CompanyExtInfoServiceImpl.java

@@ -1,108 +0,0 @@
-package com.dgtly.companyext.service.impl;
-
-import java.util.List;
-import com.dgtly.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.dgtly.companyext.mapper.CompanyExtInfoMapper;
-import com.dgtly.companyext.domain.CompanyExtInfo;
-import com.dgtly.companyext.service.ICompanyExtInfoService;
-import com.dgtly.common.core.text.Convert;
-
-/**
- * 商户扩展信息Service业务层处理
- * 
- * @author dgtly
- * @date 2020-02-13
- */
-@Service
-public class CompanyExtInfoServiceImpl implements ICompanyExtInfoService 
-{
-    @Autowired
-    private CompanyExtInfoMapper companyExtInfoMapper;
-
-    /**
-     * 查询商户扩展信息
-     * 
-     * @param id 商户扩展信息ID
-     * @return 商户扩展信息
-     */
-    @Override
-    public CompanyExtInfo selectCompanyExtInfoById(Long id)
-    {
-        return companyExtInfoMapper.selectCompanyExtInfoById(id);
-    }
-
-    /**
-     * 查询商户扩展信息列表
-     * 
-     * @param companyExtInfo 商户扩展信息
-     * @return 商户扩展信息
-     */
-    @Override
-    public List<CompanyExtInfo> selectCompanyExtInfoList(CompanyExtInfo companyExtInfo)
-    {
-        return companyExtInfoMapper.selectCompanyExtInfoList(companyExtInfo);
-    }
-
-    /**
-     * 新增商户扩展信息
-     * 
-     * @param companyExtInfo 商户扩展信息
-     * @return 结果
-     */
-    @Override
-    public int insertCompanyExtInfo(CompanyExtInfo companyExtInfo)
-    {
-        companyExtInfo.setCreateTime(DateUtils.getNowDate());
-        return companyExtInfoMapper.insertCompanyExtInfo(companyExtInfo);
-    }
-
-    /**
-     * 修改商户扩展信息
-     * 
-     * @param companyExtInfo 商户扩展信息
-     * @return 结果
-     */
-    @Override
-    public int updateCompanyExtInfo(CompanyExtInfo companyExtInfo)
-    {
-        companyExtInfo.setUpdateTime(DateUtils.getNowDate());
-        return companyExtInfoMapper.updateCompanyExtInfo(companyExtInfo);
-    }
-
-    /**
-     * 删除商户扩展信息对象
-     * 
-     * @param ids 需要删除的数据ID
-     * @return 结果
-     */
-    @Override
-    public int deleteCompanyExtInfoByIds(String ids)
-    {
-        return companyExtInfoMapper.deleteCompanyExtInfoByIds(Convert.toStrArray(ids));
-    }
-
-    /**
-     * 删除商户扩展信息信息
-     * 
-     * @param id 商户扩展信息ID
-     * @return 结果
-     */
-    @Override
-    public int deleteCompanyExtInfoById(Long id)
-    {
-        return companyExtInfoMapper.deleteCompanyExtInfoById(id);
-    }
-
-    /**
-     * 查询商户扩展信息
-     *
-     * @param companyId 商户ID
-     * @return 商户扩展信息
-     */
-    @Override
-    public CompanyExtInfo selectCompanyExtInfoByCompanyId(Long companyId) {
-        return companyExtInfoMapper.selectCompanyExtInfoByCompanyId(companyId);
-    }
-}

+ 166 - 0
dgtly-system/src/main/java/com/dgtly/companyext/service/impl/CompanyReviewedServiceImpl.java

@@ -0,0 +1,166 @@
+package com.dgtly.companyext.service.impl;
+
+import java.util.List;
+
+import com.dgtly.common.constant.UserConstants;
+import com.dgtly.common.utils.DateUtils;
+import com.dgtly.common.utils.ShiroSaltUtil;
+import com.dgtly.companyext.domain.CompanyExamine;
+import com.dgtly.companyext.mapper.CompanyExamineMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.dgtly.companyext.mapper.CompanyReviewedMapper;
+import com.dgtly.companyext.domain.CompanyReviewed;
+import com.dgtly.companyext.service.ICompanyReviewedService;
+import com.dgtly.common.core.text.Convert;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 商户扩展信息Service业务层处理
+ * 
+ * @author dgtly
+ * @date 2020-02-13
+ */
+@Service
+public class CompanyReviewedServiceImpl implements ICompanyReviewedService 
+{
+    @Autowired
+    private CompanyReviewedMapper companyReviewedMapper;
+
+    @Autowired
+    private CompanyExamineMapper companyExamineMapper;
+
+    /**
+     * 查询商户扩展信息
+     * 
+     * @param id 商户扩展信息ID
+     * @return 商户扩展信息
+     */
+    @Override
+    public CompanyReviewed selectCompanyReviewedById(Long id)
+    {
+        return companyReviewedMapper.selectCompanyReviewedById(id);
+    }
+
+    /**
+     * 查询商户扩展信息列表
+     * 
+     * @param companyReviewed 商户扩展信息
+     * @return 商户扩展信息
+     */
+    @Override
+    public List<CompanyReviewed> selectCompanyReviewedList(CompanyReviewed companyReviewed)
+    {
+        return companyReviewedMapper.selectCompanyReviewedList(companyReviewed);
+    }
+
+    /**
+     * 新增商户扩展信息
+     * 
+     * @param companyReviewed 商户扩展信息
+     * @return 结果
+     */
+    @Override
+    public int insertCompanyReviewed(CompanyReviewed companyReviewed)
+    {
+        companyReviewed.setCreateTime(DateUtils.getNowDate());
+        return companyReviewedMapper.insertCompanyReviewed(companyReviewed);
+    }
+
+    /**
+     * 修改商户扩展信息
+     * 
+     * @param companyReviewed 商户扩展信息
+     * @return 结果
+     */
+    @Override
+    public int updateCompanyReviewed(CompanyReviewed companyReviewed)
+    {
+        companyReviewed.setUpdateTime(DateUtils.getNowDate());
+        return companyReviewedMapper.updateCompanyReviewed(companyReviewed);
+    }
+
+    /**
+     * 删除商户扩展信息对象
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCompanyReviewedByIds(String ids)
+    {
+        return companyReviewedMapper.deleteCompanyReviewedByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除商户扩展信息信息
+     * 
+     * @param id 商户扩展信息ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCompanyReviewedById(Long id)
+    {
+        return companyReviewedMapper.deleteCompanyReviewedById(id);
+    }
+
+    /**
+     * 查询商户扩展信息
+     *
+     * @param companyId 商户ID
+     * @return 商户扩展信息
+     */
+    @Override
+    public CompanyReviewed selectCompanyReviewedByCompanyId(Long companyId) {
+        return companyReviewedMapper.selectCompanyReviewedByCompanyId(companyId);
+    }
+
+    /**
+     * @descption: 商家入驻时检测商户管理员是否在企业待审核列表中存在
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    @Override
+    public String checkLoginNameUnique(String loginName) {
+        int count = companyReviewedMapper.checkLoginNameUnique(loginName);
+        if (count > 0)
+        {
+            return UserConstants.USER_NAME_NOT_UNIQUE;
+        }
+        return UserConstants.USER_NAME_UNIQUE;
+    }
+
+
+    /**
+     * @descption: 查询待审核列表,未审核排在前面
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    @Override
+    public List<CompanyReviewed> selectCompanyReviewedListWiteAudit(CompanyReviewed companyReviewed) {
+        return companyReviewedMapper.selectCompanyReviewedListWiteAudit(companyReviewed);
+    }
+
+    /**
+     * @descption: 拒绝入驻申请
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    @Override
+    @Transactional
+    public int refuseEnter(CompanyExamine companyExamine) {
+        CompanyReviewed cr = new CompanyReviewed();
+        cr.setId(companyExamine.getCompanyReviewedId());
+        cr.setStatus("2");
+        cr.setUpdateBy(companyExamine.getCreateBy());
+        companyReviewedMapper.updateCompanyReviewed(cr);
+
+        return companyExamineMapper.insertCompanyExamine(companyExamine);
+    }
+}

+ 188 - 25
dgtly-system/src/main/java/com/dgtly/system/domain/SysCompany.java

@@ -1,12 +1,13 @@
 package com.dgtly.system.domain;
 
-import com.dgtly.companyext.domain.CompanyExtInfo;
+import com.dgtly.companyext.domain.CompanyReviewed;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.dgtly.common.annotation.Excel;
 import com.dgtly.common.core.domain.BaseEntity;
 
-import java.sql.Timestamp;
+import java.util.Date;
 
 /**
  * 公司表对象 sys_company
@@ -27,42 +28,71 @@ public class SysCompany extends BaseEntity
 
     private Integer status;//公司状态
 
-    private Timestamp createTime;//创建时间
+    /** 企业类型 */
+    @Excel(name = "企业类型")
+    private String companyType;
 
-    public CompanyExtInfo getCompanyExtInfo() {
-        return companyExtInfo;
-    }
+    /** 详细地址 */
+    @Excel(name = "详细地址")
+    private String detailAddress;
 
-    public void setCompanyExtInfo(CompanyExtInfo companyExtInfo) {
-        this.companyExtInfo = companyExtInfo;
-    }
+    /** 经度 */
+    @Excel(name = "经度")
+    private String longitude;
 
-    /** 商家信息扩展表*/
-    private CompanyExtInfo companyExtInfo;
+    /** 纬度 */
+    @Excel(name = "纬度")
+    private String latitude;
 
-    public Integer getStatus() {
-        return status;
-    }
+    /** 企业法人 */
+    @Excel(name = "企业法人")
+    private String legalPerson;
 
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
+    /** 联系电话 */
+    @Excel(name = "联系电话")
+    private String contactNumber;
 
-    @Override
-    public Timestamp getCreateTime() {
-        return createTime;
-    }
+    /** 成立日期 */
+    @Excel(name = "成立日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date establishDate;
+
+    /** 统一社会信用代码 */
+    @Excel(name = "统一社会信用代码")
+    private String unifiedSocialCreditCode;
+
+    /** 营业执照 */
+    @Excel(name = "营业执照")
+    private String businessLicenseUrl;
+
+    /** 企业默认图片 */
+    @Excel(name = "企业默认图片")
+    private String defaultImgUrl;
+
+    /** 企业宣传图片 */
+    @Excel(name = "企业宣传图片")
+    private String propagandaImgUrl;
+
+    /** 企业介绍 */
+    @Excel(name = "企业介绍")
+    private String companyIntroduce;
+
+    /** 版本号 */
+    @Excel(name = "版本号")
+    private Integer versionNum;
+
+
+
+    /** 主营业务*/
+    private String primaryBusiness;
 
-    public void setCreateTime(Timestamp createTime) {
-        this.createTime = createTime;
-    }
 
     public void setId(Long id)
     {
         this.id = id;
     }
 
-    public Long getId() 
+    public Long getId()
     {
         return id;
     }
@@ -75,6 +105,139 @@ public class SysCompany extends BaseEntity
     {
         return companyName;
     }
+    public void setCompanyType(String companyType)
+    {
+        this.companyType = companyType;
+    }
+
+    public String getCompanyType()
+    {
+        return companyType;
+    }
+    public void setDetailAddress(String detailAddress)
+    {
+        this.detailAddress = detailAddress;
+    }
+
+    public String getDetailAddress()
+    {
+        return detailAddress;
+    }
+    public void setLongitude(String longitude)
+    {
+        this.longitude = longitude;
+    }
+
+    public String getLongitude()
+    {
+        return longitude;
+    }
+    public void setLatitude(String latitude)
+    {
+        this.latitude = latitude;
+    }
+
+    public String getLatitude()
+    {
+        return latitude;
+    }
+    public void setLegalPerson(String legalPerson)
+    {
+        this.legalPerson = legalPerson;
+    }
+
+    public String getLegalPerson()
+    {
+        return legalPerson;
+    }
+    public void setContactNumber(String contactNumber)
+    {
+        this.contactNumber = contactNumber;
+    }
+
+    public String getContactNumber()
+    {
+        return contactNumber;
+    }
+    public void setEstablishDate(Date establishDate)
+    {
+        this.establishDate = establishDate;
+    }
+
+    public Date getEstablishDate()
+    {
+        return establishDate;
+    }
+    public void setUnifiedSocialCreditCode(String unifiedSocialCreditCode)
+    {
+        this.unifiedSocialCreditCode = unifiedSocialCreditCode;
+    }
+
+    public String getUnifiedSocialCreditCode()
+    {
+        return unifiedSocialCreditCode;
+    }
+    public void setBusinessLicenseUrl(String businessLicenseUrl)
+    {
+        this.businessLicenseUrl = businessLicenseUrl;
+    }
+
+    public String getBusinessLicenseUrl()
+    {
+        return businessLicenseUrl;
+    }
+    public void setDefaultImgUrl(String defaultImgUrl)
+    {
+        this.defaultImgUrl = defaultImgUrl;
+    }
+
+    public String getDefaultImgUrl()
+    {
+        return defaultImgUrl;
+    }
+    public void setPropagandaImgUrl(String propagandaImgUrl)
+    {
+        this.propagandaImgUrl = propagandaImgUrl;
+    }
+
+    public String getPropagandaImgUrl()
+    {
+        return propagandaImgUrl;
+    }
+    public void setCompanyIntroduce(String companyIntroduce)
+    {
+        this.companyIntroduce = companyIntroduce;
+    }
+
+    public String getCompanyIntroduce()
+    {
+        return companyIntroduce;
+    }
+    public void setVersionNum(Integer versionNum)
+    {
+        this.versionNum = versionNum;
+    }
+
+    public Integer getVersionNum()
+    {
+        return versionNum;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getPrimaryBusiness() {
+        return primaryBusiness;
+    }
+
+    public void setPrimaryBusiness(String primaryBusiness) {
+        this.primaryBusiness = primaryBusiness;
+    }
 
 
 

+ 9 - 0
dgtly-system/src/main/java/com/dgtly/system/mapper/SysCompanyMapper.java

@@ -64,4 +64,13 @@ public interface SysCompanyMapper
      * @return
      */
     public List<SysCompany> selectCompanyHotList();
+
+    /**
+     * 查询公司表排除根目录公司
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    List<SysCompany> selectSysCompanyListExRoot(SysCompany sysCompany);
 }

+ 9 - 0
dgtly-system/src/main/java/com/dgtly/system/mapper/SysDictDataMapper.java

@@ -92,4 +92,13 @@ public interface SysDictDataMapper
      * @return 结果
      */
     public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
+
+    /**
+     * @descption: 查询简单的词典
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    public List<SysDictData> selectSimpleDictDataByType(String dictType);
 }

+ 18 - 5
dgtly-system/src/main/java/com/dgtly/system/service/ISysCompanyService.java

@@ -1,7 +1,8 @@
 package com.dgtly.system.service;
 
 import com.dgtly.common.core.domain.Ztree;
-import com.dgtly.companyext.domain.CompanyExtInfo;
+import com.dgtly.companyext.domain.CompanyExamine;
+import com.dgtly.companyext.domain.CompanyReviewed;
 import com.dgtly.system.domain.SysCompany;
 import com.dgtly.system.domain.SysUser;
 
@@ -85,10 +86,22 @@ public interface ISysCompanyService
      */
     public List<SysCompany> selectCompanyHotList();
 
+
     /**
-     * api商家入驻
-     * @param
-     * @return
+     * 查询公司表排除根目录公司
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    List<SysCompany> selectSysCompanyListExRoot(SysCompany sysCompany);
+
+    /**
+     * 审核入驻申请通过
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
      */
-    public int apiAddCompany(SysUser sysUser, SysCompany sysCompany, CompanyExtInfo cei);
+    public int allowEnter(CompanyExamine companyExamine);
 }

+ 10 - 1
dgtly-system/src/main/java/com/dgtly/system/service/ISysDictDataService.java

@@ -69,9 +69,18 @@ public interface ISysDictDataService
 
     /**
      * 修改保存字典数据信息
-     * 
+     *
      * @param dictData 字典数据信息
      * @return 结果
      */
     public int updateDictData(SysDictData dictData);
+
+    /**
+     * @descption: 查询简单的词典
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    public List<SysDictData> selectSimpleDictDataByType(String dictType);
 }

+ 93 - 43
dgtly-system/src/main/java/com/dgtly/system/service/impl/SysCompanyServiceImpl.java

@@ -1,6 +1,5 @@
 package com.dgtly.system.service.impl;
 
-import java.beans.Transient;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -9,10 +8,11 @@ import com.dgtly.common.core.domain.Ztree;
 import com.dgtly.common.exception.BusinessException;
 import com.dgtly.common.utils.DateUtils;
 import com.dgtly.common.utils.ShiroSaltUtil;
-import com.dgtly.common.utils.StringUtils;
 import com.dgtly.common.utils.security.EncryptPassWordClass;
-import com.dgtly.companyext.domain.CompanyExtInfo;
-import com.dgtly.companyext.mapper.CompanyExtInfoMapper;
+import com.dgtly.companyext.domain.CompanyExamine;
+import com.dgtly.companyext.domain.CompanyReviewed;
+import com.dgtly.companyext.mapper.CompanyExamineMapper;
+import com.dgtly.companyext.mapper.CompanyReviewedMapper;
 import com.dgtly.system.domain.SysDept;
 import com.dgtly.system.domain.SysUser;
 import com.dgtly.system.service.ISysConfigService;
@@ -47,14 +47,18 @@ public class SysCompanyServiceImpl implements ISysCompanyService
     private ISysConfigService sysConfigService;
 
     @Autowired
-    private CompanyExtInfoMapper companyExtInfoMapper;
+    private CompanyReviewedMapper companyReviewedMapper;
 
-    /**
-     * 查询公司表
-     * 
-     * @param id 公司表ID
-     * @return 公司表
-     */
+    @Autowired
+    private CompanyExamineMapper companyExamineMapper;
+
+
+        /**
+         * 查询公司表
+         *
+         * @param id 公司表ID
+         * @return 公司表
+         */
     @Override
     public SysCompany selectSysCompanyById(Long id)
     {
@@ -174,9 +178,28 @@ public class SysCompanyServiceImpl implements ISysCompanyService
         return sysCompanyMapper.selectCompanyHotList();
     }
 
+    /**
+     * 查询公司表排除根目录公司
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    @Override
+    public List<SysCompany> selectSysCompanyListExRoot(SysCompany sysCompany) {
+        return sysCompanyMapper.selectSysCompanyListExRoot(sysCompany);
+    }
 
-    public List<Ztree> initZtree(List<SysCompany> companies)
-    {
+
+
+    /**
+     * @descption: 树形结构初始化
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    public List<Ztree> initZtree(List<SysCompany> companies) {
         List<Ztree> ztrees = new ArrayList<Ztree>();
         for (SysCompany company : companies)
         {
@@ -194,42 +217,69 @@ public class SysCompanyServiceImpl implements ISysCompanyService
     }
 
 
+
     /**
-     * API商户入驻
-     * @param
-     * @return
+     * 审核入驻申请通过
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
      */
     @Override
     @Transactional
-    public int apiAddCompany(SysUser sysUser, SysCompany sysCompany, CompanyExtInfo companyExtInfo) {
-
-        sysCompanyMapper.insertSysCompany(sysCompany);
-        //创建公司主体部门
-        SysDept dept = new SysDept();
-        dept.setCompanyId(sysCompany.getId());
-        dept.setDeptName(sysCompany.getCompanyName());
-        /*父节点为100 总体结构*/
-        dept.setParentId(Long.parseLong(sysConfigService.selectConfigByKey("sys.dept.parentId")));
-        sysDeptService.insertDept(dept);
-        //创建管理员账号
-
-        if(sysUser.getSex()==null){
-            sysUser.setSex("1");
+    public int allowEnter(CompanyExamine companyExamine) {
+        /*1.查询公司信息创建SysCompany*/
+        /*2.创建部门*/
+        /*3.创建管理员*/
+        /*4.修改审核信息状态*/
+        /*5.插入审核信息*/
+        int i = 0;
+        CompanyReviewed cr = companyReviewedMapper.selectCompanyReviewedById(companyExamine.getCompanyReviewedId());
+        if(cr==null){
+            throw  new RuntimeException("创建公司实体时出错!");
         }
-        Long[] roles = {Long.parseLong(sysConfigService.selectConfigByKey("company.manager.roleId"))};
-        sysUser.setRoleIds(roles);
-        sysUser.setDeptId(dept.getDeptId());
-        sysUser.setCompanyId(sysCompany.getId());
-        sysUser.setSalt(ShiroSaltUtil.randomSalt());
-        sysUser.setPassword(EncryptPassWordClass.encryptPassword(sysUser.getLoginName(), sysUser.getPassword(), sysUser.getSalt()));
-        sysUserService.insertUser(sysUser);
-
-        companyExtInfo.setCompanyId(sysCompany.getId());
-        companyExtInfoMapper.insertCompanyExtInfo(companyExtInfo);
-        /*新增待审核记录*/
+        SysCompany company = reviewedTocompany(cr);
+        SysUser user= new SysUser();
+        user.setLoginName(cr.getLoginName());
+        user.setUserName("商户管理员");
+        user.setPassword(cr.getPassword());
+        user.setPhonenumber(cr.getContactNumber());
 
-
-        return 1;
+        if(addCompany(company,user)>0){
+            CompanyReviewed upCr = new CompanyReviewed();
+            upCr.setId(cr.getId());
+            upCr.setCompanyId(company.getId());
+            upCr.setStatus("1");
+            upCr.setUpdateBy(companyExamine.getCreateBy());
+            i = companyReviewedMapper.updateCompanyReviewed(upCr);
+            i +=companyExamineMapper.insertCompanyExamine(companyExamine);
+        }
+        if(i==2){
+            return 1;
+        }else{
+            throw new RuntimeException("创建公司实体时出错!");
+        }
     }
 
+    public SysCompany reviewedTocompany (CompanyReviewed cr) {
+        SysCompany result = new SysCompany();
+        result.setCompanyName(cr.getCompanyName());
+        result.setStatus(0);
+        result.setCompanyType(cr.getCompanyType());
+        result.setDetailAddress(cr.getDetailAddress());
+        result.setLongitude(cr.getLongitude());
+        result.setLatitude(cr.getLatitude());
+        result.setLegalPerson(cr.getLegalPerson());
+        result.setContactNumber(cr.getContactNumber());
+        result.setEstablishDate(cr.getEstablishDate());
+        result.setUnifiedSocialCreditCode(cr.getUnifiedSocialCreditCode());
+        result.setBusinessLicenseUrl(cr.getBusinessLicenseUrl());
+        result.setDefaultImgUrl(cr.getDefaultImgUrl());
+        result.setPropagandaImgUrl(cr.getPropagandaImgUrl());
+        result.setCompanyIntroduce(cr.getCompanyIntroduce());
+        result.setVersionNum(cr.getVersionNum());
+        result.setRemark(cr.getRemark());
+        result.setPrimaryBusiness(cr.getPrimaryBusiness());
+        return result;
+    }
 }

+ 12 - 0
dgtly-system/src/main/java/com/dgtly/system/service/impl/SysDictDataServiceImpl.java

@@ -115,4 +115,16 @@ public class SysDictDataServiceImpl implements ISysDictDataService
     {
         return dictDataMapper.updateDictData(dictData);
     }
+
+    /**
+     * @descption: 查询简单的词典
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020-2-25
+     */
+    @Override
+    public List<SysDictData> selectSimpleDictDataByType(String dictType) {
+        return dictDataMapper.selectSimpleDictDataByType(dictType);
+    }
 }

+ 11 - 87
dgtly-system/src/main/resources/mapper/companyext/CompanyExamineMapper.xml

@@ -6,21 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="CompanyExamine" id="CompanyExamineResult">
         <result property="id"    column="id"    />
-        <result property="companyId"    column="company_id"    />
-        <result property="companyName"    column="company_name"    />
-        <result property="companyType"    column="company_type"    />
-        <result property="detailAddress"    column="detail_address"    />
-        <result property="longitude"    column="longitude"    />
-        <result property="latitude"    column="latitude"    />
-        <result property="legalPerson"    column="legal_person"    />
-        <result property="contactNumber"    column="contact_number"    />
-        <result property="establishDate"    column="establish_date"    />
-        <result property="unifiedSocialCreditCode"    column="unified_social_credit_code"    />
-        <result property="businessLicenseUrl"    column="business_license_url"    />
-        <result property="defaultImgUrl"    column="default_img_url"    />
-        <result property="propagandaImgUrl"    column="propaganda_img_url"    />
-        <result property="companyIntroduce"    column="company_introduce"    />
-        <result property="versionNum"    column="version_num"    />
+        <result property="companyReviewedId"    column="company_reviewed_id"    />
         <result property="status"    column="status"    />
         <result property="applyDate"    column="apply_date"    />
         <result property="examineDate"    column="examine_date"    />
@@ -33,97 +19,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCompanyExamineVo">
-        select id, company_id, status, apply_date, examine_date, reject_reason, create_by, create_time, update_by, update_time, remark from company_examine
+        select id, company_reviewed_id, status, examine_date, reject_reason, create_by, create_time, update_by, update_time, remark from company_examine
     </sql>
 
-    <select id="selectCompanyExamineList" parameterType="CompanyExamine" resultMap="CompanyExamineResult">
-        SELECT
-        ce.id,
-        ce.company_id,
-        cei.company_name,
-        cei.company_type,
-        cei.legal_person,
-        cei.contact_number,
-        ce.STATUS,
-        date_format(ce.apply_date,'%Y-%m-%d') as 'apply_date',
-        date_format(ce.examine_date,'%Y-%m-%d') as 'examine_date',
-        ce.reject_reason
-        FROM
-        company_examine ce,company_ext_info cei
-        WHERE ce.company_id = cei.company_id AND ce.del_flag  = '0' AND cei.del_flag = '0'
-        AND cei.version_num = (SELECT MAX(a.version_num) FROM company_ext_info a WHERE a.company_id = ce.company_id)
-        <if test="companyName != null and companyName != ''"> and cei.company_name like concat('%', #{companyName}, '%')</if>
-        <if test="companyType != null and companyType != ''"> and cei.company_type = #{companyType}</if>
-        <if test="legalPerson != null and legalPerson != ''"> and cei.legal_person like concat('%', #{legalPerson}, '%')</if>
-        <if test="status != null and status != 3"> and ce.status = #{status}</if>
-        <if test="status != null and status == 3"> and (ce.status = 1 or ce.status = 2)</if>
-        <if test="applyDate != null and applyDate != ''"> and date_format(ce.apply_date,'%Y-%m-%d') = #{applyDate}</if>
-        <if test="examineDate != null and examineDate != ''"> and date_format(ce.examine_date,'%Y-%m-%d') = #{examineDate}</if>
-    </select>
+
 
     <select id="selectCompanyExamineById" parameterType="Long" resultMap="CompanyExamineResult">
-         SELECT
-            ce.id,
-            ce.company_id,
-            cei.company_name,
-            cei.company_type,
-            cei.legal_person,
-            cei.detail_address,
-            cei.longitude,
-            cei.latitude,
-            cei.legal_person,
-            cei.contact_number,
-            date_format(cei.establish_date,'%Y-%m-%d') as 'establish_date',
-            cei.unified_social_credit_code,
-            cei.business_license_url,
-            cei.default_img_url,
-            cei.propaganda_img_url,
-            cei.company_introduce,
-            cei.version_num,
-            cei.contact_number,
-            ce.STATUS,
-            ce.apply_date,
-            ce.examine_date,
-            ce.reject_reason
-        FROM
-            company_examine ce
-        LEFT JOIN	company_ext_info cei on ce.company_id = cei.company_id
-        WHERE
-        ce.del_flag = '0'
-        AND cei.del_flag = '0'
-        AND cei.version_num = (
-            SELECT
-                MAX(a.version_num)
-            FROM
-                company_ext_info a
-            WHERE
-                a.company_id = ce.company_id
-        )
-        AND ce.id = #{id}
+        <include refid="selectCompanyExamineVo"/>
+        where id = #{id}
     </select>
         
     <insert id="insertCompanyExamine" parameterType="CompanyExamine" useGeneratedKeys="true" keyProperty="id">
         insert into company_examine
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="companyId != null ">company_id,</if>
+            examine_date,
+            create_time,
+            <if test="companyReviewedId != null ">company_reviewed_id,</if>
             <if test="status != null ">status,</if>
-            <if test="applyDate != null ">apply_date,</if>
-            <if test="examineDate != null ">examine_date,</if>
             <if test="rejectReason != null  and rejectReason != ''">reject_reason,</if>
             <if test="createBy != null  and createBy != ''">create_by,</if>
-            <if test="createTime != null ">create_time,</if>
             <if test="updateBy != null  and updateBy != ''">update_by,</if>
             <if test="updateTime != null ">update_time,</if>
             <if test="remark != null  and remark != ''">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="companyId != null ">#{companyId},</if>
+            now(),
+            now(),
+            <if test="companyReviewedId != null ">#{companyReviewedId},</if>
             <if test="status != null ">#{status},</if>
-            <if test="applyDate != null ">#{applyDate},</if>
-            <if test="examineDate != null ">#{examineDate},</if>
             <if test="rejectReason != null  and rejectReason != ''">#{rejectReason},</if>
             <if test="createBy != null  and createBy != ''">#{createBy},</if>
-            <if test="createTime != null ">#{createTime},</if>
             <if test="updateBy != null  and updateBy != ''">#{updateBy},</if>
             <if test="updateTime != null ">#{updateTime},</if>
             <if test="remark != null  and remark != ''">#{remark},</if>
@@ -134,7 +59,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update company_examine
         <trim prefix="SET" suffixOverrides=",">
             <if test="status != null ">status = #{status},</if>
-            examine_date = NOW(),
             <if test="rejectReason != null  and rejectReason != ''">reject_reason = #{rejectReason},</if>
             <if test="updateBy != null  and updateBy != ''">update_by = #{updateBy},</if>
             update_time = NOW(),

+ 74 - 18
dgtly-system/src/main/resources/mapper/companyext/CompanyExtInfoMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.dgtly.companyext.mapper.CompanyExtInfoMapper">
+<mapper namespace="com.dgtly.companyext.mapper.CompanyReviewedMapper">
     
-    <resultMap type="CompanyExtInfo" id="CompanyExtInfoResult">
+    <resultMap type="CompanyReviewed" id="CompanyReviewedResult">
         <result property="id"    column="id"    />
         <result property="companyId"    column="company_id"    />
         <result property="companyName"    column="company_name"    />
@@ -26,14 +26,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <result property="loginName"    column="login_name"    />
+        <result property="password"    column="password"    />
+        <result property="reason"    column="reason"    />
+        <result property="status"    column="status"    />
+        <result property="primaryBusiness"    column="primary_business"    />
     </resultMap>
 
-    <sql id="selectCompanyExtInfoVo">
-        select id, company_id, company_name, company_type, detail_address, longitude, latitude, legal_person, contact_number, establish_date, unified_social_credit_code, business_license_url, default_img_url, propaganda_img_url, company_introduce, version_num, create_by, create_time, update_by, update_time, remark from company_ext_info
+    <sql id="selectCompanyReviewedVo">
+        select id, company_id, company_name, company_type, detail_address, longitude, latitude, legal_person, contact_number, establish_date,
+         unified_social_credit_code, business_license_url, default_img_url, propaganda_img_url, company_introduce, version_num, create_by,
+         create_time, update_by, update_time, remark ,login_name,password,reason,status,primary_business
+         from company_reviewed
     </sql>
 
-    <select id="selectCompanyExtInfoList" parameterType="CompanyExtInfo" resultMap="CompanyExtInfoResult">
-        <include refid="selectCompanyExtInfoVo"/>
+    <select id="selectCompanyReviewedList" parameterType="CompanyReviewed" resultMap="CompanyReviewedResult">
+        <include refid="selectCompanyReviewedVo"/>
         <where>  
             <if test="companyId != null "> and company_id = #{companyId}</if>
             <if test="companyName != null  and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
@@ -50,20 +58,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="propagandaImgUrl != null  and propagandaImgUrl != ''"> and propaganda_img_url = #{propagandaImgUrl}</if>
             <if test="companyIntroduce != null  and companyIntroduce != ''"> and company_introduce = #{companyIntroduce}</if>
             <if test="versionNum != null "> and version_num = #{versionNum}</if>
+            <if test="loginName != null  and loginName != ''"> and login_name = #{loginName}</if>
+            <if test="password != null  and password != ''"> and password = #{password}</if>
+            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
+            <if test="status != null "> and status = #{status}</if>
         </where>
     </select>
     
-    <select id="selectCompanyExtInfoById" parameterType="Long" resultMap="CompanyExtInfoResult">
-        <include refid="selectCompanyExtInfoVo"/>
+    <select id="selectCompanyReviewedById" parameterType="Long" resultMap="CompanyReviewedResult">
+        <include refid="selectCompanyReviewedVo"/>
         where id = #{id}
     </select>
-    <select id="selectCompanyExtInfoByCompanyId" parameterType="Long" resultMap="CompanyExtInfoResult">
-        <include refid="selectCompanyExtInfoVo"/>
+    <select id="selectCompanyReviewedByCompanyId" parameterType="Long" resultMap="CompanyReviewedResult">
+        <include refid="selectCompanyReviewedVo"/>
         where company_id = #{companyId}
     </select>
         
-    <insert id="insertCompanyExtInfo" parameterType="CompanyExtInfo" useGeneratedKeys="true" keyProperty="id">
-        insert into company_ext_info
+    <insert id="insertCompanyReviewed" parameterType="CompanyReviewed" useGeneratedKeys="true" keyProperty="id">
+        insert into company_reviewed
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="companyId != null ">company_id,</if>
             <if test="companyName != null  and companyName != ''">company_name,</if>
@@ -85,6 +97,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null  and updateBy != ''">update_by,</if>
             <if test="updateTime != null ">update_time,</if>
             <if test="remark != null  and remark != ''">remark,</if>
+            <if test="loginName != null  and loginName != ''">  login_name ,</if>
+            <if test="password != null  and password != ''"> password ,</if>
+            <if test="reason != null  and reason != ''">  reason,</if>
+            <if test="status != null ">status ,</if>
+            <if test="primaryBusiness != null  and primaryBusiness != ''">primary_business,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="companyId != null ">#{companyId},</if>
@@ -107,11 +124,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null  and updateBy != ''">#{updateBy},</if>
             <if test="updateTime != null ">#{updateTime},</if>
             <if test="remark != null  and remark != ''">#{remark},</if>
+            <if test="loginName != null  and loginName != ''"> #{loginName},</if>
+            <if test="password != null  and password != ''"> #{password},</if>
+            <if test="reason != null  and reason != ''"> #{reason},</if>
+            <if test="status != null "> #{status},</if>
+            <if test="primaryBusiness != null  and primaryBusiness != ''">#{primaryBusiness},</if>
          </trim>
     </insert>
 
-    <update id="updateCompanyExtInfo" parameterType="CompanyExtInfo">
-        update company_ext_info
+    <update id="updateCompanyReviewed" parameterType="CompanyReviewed">
+        update company_reviewed
         <trim prefix="SET" suffixOverrides=",">
             <if test="companyId != null ">company_id = #{companyId},</if>
             <if test="companyName != null  and companyName != ''">company_name = #{companyName},</if>
@@ -133,19 +155,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null  and updateBy != ''">update_by = #{updateBy},</if>
             <if test="updateTime != null ">update_time = #{updateTime},</if>
             <if test="remark != null  and remark != ''">remark = #{remark},</if>
+            <if test="loginName != null  and loginName != ''">  login_name = #{loginName},</if>
+            <if test="password != null  and password != ''">  password = #{password},</if>
+            <if test="reason != null  and reason != ''">  reason = #{reason},</if>
+            <if test="status != null ">  status = #{status},</if>
+            <if test="primaryBusiness != null  and primaryBusiness != ''">primary_business=#{primaryBusiness},</if>
         </trim>
         where id = #{id}
     </update>
 
-    <delete id="deleteCompanyExtInfoById" parameterType="Long">
-        delete from company_ext_info where id = #{id}
+    <delete id="deleteCompanyReviewedById" parameterType="Long">
+        delete from company_reviewed where id = #{id}
     </delete>
 
-    <delete id="deleteCompanyExtInfoByIds" parameterType="String">
-        delete from company_ext_info where id in 
+    <delete id="deleteCompanyReviewedByIds" parameterType="String">
+        delete from company_reviewed where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
+
+    <select id="checkLoginNameUnique"  resultType="int">
+		select count(1) from company_reviewed where login_name=#{loginName} and reason='0' and status="0"
+	</select>
+
+    <select id="selectCompanyReviewedListWiteAudit" parameterType="CompanyReviewed" resultMap="CompanyReviewedResult">
+        <include refid="selectCompanyReviewedVo"/>
+        <where>
+            <if test="companyId != null "> and company_id = #{companyId}</if>
+            <if test="companyName != null  and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
+            <if test="companyType != null "> and company_type = #{companyType}</if>
+            <if test="detailAddress != null  and detailAddress != ''"> and detail_address = #{detailAddress}</if>
+            <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
+            <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
+            <if test="legalPerson != null  and legalPerson != ''"> and legal_person = #{legalPerson}</if>
+            <if test="contactNumber != null  and contactNumber != ''"> and contact_number = #{contactNumber}</if>
+            <if test="establishDate != null "> and establish_date = #{establishDate}</if>
+            <if test="unifiedSocialCreditCode != null  and unifiedSocialCreditCode != ''"> and unified_social_credit_code = #{unifiedSocialCreditCode}</if>
+            <if test="businessLicenseUrl != null  and businessLicenseUrl != ''"> and business_license_url = #{businessLicenseUrl}</if>
+            <if test="defaultImgUrl != null  and defaultImgUrl != ''"> and default_img_url = #{defaultImgUrl}</if>
+            <if test="propagandaImgUrl != null  and propagandaImgUrl != ''"> and propaganda_img_url = #{propagandaImgUrl}</if>
+            <if test="companyIntroduce != null  and companyIntroduce != ''"> and company_introduce = #{companyIntroduce}</if>
+            <if test="versionNum != null "> and version_num = #{versionNum}</if>
+            <if test="loginName != null  and loginName != ''"> and login_name = #{loginName}</if>
+            <if test="password != null  and password != ''"> and password = #{password}</if>
+            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
+        </where>
+        order by status,create_time
+    </select>
     
 </mapper>

+ 78 - 15
dgtly-system/src/main/resources/mapper/system/SysCompanyMapper.xml

@@ -6,13 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="SysCompany" id="SysCompanyResult">
         <result property="id"    column="id"    />
-        <result property="companyName"    column="company_name"    />
         <result property="status"    column="status"    />
-        <collection property="companyExtInfo" resultMap="CompanyExtInfoResult" />
-    </resultMap>
-
-    <resultMap type="CompanyExtInfo" id="CompanyExtInfoResult">
-        <result property="companyId"    column="company_id"    />
         <result property="companyName"    column="company_name"    />
         <result property="companyType"    column="company_type"    />
         <result property="detailAddress"    column="detail_address"    />
@@ -32,16 +26,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <result property="primaryBusiness"    column="primary_business"    />
     </resultMap>
 
+
     <sql id="selectSysCompanyVo">
-        select id, company_name,status,create_time from sys_company
+        select id, company_name,company_type,detail_address,longitude,latitude,legal_person,contact_number,establish_date,
+        unified_social_credit_code,business_license_url,default_img_url,propaganda_img_url,company_introduce,version_num,
+        create_by,update_by,update_time,remark,status,create_time,primary_business
+        from sys_company
     </sql>
 
     <select id="selectSysCompanyList" parameterType="SysCompany" resultMap="SysCompanyResult">
         <include refid="selectSysCompanyVo"/>
         <where>  
-            <if test="companyName != null  and companyName != ''"> and company_name = #{companyName}</if>
+            <if test="companyName != null  and companyName != ''"> and company_name like concat('%', #{companyName},'%')</if>
+            <if test="status != null  and status != ''">and status =#{status}</if>
+            <if test="companyType != null  and companyType != ''">and companyType =#{company_type}</if>
         </where>
     </select>
     
@@ -53,18 +54,74 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertSysCompany" parameterType="SysCompany" useGeneratedKeys="true" keyProperty="id">
         insert into sys_company
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            create_time,
+            <if test="status != null  and status != ''">status,</if>
             <if test="companyName != null  and companyName != ''">company_name,</if>
-         </trim>
+            <if test="companyType != null  and companyType != ''">company_type,</if>
+            <if test="detailAddress != null  and detailAddress != ''">detail_address,</if>
+            <if test="longitude != null  and longitude != ''">longitude,</if>
+            <if test="latitude != null  and latitude != ''">latitude,</if>
+            <if test="legalPerson != null  and legalPerson != ''">legal_person,</if>
+            <if test="contactNumber != null  and contactNumber != ''">contact_number,</if>
+            <if test="establishDate != null ">establish_date,</if>
+            <if test="unifiedSocialCreditCode != null  and unifiedSocialCreditCode != ''">unified_social_credit_code,</if>
+            <if test="businessLicenseUrl != null  and businessLicenseUrl != ''">business_license_url,</if>
+            <if test="defaultImgUrl != null  and defaultImgUrl != ''">default_img_url,</if>
+            <if test="propagandaImgUrl != null  and propagandaImgUrl != ''">propaganda_img_url,</if>
+            <if test="companyIntroduce != null  and companyIntroduce != ''">company_introduce,</if>
+            <if test="versionNum != null  and versionNum != ''">version_num,</if>
+            <if test="createBy != null  and createBy != ''">create_by,</if>
+            <if test="updateBy != null  and updateBy != ''">update_by,</if>
+            <if test="remark != null  and remark != ''">remark,</if>
+            <if test="primaryBusiness != null  and primaryBusiness != ''">primary_business,</if>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            now(),
+            <if test="status != null  and status != ''">#{status},</if>
             <if test="companyName != null  and companyName != ''">#{companyName},</if>
+            <if test="companyType != null  and companyType != ''">#{companyType},</if>
+            <if test="detailAddress != null  and detailAddress != ''">#{detailAddress},</if>
+            <if test="longitude != null  and longitude != ''">#{longitude},</if>
+            <if test="latitude != null  and latitude != ''">#{latitude},</if>
+            <if test="legalPerson != null  and legalPerson != ''">#{legalPerson},</if>
+            <if test="contactNumber != null  and contactNumber != ''">#{contactNumber},</if>
+            <if test="establishDate != null ">#{establishDate},</if>
+            <if test="unifiedSocialCreditCode != null  and unifiedSocialCreditCode != ''">#{unifiedSocialCreditCode},</if>
+            <if test="businessLicenseUrl != null  and businessLicenseUrl != ''">#{businessLicenseUrl},</if>
+            <if test="defaultImgUrl != null  and defaultImgUrl != ''">#{defaultImgUrl},</if>
+            <if test="propagandaImgUrl != null  and propagandaImgUrl != ''">#{propagandaImgUrl},</if>
+            <if test="companyIntroduce != null  and companyIntroduce != ''">#{companyIntroduce},</if>
+            <if test="versionNum != null  and versionNum != ''">#{versionNum},</if>
+            <if test="createBy != null  and createBy != ''">#{createBy},</if>
+            <if test="updateBy != null  and updateBy != ''">#{updateBy},</if>
+            <if test="remark != null  and remark != ''">#{remark},</if>
+            <if test="primaryBusiness != null  and primaryBusiness != ''">#{primaryBusiness},</if>
          </trim>
     </insert>
 
     <update id="updateSysCompany" parameterType="SysCompany">
         update sys_company
         <trim prefix="SET" suffixOverrides=",">
+            update_time = now(),
             <if test="status != null">status = #{status},</if>
-            <if test="companyName != null  and companyName != ''">company _name= #{companyName},</if>
+            <if test="companyName != null  and companyName != ''">company_name= #{companyName},</if>
+            <if test="companyType != null  and companyType != ''">company_type= #{companyType},</if>
+            <if test="detailAddress != null  and detailAddress != ''">detail_address= #{detailAddress},</if>
+            <if test="longitude != null  and longitude != ''">longitude= #{longitude},</if>
+            <if test="latitude != null  and latitude != ''">latitude= #{latitude},</if>
+            <if test="legalPerson != null  and legalPerson != ''">legal_person= #{legalPerson},</if>
+            <if test="contactNumber != null  and contactNumber != ''">contact_number= #{contactNumber},</if>
+            <if test="establishDate != null ">establish_date= #{establishDate},</if>
+            <if test="unifiedSocialCreditCode != null  and unifiedSocialCreditCode != ''">unified_social_credit_code= #{unifiedSocialCreditCode},</if>
+            <if test="businessLicenseUrl != null  and businessLicenseUrl != ''">businessLicenseUrl= #{businessLicenseUrl},</if>
+            <if test="defaultImgUrl != null  and defaultImgUrl != ''">default_img_url= #{defaultImgUrl},</if>
+            <if test="propagandaImgUrl != null  and propagandaImgUrl != ''">propaganda_img_url= #{propagandaImgUrl},</if>
+            <if test="companyIntroduce != null  and companyIntroduce != ''">company_introduce= #{companyIntroduce},</if>
+            <if test="versionNum != null  and versionNum != ''">version_num= #{versionNum},</if>
+            <if test="createBy != null  and createBy != ''">create_by= #{createBy},</if>
+            <if test="updateBy != null  and updateBy != ''">update_by= #{updateBy},</if>
+            <if test="remark != null  and remark != ''">remark= #{remark},</if>
+            <if test="primaryBusiness != null  and primaryBusiness != ''">primary_business=#{primaryBusiness},</if>
         </trim>
         where id = #{id}
     </update>
@@ -81,12 +138,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
 
-    <select id="selectCompanyHotList" parameterType="Long" resultMap="SysCompanyResult">
-        select sc.id, sc.company_name,sc.status,sc.create_time,
-        cei.default_img_url,
+    <select id="selectCompanyHotList"  resultMap="SysCompanyResult">
+        select sc.id, sc.company_name,sc.establish_date,sc.default_img_url,sc.primary_business
         from sys_company sc
-        left join company_ext_info cei on sc.id = cei.company_id
-        where sc.id != 1
+        where sc.id != 1 and sc.status = 0
+        limit 0,5
+    </select>
+    <select id="selectSysCompanyListExRoot" parameterType="SysCompany" resultMap="SysCompanyResult">
+        <include refid="selectSysCompanyVo"/>
+        <where>
+            id !=1
+            <if test="companyName != null  and companyName != ''"> and company_name = #{companyName}</if>
+        </where>
     </select>
     
 </mapper>

+ 6 - 0
dgtly-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@@ -119,5 +119,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			sysdate()
  		)
 	</insert>
+
+	<select id="selectSimpleDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
+		select dict_label, dict_value
+		from sys_dict_data
+		where status = '0' and dict_type = #{dictType} order by dict_sort asc
+	</select>
 	
 </mapper>