Browse Source

关注接口修改BUG 商品列表筛选问题修改 商户入驻公示接口

qxp 4 years ago
parent
commit
c44ec1b425
31 changed files with 405 additions and 295 deletions
  1. 19 4
      dgtly-admin/src/main/java/com/dgtly/web/controller/company/CompanyController.java
  2. 0 140
      dgtly-admin/src/main/java/com/dgtly/web/controller/company/CompanyExamineController.java
  3. 0 125
      dgtly-admin/src/main/java/com/dgtly/web/controller/company/CompanyReviewedController.java
  4. 1 1
      dgtly-admin/src/main/resources/templates/company/company.html
  5. 125 0
      dgtly-admin/src/main/resources/templates/company/edit/edit.html
  6. 6 0
      dgtly-admin/src/main/resources/templates/company/honour/add.html
  7. 6 0
      dgtly-admin/src/main/resources/templates/company/honour/edit.html
  8. 4 0
      dgtly-admin/src/main/resources/templates/company/honour/honour.html
  9. 11 0
      dgtly-api/src/main/java/com/dgtly/api/controller/SysCompanyController.java
  10. 5 0
      dgtly-apiframework/pom.xml
  11. 5 3
      dgtly-apiframework/src/main/java/com/dgtly/apiframework/interceptor/AuthenticationInterceptor.java
  12. 4 0
      dgtly-common/src/main/java/com/dgtly/common/core/domain/ParameterObject.java
  13. 7 2
      dgtly-goods/dgtly-goods-api/src/main/java/com/dgtly/goods/controller/GoodsInfoController.java
  14. 20 0
      dgtly-goods/dgtly-goods-common/src/main/java/com/dgtly/goods/domain/GoodsInfo.java
  15. 9 0
      dgtly-goods/dgtly-goods-common/src/main/java/com/dgtly/goods/mapper/GoodsInfoMapper.java
  16. 9 0
      dgtly-goods/dgtly-goods-common/src/main/java/com/dgtly/goods/service/IGoodsInfoService.java
  17. 13 0
      dgtly-goods/dgtly-goods-common/src/main/java/com/dgtly/goods/service/impl/GoodsInfoServiceImpl.java
  18. 21 1
      dgtly-goods/dgtly-goods-common/src/main/resources/mapper/goods/GoodsInfoMapper.xml
  19. 24 4
      dgtly-member/dgtly-member-api/src/main/java/com/dgtly/member/controller/MemberFollowApi.java
  20. 17 0
      dgtly-member/dgtly-member-api/src/main/java/com/dgtly/member/controller/MemberInfoController.java
  21. 0 10
      dgtly-member/dgtly-member-api/src/main/java/com/dgtly/member/controller/UserInfoController.java
  22. 12 0
      dgtly-member/dgtly-member-common/src/main/java/com/dgtly/member/mapper/MemberFollowMapper.java
  23. 9 0
      dgtly-member/dgtly-member-common/src/main/java/com/dgtly/member/service/IMemberFollowService.java
  24. 12 0
      dgtly-member/dgtly-member-common/src/main/java/com/dgtly/member/service/impl/MemberFollowServiceImpl.java
  25. 4 0
      dgtly-member/dgtly-member-common/src/main/resources/mapper/member/MemberFollowMapper.xml
  26. 13 0
      dgtly-system/src/main/java/com/dgtly/companyext/domain/CompanyHonour.java
  27. 9 0
      dgtly-system/src/main/java/com/dgtly/companyext/mapper/CompanyReviewedMapper.java
  28. 9 0
      dgtly-system/src/main/java/com/dgtly/companyext/service/ICompanyReviewedService.java
  29. 13 1
      dgtly-system/src/main/java/com/dgtly/companyext/service/impl/CompanyReviewedServiceImpl.java
  30. 5 3
      dgtly-system/src/main/resources/mapper/companyext/CompanyHonourMapper.xml
  31. 13 1
      dgtly-system/src/main/resources/mapper/companyext/CompanyReviewedMapper.xml

+ 19 - 4
dgtly-admin/src/main/java/com/dgtly/web/controller/company/CompanyController.java

@@ -61,7 +61,7 @@ public class CompanyController extends BaseController
     @Autowired
     private ICompanyExamineService companyExamineService;
 
-    @RequiresPermissions("company:info:view")
+    @RequiresPermissions("company:company:view")
     @GetMapping("/company")
     public String company()
     {
@@ -71,7 +71,7 @@ public class CompanyController extends BaseController
     /**
      * 查询公司表列表
      */
-    @RequiresPermissions("system:company:list")
+    @RequiresPermissions("company:company:list")
     @PostMapping("/list")
     @ResponseBody
     public TableDataInfo list(SysCompany sysCompany)
@@ -109,7 +109,7 @@ public class CompanyController extends BaseController
      * @auther: qxp
      * @date: 2020-2-25
      */
-    @RequiresPermissions("company:info:view")
+    @RequiresPermissions("company:conpmay:info")
     @GetMapping("/info/{id}")
     public String info(@PathVariable("id")Long id, ModelMap mmap)
     {
@@ -201,8 +201,13 @@ public class CompanyController extends BaseController
         return prefix + "/editexamine/reviewed";
     }
 
+
     /**
-     * 查询商户修改信息审核列表
+     * @descption: 查询商户修改信息审核列表
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 14:03
      */
     @RequiresPermissions("company:editexamine:list")
     @PostMapping("/editexamine/list")
@@ -215,5 +220,15 @@ public class CompanyController extends BaseController
         return getDataTable(list);
     }
 
+    @RequiresPermissions("company:edit:view")
+    @GetMapping("/edit")
+    public String edit(ModelMap mmp)
+    {
+        Long companyId = ShiroUtils.getCompanyId();
+        SysCompany sysCompany = sysCompanyService.selectSysCompanyById(companyId);
+
+        mmp.addAttribute("sysCompany",sysCompany);
+        return prefix + "/edit/edit";
+    }
 
 }

+ 0 - 140
dgtly-admin/src/main/java/com/dgtly/web/controller/company/CompanyExamineController.java

@@ -1,140 +0,0 @@
-package com.dgtly.web.controller.company;
-
-import com.dgtly.framework.util.ShiroUtils;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import com.dgtly.common.annotation.Log;
-import com.dgtly.common.enums.BusinessType;
-import com.dgtly.companyext.domain.CompanyExamine;
-import com.dgtly.companyext.service.ICompanyExamineService;
-import com.dgtly.common.core.controller.BaseController;
-import com.dgtly.common.core.domain.AjaxResult;
-import com.dgtly.common.utils.poi.ExcelUtil;
-import com.dgtly.common.core.page.TableDataInfo;
-
-import java.util.List;
-
-/**
- * 商户审核Controller
- * 
- * @author dgtly
- * @date 2020-02-13
- */
-@Controller
-@RequestMapping("/companyext/examine")
-public class CompanyExamineController extends BaseController
-{
-    private String prefix = "companyext/examine";
-
-    @Autowired
-    private ICompanyExamineService companyExamineService;
-
-    @RequiresPermissions("companyext:examine:view")
-    @GetMapping()
-    public String examine()
-    {
-        return prefix + "/examine";
-    }
-
-    /*
-     * @Description: 待审核列表页面
-     * @Author: koucx
-     * @Date: 2020-02-13
-    **/
-    @RequiresPermissions("company:noexamine:view")
-    @GetMapping("/noexamine")
-    public String noexamine()
-    {
-        return prefix + "/noexamine";
-    }
-
-    /*
-     * @Description: 已经审核列表页面
-     * @Author: koucx
-     * @Date: 2020-02-13
-     **/
-    @RequiresPermissions("companyext:yesexamine:view")
-    @GetMapping("/yesexamine")
-    public String yesexamine()
-    {
-        return prefix + "/yesexamine";
-    }
-
-
-
-
-    /**
-     * 新增商户审核
-     */
-    @GetMapping("/add")
-    public String add()
-    {
-        return prefix + "/add";
-    }
-
-    /**
-     * 新增保存商户审核
-     */
-    @RequiresPermissions("companyext:examine:add")
-    @Log(title = "商户审核", businessType = BusinessType.INSERT)
-    @PostMapping("/add")
-    @ResponseBody
-    public AjaxResult addSave(CompanyExamine companyExamine)
-    {
-        return toAjax(companyExamineService.insertCompanyExamine(companyExamine));
-    }
-
-    /**
-     * 修改商户审核
-     */
-    @GetMapping("/edit/{id}")
-    public String edit(@PathVariable("id") Long id, ModelMap mmap)
-    {
-        CompanyExamine companyExamine = companyExamineService.selectCompanyExamineById(id);
-        mmap.put("companyExamine", companyExamine);
-        return prefix + "/edit";
-    }
-
-    /**
-     * 商户审核页面跳转
-     */
-    @GetMapping("/approvePage/{id}")
-    public String approvePage(@PathVariable("id") Long id, ModelMap mmap)
-    {
-        CompanyExamine companyExamine = companyExamineService.selectCompanyExamineById(id);
-        mmap.put("companyExamine", companyExamine);
-        return prefix + "/approve";
-    }
-
-    /**
-     * 修改保存商户审核
-     */
-    @RequiresPermissions("companyext:examine:edit")
-    @Log(title = "商户审核", businessType = BusinessType.UPDATE)
-    @PostMapping("/edit")
-    @ResponseBody
-    public AjaxResult editSave(CompanyExamine companyExamine)
-    {
-        companyExamine.setUpdateBy(ShiroUtils.getUserId().toString());
-        return toAjax(companyExamineService.updateCompanyExamine(companyExamine));
-    }
-
-    /**
-     * 删除商户审核
-     */
-    @RequiresPermissions("companyext:examine:remove")
-    @Log(title = "商户审核", businessType = BusinessType.DELETE)
-    @PostMapping( "/remove")
-    @ResponseBody
-    public AjaxResult remove(String ids)
-    {
-        return toAjax(companyExamineService.deleteCompanyExamineByIds(ids));
-    }
-}

+ 0 - 125
dgtly-admin/src/main/java/com/dgtly/web/controller/company/CompanyReviewedController.java

@@ -1,125 +0,0 @@
-package com.dgtly.web.controller.company;
-
-import java.util.List;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import com.dgtly.common.annotation.Log;
-import com.dgtly.common.enums.BusinessType;
-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;
-import com.dgtly.common.core.page.TableDataInfo;
-
-/**
- * 商户扩展信息Controller
- * 
- * @author dgtly
- * @date 2020-02-13
- */
-@Controller
-@RequestMapping("/companyext/info")
-public class CompanyReviewedController extends BaseController
-{
-    private String prefix = "companyext/info";
-
-    @Autowired
-    private ICompanyReviewedService companyReviewedService;
-
-    @RequiresPermissions("companyext:info:view")
-    @GetMapping()
-    public String info()
-    {
-        return prefix + "/info";
-    }
-
-    /**
-     * 查询商户扩展信息列表
-     */
-    @RequiresPermissions("companyext:info:list")
-    @PostMapping("/list")
-    @ResponseBody
-    public TableDataInfo list(CompanyReviewed companyReviewed)
-    {
-        startPage();
-        List<CompanyReviewed> list = companyReviewedService.selectCompanyReviewedList(companyReviewed);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出商户扩展信息列表
-     */
-    @RequiresPermissions("companyext:info:export")
-    @PostMapping("/export")
-    @ResponseBody
-    public AjaxResult export(CompanyReviewed companyReviewed)
-    {
-        List<CompanyReviewed> list = companyReviewedService.selectCompanyReviewedList(companyReviewed);
-        ExcelUtil<CompanyReviewed> util = new ExcelUtil<CompanyReviewed>(CompanyReviewed.class);
-        return util.exportExcel(list, "info");
-    }
-
-    /**
-     * 新增商户扩展信息
-     */
-    @GetMapping("/add")
-    public String add()
-    {
-        return prefix + "/add";
-    }
-
-    /**
-     * 新增保存商户扩展信息
-     */
-    @RequiresPermissions("companyext:info:add")
-    @Log(title = "商户扩展信息", businessType = BusinessType.INSERT)
-    @PostMapping("/add")
-    @ResponseBody
-    public AjaxResult addSave(CompanyReviewed companyReviewed)
-    {
-        return toAjax(companyReviewedService.insertCompanyReviewed(companyReviewed));
-    }
-
-    /**
-     * 修改商户扩展信息
-     */
-    @GetMapping("/edit/{id}")
-    public String edit(@PathVariable("id") Long id, ModelMap mmap)
-    {
-        CompanyReviewed companyReviewed = companyReviewedService.selectCompanyReviewedById(id);
-        mmap.put("companyReviewed", companyReviewed);
-        return prefix + "/edit";
-    }
-
-    /**
-     * 修改保存商户扩展信息
-     */
-    @RequiresPermissions("companyext:info:edit")
-    @Log(title = "商户扩展信息", businessType = BusinessType.UPDATE)
-    @PostMapping("/edit")
-    @ResponseBody
-    public AjaxResult editSave(CompanyReviewed companyReviewed)
-    {
-        return toAjax(companyReviewedService.updateCompanyReviewed(companyReviewed));
-    }
-
-    /**
-     * 删除商户扩展信息
-     */
-    @RequiresPermissions("companyext:info:remove")
-    @Log(title = "商户扩展信息", businessType = BusinessType.DELETE)
-    @PostMapping( "/remove")
-    @ResponseBody
-    public AjaxResult remove(String ids)
-    {
-        return toAjax(companyReviewedService.deleteCompanyReviewedByIds(ids));
-    }
-}

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

@@ -4,7 +4,7 @@
     <th:block th:include="include :: header('公司表列表')" />
 </head>
 <body class="gray-bg">
-     <div class="container-div">
+    <div class="container-div">
         <div class="row">
             <div class="col-sm-12 search-collapse">
                 <form id="formId">

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

@@ -0,0 +1,125 @@
+<!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('商户信息')" />
+    <th:block th:include="include :: datetimepicker-css" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <div class="row">
+            <div class="col-sm-Offsets-11 col-sm-1">
+                <a class="btn btn-primary btn-rounded btn-sm" onclick="edit()" shiro:hasPermission="system:dept:add>
+                    <i class="fa fa-search"></i>&nbsp;搜索</a>
+            </div>
+        </div>
+        <form class="form-horizontal m" id="form-company-edit" th:object="${sysCompany}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">公司名称:</label>
+                <div class="col-sm-8">
+                    <input name="companyName" th:field="*{companyName}"  class="form-control" type="text" disabled required>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">企业类型:</label>
+                <div class="col-sm-8">
+                    <select name="sex" class="form-control m-b" th:with="type=${@dict.getType('company_type')}" disabled>
+                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{companyType}"></option>
+                    </select>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">详细地址:</label>
+                <div class="col-sm-8">
+                    <input name="detailAddress" th:field="*{detailAddress}" class="form-control" type="text" disabled>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">经度:</label>
+                <div class="col-sm-8">
+                    <input name="longitude" th:field="*{longitude}" class="form-control" type="text" disabled>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">纬度:</label>
+                <div class="col-sm-8">
+                    <input name="latitude" th:field="*{latitude}" class="form-control" type="text" disabled>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">企业法人:</label>
+                <div class="col-sm-8">
+                    <input name="legalPerson" th:field="*{legalPerson}" class="form-control" type="text" disabled>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">联系电话:</label>
+                <div class="col-sm-8">
+                    <input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" disabled>
+                </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="establishDate" th:value="${#dates.format(sysCompany.establishDate, 'yyyy-MM-dd')}"
+                               class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">统一社会信用代码:</label>
+                <div class="col-sm-8">
+                    <input name="unifiedSocialCreditCode" th:field="*{unifiedSocialCreditCode}" class="form-control" type="text" disabled>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">营业执照:</label>
+                <div class="col-sm-8">
+                    <img th:src="*{businessLicenseUrl}" />
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">企业默认图片:</label>
+                <div class="col-sm-8">
+                    <img th:src="*{defaultImgUrl}" />
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">企业宣传图片:</label>
+                <div class="col-sm-8">
+                    <img th:src="*{propagandaImgUrl}" />
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">企业介绍:</label>
+                <div class="col-sm-8">
+                    <textarea name="companyIntroduce" class="form-control" disabled>[[*{companyIntroduce}]]</textarea>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">主营业务:</label>
+                <div class="col-sm-8">
+                    <input name="primaryBusiness" th:field="*{primaryBusiness}" class="form-control" type="text" disabled>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: datetimepicker-js" />
+    <script th:inline="javascript">
+        var prefix = ctx + "system/company";
+        $("#form-company-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            $.modal.close();
+        }
+        function edit(){
+            alert(111111111111111)
+        }
+    </script>
+</body>
+</html>

+ 6 - 0
dgtly-admin/src/main/resources/templates/company/honour/add.html

@@ -7,6 +7,12 @@
 <body class="white-bg">
     <div class="wrapper wrapper-content animated fadeInRight ibox-content">
         <form class="form-horizontal m" id="form-company_honour-add">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">荣耀标题:</label>
+                <div class="col-sm-8">
+                    <input class="form-control" type="text" name="title" id="title" required>
+                </div>
+            </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">荣誉描述:</label>
                 <div class="col-sm-8">

+ 6 - 0
dgtly-admin/src/main/resources/templates/company/honour/edit.html

@@ -9,6 +9,12 @@
         <form class="form-horizontal m" id="form-company_honour-edit" th:object="${companyHonour}">
             <input name="honourId" th:field="*{honourId}" type="hidden">
 
+            <div class="form-group">
+                <label class="col-sm-3 control-label">荣誉标题:</label>
+                <div class="col-sm-8">
+                    <input class="form-control" type="text" name="title" th:field="*{title}" id="title" required>
+                </div>
+            </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">荣誉描述:</label>
                 <div class="col-sm-8">

+ 4 - 0
dgtly-admin/src/main/resources/templates/company/honour/honour.html

@@ -52,6 +52,10 @@
                     title : '商户id',
                     visible: false
                 },
+                {
+                    field : 'title',
+                    title : '荣誉标题'
+                },
                 {
                     field : 'des',
                     title : '荣誉描述'

+ 11 - 0
dgtly-api/src/main/java/com/dgtly/api/controller/SysCompanyController.java

@@ -135,6 +135,17 @@ public class SysCompanyController extends ApiBaseController {
         return toAjax(i);
     }
 
+    @ApiOperation(value = "商家入驻公示列表")
+    @ApiImplicitParam(name = "params" , paramType = "body",example = "{}")
+    @PostMapping("/enterPublicity")
+    public Object enterPublicity(){
+        ParameterObject obj = getParameterObject();
+        startPage(obj);
+        CompanyReviewed cr = new CompanyReviewed();
+        List<CompanyReviewed> crs =  companyReviewedService.selectEnterPublicityList();
+        return AjaxResult.success(getDataTable(crs));
+    }
+
 
 
 }

+ 5 - 0
dgtly-apiframework/pom.xml

@@ -103,6 +103,11 @@
             <groupId>com.dgtly</groupId>
             <artifactId>dgtly-system</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.dgtly</groupId>
+            <artifactId>dgtly-member-common</artifactId>
+            <version>4.0.0</version>
+        </dependency>
     </dependencies>
 
 </project>

+ 5 - 3
dgtly-apiframework/src/main/java/com/dgtly/apiframework/interceptor/AuthenticationInterceptor.java

@@ -8,6 +8,8 @@ import com.auth0.jwt.exceptions.JWTVerificationException;
 import com.dgtly.common.exception.api.ApiTokenTimeoutException;
 import com.dgtly.common.exception.api.NoLoginException;
 import com.dgtly.common.annotation.ApiPassToken;
+import com.dgtly.member.domain.MemberInfo;
+import com.dgtly.member.service.IMemberInfoService;
 import com.dgtly.system.domain.SysUser;
 import com.dgtly.system.service.ISysUserService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,7 +24,7 @@ import javax.servlet.http.HttpServletResponse;
 @Component
 public class AuthenticationInterceptor implements HandlerInterceptor {
     @Autowired
-    private ISysUserService sysUserService;
+    private IMemberInfoService memberInfoService;
     @Override
     public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object object) throws Exception {
         String token = httpServletRequest.getHeader("token");// 从 http 请求头中取出 token
@@ -58,12 +60,12 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
             /*密码错误*/
             throw new NoLoginException();
         }
-        SysUser user = sysUserService.selectUserById(userId);
+        MemberInfo user = memberInfoService.selectMemberInfoById(userId);
         if (user == null) {
             throw new NoLoginException();
         }
         // 验证 token
-        JWTVerifier jwtVerifier = JWT.require(Algorithm.HMAC256(user.getPassword())).build();
+        JWTVerifier jwtVerifier = JWT.require(Algorithm.HMAC256(user.getLoginPassword())).build();
         try {
             jwtVerifier.verify(token);
         } catch (JWTVerificationException e) {

+ 4 - 0
dgtly-common/src/main/java/com/dgtly/common/core/domain/ParameterObject.java

@@ -81,4 +81,8 @@ public class ParameterObject {
         }
     }
 
+    public Boolean contaonsKey(Object key){
+        return jsonObject.containsKey(key);
+    }
+
 }

+ 7 - 2
dgtly-goods/dgtly-goods-api/src/main/java/com/dgtly/goods/controller/GoodsInfoController.java

@@ -9,6 +9,7 @@ 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.common.exception.api.LessParamException;
 import com.dgtly.goods.domain.GoodsInfo;
 import com.dgtly.goods.service.IGoodsInfoService;
 import io.swagger.annotations.ApiImplicitParam;
@@ -42,9 +43,13 @@ public class GoodsInfoController extends ApiBaseController {
         if(gi==null){
             gi = new GoodsInfo();
         }
+        if(obj.contaonsKey("orderByColumn")){
+            if(!obj.contaonsKey("isAsc")){
+                throw new LessParamException("orderByColumn字段和isAsc字段必须同时存在");
+            }
+        }
         startPage(obj);/*向分页传递 分页参数*/
-        gi.setPutawayFlag("1");
-        List<GoodsInfo> goodsInfos =  goodsInfoService.selectGoodsInfoList(gi);
+        List<GoodsInfo> goodsInfos =  goodsInfoService.selectGoodsInfoListInWeb(gi);
         return AjaxResult.success(getDataTable(goodsInfos));
     }
 

+ 20 - 0
dgtly-goods/dgtly-goods-common/src/main/java/com/dgtly/goods/domain/GoodsInfo.java

@@ -90,6 +90,9 @@ public class GoodsInfo extends BaseEntity
 
     private String typeName;
 
+    private String beginPrice;
+
+    private String endPrice;
 
 
     public void setId(Long id) 
@@ -278,6 +281,23 @@ public class GoodsInfo extends BaseEntity
     }
 
 
+    public String getBeginPrice() {
+        return beginPrice;
+    }
+
+    public void setBeginPrice(String beginPrice) {
+        this.beginPrice = beginPrice;
+    }
+
+    public String getEndPrice() {
+        return endPrice;
+    }
+
+    public void setEndPrice(String endPrice) {
+        this.endPrice = endPrice;
+    }
+
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 9 - 0
dgtly-goods/dgtly-goods-common/src/main/java/com/dgtly/goods/mapper/GoodsInfoMapper.java

@@ -74,4 +74,13 @@ public interface GoodsInfoMapper
      * @date: 2020-2-25
      */
     public int selectGoodsInfoCountByTypeId(Long typeId);
+
+    /**
+     * @descption: 为前端网页提供商品查询,价格筛选
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 10:43
+     */
+    public List<GoodsInfo> selectGoodsInfoListInWeb(GoodsInfo gi);
 }

+ 9 - 0
dgtly-goods/dgtly-goods-common/src/main/java/com/dgtly/goods/service/IGoodsInfoService.java

@@ -75,4 +75,13 @@ public interface IGoodsInfoService
      * @date: 2020-2-25
      */
     public int selectGoodsInfoCountByTypeId(Long id);
+
+    /**
+     * @descption: 为前端网页提供商品查询,价格筛选
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 10:43
+     */
+    public List<GoodsInfo> selectGoodsInfoListInWeb(GoodsInfo gi);
 }

+ 13 - 0
dgtly-goods/dgtly-goods-common/src/main/java/com/dgtly/goods/service/impl/GoodsInfoServiceImpl.java

@@ -156,4 +156,17 @@ public class GoodsInfoServiceImpl implements IGoodsInfoService
     public int selectGoodsInfoCountByTypeId(Long id) {
         return goodsInfoMapper.selectGoodsInfoCountByTypeId(id);
     }
+
+
+    /**
+     * @descption: 为前端网页提供商品查询,价格筛选
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 10:43
+     */
+    @Override
+    public List<GoodsInfo> selectGoodsInfoListInWeb(GoodsInfo gi) {
+        return goodsInfoMapper.selectGoodsInfoListInWeb(gi);
+    }
 }

+ 21 - 1
dgtly-goods/dgtly-goods-common/src/main/resources/mapper/goods/GoodsInfoMapper.xml

@@ -213,5 +213,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and gi.putaway_flag = "1"
 
     </select>
-    
+    <select id="selectGoodsInfoListInWeb" parameterType="GoodsInfo" resultMap="GoodsInfoResult">
+        select gi.id, gi.name, gi.company_id, gi.type_id, gi.price, gi.cover, gi.slideshow, gi.create_time, gi.create_by, gi.update_time, gi.update_by, gi.remark,
+        gi.putaway_flag,gi.weight,gi.material,gi.produced_time,
+        gt.name typeName,sc.company_name companyName
+        from goods_info gi
+        left join goods_type gt on gt.id =gi.type_id
+        left join sys_company sc on sc.id =gi.company_id
+        <where>
+            gi.del_flag = "0"
+            and gi.putaway_flag= "1"
+            and sc.del_flag=0
+            and sc.status=0
+            <if test="name != null  and name != ''"> and gi.name like concat('%', #{name}, '%')</if>
+            <if test="companyId != null "> and gi.company_id = #{companyId}</if>
+            <if test="typeId != null "> and find_in_set(#{typeId},gt.ancestors) </if>
+            <if test="beginPrice != null and beginPrice!='' "> and gi.price &gt;= #{beginPrice}</if>
+            <if test="endPrice != null and endPrice!='' "> and gi.price &lt;= #{endPrice}</if>
+            <if test="weight != null  and weight != ''"> and gi.weight = #{weight}</if>
+        </where>
+        order by gi.putaway_flag ,gi.create_time
+    </select>
 </mapper>

+ 24 - 4
dgtly-member/dgtly-member-api/src/main/java/com/dgtly/member/controller/MemberFollowApi.java

@@ -10,6 +10,9 @@ import com.dgtly.common.utils.DateUtils;
 import com.dgtly.common.utils.StringUtils;
 import com.dgtly.member.domain.MemberFollow;
 import com.dgtly.member.service.IMemberFollowService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -28,7 +31,6 @@ import java.util.List;
   */
 @RestController
 @RequestMapping("/member/follow")
-@ApiPassToken/* 不用验证token  方法上可用*/
 @ApiNoCheckSign/* 不用验证 签名 方法上可用*/
 public class MemberFollowApi extends ApiBaseController {
 
@@ -41,6 +43,11 @@ public class MemberFollowApi extends ApiBaseController {
      * @auther: LiuLingChao
      * @date: 2020-2-27 15:11
      */
+    @ApiOperation(value = "会员关注")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "params" , paramType = "body"),
+        @ApiImplicitParam(name = "token" , paramType = "header")
+    })
     @PostMapping("/addMemberFollow")
     public Object addMemberFollow(){
         //获取token中用户id
@@ -64,12 +71,20 @@ public class MemberFollowApi extends ApiBaseController {
      * @auther: LiuLingChao
      * @date: 2020-2-27 15:35
      */
+    @ApiOperation(value = "取消关注")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params" , paramType = "body"),
+            @ApiImplicitParam(name = "token" , paramType = "header")
+    })
     @PostMapping("/cancleMemberFollow")
     public Object cancleMemberFollow(){
         ParameterObject obj =  getParameterObject();
-        MemberFollow memberFollow = obj.parseBean(MemberFollow.class);
-        int flag = iMemberFollowService.deleteMemberFollowById(memberFollow.getId());
-        return toAjax(flag);
+        obj.checkParameterNotNull("companyId");
+        //获取token中用户id
+        String memberId = TokenUtil.getTokenUserId();
+        String companyId = obj.getString("companyId");
+        int flag = iMemberFollowService.deleteMemberFollowByCompanyMemberId(memberId,companyId);
+        return AjaxResult.success();
     }
 
     /**
@@ -79,6 +94,11 @@ public class MemberFollowApi extends ApiBaseController {
      * @auther: LiuLingChao
      * @date: 2020-2-27 15:57
      */
+    @ApiOperation(value = "商户列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params" , paramType = "body"),
+            @ApiImplicitParam(name = "token" , paramType = "header")
+    })
     @PostMapping("/getMemberFollowList")
     public Object getMemberFollowList(){
         String userId = TokenUtil.getTokenUserId();

+ 17 - 0
dgtly-member/dgtly-member-api/src/main/java/com/dgtly/member/controller/MemberInfoController.java

@@ -13,6 +13,9 @@ import com.dgtly.common.utils.StringUtils;
 import com.dgtly.member.domain.MemberInfo;
 import com.dgtly.member.service.IMemberInfoService;
 import com.google.code.kaptcha.Constants;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -47,6 +50,8 @@ public class MemberInfoController extends ApiBaseController {
      * @auther: LiuLingChao
      * @date: 2020-2-25 14:43
      */
+    @ApiOperation(value = "网站用户注册")
+    @ApiImplicitParam(name = "params" , paramType = "body")
     @PostMapping("/userRegister")
     public Object userRegister(){
         ParameterObject obj =  getParameterObject();
@@ -75,6 +80,8 @@ public class MemberInfoController extends ApiBaseController {
      * @auther: LiuLingChao
      * @date: 2020-2-25 15:35
      */
+    @ApiOperation(value = "会员登录")
+    @ApiImplicitParam(name = "params" , paramType = "body")
     @PostMapping("/memberLogin")
     public Object memberLogin(){
         ParameterObject obj =  getParameterObject();
@@ -110,6 +117,11 @@ public class MemberInfoController extends ApiBaseController {
      * @auther: LiuLingChao
      * @date: 2020-2-26 22:16
      */
+    @ApiOperation(value = "根据token获取会员信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params" , paramType = "body"),
+            @ApiImplicitParam(name = "token" , paramType = "header")
+    })
     @PostMapping("/getMemberInfo")
     public Object getMemberInfo(){
         String userId  = TokenUtil.getTokenUserId();
@@ -131,6 +143,11 @@ public class MemberInfoController extends ApiBaseController {
      * @auther: LiuLingChao
      * @date: 2020-2-28 15:01
      */
+    @ApiOperation(value = "修改用户信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params" , paramType = "body"),
+            @ApiImplicitParam(name = "token" , paramType = "header")
+    })
     @PostMapping("/editMemberInfo")
     public Object editMemberInfo(){
         String userId  = TokenUtil.getTokenUserId();

+ 0 - 10
dgtly-member/dgtly-member-api/src/main/java/com/dgtly/member/controller/UserInfoController.java

@@ -1,10 +0,0 @@
-package com.dgtly.member.controller;
-
-import com.dgtly.common.core.controller.ApiBaseController;
-
-
-public class UserInfoController extends ApiBaseController {
-
-
-
-}

+ 12 - 0
dgtly-member/dgtly-member-common/src/main/java/com/dgtly/member/mapper/MemberFollowMapper.java

@@ -1,6 +1,8 @@
 package com.dgtly.member.mapper;
 
 import com.dgtly.member.domain.MemberFollow;
+import org.apache.ibatis.annotations.Param;
+
 import java.util.List;
 
 /**
@@ -68,4 +70,14 @@ public interface MemberFollowMapper
      * @date: 2020-2-27 15:55
      */
     public List<MemberFollow> getMemberFollowList(MemberFollow memberFollow);
+
+
+    /**
+     * @descption: 根据公司ID和 用户id取消关注
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 16:46
+     */
+    public int deleteMemberFollowByCompanyMemberId(@Param("memberId")String memberId, @Param("companyId")String companyId);
 }

+ 9 - 0
dgtly-member/dgtly-member-common/src/main/java/com/dgtly/member/service/IMemberFollowService.java

@@ -67,4 +67,13 @@ public interface IMemberFollowService
      * @date: 2020-2-27 15:53
      */
     public List<MemberFollow> getMemberFollowList(MemberFollow memberFollow);
+
+    /**
+     * @descption: 根据公司ID和 用户id取消关注
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 16:46
+     */
+    public int deleteMemberFollowByCompanyMemberId(String memberId, String companyId);
 }

+ 12 - 0
dgtly-member/dgtly-member-common/src/main/java/com/dgtly/member/service/impl/MemberFollowServiceImpl.java

@@ -101,4 +101,16 @@ public class MemberFollowServiceImpl implements IMemberFollowService
     public List<MemberFollow> getMemberFollowList(MemberFollow memberFollow) {
         return memberFollowMapper.getMemberFollowList(memberFollow);
     }
+
+    /**
+     * @descption: 根据公司ID和 用户id取消关注
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 16:46
+     */
+    @Override
+    public int deleteMemberFollowByCompanyMemberId(String memberId, String companyId) {
+        return memberFollowMapper.deleteMemberFollowByCompanyMemberId(memberId,companyId);
+    }
 }

+ 4 - 0
dgtly-member/dgtly-member-common/src/main/resources/mapper/member/MemberFollowMapper.xml

@@ -97,5 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where  m.member_id = #{memberId}
 
     </select>
+
+    <delete id="deleteMemberFollowByCompanyMemberId">
+        delete from member_follow where member_id = #{memberId} and  company_id = #{companyId}
+    </delete>
     
 </mapper>

+ 13 - 0
dgtly-system/src/main/java/com/dgtly/companyext/domain/CompanyHonour.java

@@ -22,10 +22,14 @@ public class CompanyHonour extends BaseEntity
     @Excel(name = "商户id")
     private Long companyId;
 
+    /** 荣誉标题*/
+    private String title;
+
     /** 荣誉描述 */
     @Excel(name = "荣誉描述")
     private String des;
 
+
     /** 荣誉图片 */
     @Excel(name = "荣誉图片")
     private String img;
@@ -67,6 +71,15 @@ public class CompanyHonour extends BaseEntity
         return img;
     }
 
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

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

@@ -84,4 +84,13 @@ public interface CompanyReviewedMapper
      * @date: 2020-2-25
      */
     List<CompanyReviewed> selectCompanyReviewedListWiteAudit(CompanyReviewed companyReviewed);
+
+    /**
+     * @descption: 查询入驻申请公示列表
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 13:25
+     */
+    List<CompanyReviewed> selectEnterPublicityList();
 }

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

@@ -96,4 +96,13 @@ public interface ICompanyReviewedService
      * @date: 2020-2-25
      */
     public int refuseEnter(CompanyExamine companyExamine);
+
+    /**
+     * @descption: 查询入驻申请公示列表
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 13:25
+     */
+    List<CompanyReviewed> selectEnterPublicityList();
 }

+ 13 - 1
dgtly-system/src/main/java/com/dgtly/companyext/service/impl/CompanyReviewedServiceImpl.java

@@ -159,8 +159,20 @@ public class CompanyReviewedServiceImpl implements ICompanyReviewedService
         cr.setId(companyExamine.getCompanyReviewedId());
         cr.setStatus("2");
         cr.setUpdateBy(companyExamine.getCreateBy());
-       companyReviewedMapper.updateCompanyReviewed(cr);
+        companyReviewedMapper.updateCompanyReviewed(cr);
 
         return companyExamineMapper.insertCompanyExamine(companyExamine);
     }
+
+    /**
+     * @descption: 查询入驻申请公示列表
+     * @param:
+     * @return:
+     * @auther: qxp
+     * @date: 2020/3/3 13:25
+     */
+    @Override
+    public List<CompanyReviewed> selectEnterPublicityList() {
+        return companyReviewedMapper.selectEnterPublicityList();
+    }
 }

+ 5 - 3
dgtly-system/src/main/resources/mapper/companyext/CompanyHonourMapper.xml

@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="CompanyHonour" id="CompanyHonourResult">
         <result property="honourId"    column="honour_id"    />
         <result property="companyId"    column="company_id"    />
+        <result property="title"    column="title"    />
         <result property="des"    column="des"    />
         <result property="img"    column="img"    />
         <result property="createBy"    column="create_by"    />
@@ -17,15 +18,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCompanyHonourVo">
-        select honour_id, company_id, des, img, create_by, create_time, update_by, update_time, remark from company_honour
+        select honour_id, company_id, title,des, img, create_by, create_time, update_by, update_time, remark from company_honour
     </sql>
 
     <select id="selectCompanyHonourList" parameterType="CompanyHonour" resultMap="CompanyHonourResult">
         <include refid="selectCompanyHonourVo"/>
         <where>  
             <if test="companyId != null "> and company_id = #{companyId}</if>
-            <if test="des != null  and des != ''"> and des = #{des}</if>
-            <if test="img != null  and img != ''"> and img = #{img}</if>
         </where>
     </select>
     
@@ -38,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into company_honour
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="companyId != null ">company_id,</if>
+            <if test="title != null  and title != ''">title,</if>
             <if test="des != null  and des != ''">des,</if>
             <if test="img != null  and img != ''">img,</if>
             <if test="createBy != null  and createBy != ''">create_by,</if>
@@ -48,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="companyId != null ">#{companyId},</if>
+            <if test="title != null  and title != ''">#{title},</if>
             <if test="des != null  and des != ''">#{des},</if>
             <if test="img != null  and img != ''">#{img},</if>
             <if test="createBy != null  and createBy != ''">#{createBy},</if>
@@ -62,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update company_honour
         <trim prefix="SET" suffixOverrides=",">
             <if test="companyId != null ">company_id = #{companyId},</if>
+            <if test="title != null  and title != ''">title = #{title},</if>
             <if test="des != null  and des != ''">des = #{des},</if>
             <if test="img != null  and img != ''">img = #{img},</if>
             <if test="createBy != null  and createBy != ''">create_by = #{createBy},</if>

+ 13 - 1
dgtly-system/src/main/resources/mapper/companyext/CompanyReviewedMapper.xml

@@ -216,5 +216,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by cr.status,ce.examine_date desc,cr.create_time desc
     </select>
-    
+
+
+    <select id="selectEnterPublicityList" parameterType="CompanyReviewed" resultMap="CompanyReviewedResult">
+        select  cr.company_name,cr.default_img_url, cr.propaganda_img_url, cr.company_introduce,cr.create_time,
+        cr.reason,cr.status,cr.primary_business,cr.detail_address,
+        ce.reject_reason,ce.examine_date
+        from company_reviewed cr
+        left join company_examine ce on ce.company_reviewed_id = cr.id
+        <where>
+            cr.reason=0
+        </where>
+    </select>
+
 </mapper>