Explorar el Código

增加应用下拉选接口

marxjaw hace 3 meses
padre
commit
4a25fb68b5

+ 3 - 3
yt-app/app-service/src/main/resources/mapper/dyz/AppUserMapper.xml

@@ -477,13 +477,13 @@
         from yt_dyz_user
         where app_id = #{appId}
         <if test="type != null and type ==1">
-            and DATE(finish_time) = DATE(now())
+            and DATE(registry_time) = DATE(now())
         </if>
         <if test="type != null and type ==2">
-            and DATE(finish_time) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)
+            and DATE(registry_time) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)
         </if>
         <if test="type != null and type ==3">
-            and DATE_FORMAT(finish_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m')
+            and DATE_FORMAT(registry_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m')
         </if>
         group by `time`
     </select>

+ 2 - 2
yt-common/src/main/java/com/ytpm/middle/view/DropDownVO.java

@@ -16,9 +16,9 @@ public class DropDownVO {
     @ApiModelProperty("下拉选项名")
     private String optionName;
     @ApiModelProperty("下拉选项值")
-    private Integer optionVal;
+    private String optionVal;
     @ApiModelProperty("上级ID")
-    private Integer parentId;
+    private String parentId;
     @ApiModelProperty("是否选中")
     private boolean checked;
     @ApiModelProperty("子级列表")

+ 3 - 0
yt-middle/middle-platform/src/main/java/com/ytpm/middle/service/impl/CountServiceImpl.java

@@ -1,6 +1,7 @@
 package com.ytpm.middle.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.ytpm.agent.view.AgentAppView;
 import com.ytpm.feign.AppFeign;
@@ -123,6 +124,8 @@ public class CountServiceImpl implements CountService {
         vo.setYesterdayBannedCount(riskMapper.countBanned(appId,2));
         vo.setMonthBannedCount(riskMapper.countBanned(appId,3));
         List<AppUserHourVO> bannedHour = riskMapper.countBannedHour(appId,1);
+        bannedHour = bannedHour.stream().filter(
+                s-> StrUtil.isNotBlank(s.getTime())).collect(Collectors.toList());
         if(CollUtil.isNotEmpty(bannedHour)){
             Map<String, Integer> collect = bannedHour.stream().collect(
                     Collectors.toMap(AppUserHourVO::getTime, AppUserHourVO::getCount));

+ 1 - 0
yt-middle/middle-platform/src/main/resources/mapper/RiskMapper.xml

@@ -79,6 +79,7 @@
             template_id, template_name, template_content, template_code, channel_id, effect_node, app_id, all_satisfy, create_time, create_user_id, update_time, update_user_id, enabled, can_modify
         from yt_risk_template
         where app_id = #{appId}
+        limit 1
     </select>
     <select id="countBanned" resultType="java.lang.Integer">
         select