浏览代码

admin 2月15号

guojing 5 年之前
父节点
当前提交
8ef5e5cad9

+ 25 - 33
whepi-ui/templates/home/home.ftl

@@ -92,11 +92,20 @@
             buyGroup();
         }
 
+        function selectqiuzhu() {
+            $("#tab1").removeClass('weui-tab__bd-item--active');
+            $("#jt1").removeClass('weui-bar__item--on');
+            $("#tab2").addClass('weui-tab__bd-item--active');
+            $("#jt2").addClass('weui-bar__item--on');
+        }
+
         var show = ${show!'"-"'};
 
         if (show == 'tuangou') {
             selectTab();
 
+        } else if (show == 'qiuzhu') {
+            selectqiuzhu();
         }
     })(jQuery);
 
@@ -105,7 +114,7 @@
     function familyClick() {
         $('#notitle').empty();//清除节点
         $.ajax({
-            url: '/home/home/queryQzTask',
+            url: '/home/home/queryQzTaskxq',
             data: {userId: $('#userId').val()},
             type: 'GET',
             async: false,
@@ -139,40 +148,23 @@
     }
 
     function xiaoQuItemClick(v) {
-        /*$.alert(v.taskId)*/
-        if ($('#titlteZs')[0].style.display == 'none') {
-            $('#notitle').toggle();
-            $('#titlteZs')[0].style.display = '';
-            $('#qzHS').empty();//清除节点
-            //详情页面的展示
-            $.ajax({
-                url: '/home/home/taskQuery',
-                data: {taskId: v.taskId},
-                type: 'GET',
-                success: function (data) {
-                    console.log(data);
-                    if (data.data.length > 0) {
-                        hasData = true;
-                        $('#qzHS').append($('<div>' + data.data[0].taskTitle + '</div>\n' + '<div class="weui-cell ">\n' + '<div class="weui-cell__bd">\n'
-                                + '<textarea class="weui-textarea" rows="1" readonly />' + data.data[0].remark + '</div>'));
-                        if (data.data[0].nickName != null) {
-                            data.data.forEach(function (v) {
-                                shValue(v);
-                            });
-                        }
-                    } else {
-
-                    }
-                },
-                error: function () {
+        $.ajax({
+            url: '/home/home/taskQuery',
+            data: {taskId: v.taskId},
+            type: 'GET',
+            success: function (data) {
+                console.log(data);
+                if (v.userId != data.data.userId) {
+                    $.alert('当前求助信息不是你的')
+                } else {
+                    window.location.href = "/quzhu/home/quxiao.html?taskId=" + v.taskId + "&userId=" + v.userId;
+                    familyClick()
                 }
-            });
-            /*$('#qzHS').*/
+            },
+            error: function () {
+            }
+        });
 
-        } else {
-            $('#notitle')[0].style.display = '';
-            $('#titlteZs')[0].style.display = 'none';
-        }
     }
 
 

+ 175 - 0
whepi-ui/templates/home/htlpXq.ftl

@@ -0,0 +1,175 @@
+<#assign title="求助详情"/>
+<#include "/home/frag.head.ftl" />
+
+<div class="weui-tab">
+    <div class="weui-btn-area" style="display: flex; flex-direction: row;">
+        <a class="weui-btn weui-btn_primary" href="javascript:goback();"
+           style="width: 25vw; height: 6vh; line-height: 6vh;">返回</a>
+        <div style="width: 65%;"></div>
+    </div>
+
+    <div class="weui-btn-area">
+
+        <p class="weui-media-box__desc">求助标题</p>
+        <h4 class="weui-media-box__title">${ task.taskTitle }</h4>
+        <br>
+        <p class="weui-media-box__desc">求助对象</p>
+        <h4 class="weui-media-box__title">${ task.taskTarget }</h4>
+        <br>
+        <p class="weui-media-box__desc">求助内容</p>
+        <h4 class="weui-media-box__title">${ task.remark }</h4>
+        <br>
+
+
+
+
+
+        <#if task.taskStatus == 1>
+        <#--<div class="weui-btn-area">
+            <p style="align-items: center">处理中</p>
+        </div>-->
+        </#if>
+        <#if task.taskStatus == 2>
+        <div class="weui-btn-area">
+            <a class="weui-btn weui-btn_default" href="javascript:doTask();">回复</a>
+            <a class="weui-btn weui-btn_primary" href="javascript:commint();">完成</a>
+        </div>
+            <div id="qz_doing_detail" style="margin-top: 3vh;"></div>
+        </#if>
+        <#if task.taskStatus == 3>
+            <div class="weui-btn_primary"
+                 style="margin-bottom: 3vh; display: flex; justify-content: center; height: 5vh; line-height: 5vh">
+                <h4 class="weui-media-box__title">已完成</h4>
+            </div>
+            <div id="qz_done_detail"></div>
+        </#if>
+    </div>
+
+    <div id="qz_showPop" class="weui-popup__container popup-bottom">
+        <div class="weui-popup__overlay"></div>
+        <div class="weui-popup__modal">
+            <div class="weui-btn-area">
+                <div style="display:flex; flex-direction: row; justify-content: space-between;">
+                    <div style="width: 75%;"></div>
+                    <a class="weui-btn weui-btn_primary" style="margin-bottom: 3vh;" href="javascript:close();">关闭</a>
+                </div>
+                <textarea id="qz_content" class="weui-textarea" placeholder="请输入文本" rows="5" maxlength="99"></textarea>
+                <a class="weui-btn weui-btn_primary" style="margin-top: 3vh;margin-bottom: 5vh;"
+                   href="javascript:send();">提交</a>
+            </div>
+        </div>
+    </div>
+</div>
+
+<#include "/home/frag.foot.ftl" />
+
+<script>
+    var task = ${taskJson};
+    var userId = ${userId};
+    var YeuserId = ${YeuserId};//业委会id
+    (function ($) {
+
+        if (task.taskStatus == 2 || task.taskStatus == 3) {
+            getdealdetail();
+        }
+
+    })(jQuery);
+
+    function doTask() {
+        $("#qz_showPop").popup();
+    }
+
+    //完成
+    function commint() {
+        $.ajax({
+            url: '/home/qiuzhu/reply.json',
+            type: 'GET',
+            data: {
+                taskId: task.taskId,
+            },
+            success: function (data) {
+                /*$.closePopup();*/
+                window.location.href = "/user/homeIndex.html?show=qiuzhu&userId=" + userId + "&userType=" + 1;
+            },
+            error: function () {
+            }
+        });
+    }
+
+    function close() {
+        $.closePopup();
+    }
+
+    function send() {
+
+        let qzcontent = $('#qz_content').val();
+        if (qzcontent.length <= 0) {
+            $.alert("请输入内容");
+            return;
+        }
+        $.ajax({
+            url: '/yeweihui/qiuzhu/reply/add.json',
+            type: 'post',
+            data: {
+                userId: YeuserId,
+                taskId: task.taskId,
+                replyContent: qzcontent,
+                userCreate: userId,
+                userUpdate: userId,
+            },
+            success: function (data) {
+                $.closePopup();
+                window.location.href = "/user/homeIndex.html?show=qiuzhu&userId=" + userId + "&userType=" + 1;
+            },
+            error: function () {
+                $.alert("网络异常");
+            }
+        });
+    }
+
+    function goback() {
+        window.location.href = "/user/homeIndex.html?show=qiuzhu&userId=" + userId + "&userType=" + 1;
+    }
+
+    function getdealdetail() {
+        $.ajax({
+            url: '/home/qiuzhu/getData',
+            type: 'post',
+            data: {
+                taskId: task.taskId,
+            },
+            success: function (data) {
+                console.log("---返回数据---", data);
+
+                if (task.taskStatus == 2) {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let reply = data.data[i];
+                        $("#qz_doing_detail").append('<p class="weui-media-box__desc">' + reply.nickName + '&emsp;' + timestampToTime(reply.timeUpdate) + '&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;回复</p>\n' +
+                                '        <h4 class="weui-media-box__title">' + reply.replyContent + '</h4><br>');
+                    }
+                }
+                else if (task.taskStatus == 3) {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let reply = data.data[i];
+                        $("#qz_done_detail").append('<p class="weui-media-box__desc">' + reply.nickName + '&emsp;' + timestampToTime(reply.timeUpdate) + '&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;回复</p>\n' +
+                                '        <h4 class="weui-media-box__title">' + reply.replyContent + '</h4><br>');
+                    }
+                }
+            },
+            error: function () {
+                $.alert("网络异常");
+            }
+        });
+    }
+
+    function timestampToTime(timestamp) {
+        var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
+        var Y = date.getFullYear() + '/';
+        var M = ((date.getMonth() + 1) < 10) ? ('0' + (date.getMonth() + 1) + '/') : ((date.getMonth() + 1) + '/');
+        var D = (date.getDate() < 10) ? ('0' + date.getDate() + ' ') : (date.getDate() + ' ');
+        var h = (date.getHours() < 10) ? ('0' + date.getHours() + ':') : (date.getHours() + ':');
+        var m = (date.getMinutes() < 10) ? ('0' + date.getMinutes() + ':') : (date.getMinutes() + ':');
+        var s = (date.getSeconds() < 10) ? ('0' + date.getSeconds()) : (date.getSeconds());
+        return Y + M + D + h + m + s;
+    }
+</script>

+ 29 - 32
whepi-ui/templates/home/qiuzhu.ftl

@@ -318,40 +318,37 @@
     var aid;
 
     function myItemClick(v) {
-        if ($('#familyDisplay')[0].style.display == 'none') {
-            $('#familyDisplay')[0].style.display = '';
-            $("#notPlay").toggle();
-            $('#qzHS2').empty();
+        window.location.href = "/quzhu/home/quxiao.html?taskId=" + v.taskId + "&userId=" + v.userId;
+        /*     $.ajax({
+                 url: '/home/home/taskQuery',
+                 data: {taskId: v.taskId},
+                 type: 'GET',
+                 success: function (data) {
+                     console.log(data);
 
-            $.ajax({
-                url: '/home/home/taskQuery',
-                data: {taskId: v.taskId},
-                type: 'GET',
-                success: function (data) {
-                    console.log(data);
-                    //判断该求助是否完成  来判断按钮是否展示
-                    if (data.data.length > 0 && data.data[0].taskStatus == 2) {
-                        $('#isHiddenStyle12')[0].style.display = '';
-                    } else {
-                        $('#isHiddenStyle12')[0].style.display = 'none';
-                    }
+                /!*     //判断该求助是否完成  来判断按钮是否展示
+                     if (data.data.length > 0 && data.data[0].taskStatus == 2) {
+                         $('#isHiddenStyle12')[0].style.display = '';
+                     } else {
+                         $('#isHiddenStyle12')[0].style.display = 'none';
+                     }
 
-                    if (data.data.length > 0) {
-                        $('#qzHS2').append($('<div>' + data.data[0].taskTitle + '</div>\n'+'<div class="weui-cell ">\n'+'<div class="weui-cell__bd">\n'
-                                +data.data[0].remark+'</div>'));
-                        if(data.data[0].nickName!=null){
-                            data.data.forEach(function (v) {
-                                shValuenat2(v);
-                            });
-                        }
-                    } else {
+                     if (data.data.length > 0) {
+                         $('#qzHS2').append($('<div>' + data.data[0].taskTitle + '</div>\n' + '<div class="weui-cell ">\n' + '<div class="weui-cell__bd">\n'
+                                 + data.data[0].remark + '</div>'));
+                         if (data.data[0].nickName != null) {
+                             data.data.forEach(function (v) {
+                                 shValuenat2(v);
+                             });
+                         }
+                     } else {
+
+                     }*!/
+                 },
+                 error: function () {
+                 }
+             });*/
 
-                    }
-                },
-                error: function () {
-                }
-            });
-        }
     }
 
     function shValuenat2(v) {
@@ -418,7 +415,7 @@
         /*展示*/
         $('#play')[0].style.display = '';
         $('#Qzinput').val("")
-       // $("#qzf2").removeAttr('checked', false)
+        // $("#qzf2").removeAttr('checked', false)
         $('#remarks').val("")
     }
 

+ 2 - 2
whepi-ui/templates/home/qiuzhu.js

@@ -3,7 +3,7 @@ function qiuzhu_init() {
 }
 
 function shValue(v) {
-  $('#qzHS').append($('<a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">\n' +
+/*  $('#qzHS').append($('<a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">\n' +
     '                <div class="weui-media-box__bd">\n' +
     '                    <div style="display: flex; flex-direction: row; justify-content: space-between;">\n' +
     '                        <p class="weui-media-box__desc">' + v.nickName + '</p>\n' +
@@ -16,7 +16,7 @@ function shValue(v) {
     '                        </div>\n' +
     '                    </div>\n' +
     '                </div>\n' +
-    '            </a>\n<br />'));
+    '            </a>\n<br />'));*/
 }
 
 function timestampToTime(timestamp) {

+ 1 - 0
whepi-web/src/main/java/com/bofeng/dao/QzTaskDao.java

@@ -25,6 +25,7 @@ public interface QzTaskDao extends BaseMapper<QzTask> {
     List<QzTask> queryQzTaskByStatus(@Param("taskStatus") Integer taskStatus);
 
     List<QzTask> queryQzTask(@Param("taskStatus") Integer taskStatus, @Param("taskTitle") String taskTitle, @Param("userId") Long userId);
+    List<QzTask> queryQzTaskxq(@Param("userId") Long userId);
 
     //当前用户名称
     QzTask selectUserName(@Param("userId") Long userId);

+ 2 - 0
whepi-web/src/main/java/com/bofeng/dao/QzTaskReplyDao.java

@@ -16,4 +16,6 @@ public interface QzTaskReplyDao extends BaseMapper<QzTaskReply> {
 
   List<QzTaskReply> queryQzTaskReplyByTaskId(@Param("taskId")Long taskId);
 
+  QzTaskReply selectId(@Param("taskId")Long taskId);
+
 }

+ 3 - 0
whepi-web/src/main/java/com/bofeng/service/QzTaskReplyService.java

@@ -40,4 +40,7 @@ public class QzTaskReplyService {
         return qzTaskReplyDao.queryQzTaskReplyByTaskId(taskId);
     }
 
+    public QzTaskReply selectId(Long taskId){
+        return qzTaskReplyDao.selectId(taskId);
+    }
 }

+ 3 - 0
whepi-web/src/main/java/com/bofeng/service/QzTaskService.java

@@ -76,6 +76,9 @@ public class QzTaskService {
   public List<QzTask> queryQzTask(Integer taskStatus, String taskTitle, Long userId) {
     return qzTaskDao.queryQzTask(taskStatus, taskTitle, userId);
   }
+  public List<QzTask> queryQzTaskxq(Long userId) {
+    return qzTaskDao.queryQzTaskxq(userId);
+  }
 
   @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
   public int taskQueryTaskId(Long taskId) {

+ 116 - 68
whepi-web/src/main/java/com/bofeng/wx/controller/HomeController.java

@@ -1,97 +1,145 @@
 package com.bofeng.wx.controller;
 
-import com.baomidou.mybatisplus.toolkit.IdWorker;
-import com.bofeng.Consts;
-import com.bofeng.JwtHelper;
-import com.bofeng.dao.UserOpenMapper;
+
 import com.bofeng.entity.*;
 import com.bofeng.service.*;
 import com.fasterxml.jackson.core.JsonProcessingException;
-import com.google.common.collect.Maps;
 import com.yvan.Model;
 import com.yvan.ModelOps;
-import com.yvan.mvc.JsonBody;
 import com.yvan.mvc.Pd;
 import com.yvan.platform.JsonWapper;
-import com.yvan.platform.YvanUtil;
-import lombok.val;
-import lombok.var;
-import me.chanjar.weixin.mp.bean.result.WxMpUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
 
-import javax.annotation.PreDestroy;
 import java.util.List;
-import java.util.Map;
+
+import com.yvan.platform.JsonWapper;
 
 @RestController
 public class HomeController {
 
-    @Autowired
-    private HomeService homeService;
-
-    @Autowired
-    private QzTaskService qzTaskService;
-
-    @Autowired
-    private QzTaskReplyService qzTaskReplyService;
-
-    @Autowired
-    private MsReportService msReportService;
-
-
-    @GetMapping("/home/home.html")
-    public ModelAndView home(ModelMap model) throws JsonProcessingException {
-        model.put("user", new JsonWapper("{\"www\": \"er\"}"));
-        //初始化今日日报
-        UserOpen userOpen = homeService.getUserOpen();
-        Long userId = userOpen.getUserId();
-       // Long userId = 1224706869998772226L;
-        MsReport msReport = msReportService.getReportByDateNow(userId);
-        model.put("msReport", new JsonWapper(msReport));
-        return new ModelAndView("/home/home.ftl", model);
+  @Autowired
+  private HomeService homeService;
+
+  @Autowired
+  private QzTaskService qzTaskService;
+
+  @Autowired
+  private QzTaskReplyService qzTaskReplyService;
+
+  @Autowired
+  private MsReportService msReportService;
+
+
+  @GetMapping("/home/home.html")
+  public ModelAndView home(ModelMap model) throws JsonProcessingException {
+    model.put("user", new JsonWapper("{\"www\": \"er\"}"));
+    //初始化今日日报
+    UserOpen userOpen = homeService.getUserOpen();
+    Long userId = userOpen.getUserId();
+    // Long userId = 1224706869998772226L;
+    MsReport msReport = msReportService.getReportByDateNow(userId);
+    model.put("msReport", new JsonWapper(msReport));
+    return new ModelAndView("/home/home.ftl", model);
+  }
+
+
+  //家庭求助
+  @GetMapping("/home/home/addFimaly")
+  public ModelOps family(@Pd(name = "taskTitle") String taskTitle,
+                         @Pd(name = "taskTarget") String taskTarget,
+                         @Pd(name = "remark") String remark,
+                         @Pd(name = "userId", required = false) Long userId) {
+    return ModelOps.newSuccess(qzTaskService.addHelp(taskTitle, taskTarget, remark, userId));
+  }
+
+  //我的在求助的展示
+  @GetMapping("/home/home/queryQzTask")
+  public Model<List<QzTask>> queryQzTask(@Pd(name = "taskStatus", required = false) Integer taskStatus,
+                                         @Pd(name = "taskTitle", required = false) String taskTitle,
+                                         @Pd(name = "userId", required = false) Long userId) {
+    return Model.newSuccess(qzTaskService.queryQzTask(taskStatus, taskTitle, userId));
+  }
+
+  //我的在求助的展示
+  @GetMapping("/home/home/queryQzTaskxq")
+  public Model<List<QzTask>> queryQzTaskxq(@Pd(name = "userId", required = false) Long userId) {
+    return Model.newSuccess(qzTaskService.queryQzTaskxq(userId));
+  }
+
+
+  //页面存储taskId
+  @GetMapping("/home/qiuzhu/reply.json")
+  public ModelOps taskQueryTaskId(@RequestParam(value = "taskId") Long taskId) {
+    int i = qzTaskService.taskQueryTaskId(taskId);
+    return ModelOps.newSuccess(i);
+  }
+
+
+  //小区求助的查看
+  @GetMapping("/home/home/taskQuery")
+  public Model<QzTask> taskQuery(@Pd(name = "taskId") Long taskId) {
+    return Model.newSuccess(qzTaskService.queryByTaskId(taskId));
+  }
+
+  @GetMapping("/home/home_new.html")
+  public ModelAndView hmoe_new(ModelMap model) {
+    model.put("user", new JsonWapper("{\"www\": \"er\"}"));
+    return new ModelAndView("/home/home_new.ftl", model);
+  }
+
+  @GetMapping("/quzhu/home/quxiao.html")
+  public ModelAndView quxiao(@Pd(name = "taskId") Long taskId, @Pd(name = "userId") Long userId, ModelMap model) throws JsonProcessingException {
+    QzTask task = qzTaskService.queryByTaskId(taskId);
+
+    //回复人的id
+    QzTaskReply qzTaskReply = qzTaskReplyService.selectId(taskId);
+    Long userId1 = null;
+    if (qzTaskReply != null) {
+      userId1 = qzTaskReply.getUserId();
     }
 
 
-    //家庭求助
-    @GetMapping("/home/home/addFimaly")
-    public ModelOps family(@Pd(name = "taskTitle") String taskTitle,
-                           @Pd(name = "taskTarget") String taskTarget,
-                           @Pd(name = "remark") String remark,
-                           @Pd(name = "userId", required = false) Long userId) {
-        return ModelOps.newSuccess(qzTaskService.addHelp(taskTitle, taskTarget, remark, userId));
-    }
-
-    //我的在求助的展示
-    @GetMapping("/home/home/queryQzTask")
-    public Model<List<QzTask>> queryQzTask(@Pd(name = "taskStatus", required = false) Integer taskStatus,
-                                           @Pd(name = "taskTitle", required = false) String taskTitle,
-                                           @Pd(name = "userId", required = false) Long userId) {
-        return Model.newSuccess(qzTaskService.queryQzTask(taskStatus, taskTitle, userId));
+//        A业委会,B居委会,C物业,D志愿者
+    StringBuffer target = new StringBuffer();
+    if (task.getTaskTarget().equals("A")) {
+      target.append("业委会");
+    } else if (task.getTaskTarget().equals("B")) {
+      if (target.length() > 0) {
+        target.append("、居委会");
+      } else {
+        target.append("居委会");
+      }
+    } else if (task.getTaskTarget().equals("C")) {
+      if (target.length() > 0) {
+        target.append("、物业");
+      } else {
+        target.append("物业");
+      }
+    } else if (task.getTaskTarget().equals("D")) {
+      if (target.length() > 0) {
+        target.append("、志愿者");
+      } else {
+        target.append("志愿者");
+      }
     }
 
+    task.setTaskTarget(target.toString());
 
-    //页面存储taskId
-    @GetMapping("/home/qiuzhu/reply.json")
-    public ModelOps taskQueryTaskId(@RequestParam(value = "taskId") Long taskId) {
-        int i = qzTaskService.taskQueryTaskId(taskId);
-        return ModelOps.newSuccess(i);
-    }
+    model.put("taskJson", new JsonWapper(task));
+    model.put("task", task);
+    model.put("userId", "\"" + userId + "\"");
+    model.put("YeuserId", "\"" + userId1 + "\"");
+    return new ModelAndView("/home/htlpXq.ftl", model);
+  }
 
-    //小区求助的查看
-    @GetMapping("/home/home/taskQuery")
-    public Model<List<QzTaskReply>> taskQuery(@Pd(name = "taskId") Long taskId) {
-        return Model.newSuccess(qzTaskReplyService.taskQuery(taskId));
-    }
-
-    @GetMapping("/home/home_new.html")
-    public ModelAndView hmoe_new(ModelMap model) {
-        model.put("user", new JsonWapper("{\"www\": \"er\"}"));
-        return new ModelAndView("/home/home_new.ftl", model);
-    }
+  @PostMapping("home/qiuzhu/getData")
+  public Model<List<QzTaskReply>> getData(@Pd(name = "taskId") Long taskId) {
+    return Model.newSuccess(qzTaskReplyService.taskQuery(taskId));
+  }
 }

+ 4 - 4
whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java

@@ -66,10 +66,10 @@ public class UserOpenController {
                              @RequestParam(value = "userType", required = false, defaultValue = "0") Integer userType) throws JsonProcessingException {
         List<UserRole> list = new ArrayList<>();
         if (userId == 0) {
-            UserOpen userOpen = homeService.getUserOpen();
-            list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());
-//            list = userRoleMapper.getUserRoleByUserId(1225321682867105793L);
-//            UserOpen userOpen = userOpenMapper.selectByUserId(1225321682867105793L);
+           /* UserOpen userOpen = homeService.getUserOpen();
+            list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());*/
+            list = userRoleMapper.getUserRoleByUserId(1225321682867105793L);
+            UserOpen userOpen = userOpenMapper.selectByUserId(1225321682867105793L);
             userId = userOpen.getUserId();
             model.put("user", userOpen);
             model.put("user_id", "\"" + userOpen.getUserId() + "\"");

+ 12 - 0
whepi-web/src/main/resources/mapper/QzTaskDao.xml

@@ -29,6 +29,18 @@
         select * from qz_task where task_status=#{taskStatus}
     </select>
 
+    <select id="queryQzTaskxq" resultType="com.bofeng.entity.QzTask">
+        select qz.* from qz_task qz
+        <where>
+            qz.uptown_id =(select c.uptown_id
+            FROM sys_user_role a
+            INNER JOIN sys_uptown_house b on a.property_id=b.house_id
+            INNER JOIN sys_uptown_unit c on c.unit_id=b.unit_id
+            where a.user_id=#{userId} limit 1)
+        </where>
+        order by qz.time_update desc
+    </select>
+
     <select id="queryQzTask" resultType="com.bofeng.entity.QzTask">
         select * from qz_task
         <where>

+ 5 - 1
whepi-web/src/main/resources/mapper/QzTaskReplyDao.xml

@@ -5,7 +5,7 @@
 
     <select id="taskQuery" resultType="com.bofeng.entity.QzTaskReply">
      select a.task_title,a.remark,b.time_update,c.nick_name,b.reply_content,
-     a.task_id,a.task_status
+     a.task_id,a.task_status,b.user_id
      from qz_task a
      left JOIN qz_task_reply b on a.task_id=b.task_id
      left JOIN sys_user_open c on c.user_id=b.user_id
@@ -15,4 +15,8 @@
     <select id="queryQzTaskReplyByTaskId" resultType="com.bofeng.entity.QzTaskReply">
         select * from qz_task_reply where task_id=#{taskId}
     </select>
+
+    <select id="selectId" resultType="com.bofeng.entity.QzTaskReply">
+        select * from qz_task_reply where task_id=#{taskId} order by time_update desc limit 1
+    </select>
 </mapper>