Bladeren bron

接口返回的信息中非关键信息隐藏,比如记录创建时间,更新时间,操作人,创建人信息

(cherry picked from commit 063df8b463f29ac82c538f87a8632af093057aae)
MOKASZ\lw12420 1 jaar geleden
bovenliggende
commit
f9693f7aae

+ 3 - 2
launch-admin/src/main/java/com/webflux/launchadmin/mysql/controller/planNew/PlanNewCommonOutController.java

@@ -73,7 +73,8 @@ public class PlanNewCommonOutController {
 
 
 
-
+    private static final String COLUMN="id,name,code,type,poster_template_id,group_id,config_json,import_domain,preview_url";
+    private static final String[] COLUMNARRAYCOMMON=COLUMN.split(",");
     /**
      * 通过 code 获取计划配置H5信息
      *
@@ -82,7 +83,7 @@ public class PlanNewCommonOutController {
      */
     @GetMapping("getPlanNewCommonH5")
     public Mono<RStatus<byte[]>> getPlanNewCommonH5(@RequestParam("code") String code, ServerWebExchange exchange) {
-        Mono<PlanNewCommon> planNewCommonMono = template.selectOne(Query.query(Criteria.where("code").is(code)), PlanNewCommon.class)
+        Mono<PlanNewCommon> planNewCommonMono = template.selectOne(Query.query(Criteria.where("code").is(code)).columns(COLUMNARRAYCOMMON), PlanNewCommon.class)
                 .switchIfEmpty(Mono.error(new BaseException("计划code异")))
                 .onErrorResume(throwable -> Mono.error(new BaseException("计划code异")));
         Mono<PlanNewCommonRes> resMono = planNewCommonMono.flatMap(f -> {

+ 12 - 2
launch-admin/src/main/java/com/webflux/launchadmin/mysql/controller/planNew/PlanNewOutController.java

@@ -312,6 +312,15 @@ public class PlanNewOutController {
 
         return RStatus.successList(dataListsKefuMono);
     }
+
+    private static final String COLUMN="plan_new_id,name," +
+            "type,code,group_id,poster_template_id,page_show,page_line,count,list_audio_id," +
+            "ret_audio_id,link,is_add_qun,background_group_id,home_page_id,top_adv_num,bottom_adv_num,return_loop_id," +
+            "background_group_qs_id,top_adv_bl,bottom_adv_bl,return_loop_bl,group_Id_qs,baidu_dot," +
+            "background_group_id_new_add,preview_url,redirect_type,redirect_plan_id," +
+            "import_domain,landing_page_domain,transfer_page_domain,transfer_page_bl," +
+            "backgroup_domain,list_button,group_list_display";
+    private static final String[] COLUMNARRAYPLANNEW=COLUMN.split(",");
     /**
      * h5-通过code (第一个接口)
      * @param request
@@ -330,8 +339,9 @@ public class PlanNewOutController {
         } else {
             ipAddress = null;
         }
-
-        Mono<PlanNew> code0 = template.selectOne(Query.query(Criteria.where("code").is(request.getCode())), PlanNew.class)
+        Mono<PlanNew> code0 = template.selectOne(Query
+                .query(Criteria.where("code").is(request.getCode()))
+                .columns(COLUMNARRAYPLANNEW), PlanNew.class)
                 .switchIfEmpty(Mono.error(new BaseException(" code错误")))
                 .onErrorResume(throwable -> Mono.error(new BaseException(throwable.getMessage())));
         Mono<DataLists> dataListsMono1 = code0.flatMap(planNew -> {