Ver código fonte

查询加盟商上架应用列表

marxjaw 4 meses atrás
pai
commit
e3b360bb3f

+ 11 - 0
yt-agent/agent-service/src/main/java/com/ytpm/controller/AppController.java

@@ -3,6 +3,7 @@ package com.ytpm.controller;
 import com.ytpm.advertise.param.AppCategoryParam;
 import com.ytpm.advertise.param.AppSubCategoryParam;
 import com.ytpm.advertise.param.RelativeChannelParam;
+import com.ytpm.agent.model.YtPlatformUserApp;
 import com.ytpm.agent.param.AppListParam;
 import com.ytpm.agent.param.AppParam;
 import com.ytpm.agent.view.AgentAppView;
@@ -28,6 +29,16 @@ public class AppController {
     @Resource
     private AgentAppService agentAppService;
 
+    /**
+     * 查询加盟商上架应用列表
+     */
+    @ApiOperation("查询加盟商上架应用列表")
+    @GetMapping("/getIssuedAppList")
+    private ResultTable<YtPlatformUserApp> getIssuedAppList(@ApiIgnore @AuthenticationPrincipal AgentUserInfo userInfo) {
+        return agentAppService.getIssuedAppList(userInfo.getUserId());
+    }
+
+
     /**
      * 根据当前登录的加盟商查询启用的应用列表
      */

+ 5 - 0
yt-agent/agent-service/src/main/java/com/ytpm/dao/AgentAppMapper.java

@@ -1,5 +1,6 @@
 package com.ytpm.dao;
 
+import com.ytpm.agent.model.YtPlatformUserApp;
 import com.ytpm.agent.param.AppListParam;
 import com.ytpm.agent.view.AgentAppView;
 import com.ytpm.agent.view.AgentEnableAppView;
@@ -19,4 +20,8 @@ public interface AgentAppMapper {
      * 查询应用列表
      */
     List<AgentAppView> searchAppList(AppListParam appListParam);
+    /**
+     * 查询加盟商上架应用列表
+     */
+    List<YtPlatformUserApp> getIssuedAppList(@Param("userId") String userId);
 }

+ 5 - 0
yt-agent/agent-service/src/main/java/com/ytpm/service/AgentAppService.java

@@ -1,6 +1,7 @@
 package com.ytpm.service;
 
 import com.ytpm.advertise.param.RelativeChannelParam;
+import com.ytpm.agent.model.YtPlatformUserApp;
 import com.ytpm.agent.param.AppListParam;
 import com.ytpm.agent.param.AppParam;
 import com.ytpm.agent.view.AgentAppView;
@@ -43,4 +44,8 @@ public interface AgentAppService {
      * 获取指定平台下的一级分类下的二级分类
      */
     Result<?> getSecondaryCategories(String platform,String primaryCategory);
+    /**
+     * 查询加盟商上架应用列表
+     */
+    ResultTable<YtPlatformUserApp> getIssuedAppList(String userId);
 }

+ 9 - 0
yt-agent/agent-service/src/main/java/com/ytpm/service/impl/AgentAppServiceImpl.java

@@ -13,6 +13,7 @@ import com.ytpm.advertise.view.AddAppResponse;
 import com.ytpm.advertise.view.ComprehensiveAppReport;
 import com.ytpm.agent.model.YtApp;
 import com.ytpm.agent.model.YtAppChannelRelative;
+import com.ytpm.agent.model.YtPlatformUserApp;
 import com.ytpm.agent.param.AppListParam;
 import com.ytpm.agent.param.AppParam;
 import com.ytpm.agent.view.AgentAppView;
@@ -184,4 +185,12 @@ public class AgentAppServiceImpl implements AgentAppService {
         return Result.resultObjOk(secondaryCategories);
     }
 
+    /**
+     * 查询加盟商上架应用列表
+     */
+    @Override
+    public ResultTable<YtPlatformUserApp> getIssuedAppList(String userId) {
+        return ResultTable.resultTableOk(new PageInfo<YtPlatformUserApp>(agentAppMapper.getIssuedAppList(userId)));
+    }
+
 }

+ 6 - 0
yt-agent/agent-service/src/main/resources/mapper/AgentAppMapper.xml

@@ -76,4 +76,10 @@
         GROUP BY
             ya.app_id
     </select>
+    <select id="getIssuedAppList" resultType="com.ytpm.agent.model.YtPlatformUserApp">
+        select
+            app_id, app_name, user_id, app_type, app_key, store_on_sale, store_type, store_url, package_name, domain, category, sub_category, coppa, screen_orientation, ccpa, issued_time
+        from yt_platform_user_app
+        where user_id = #{userId}
+    </select>
 </mapper>

+ 24 - 4
yt-common/src/main/java/com/ytpm/agent/model/YtPlatformUserApp.java

@@ -1,24 +1,44 @@
 package com.ytpm.agent.model;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.Date;
 
 @Data
+@ApiModel("平台用户应用表")
 public class YtPlatformUserApp {
+    @ApiModelProperty("应用ID")
     private String appId;
+    @ApiModelProperty("应用名称")
     private String appName;
+    @ApiModelProperty("用户ID")
     private String userId;
+    @ApiModelProperty("应用类型")
     private Integer appType;
+    @ApiModelProperty("应用秘钥")
     private String appKey;
-    private String storeOnSale;
+    @ApiModelProperty("是否商店上架")
+    private Integer storeOnSale;
+    @ApiModelProperty("商店类型")
+    private Integer storeType;
+    @ApiModelProperty("应用商店链接")
     private String storeUrl;
+    @ApiModelProperty("报名")
     private String packageName;
+    @ApiModelProperty("域名")
     private String domain;
+    @ApiModelProperty("一级分类")
     private String category;
+    @ApiModelProperty("二级分类")
     private String subCategory;
-    private String coppa;
-    private String ccpa;
-    private String screenOrientation;
+    @ApiModelProperty("是否遵守coppa")
+    private Integer coppa;
+    @ApiModelProperty("是否遵守ccpa")
+    private Integer ccpa;
+    @ApiModelProperty("屏幕方向 1-竖屏 2-横屏 3-所有")
+    private Integer screenOrientation;
+    @ApiModelProperty("上架时间")
     private Date issuedTime;
 }