瀏覽代碼

接口api

liulingchao 4 年之前
父節點
當前提交
c8c737eb1c
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      dgtly-api/src/main/java/com/dgtly/api/controller/SysCompanyController.java

+ 9 - 1
dgtly-api/src/main/java/com/dgtly/api/controller/SysCompanyController.java

@@ -11,8 +11,10 @@ import com.dgtly.companyext.domain.CompanyHonour;
 import com.dgtly.companyext.domain.CompanyReviewed;
 import com.dgtly.companyext.service.ICompanyHonourService;
 import com.dgtly.companyext.service.ICompanyReviewedService;
+import com.dgtly.goods.service.IGoodsInfoService;
 import com.dgtly.member.domain.MemberFollow;
 import com.dgtly.member.service.IMemberFollowService;
+import com.dgtly.member.service.IMemberInfoService;
 import com.dgtly.system.domain.SysCompany;
 import com.dgtly.system.service.ISysCompanyService;
 import com.dgtly.system.service.ISysDictDataService;
@@ -47,6 +49,10 @@ public class SysCompanyController extends ApiBaseController {
     private ICompanyHonourService companyHonourService;
     @Autowired
     private ISysDictDataService dictDataService;
+    @Autowired
+    private IMemberInfoService memberInfoService;
+    @Autowired
+    private IGoodsInfoService goodsInfoService;
 
     @ApiOperation(value = "商家详情")
     @ApiImplicitParam(name = "params" , paramType = "body")
@@ -158,7 +164,9 @@ public class SysCompanyController extends ApiBaseController {
     public Object countCompanyInfo(){
 
         int companyNum = companyService.countCompany();
-        return AjaxResult.success().putKV("companyNum",companyNum-1);
+        int memberNum = memberInfoService.countMemberInfo();
+        int goodsNum = goodsInfoService.countGoodsInfo();
+        return AjaxResult.success().putKV("companyNum",companyNum-1).putKV("memberNum",memberNum).putKV("goodsNum",goodsNum);
     }