Просмотр исходного кода

Merge branch 'cpq-dev' of wangfan/adweb3-server into master

chenpeiqing 5 месяцев назад
Родитель
Сommit
55f21649ec

+ 0 - 21
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/common/domain/HttpApiResult.java

@@ -1,21 +0,0 @@
-package org.jeecg.modules.adweb.common.domain;
-
-import lombok.Data;
-import org.jeecg.modules.adweb.databridge.dto.APIStatus;
-
-
-@Data
-public class HttpApiResult {
-
-    private int code = APIStatus.SUCCESS.getCode();
-
-    private String msg = "";
-
-    private int count = 0;
-
-    private Object data;
-
-    public static HttpApiResult getInstance(){
-        return new HttpApiResult();
-    }
-}

+ 3 - 6
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/controller/AdwebSiteController.java

@@ -16,7 +16,6 @@ import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.adweb.common.constant.AdwebConstant;
-import org.jeecg.modules.adweb.common.domain.HttpApiResult;
 import org.jeecg.modules.adweb.common.util.ListUtil;
 import org.jeecg.modules.adweb.site.entity.AdwebSite;
 import org.jeecg.modules.adweb.site.service.IAdwebSiteService;
@@ -181,7 +180,7 @@ public class AdwebSiteController extends JeecgController<AdwebSite, IAdwebSiteSe
      * "id", "name", "code", "domain","domain_dev","status"
      */
     @GetMapping("/getSiteListByUid")
-    public HttpApiResult getAllSites() {
+    public Result<?> getAllSites() {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
         if (sysAdwebApi.isAdmin()) {
@@ -211,10 +210,8 @@ public class AdwebSiteController extends JeecgController<AdwebSite, IAdwebSiteSe
                 }
             }
         }
-        HttpApiResult httpApiResult = new HttpApiResult();
-        httpApiResult.setData(siteList);
-        httpApiResult.setCount(siteList.size());
-        return httpApiResult;
+
+        return Result.ok(siteList);
     }
 
 }