Browse Source

【修改】弹框点赞页面功能细节调整

lichen 3 months ago
parent
commit
3978e4c9de

+ 6 - 10
suishenbang-admin/src/main/resources/templates/system/upvoteLog/upvoteLog.html

@@ -73,6 +73,7 @@
     <script th:inline="javascript">
         var editFlag = [[${@permission.hasPermi('system:log:edit')}]];
         var removeFlag = [[${@permission.hasPermi('system:log:remove')}]];
+        var upvoteShow =[[${@dict.getType('upvote_status_show')}]];
         var prefix = ctx + "system/upvoteLog";
 
         $(function() {
@@ -108,15 +109,7 @@
                     field : 'status',
                     title : '点赞状态',
                     formatter: function(value, row, index) {
-                        if (value == 0){
-                            return '无';
-                        }
-                        if (value == 1){
-                            return '赞';
-                        }
-                        if (value == 2){
-                            return '踩';
-                        }
+                        return $.table.selectDictLabel(upvoteShow, value);
                     }
                 },
                 {
@@ -126,7 +119,10 @@
                 },
                 {
                     field : 'alertContent',
-                    title : '弹框内容'
+                    title : '弹框内容',
+                    formatter: function(value, row, index) {
+                        return $.table.tooltip(value); // 使用tooltip显示完整内容
+                    }
                 },
                 {
                     field : 'photoUrl',

+ 3 - 3
suishenbang-system/src/main/java/com/dgtly/system/service/impl/AlertConfigurationServiceImpl.java

@@ -45,15 +45,15 @@ public class AlertConfigurationServiceImpl implements IAlertConfigurationService
             while (it.hasNext()) {
                 AlertConfiguration alert = it.next();
                 //diy
-                if(StringUtils.isNotEmpty(alert.getOrgCode())){
+                if( alert.getOrgCode() ==null || ("null").equals(alert.getOrgCode())){
+                    return alert;
+                }else {
                     List<String>  orgCodes = alertConfigurationMapper.selectOrgCodeByInterface(alert.getSalesLevel(),alert.getOrgCode());
                     if(orgCodes !=null && orgCodes.size()>0){
                         if(orgCodes.contains(orgCode)){
                             return alert;
                         }
                     }
-                }else {
-                    return alert;
                 }
 //                if(orgCode ==null || ("").equals(orgCode)){
 //                    if( alert.getOrgCode() ==null || ("null").equals(alert.getOrgCode())){

+ 2 - 2
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxAlertLogController.java

@@ -260,7 +260,7 @@ public class WxAlertLogController  extends ApiBaseController {
             alertUpvoteLog.setUserName(userName);
             alertUpvoteLog.setAlertContent(alertContent);
             alertUpvoteLog.setPhotoUrl(photoUrl);
-            int i = alertUpvoteLogService.updateAlertUpvoteLog(alertUpvoteLog);
+            alertUpvoteLogService.updateAlertUpvoteLog(alertUpvoteLog);
             return AjaxResult.success(alertUpvoteLog);
         }else {
             //没有新增记录
@@ -272,7 +272,7 @@ public class WxAlertLogController  extends ApiBaseController {
             upvoteLog.setAlertContent(alertContent);
             upvoteLog.setPhotoUrl(photoUrl);
             upvoteLog.setStatus(status);
-            int i = alertUpvoteLogService.insertAlertUpvoteLog(upvoteLog);
+            alertUpvoteLogService.insertAlertUpvoteLog(upvoteLog);
             return AjaxResult.success(upvoteLog);
         }
     }