Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java
peiguo 5 years ago
parent
commit
f164e7c208
32 changed files with 1632 additions and 169 deletions
  1. 20 7
      whepi-ui/templates/home/home.ftl
  2. 129 45
      whepi-ui/templates/home/qiuzhu.ftl
  3. 3 3
      whepi-ui/templates/home/qiuzhu.js
  4. 12 34
      whepi-ui/templates/home/ribao.ftl
  5. 62 4
      whepi-ui/templates/home/ribao.js
  6. 155 0
      whepi-ui/templates/shop/home.ftl
  7. 341 0
      whepi-ui/templates/shop/qiuzhu.ftl
  8. 58 0
      whepi-ui/templates/shop/qiuzhu.js
  9. 9 0
      whepi-ui/templates/yeweihui/qiuzhu.ftl
  10. 0 3
      whepi-ui/templates/yeweihui/qiuzhu.js
  11. 10 4
      whepi-web/src/main/java/com/bofeng/dao/QzTaskDao.java
  12. 26 0
      whepi-web/src/main/java/com/bofeng/dao/ShShopMapper.java
  13. 30 0
      whepi-web/src/main/java/com/bofeng/dao/ShShopMatMapper.java
  14. 1 1
      whepi-web/src/main/java/com/bofeng/entity/QzTask.java
  15. 33 30
      whepi-web/src/main/java/com/bofeng/entity/QzTaskReply.java
  16. 57 0
      whepi-web/src/main/java/com/bofeng/entity/ShShop.java
  17. 46 0
      whepi-web/src/main/java/com/bofeng/entity/ShShopMat.java
  18. 7 9
      whepi-web/src/main/java/com/bofeng/service/MsReportService.java
  19. 31 20
      whepi-web/src/main/java/com/bofeng/service/QzTaskService.java
  20. 130 0
      whepi-web/src/main/java/com/bofeng/service/ShShopMatService.java
  21. 116 0
      whepi-web/src/main/java/com/bofeng/service/ShShopService.java
  22. 18 6
      whepi-web/src/main/java/com/bofeng/wx/controller/HomeController.java
  23. 7 0
      whepi-web/src/main/java/com/bofeng/wx/controller/MsReportController.java
  24. 63 0
      whepi-web/src/main/java/com/bofeng/wx/controller/ShopController.java
  25. 86 0
      whepi-web/src/main/java/com/bofeng/wx/controller/ShopMatController.java
  26. 9 1
      whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java
  27. 1 1
      whepi-web/src/main/resources/application-dev.yml
  28. 76 0
      whepi-web/src/main/resources/application-songjiaqing.yml
  29. 21 0
      whepi-web/src/main/resources/mapper/QzTaskDao.xml
  30. 4 1
      whepi-web/src/main/resources/mapper/QzTaskReplyDao.xml
  31. 36 0
      whepi-web/src/main/resources/mapper/ShShop.xml
  32. 35 0
      whepi-web/src/main/resources/mapper/ShShopMat.xml

+ 20 - 7
whepi-ui/templates/home/home.ftl

@@ -61,11 +61,11 @@
         ribao_add();
         ribao_cancel();
         ribao_commit();
-        var msReport = ${msReport};
-        $('#ribao_safety_num').val(msReport.safetyNum);
-        ribaoInitialization(msReport.reportId);
 
-        submit_back();
+        <#--var msReport = ${msReport};-->
+        <#--$('#ribao_safety_num').val(msReport.safetyNum);-->
+        <#--ribaoInitialization(msReport.reportId);-->
+        /*submit_back();*/
         familyClick();
 
         $(function () {
@@ -73,11 +73,12 @@
                 if ($("#Gj").val() == "off") {
                     $("#Gj").val("on");
                     console.log("关闭查看所有");
-                    qzMy_help(1);
+
+                    qzMy_help('', $("#quetyFamily").val());
                 } else {
                     $("#Gj").val("off");
                     console.log("查看已解决的");
-                    qzMy_help(2);
+                    qzMy_help(3, $("#quetyFamily").val());
                 }
             });
         });
@@ -91,6 +92,7 @@
             url: '/home/home/queryQzTask',
             data: {},
             type: 'GET',
+            async: false,
             success: function (data) {
                 console.log(data);
                 if (data.data.length > 0) {
@@ -115,7 +117,7 @@
                 '                                <p class="weui-media-box__desc" >' + v.taskTitle + '</p>\n' +
                 '                            </div>\n' +
                 '                        </div>\n' +
-                '                        <div class="weui-cell__ft"></div>\n' +
+                '                        <div class="weui-cell__ft">' + conversion(v.taskStatus) + '</div>\n' +
                 '                    </a>\n<br />'));
 
     }
@@ -155,4 +157,15 @@
     }
 
 
+    //完成 已解决  为完成的方法
+    function conversion(a) {
+        if (a == 1) {
+            return "<span style='color:red;'>未解决</span>";
+        } else if (a == 2) {
+            return "<span style='color:Black;'>处理中</span>";
+        } else {
+            return "<span style='color:green;'>已完成</span>";
+        }
+    }
+
 </script>

+ 129 - 45
whepi-ui/templates/home/qiuzhu.ftl

@@ -11,6 +11,9 @@
         <div class="weui-tab__panel">
             <div id="qz_nav1" class="weui-tab__bd-item qiu_zhu_weui_tab_bd_item_active">
                 <div id="notitle">
+                    <div>
+
+                    </div>
                 <#--<a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="form" href="javascript:;">
                         <div class="weui-cell__bd">
                             <div class="weui-media-box weui-media-box_text" id="title">
@@ -68,14 +71,17 @@
                     <div class="weui-cell weui-cell_active weui-cell_switch">
                         <div class="weui-cell">
                             <div class="weui-cell__bd">
-                                <input type="text" class="weui-input" placeholder="搜素关键字"/>
+                                <input id="quetyFamily" type="text" class="weui-input" placeholder="搜素关键字"
+                                       maxlength="10"/>
                             </div>
+                            <a href="javascript:"
+                               class="weui-btn weui-btn_mini weui-btn_primary" onclick="queryQz()">查询</a>
                         </div>
                         <input hidden="hidden" name="Gj11" id="Gj" value="on" type="radio" checked="checked"/>
                         <div class="weui-cell__ft">
                             <input class="weui-switch" type="checkbox" id="ground" name="ground">
                         </div>
-                        <div class="weui-cell__bd">只显示未解决</div>
+                        <div class="weui-cell__bd">解决</div>
                     </div>
                     <div id="family">
                         <div class="weui-panel__bd" id="valueQz">
@@ -102,16 +108,16 @@
                     <div class="weui-form__control-area">
                         <div class="weui-cells__group weui-cells__group_form">
                             <div class="weui-cells weui-cells_checkbox">
-                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf1">
-                                    <div class="weui-cell__hd">
-                                        <input type="checkbox" class="weui-check" name="checkbox1" id="qzf1"
-                                               value="居委会">
-                                        <i class="weui-icon-checked"></i>
-                                    </div>
-                                    <div class="weui-cell__bd">
-                                        <p>居委会</p>
-                                    </div>
-                                </label>
+                            <#-- <label class="weui-cell weui-cell_active weui-check__label" for="qzf1">
+                                 <div class="weui-cell__hd">
+                                     <input type="checkbox" class="weui-check" name="checkbox1" id="qzf1"
+                                            value="居委会">
+                                     <i class="weui-icon-checked"></i>
+                                 </div>
+                                 <div class="weui-cell__bd">
+                                     <p>居委会</p>
+                                 </div>
+                             </label>-->
                                 <label class="weui-cell weui-cell_active weui-check__label" for="qzf2">
                                     <div class="weui-cell__hd">
                                         <input type="checkbox" name="checkbox2" class="weui-check" id="qzf2"
@@ -122,25 +128,25 @@
                                         <p>业委会</p>
                                     </div>
                                 </label>
-                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf3">
-                                    <div class="weui-cell__hd">
-                                        <input type="checkbox" name="checkbox3" class="weui-check" id="qzf3" value="物业">
-                                        <i class="weui-icon-checked"></i>
-                                    </div>
-                                    <div class="weui-cell__bd">
-                                        <p>物业</p>
-                                    </div>
-                                </label>
-                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf4">
-                                    <div class="weui-cell__hd">
-                                        <input type="checkbox" name="checkbox4" class="weui-check" id="qzf4"
-                                               value="志愿者">
-                                        <i class="weui-icon-checked"></i>
-                                    </div>
-                                    <div class="weui-cell__bd">
-                                        <p>志愿者</p>
-                                    </div>
-                                </label>
+                            <#--<label class="weui-cell weui-cell_active weui-check__label" for="qzf3">
+                                <div class="weui-cell__hd">
+                                    <input type="checkbox" name="checkbox3" class="weui-check" id="qzf3" value="物业">
+                                    <i class="weui-icon-checked"></i>
+                                </div>
+                                <div class="weui-cell__bd">
+                                    <p>物业</p>
+                                </div>
+                            </label>
+                            <label class="weui-cell weui-cell_active weui-check__label" for="qzf4">
+                                <div class="weui-cell__hd">
+                                    <input type="checkbox" name="checkbox4" class="weui-check" id="qzf4"
+                                           value="志愿者">
+                                    <i class="weui-icon-checked"></i>
+                                </div>
+                                <div class="weui-cell__bd">
+                                    <p>志愿者</p>
+                                </div>
+                            </label>-->
                             <#--<a href="javascript:void(0);" class="weui-cell weui-cell_active weui-cell_link">
                                 <div class="weui-cell__bd">添加更多</div>
                             </a>-->
@@ -154,12 +160,21 @@
                                     <div class="weui-textarea-counter"><span>0</span>/200</div>
                                 </div>
                             </div>
-                            <div class="weui-cell">
-                                <a class="weui-btn weui-btn_primary" href="javascript:" id="back"
-                                   onclick="qzCommit()">发起求助</a>
+                            <br>
+                            <div class="button-sp-area">
+                                <a id="zqback2" href="javascript:;" onclick="qzBackFa()"
+                                   class="weui-btn weui-btn_default">取消</a>
+                                <a id="back" href="javascript:;" onclick="qzCommit()" class="weui-btn weui-btn_primary">求助</a>
                             </div>
+                        <#--  <div class="weui-cell">
+                              <a class="weui-btn weui-btn_primary" href="javascript:" id="zqback2"
+                                 onclick="qzCommit()" >取消</a>
+                              <a class="weui-btn weui-btn_primary" href="javascript:" id="back"
+                                 onclick="qzCommit()" >求助</a>
+                          </div>-->
                             <div class="weui-cell ">
                                 <br>
+                                <br>
                             </div>
                         </div>
                     </div>
@@ -171,7 +186,11 @@
                         </div>
                         <div class="button-sp-area">
                             <div class="weui-btn-area">
-                                <a class="weui-btn weui-btn_primary" onclick="qzBackHome();">返回</a>
+                                <a class="weui-btn weui-btn_default" onclick="qzBackHome();">返回</a>
+                            </div>
+                            <div class="weui-btn-area">
+                                <a class="weui-btn weui-btn_primary" onclick="HomeStatus();" id="isHiddenStyle12"
+                                   style="display: none">完成</a>
                             </div>
                         </div>
                     </div>
@@ -191,6 +210,9 @@
         var taskTitle = $("#Qzinput").val();
         if (!taskTitle) {
             alert("请输入求助标题!")
+            $('#notPlay').hidden = 'hidden';
+            $('#play')[0].style.display = '';
+            // $('#notPlay').style=='hidden'
             return false;
         }
         var taskTarget = $("#qzf2").val();
@@ -212,17 +234,21 @@
             data: {
                 taskTitle: $("#Qzinput").val(),
                 taskTarget: $("#qzf2").val(),
-                remark: $("#remarks").val()
+                remark: $("#remarks").val(),
+                userId: $('#userId').val(),
             },
             type: 'GET',
             success: function (data) {
-                /*if ($('#notPlay')[0].style.display == 'none') {
+                if ($('#notPlay')[0].style.display == 'none') {
                     $('#play').toggle();
                     $('#notPlay')[0].style.display = '';
                 } else {
                     $('#play')[0].style.display = '';
                     $('#notPlay')[0].style.display = 'none';
-                }*/
+                }
+                qzMy_help('', '');
+                $('#quetyFamily').val("")
+
             },
             error: function () {
 
@@ -230,19 +256,36 @@
         });
     }
 
+    function qzBackFa() {
+        if ($('#notPlay')[0].style.display == 'none') {
+            $('#play').toggle();
+            $('#notPlay')[0].style.display = '';
+        } else {
+            $('#play')[0].style.display = '';
+            $('#notPlay')[0].style.display = 'none';
+        }
+        $('#Qzinput').val("")
+        $("#qzf2").removeAttr('checked', false)
+        $('#remarks').val("")
+    }
+
     //我的求助的页面展示
-    function qzMy_help(status) {
+    function qzMy_help(status, query) {
         $('#valueQz').empty();//清除节点
         $.ajax({
             url: '/home/home/queryQzTask',
-            data: {taskStatus:status},
+            data: {
+                taskStatus: status,
+                taskTitle: query,
+                userId: $('#userId').val()
+            },
             type: 'GET',
             success: function (data) {
                 console.log(data);
                 if (data.data.length > 0) {
                     hasData = true;
                     data.data.forEach(function (v) {
-                        helpValue(v);
+                        helpValueGj(v);
                     });
                 } else {
 
@@ -253,7 +296,7 @@
         });
     }
 
-    function helpValue(v) {
+    function helpValueGj(v) {
         $('#valueQz').append($(' <a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="form"\n' +
                 '                               onclick=\'myItemClick(' + JSON.stringify(v) + ')\'>\n' +
                 '                                <div class="weui-cell__bd">\n' +
@@ -261,23 +304,32 @@
                 '                                        <p class="weui-media-box__desc">' + v.taskTitle + '</p>\n' +
                 '                                    </div>\n' +
                 '                                </div>\n' +
-                '                                <div class="weui-cell__ft"></div>\n' +
+                '                                <div class="weui-cell__ft">' + conversion(v.taskStatus) + '</div>\n' +
                 '                            </a><br />'));
     }
 
+    var aid;
+
     function myItemClick(v) {
         if ($('#familyDisplay')[0].style.display == 'none') {
             $('#familyDisplay')[0].style.display = '';
             $("#notPlay").toggle();
             $('#qzHS2').empty();
+
             $.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) {
-                        hasData = true;
                         $('#qzHS2').append($('<div>' + data.data[0].taskTitle + '</div>'))
                         data.data.forEach(function (v) {
                             shValuenat2(v);
@@ -293,10 +345,11 @@
     }
 
     function shValuenat2(v) {
+        aid = v.taskId;
         $('#qzHS2').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">业主1号</p>\n' +
+                '                        <p class="weui-media-box__desc">' + v.nickName + '</p>\n' +
                 '                        <p class="weui-media-box__desc">' + timestampToTime(v.timeUpdate) + '</p>\n' +
                 '                    </div>\n' +
                 '                    <div class="weui-cell ">\n' +
@@ -320,6 +373,24 @@
 
     }
 
+    //求助反馈完成
+    function HomeStatus() {
+        $.ajax({
+            url: '/home/qiuzhu/reply.json',
+            type: 'GET',
+            data: {
+                taskId: aid,
+            },
+            success: function (data) {
+                qzBackHome();
+                qzMy_help('', '');
+            },
+            error: function () {
+            }
+        });
+    }
+
+    //只是单独的返回
     function qzBackHome() {
         if ($('#notPlay')[0].style.display == 'none') {
             $('#familyDisplay').toggle();
@@ -336,6 +407,19 @@
         /*点击隐藏*/
         /*展示*/
         $('#play')[0].style.display = '';
+        $('#Qzinput').val("")
+        $("#qzf2").removeAttr('checked', false)
+        $('#remarks').val("")
+    }
+
+
+    //查询按钮
+    function queryQz() {
+        if ($("#Gj").val() != "off") {
+            qzMy_help('', $("#quetyFamily").val());
+        } else {
+            qzMy_help(3, $("#quetyFamily").val());
+        }
     }
 </script>
 

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

@@ -6,7 +6,7 @@ function shValue(v) {
   $('#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">业主1号</p>\n' +
+    '                        <p class="weui-media-box__desc">'+v.nickName+'</p>\n' +
     '                        <p class="weui-media-box__desc">' + timestampToTime(v.timeUpdate) + '</p>\n' +
     '                    </div>\n' +
     '                    <div class="weui-cell ">\n' +
@@ -47,12 +47,12 @@ function family_init() {
 }
 
 function submit_back() {
-  $('#back').on('click', function () {
+  /*$('#back').on('click', function () {
     if ($('#notPlay')[0].style.display = 'none') {
       $('#notPlay')[0].style.display = '';
       $('#play').toggle();
 
     }
 
-  })
+  })*/
 }

+ 12 - 34
whepi-ui/templates/home/ribao.ftl

@@ -21,7 +21,7 @@
                             </div>
                             <div class="weui-cell__ft">
                                 <a id="btnAdd" href="javascript:"
-                                   class="weui-btn weui-btn_mini weui-btn_primary">添加家人</a>
+                                   class="weui-btn weui-btn_mini weui-btn_primary">病情描述</a>
                             </div>
                         </div>
                     </div>
@@ -116,40 +116,18 @@
                 </br>
             </div>
             <div id="rb_nav2" class="weui-tab__bd-item ">
-                <div class="weui-grids">
-                    <a href="javascript:;" class="weui-grid" style="background-color: #0bb20c">
-                        <p class="weui-grid__label">
-                            01
-                        </p>
-                    </a>
-                    <a href="javascript:;" class="weui-grid" style="background-color: red">
-                        <p class="weui-grid__label">
-                            02
-                        </p>
-                    </a>
-                    <a href="javascript:;" class="weui-grid">
-                        <p class="weui-grid__label">
-                            03
-                        </p>
-                    </a>
-                    <a href="javascript:;" class="weui-grid">
-                        <p class="weui-grid__label">
-                            04
-                        </p>
-                    </a>
-                </div>
+                <div id="my-input-ribao"></div>
                 <div class="weui-panel weui-panel_access">
-                    <div class="weui-panel__hd">2020-02-03</div>
-                    <div class="weui-panel__bd">
-                        <div class="weui-media-box weui-media-box_text">
-                            <h4 class="weui-media-box__title">家人1:咳嗽、乏力、未确诊</h4>
-                            <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
-                        </div>
-                        <div class="weui-media-box weui-media-box_text">
-                            <h4 class="weui-media-box__title">家人1:咳嗽、乏力、确诊</h4>
-                            <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
-                        </div>
-                    </div>
+                    <div class="weui-panel__bd" id="ribao_famliy">
+                        <#--<div class="weui-media-box weui-media-box_text">-->
+                            <#--<h4 class="weui-media-box__title">家人1:咳嗽、乏力、未确诊</h4>-->
+                            <#--<p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>-->
+                        <#--</div>-->
+                        <#--<div class="weui-media-box weui-media-box_text">-->
+                            <#--<h4 class="weui-media-box__title">家人1:咳嗽、乏力、确诊</h4>-->
+                            <#--<p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>-->
+                        <#--</div>-->
+                    </div><br /><br />
                 </div>
             </div>
         </div>

+ 62 - 4
whepi-ui/templates/home/ribao.js

@@ -35,13 +35,13 @@ function helpValue(v) {
   var conditionStatusList = v.conditionStatus.split(',');
   var conditionStatus = v.userName + ":";
   if (conditionStatusList[0] > 0)
-    conditionStatus += "咳嗽"
+    conditionStatus += "&nbsp;&nbsp;&nbsp;咳嗽"
   if (conditionStatusList[1] > 0)
-    conditionStatus += "发烧"
+    conditionStatus += "&nbsp;&nbsp;&nbsp;发烧"
   if (conditionStatusList[2] > 0)
-    conditionStatus += "乏力"
+    conditionStatus += "&nbsp;&nbsp;&nbsp;乏力"
   if (conditionStatusList[3] > 0)
-    conditionStatus += "其他"
+    conditionStatus += "&nbsp;&nbsp;&nbsp;其他"
   if (v.medical > 0)
     conditionStatus += "&nbsp;&nbsp;&nbsp;确诊"
   else
@@ -150,3 +150,61 @@ function addReport() {
     },
   });
 }
+
+$("#my-input-ribao").calendar({
+  dateFormat: 'yyyy-mm-dd',
+  inputReadOnly: false,
+  onChange: function (p, values, displayValues) {
+    var reportDate = values.toString();
+    $.ajax({
+      url: '/home/home/queryRibaoReportDate',
+      data: {
+        "reportDate": reportDate,
+      },
+      type: 'GET',
+      success: function (data) {
+        if(data.data==undefined){
+          $('#ribao_famliy').empty();
+        }
+        else {
+          if (data.data.length > 0) {
+            hasData = true;
+            data.data.forEach(function (v) {
+              helpValue1(v);
+            });
+          } else {
+
+          }
+        }
+      },
+      error: function () {
+      }
+    });
+  }
+});
+
+
+function helpValue1(v) {
+  var conditionStatusList = v.conditionStatus.split(',');
+  var conditionStatus = v.userName + ":";
+  if (conditionStatusList[0] > 0)
+    conditionStatus += "&nbsp;&nbsp;&nbsp;咳嗽"
+  if (conditionStatusList[1] > 0) {
+      conditionStatus += "&nbsp;&nbsp;&nbsp;发烧"
+  }
+  if (conditionStatusList[2] > 0) {
+      conditionStatus += "&nbsp;&nbsp;&nbsp;乏力"
+  }
+  if (conditionStatusList[3] > 0) {
+      conditionStatus += "&nbsp;&nbsp;&nbsp;其他"
+  }
+  if (v.medical > 0)
+    conditionStatus += "&nbsp;&nbsp;&nbsp;确诊"
+  else
+    conditionStatus += "&nbsp;&nbsp;&nbsp;未确诊"
+  $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text">\n' +
+    '                                      <h4 class="weui-media-box__title">' + conditionStatus + '</h4>\n' +
+    '                                      <p class="weui-media-box__desc">' + v.remarks + '</p>\n' +
+    '                                    </div>\n' +
+    '                              '));
+}

+ 155 - 0
whepi-ui/templates/shop/home.ftl

@@ -0,0 +1,155 @@
+<#assign title="我的店"/>
+<#include "/home/frag.head.ftl" />
+
+<div class="weui-tab">
+    <input id="userId" type="text" hidden="hidden" value=${user_id!}/>
+    <div class="weui-tab__bd">
+        <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
+            <#include "/shop/qiuzhu.ftl" /></div>
+        <div id="tab2" class="weui-tab__bd-item">
+            <#include "/shop/shangpin.ftl" /></div>
+    <#--<div id="tab3" class="weui-tab__bd-item">-->
+    <#--<h1>页面三</h1> </div>-->
+    <#--<div id="tab4" class="weui-tab__bd-item">-->
+    <#--<h1>页面四</h1> </div>-->
+    </div>
+    <div class="weui-tabbar">
+        <a href="#tab1" class="weui-tabbar__item weui-bar__item--on">
+            <div class="weui-tabbar__icon"><img src="/static/images/wx/order.png" alt=""></div>
+            <p class="weui-tabbar__label">居民求助消息</p>
+        </a>
+        <a href="#tab2" class="weui-tabbar__item">
+            <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
+            <p class="weui-tabbar__label" onclick="familyClick()">我的商品</p>
+        </a>
+    <#--<a href="#tab3" class="weui-tabbar__item">-->
+    <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_article.png" alt=""> </div>-->
+    <#--<p class="weui-tabbar__label">发现</p>-->
+    <#--</a>-->
+    <#--<a href="#tab4" class="weui-tabbar__item">-->
+    <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_cell.png" alt=""> </div>-->
+    <#--<p class="weui-tabbar__label">我</p>-->
+    <#--</a>-->
+    </div>
+</div>
+
+
+</body>
+
+<#include "/home/frag.foot.ftl" />
+<script>
+    <#include "/shop/qiuzhu.js" />
+    <#include "/shop/shangpin.js" />
+    (function ($) {
+
+        $(function () {
+            $('.weui-navbar__item').on('click', function () {
+                $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
+                //内容切换
+                var moduleClass = jQuery(this).attr("module");
+                var ss = ".weui-tab__panel ." + moduleClass + "_weui_tab_bd_item_active";
+                $(ss).removeClass(moduleClass + '_weui_tab_bd_item_active');
+                var data_toggle = jQuery(this).attr("target");
+                $(data_toggle).addClass(moduleClass + "_weui_tab_bd_item_active");
+            });
+        });
+
+
+        ribao_init();
+        qiuzhu_init();
+        family_init();
+        ribao_add();
+        ribao_cancel();
+        ribao_commit();
+        submit_back();
+        familyClick();
+
+        $(function () {
+            $("#ground").bind("click", function () {
+                if ($("#Gj").val() == "off") {
+                    $("#Gj").val("on");
+                    console.log("关闭查看所有");
+                    qzMy_help(1);
+                } else {
+                    $("#Gj").val("off");
+                    console.log("查看已解决的");
+                    qzMy_help(2);
+                }
+            });
+        });
+    })(jQuery);
+
+
+    //小区求助信息的展示
+    function familyClick() {
+        $('#notitle').empty();//清除节点
+        $.ajax({
+            url: '/home/home/queryQzTask',
+            // data: {},
+            data: {taskStatus: 1},
+            type: 'GET',
+            success: function (data) {
+                console.log(data);
+                if (data.data.length > 0) {
+                    hasData = true;
+                    data.data.forEach(function (v) {
+                        familyValue(v);
+                    });
+                } else {
+
+                }
+            },
+            error: function () {
+            }
+        });
+    }
+
+    function familyValue(v) {
+        $('#notitle').append($('<a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="form" ' +
+                '                               onclick=\'xiaoQuItemClick(' + JSON.stringify(v) + ')\'>\n' +
+                '                        <div class="weui-cell__bd" taskId="1212>\n' +
+                '                            <div class="weui-media-box weui-media-box_text" id="title">\n' +
+                '                                <p class="weui-media-box__desc" >' + v.taskTitle + '</p>\n' +
+                '                            </div>\n' +
+                '                        </div>\n' +
+                '                        <div class="weui-cell__ft"></div>\n' +
+                '                    </a>\n<br />'));
+
+    }
+
+    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>'))
+                        data.data.forEach(function (v) {
+                            shValue(v);
+                        });
+                    } else {
+
+                    }
+                },
+                error: function () {
+                }
+            });
+            /*$('#qzHS').*/
+
+        } else {
+            $('#notitle')[0].style.display = '';
+            $('#titlteZs')[0].style.display = 'none';
+        }
+    }
+
+
+</script>

+ 341 - 0
whepi-ui/templates/shop/qiuzhu.ftl

@@ -0,0 +1,341 @@
+<div class="page__bd">
+    <div class="weui-tab">
+        <div class="weui-navbar">
+            <a class="weui-navbar__item weui-bar__item_on" target="#qz_nav1" module="qiu_zhu" onclick="familyClick()">
+                未响应
+            </a>
+            <a class="weui-navbar__item" target="#qz_nav2" module="qiu_zhu" id="qzMy_help" onclick="qzMy_help('')">
+                已响应
+            </a>
+        </div>
+        <div class="weui-tab__panel">
+            <div id="qz_nav1" class="weui-tab__bd-item qiu_zhu_weui_tab_bd_item_active">
+                <div id="notitle">
+                <#--<a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="form" href="javascript:;">
+                        <div class="weui-cell__bd">
+                            <div class="weui-media-box weui-media-box_text" id="title">
+                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
+                            </div>
+                        </div>
+                        <div class="weui-cell__ft"></div>
+                    </a>
+                    <a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="list" href="javascript:;">
+                        <div class="weui-cell__bd">
+                            <div class="weui-media-box weui-media-box_text" id="title">
+                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
+                            </div>
+                        </div>
+                        <div class="weui-cell__ft"></div>
+                    </a>
+                    <a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="name" href="javascript:;">
+                        <div class="weui-cell__bd">
+                            <div class="weui-media-box weui-media-box_text" id="title2">
+                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
+                            </div>
+                        </div>
+                        <div class="weui-cell__ft"></div>
+                    </a>
+                    <a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="age" href="javascript:;">
+                        <div class="weui-cell__bd">
+                            <div class="weui-media-box weui-media-box_text" id="title3">
+                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
+                            </div>
+                        </div>
+                        <div class="weui-cell__ft"></div>
+                    </a>-->
+                </div>
+                <div id="titlteZs" style="display: none">
+                    <div class="page__bd">
+                        <div class="weui-panel weui-panel_access" id="qzHS">
+                        </div>
+                        <div class="button-sp-area">
+                            <div class="weui-btn-area">
+                                <a class="weui-btn weui-btn_primary" onclick="qzBackXiaoQu();">返回</a>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+
+
+        <#--我的求助2-->
+            <div id="qz_nav2" class="weui-tab__bd-item">
+                <div id="notPlay">
+                    <div class="weui-btn-area">
+                        <a id="btnQZ" class="weui-btn weui-btn_primary" onclick="qzDetail();">发起求助</a>
+                    </div>
+                    <div class="weui-cell weui-cell_active weui-cell_switch">
+                        <div class="weui-cell">
+                            <div class="weui-cell__bd">
+                                <input type="text" class="weui-input" placeholder="搜素关键字"/>
+                            </div>
+                        </div>
+                        <input hidden="hidden" name="Gj11" id="Gj" value="on" type="radio" checked="checked"/>
+                        <div class="weui-cell__ft">
+                            <input class="weui-switch" type="checkbox" id="ground" name="ground">
+                        </div>
+                        <div class="weui-cell__bd">只显示未解决</div>
+                    </div>
+                    <div id="family">
+                        <div class="weui-panel__bd" id="valueQz">
+                        </div>
+                    </div>
+                </div>
+                <div id="play" style="display: none" class="weui-panel__bd"><#--发起求助的展示界面-->
+                    <div class="weui-cells__group weui-cells__group_form">
+                        <div class="weui-cells weui-cells_form">
+                            <div class="weui-cell weui-cell_active" id="js_cell">
+                                <div class="weui-cell__hd"><label class="weui-label">标题</label></div>
+                                <div class="weui-cell__bd weui-flex">
+                                    <input id="Qzinput" class="weui-input" type="text"
+                                           placeholder="输入求助标题" maxlength="20" bindinput='formName' name="name"
+                                    >
+                                <#--<button id="js_input_clear" onclick="inputClick()"
+                                        class="weui-btn_reset weui-btn_icon weui-btn_input-clear">
+                                    <i class="weui-icon-clear"></i>
+                                </button>-->
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="weui-form__control-area">
+                        <div class="weui-cells__group weui-cells__group_form">
+                            <div class="weui-cells weui-cells_checkbox">
+                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf1">
+                                    <div class="weui-cell__hd">
+                                        <input type="checkbox" class="weui-check" name="checkbox1" id="qzf1"
+                                               value="居委会">
+                                        <i class="weui-icon-checked"></i>
+                                    </div>
+                                    <div class="weui-cell__bd">
+                                        <p>居委会</p>
+                                    </div>
+                                </label>
+                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf2">
+                                    <div class="weui-cell__hd">
+                                        <input type="checkbox" name="checkbox2" class="weui-check" id="qzf2"
+                                               value="业委会">
+                                        <i class="weui-icon-checked"></i>
+                                    </div>
+                                    <div class="weui-cell__bd">
+                                        <p>业委会</p>
+                                    </div>
+                                </label>
+                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf3">
+                                    <div class="weui-cell__hd">
+                                        <input type="checkbox" name="checkbox3" class="weui-check" id="qzf3" value="物业">
+                                        <i class="weui-icon-checked"></i>
+                                    </div>
+                                    <div class="weui-cell__bd">
+                                        <p>物业</p>
+                                    </div>
+                                </label>
+                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf4">
+                                    <div class="weui-cell__hd">
+                                        <input type="checkbox" name="checkbox4" class="weui-check" id="qzf4"
+                                               value="志愿者">
+                                        <i class="weui-icon-checked"></i>
+                                    </div>
+                                    <div class="weui-cell__bd">
+                                        <p>志愿者</p>
+                                    </div>
+                                </label>
+                            <#--<a href="javascript:void(0);" class="weui-cell weui-cell_active weui-cell_link">
+                                <div class="weui-cell__bd">添加更多</div>
+                            </a>-->
+                            </div>
+                        </div>
+                        <div class="weui-cells weui-cells_form">
+                            <div class="weui-cell ">
+                                <div class="weui-cell__bd">
+                                    <textarea class="weui-textarea" placeholder="请输入求助内容" rows="3"
+                                              id="remarks"></textarea>
+                                    <div class="weui-textarea-counter"><span>0</span>/200</div>
+                                </div>
+                            </div>
+                            <div class="weui-cell">
+                                <a class="weui-btn weui-btn_primary" href="javascript:" id="back"
+                                   onclick="qzCommit()">发起求助</a>
+                            </div>
+                            <div class="weui-cell ">
+                                <br>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+
+                <div id="familyDisplay" style="display: none">
+                    <div class="page__bd">
+                        <div class="weui-panel weui-panel_access" id="qzHS2">
+                        </div>
+                        <div class="button-sp-area">
+                            <div class="weui-btn-area">
+                                <a class="weui-btn weui-btn_primary" onclick="qzBackHome();">返回</a>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+
+    function qzCommit() {
+        /*     $("#qzf1").val()
+             $("#qzf2").val()
+             $("#qzf3").val()
+             $("#qzf4").val()*/
+        var taskTitle = $("#Qzinput").val();
+        if (!taskTitle) {
+            alert("请输入求助标题!")
+            return false;
+        }
+        var taskTarget = $("#qzf2").val();
+        if (!taskTarget) {
+            alert("请输入求助目标!")
+            return false;
+        }
+        var remark = $("#remarks").val();
+        if (!remark) {
+            alert("请输入求助内容!")
+            return false;
+        }
+
+        var data = {}
+        var tep = JSON.stringify(data);
+        console.log(tep)
+        $.ajax({
+            url: '/home/home/addFimaly',
+            data: {
+                taskTitle: $("#Qzinput").val(),
+                taskTarget: $("#qzf2").val(),
+                remark: $("#remarks").val()
+            },
+            type: 'GET',
+            success: function (data) {
+                /*if ($('#notPlay')[0].style.display == 'none') {
+                    $('#play').toggle();
+                    $('#notPlay')[0].style.display = '';
+                } else {
+                    $('#play')[0].style.display = '';
+                    $('#notPlay')[0].style.display = 'none';
+                }*/
+            },
+            error: function () {
+
+            }
+        });
+    }
+
+    //我的求助的页面展示
+    function qzMy_help(status) {
+        $('#valueQz').empty();//清除节点
+        $.ajax({
+            url: '/home/home/queryQzTask',
+            data: {taskStatus: status},
+            type: 'GET',
+            success: function (data) {
+                console.log(data);
+                if (data.data.length > 0) {
+                    hasData = true;
+                    data.data.forEach(function (v) {
+                        helpValue(v);
+                    });
+                } else {
+
+                }
+            },
+            error: function () {
+            }
+        });
+    }
+
+    function helpValue(v) {
+        $('#valueQz').append($(' <a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="form"\n' +
+                '                               onclick=\'myItemClick(' + JSON.stringify(v) + ')\'>\n' +
+                '                                <div class="weui-cell__bd">\n' +
+                '                                    <div class="weui-media-box weui-media-box_text" id="title">\n' +
+                '                                        <p class="weui-media-box__desc">' + v.taskTitle + '</p>\n' +
+                '                                    </div>\n' +
+                '                                </div>\n' +
+                '                                <div class="weui-cell__ft"></div>\n' +
+                '                            </a><br />'));
+    }
+
+    function myItemClick(v) {
+        if ($('#familyDisplay')[0].style.display == 'none') {
+            $('#familyDisplay')[0].style.display = '';
+            $("#notPlay").toggle();
+            $('#qzHS2').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;
+                        $('#qzHS2').append($('<div>' + data.data[0].taskTitle + '</div>'))
+                        data.data.forEach(function (v) {
+                            shValuenat2(v);
+                        });
+                    } else {
+
+                    }
+                },
+                error: function () {
+                }
+            });
+        }
+    }
+
+    function shValuenat2(v) {
+        $('#qzHS2').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">业主1号</p>\n' +
+                '                        <p class="weui-media-box__desc">' + timestampToTime(v.timeUpdate) + '</p>\n' +
+                '                    </div>\n' +
+                '                    <div class="weui-cell ">\n' +
+                '                        <div class="weui-cell__bd">\n' +
+                '                            <textarea class="weui-textarea" rows="1" readonly >' + v.replyContent + '</textarea>\n' +
+                '                            <div class="weui-textarea-counter"></div>\n' +
+                '                        </div>\n' +
+                '                    </div>\n' +
+                '                </div>\n' +
+                '            </a>\n<br />'));
+    }
+
+    function qzBackXiaoQu() {
+        if ($('#titlteZs')[0].style.display == 'none') {
+            $('#notitle').toggle();
+            $('#titlteZs')[0].style.display = '';
+        } else {
+            $('#notitle')[0].style.display = '';
+            $('#titlteZs')[0].style.display = 'none';
+        }
+
+    }
+
+    function qzBackHome() {
+        if ($('#notPlay')[0].style.display == 'none') {
+            $('#familyDisplay').toggle();
+            $('#notPlay')[0].style.display = '';
+        } else {
+            $('#familyDisplay')[0].style.display = '';
+            $('#notPlay')[0].style.display = 'none';
+        }
+
+    }
+
+    function qzDetail() {
+        $("#notPlay").toggle();
+        /*点击隐藏*/
+        /*展示*/
+        $('#play')[0].style.display = '';
+    }
+</script>
+

+ 58 - 0
whepi-ui/templates/shop/qiuzhu.js

@@ -0,0 +1,58 @@
+function qiuzhu_init() {
+
+}
+
+function shValue(v) {
+  $('#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">业主1号</p>\n' +
+    '                        <p class="weui-media-box__desc">' + timestampToTime(v.timeUpdate) + '</p>\n' +
+    '                    </div>\n' +
+    '                    <div class="weui-cell ">\n' +
+    '                        <div class="weui-cell__bd">\n' +
+    '                            <textarea class="weui-textarea" rows="1" readonly >' + v.replyContent + '</textarea>\n' +
+    '                            <div class="weui-textarea-counter"></div>\n' +
+    '                        </div>\n' +
+    '                    </div>\n' +
+    '                </div>\n' +
+    '            </a>\n<br />'));
+}
+
+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;
+}
+
+function family_init() {
+  /*$('#family').on('click',function () {
+    $('#familyDisplay')[0].style.display == '';
+    alert($('#familyDisplay')[0].style.display == 'none')
+    if($('#familyDisplay')[0].style.display == 'none'){
+      $('#notPlay').toggle();
+
+    }else{
+      $('#familyDisplay')[0].style.display == '';
+      $('#notPlay')[0].style.display == 'none';
+    }
+
+
+  })*/
+}
+
+function submit_back() {
+  $('#back').on('click', function () {
+    if ($('#notPlay')[0].style.display = 'none') {
+      $('#notPlay')[0].style.display = '';
+      $('#play').toggle();
+
+    }
+
+  })
+}

+ 9 - 0
whepi-ui/templates/yeweihui/qiuzhu.ftl

@@ -45,6 +45,9 @@
                             </div>
                         </a>
                     </div>
+                    <div class="weui-cell ">
+                        <br>
+                    </div>
                 </div>
             </div>
             <div id="qz_nav2" class="weui-tab__bd-item">
@@ -80,6 +83,9 @@
                             </div>
                         </a>
                     </div>
+                    <div class="weui-cell ">
+                        <br>
+                    </div>
                 </div>
             </div>
             <div id="qz_nav3" class="weui-tab__bd-item">
@@ -115,6 +121,9 @@
                             </div>
                         </a>
                     </div>
+                    <div class="weui-cell ">
+                        <br>
+                    </div>
                 </div>
             </div>
         </div>

+ 0 - 3
whepi-ui/templates/yeweihui/qiuzhu.js

@@ -106,7 +106,6 @@ function makeList1(tasks) {
         '                            </div>\n' +
         '                        </a>'));
   }
-  $('#qz_list1').append('<br>');
 }
 
 function makeList2(tasks) {
@@ -131,7 +130,6 @@ function makeList2(tasks) {
         '                            </div>\n' +
         '                        </a>'));
   }
-  $('#qz_list2').append('<br>');
 }
 
 function makeList3(tasks) {
@@ -157,7 +155,6 @@ function makeList3(tasks) {
         '                            </div>\n' +
         '                        </a>'));
   }
-  $('#qz_list3').append('<br>');
 }
 
 function itemSelect(taskId) {

+ 10 - 4
whepi-web/src/main/java/com/bofeng/dao/QzTaskDao.java

@@ -14,11 +14,17 @@ public interface QzTaskDao extends BaseMapper<QzTask> {
 
   List<QzTask> selectAll();
 
-    QzTask queryByTaskId(Long taskId);
+  QzTask queryByTaskId(Long taskId);
 
-    List<QzTask> queryByHouseNumber(@Param("houseNumber") String houseNumber, @Param("status") Integer status);
+  List<QzTask> queryByHouseNumber(@Param("houseNumber") String houseNumber, @Param("status") Integer status);
 
-    Integer updateStatusById(@Param("taskId") Long taskId, @Param("status") Integer status);
+  Integer updateStatusById(@Param("taskId") Long taskId, @Param("status") Integer status);
 
-    List<QzTask> queryQzTask(@Param("taskStatus")Integer taskStatus);
+  List<QzTask> queryQzTaskByStatus(@Param("taskStatus")Integer taskStatus);
+  List<QzTask> queryQzTask(@Param("taskStatus") Integer taskStatus, @Param("taskTitle") String taskTitle,@Param("userId")Long userId);
+
+  //当前用户名称
+  QzTask selectUserName(@Param("userId") Long userId);
+  //当前用户门牌id 门牌号
+  QzTask selectHome(@Param("userId") Long userId);
 }

+ 26 - 0
whepi-web/src/main/java/com/bofeng/dao/ShShopMapper.java

@@ -0,0 +1,26 @@
+package com.bofeng.dao;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.bofeng.entity.ShShop;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface ShShopMapper extends BaseMapper<ShShop> {
+
+//    List<ShShop> selectAll();
+
+//    ShShop queryById(Long taskId);
+
+    List<ShShop> queryMyShShop(Long userId);
+
+//    List<ShShop> queryByHouseNumber(@Param("houseNumber") String houseNumber, @Param("status") Integer status);
+//
+//    Integer updateStatusById(@Param("taskId") Long taskId, @Param("status") Integer status);
+//
+//    List<ShShop> queryShShop(@Param("taskStatus") Integer taskStatus);
+
+}

+ 30 - 0
whepi-web/src/main/java/com/bofeng/dao/ShShopMatMapper.java

@@ -0,0 +1,30 @@
+package com.bofeng.dao;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.bofeng.entity.ShShopMat;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface ShShopMatMapper extends BaseMapper<ShShopMat> {
+
+//    List<ShShop> selectAll();
+
+//    ShShop queryById(Long taskId);
+
+    List<ShShopMat> queryMyShShopMat(Long shopId);
+
+    List<ShShopMat> queryAllShShopMat();
+
+//    Integer cancelMyShopMat(@Param("matId") Long matId, @Param("status") Integer status);
+
+//    List<ShShop> queryByHouseNumber(@Param("houseNumber") String houseNumber, @Param("status") Integer status);
+//
+//    Integer updateStatusById(@Param("taskId") Long taskId, @Param("status") Integer status);
+//
+//    List<ShShop> queryShShop(@Param("taskStatus") Integer taskStatus);
+
+}

+ 1 - 1
whepi-web/src/main/java/com/bofeng/entity/QzTask.java

@@ -54,7 +54,7 @@ public class QzTask implements Serializable {
     /**
      * 门牌号ID
      */
-    private String houseId;
+    private Long houseId;
 
     /**
      * 新增人

+ 33 - 30
whepi-web/src/main/java/com/bofeng/entity/QzTaskReply.java

@@ -1,6 +1,7 @@
 package com.bofeng.entity;
 
 import lombok.Data;
+import org.joda.time.DateTime;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -13,42 +14,44 @@ public class QzTaskReply implements Serializable {
    */
   private Long replyId;
 
-    /**
-     * 求助ID
-     */
-    private Long taskId;
+  /**
+   * 求助ID
+   */
+  private Long taskId;
 
-    /**
-     * 回复用户ID
-     */
-    private Long userId;
+  /**
+   * 回复用户ID
+   */
+  private Long userId;
 
-    /**
-     * 回复内容
-     */
-    private String replyContent;
+  /**
+   * 回复内容
+   */
+  private String replyContent;
 
-    /**
-     * 新增人
-     */
-    private Long userCreate;
+  /**
+   * 新增人
+   */
+  private Long userCreate;
 
-    /**
-     * 新增时间
-     */
-    private Date timeCreate;
+  /**
+   * 新增时间
+   */
+  private DateTime timeCreate;
 
-    /**
-     * 修改人
-     */
-    private Long userUpdate;
+  /**
+   * 修改人
+   */
+  private Long userUpdate;
 
-    /**
-     * 修改时间
-     */
-    private Date timeUpdate;
+  /**
+   * 修改时间
+   */
+  private DateTime timeUpdate;
 
-    private String taskTitle;
+  private String taskTitle;
+  private Integer taskStatus;
+  private String nickName;
 
-    private static final long serialVersionUID = 1L;
+  private static final long serialVersionUID = 1L;
 }

+ 57 - 0
whepi-web/src/main/java/com/bofeng/entity/ShShop.java

@@ -0,0 +1,57 @@
+package com.bofeng.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import lombok.Getter;
+import lombok.Setter;
+import org.joda.time.DateTime;
+
+import java.io.Serializable;
+
+/**
+ * qz_task
+ *
+ * @author
+ */
+@Getter
+@Setter
+@TableName("sh_shop")
+public class ShShop implements Serializable {
+    @TableId("shop_id")
+    private Long shopId;
+    @TableField("user_id")
+    private Long userId;
+    @TableField("shop_type")
+    private Integer shopType;
+    @TableField("shop_name")
+    private String shopName;
+    @TableField("linkman")
+    private String linkman;
+    @TableField("phone")
+    private String phone;
+    //    @TableField("housing_estate")
+//    private String housingEstate;
+    @TableField("addr")
+    private String addr;
+    @TableField("main_mat_desc")
+    private String mainMatDesc;
+    @TableField("start_date")
+    private DateTime startDate;
+    @TableField("end_date")
+    private DateTime endDate;
+    //    @TableField("message")
+//    private String message;
+    @TableField("status")
+    private int status;
+    @TableField("user_create")
+    private Long userCreate;
+    @TableField("time_create")
+    private DateTime timeCreate;
+    @TableField("user_update")
+    private Long userUpdate;
+    @TableField("time_update")
+    private DateTime timeUpdate;
+
+
+}

+ 46 - 0
whepi-web/src/main/java/com/bofeng/entity/ShShopMat.java

@@ -0,0 +1,46 @@
+package com.bofeng.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import lombok.Getter;
+import lombok.Setter;
+import org.joda.time.DateTime;
+
+import java.io.Serializable;
+
+/**
+ * qz_task
+ *
+ * @author
+ */
+@Getter
+@Setter
+@TableName("sh_shop_mat")
+public class ShShopMat implements Serializable {
+    @TableId("mat_id")
+    private Long matId;
+    @TableField("shop_id")
+    private Long shopId;
+    @TableField("inventory_type")
+    private Integer inventory_type;
+    @TableField("status")
+    private Integer status;
+    @TableField("description")
+    private String description;
+    @TableField("user_create")
+    private Long userCreate;
+    @TableField("time_create")
+    private DateTime timeCreate;
+    @TableField("user_update")
+    private Long userUpdate;
+    @TableField("time_update")
+    private DateTime timeUpdate;
+
+
+    @TableField("mat_name")
+    private String matName;
+    @TableField("mat_num")
+    private int matNum;
+
+}

+ 7 - 9
whepi-web/src/main/java/com/bofeng/service/MsReportService.java

@@ -30,20 +30,18 @@ public class MsReportService {
     @Autowired
     private MsReportMapper msReportMapper;
 
-    public List<MsSuspected> getBySuspectedDateNow(Long userId) {
-        Date t = new Date();
-        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
-        String reportDate = df.format(t);
+    public List<MsSuspected> getByReportId(Long reportId) {
+        return msSuspectedMapper.selectByReportId(reportId);
+    }
+
+    public List<MsSuspected> getByReportReportDate(String reportDate) {
+
         List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate);
         List<MsSuspected> listSuspected = null;
         if (listReport != null && listReport.size() > 0) {
             listSuspected = msSuspectedMapper.selectByReportId(Long.parseLong(listReport.get(0).getReportId().toString()));
         }
-        return listSuspected;
-    }
-
-    public List<MsSuspected> getByReportId(Long reportId) {
-        return msSuspectedMapper.selectByReportId(reportId);
+        return  listSuspected;
     }
 
     public MsReport getReportByDateNow(Long userId) {

+ 31 - 20
whepi-web/src/main/java/com/bofeng/service/QzTaskService.java

@@ -16,43 +16,54 @@ import java.util.List;
 @Transactional(readOnly = true)
 public class QzTaskService {
 
-    @Autowired
-    private QzTaskDao qzTaskDao;
+  @Autowired
+  private QzTaskDao qzTaskDao;
 
-    public List<QzTask> selectAll () {
-        return qzTaskDao.selectAll();
-    }
+  public List<QzTask> selectAll() {
+    return qzTaskDao.selectAll();
+  }
 
-    public List<QzTask> queryByHouseNumber (String houseNumber, Integer status) {
-        return qzTaskDao.queryByHouseNumber(houseNumber, status);
-    }
+  public List<QzTask> queryByHouseNumber(String houseNumber, Integer status) {
+    return qzTaskDao.queryByHouseNumber(houseNumber, status);
+  }
 
-    public QzTask queryByTaskId (Long taskId) {
-        return qzTaskDao.queryByTaskId(taskId);
-    }
+  public QzTask queryByTaskId(Long taskId) {
+    return qzTaskDao.queryByTaskId(taskId);
+  }
 
   //求助的新增
   @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
-  public int addHelp(String taskTitle,String taskTarget,String remark) {
-    var qzTak=new QzTask();
+  public int addHelp(String taskTitle, String taskTarget, String remark, Long userId) {
+    var qzTak = new QzTask();
     qzTak.setTaskId(IdWorker.getId());
     qzTak.setTaskTitle(taskTitle);
     qzTak.setRemark(remark);
     qzTak.setTaskTarget(taskTarget);
     qzTak.setTaskStatus(1);
-
-    /*long userId = Long.parseLong(JwtHelper.getUserId());
     qzTak.setUserId(userId);
-    qzTak.setUserCreate(userId);*/
+    //当前用户名称
+    qzTak.setUserName(qzTaskDao.selectUserName(userId).getUserName());
+    //当前用户的门牌id  门牌号
+    QzTask qzTask1 = qzTaskDao.selectHome(userId);
+    qzTak.setHouseId(qzTask1.getHouseId());
+    qzTak.setHouseNumber(qzTask1.getHouseNumber());
+    qzTak.setUserCreate(userId);
     qzTak.setTimeCreate(new DateTime());
-   /* qzTak.setUserUpdate(userId);*/
+    qzTak.setUserUpdate(userId);
     qzTak.setTimeUpdate(new DateTime());
-    return qzTaskDao.insert(qzTak);
+    return 1;
   }
 
+  public List<QzTask> queryQzTaskByStatus(Integer taskStatus) {
+    return qzTaskDao.queryQzTaskByStatus(taskStatus);
+  }
 
+  public List<QzTask> queryQzTask(Integer taskStatus, String taskTitle, Long userId) {
+    return qzTaskDao.queryQzTask(taskStatus, taskTitle, userId);
+  }
 
-  public List<QzTask> queryQzTask(Integer taskStatus){
-    return qzTaskDao.queryQzTask(taskStatus);
+  @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+  public int taskQueryTaskId(Long taskId) {
+    return qzTaskDao.updateStatusById(taskId, 3);//求助完成
   }
 }

+ 130 - 0
whepi-web/src/main/java/com/bofeng/service/ShShopMatService.java

@@ -0,0 +1,130 @@
+package com.bofeng.service;
+
+import com.baomidou.mybatisplus.toolkit.IdWorker;
+import com.bofeng.dao.ShShopMapper;
+import com.bofeng.dao.ShShopMatMapper;
+import com.bofeng.entity.ShShopMat;
+import lombok.var;
+import org.joda.time.DateTime;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Service
+@Transactional(readOnly = true)
+public class ShShopMatService {
+
+    @Autowired
+    private ShShopMapper shShopMapper;
+    @Autowired
+    private ShShopMatMapper shShopMatMapper;
+
+//    public List<QzTask> selectAll () {
+//        return qzTaskDao.selectAll();
+//    }
+//
+//    public List<QzTask> queryByHouseNumber (String houseNumber, Integer status) {
+//        return qzTaskDao.queryByHouseNumber(houseNumber, status);
+//    }
+//
+//    public QzTask queryByTaskId (Long taskId) {
+//        return qzTaskDao.queryByTaskId(taskId);
+//    }
+
+    //商品的新增
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public int addShShopMat(Long userId, String matName, Integer matNum) throws Exception {
+        DateTime dateTime = new DateTime();
+
+        var shShopDb = shShopMapper.selectById(userId);
+        if (null == shShopDb) {
+            throw new Exception("发布失败");
+        }
+
+        var mat = new ShShopMat();
+        mat.setMatId(IdWorker.getId());
+        mat.setShopId(shShopDb.getShopId());
+        mat.setMatName(matName);
+        mat.setMatNum(matNum);
+        mat.setStatus(1);
+
+    /*long userId = Long.parseLong(JwtHelper.getUserId());
+    qzTak.setUserId(userId);
+    qzTak.setUserCreate(userId);*/
+        mat.setTimeCreate(dateTime);
+        /* qzTak.setUserUpdate(userId);*/
+        mat.setTimeUpdate(dateTime);
+        return shShopMatMapper.insert(mat);
+    }
+
+
+    //商品的修改
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public int editShShopMat(Long matId, String matName, Integer matNum) throws Exception {
+        DateTime dateTime = new DateTime();
+
+//        var shShopDb = shShopMapper.selectById(userId);
+//        if (null == shShopDb) {
+//            throw new Exception("发布失败");
+//        }
+
+        var shShopMatDb = shShopMatMapper.selectById(matId);
+        if (null == shShopMatDb) {
+            throw new Exception("修改失败");
+        }
+
+        shShopMatDb.setMatName(matName);
+        shShopMatDb.setMatNum(matNum);
+        shShopMatDb.setStatus(1);
+
+    /*long userId = Long.parseLong(JwtHelper.getUserId());
+    qzTak.setUserId(userId);
+    qzTak.setUserCreate(userId);*/
+//        mat.setTimeCreate(dateTime);
+        /* qzTak.setUserUpdate(userId);*/
+        shShopMatDb.setTimeUpdate(dateTime);
+        return shShopMatMapper.updateById(shShopMatDb);
+    }
+
+    //商品的置顶2、下架0修改
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public int editShShopMatStatus(Long matId, Integer status) throws Exception {
+        DateTime dateTime = new DateTime();
+
+//        var shShopDb = shShopMapper.selectById(userId);
+//        if (null == shShopDb) {
+//            throw new Exception("发布失败");
+//        }
+
+        var shShopMatDb = shShopMatMapper.selectById(matId);
+        if (null == shShopMatDb) {
+            throw new Exception("修改失败");
+        }
+
+        shShopMatDb.setStatus(status);
+
+    /*long userId = Long.parseLong(JwtHelper.getUserId());
+    qzTak.setUserId(userId);
+    qzTak.setUserCreate(userId);*/
+//        mat.setTimeCreate(dateTime);
+        /* qzTak.setUserUpdate(userId);*/
+        shShopMatDb.setTimeUpdate(dateTime);
+        return shShopMatMapper.updateById(shShopMatDb);
+    }
+
+
+    public List<ShShopMat> queryMyShShopMat(Long userId) throws Exception {
+        var shShopDb = shShopMapper.selectById(userId);
+        if (null == shShopDb) {
+            throw new Exception("获取失败");
+        }
+        return shShopMatMapper.queryMyShShopMat(shShopDb.getShopId());
+    }
+
+    public List<ShShopMat> queryAllShShopMat() throws Exception {
+        return shShopMatMapper.queryAllShShopMat();
+    }
+}

+ 116 - 0
whepi-web/src/main/java/com/bofeng/service/ShShopService.java

@@ -0,0 +1,116 @@
+package com.bofeng.service;
+
+import com.baomidou.mybatisplus.toolkit.IdWorker;
+import com.bofeng.dao.ShShopMapper;
+import com.bofeng.entity.ShShop;
+import lombok.var;
+import org.apache.commons.collections.CollectionUtils;
+import org.joda.time.DateTime;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Service
+@Transactional(readOnly = true)
+public class ShShopService {
+
+    @Autowired
+    private ShShopMapper shShopMapper;
+
+    //我的商店新增
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public int addShShop(Long userId, Integer shopType, String shopName, String adddr,
+                         DateTime startDate, DateTime endDate, String linkman, String phone) throws Exception {
+
+        DateTime dateTime = new DateTime();
+        var shShopDb = shShopMapper.selectById(userId);
+        if (null == shShopDb) {
+            var shop = new ShShop();
+            shop.setShopId(IdWorker.getId());
+            shop.setUserId(userId);
+            shop.setShopType(shopType);
+            shop.setShopName(shopName);
+            shop.setAddr(adddr);
+            shop.setStartDate(startDate);
+            shop.setEndDate(endDate);
+            shop.setLinkman(linkman);
+            shop.setPhone(phone);
+    /*long userId = Long.parseLong(JwtHelper.getUserId());
+    qzTak.setUserId(userId);
+    qzTak.setUserCreate(userId);*/
+            shop.setTimeCreate(dateTime);
+            /* qzTak.setUserUpdate(userId);*/
+            shop.setTimeUpdate(dateTime);
+            return shShopMapper.insert(shop);
+        } else {
+            throw new Exception("您已有一个商店,请勿重复添加");
+        }
+        /* else {
+            shShopDb.setUserId(userId);
+            shShopDb.setShopType(shopType);
+            shShopDb.setShopName(shopName);
+            shShopDb.setAddr(adddr);
+            shShopDb.setStartDate(startDate);
+            shShopDb.setEndDate(endDate);
+            shShopDb.setLinkman(linkman);
+            shShopDb.setPhone(phone);
+    *//*long userId = Long.parseLong(JwtHelper.getUserId());
+    qzTak.setUserId(userId);
+    qzTak.setUserCreate(userId);*//*
+            shShopDb.setTimeCreate(dateTime);
+            *//* qzTak.setUserUpdate(userId);*//*
+            shShopDb.setTimeUpdate(dateTime);
+            return shShopMapper.updateById(shShopDb);
+        }*/
+
+
+    }
+
+    public List<ShShop> queryMyShShop(Long userId) throws Exception {
+        List<ShShop> shShopDb = shShopMapper.queryMyShShop(userId);
+        if (CollectionUtils.isEmpty(shShopDb)) {
+            throw new Exception("获取失败");
+        }
+        return shShopDb;
+    }
+
+//
+//    public List<QzTask> selectAll() {
+//        return qzTaskDao.selectAll();
+//    }
+//
+//    public List<QzTask> queryByHouseNumber(String houseNumber, Integer status) {
+//        return qzTaskDao.queryByHouseNumber(houseNumber, status);
+//    }
+//
+//    public QzTask queryByTaskId(Long taskId) {
+//        return qzTaskDao.queryByTaskId(taskId);
+//    }
+//
+//    //求助的新增
+//    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+//    public int addHelp(String taskTitle, String taskTarget, String remark) {
+//        var qzTak = new QzTask();
+//        qzTak.setTaskId(IdWorker.getId());
+//        qzTak.setTaskTitle(taskTitle);
+//        qzTak.setRemark(remark);
+//        qzTak.setTaskTarget(taskTarget);
+//        qzTak.setTaskStatus(1);
+//
+//    /*long userId = Long.parseLong(JwtHelper.getUserId());
+//    qzTak.setUserId(userId);
+//    qzTak.setUserCreate(userId);*/
+//        qzTak.setTimeCreate(new DateTime());
+//        /* qzTak.setUserUpdate(userId);*/
+//        qzTak.setTimeUpdate(new DateTime());
+//        return qzTaskDao.insert(qzTak);
+//    }
+//
+//
+//    public List<QzTask> queryQzTask(Integer taskStatus) {
+//        return qzTaskDao.queryQzTask(taskStatus);
+//    }
+}

+ 18 - 6
whepi-web/src/main/java/com/bofeng/wx/controller/HomeController.java

@@ -21,6 +21,7 @@ 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.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -55,20 +56,31 @@ public class HomeController {
     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) {
-    return ModelOps.newSuccess(qzTaskService.addHelp(taskTitle,taskTarget,remark));
+  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){
-    return Model.newSuccess(qzTaskService.queryQzTask(taskStatus));
+  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));
   }
 
+
+  //页面存储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<List<QzTaskReply>> taskQuery(@Pd(name = "taskId") Long taskId) {

+ 7 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/MsReportController.java

@@ -64,4 +64,11 @@ public class MsReportController {
         msReportService.addReport(safetyNum);
         return new ModelAndView("/home/home.ftl");
     }
+
+    //获取家人
+    @GetMapping("/home/home/queryRibaoReportDate")
+    public Model<List<MsSuspected>> queryRibaoReportDate(@Pd(name = "reportDate") String reportDate) {
+        String report_date=reportDate;
+        return Model.newSuccess(msReportService.getByReportReportDate(reportDate));
+    }
 }

+ 63 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/ShopController.java

@@ -0,0 +1,63 @@
+package com.bofeng.wx.controller;
+
+import com.bofeng.service.ShShopMatService;
+import com.bofeng.service.ShShopService;
+import com.yvan.platform.JsonWapper;
+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.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+@RestController
+public class ShopController {
+
+//    @Autowired
+//    private HomeService homeService;
+//
+//    @Autowired
+//    private QzTaskService qzTaskService;
+//
+//    @Autowired
+//    private QzTaskReplyService qzTaskReplyService;
+
+    @Autowired
+    private ShShopService shShopService;
+    @Autowired
+    private ShShopMatService shShopMatService;
+
+
+    @GetMapping("/shop/home.html")
+    public ModelAndView home(ModelMap model) {
+        //UserOpen userOpen = homeService.getUserOpen();
+        model.put("user", new JsonWapper("{\"www\": \"er\"}"));
+        return new ModelAndView("/shop/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) {
+//        return ModelOps.newSuccess(qzTaskService.addHelp(taskTitle, taskTarget, remark));
+//    }
+//
+//    //我的在求助的展示
+//    @GetMapping("/home/home/queryQzTask")
+//    public Model<List<QzTask>> queryQzTask(@Pd(name = "taskStatus", required = false) Integer taskStatus) {
+//        return Model.newSuccess(qzTaskService.queryQzTask(taskStatus));
+//    }
+//
+//    //小区求助的查看
+//    @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);
+//    }
+}

+ 86 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/ShopMatController.java

@@ -0,0 +1,86 @@
+package com.bofeng.wx.controller;
+
+import com.bofeng.entity.ShShopMat;
+import com.bofeng.service.ShShopMatService;
+import com.bofeng.service.ShShopService;
+import com.yvan.Model;
+import com.yvan.ModelOps;
+import com.yvan.mvc.Pd;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+public class ShopMatController {
+
+//    @Autowired
+//    private HomeService homeService;
+//
+//    @Autowired
+//    private QzTaskService qzTaskService;
+//
+//    @Autowired
+//    private QzTaskReplyService qzTaskReplyService;
+
+    @Autowired
+    private ShShopService shShopService;
+    @Autowired
+    private ShShopMatService shShopMatService;
+
+
+   /* @GetMapping("/shop/home.html")
+    public ModelAndView home(ModelMap model) {
+        //UserOpen userOpen = homeService.getUserOpen();
+        model.put("user", new JsonWapper("{\"www\": \"er\"}"));
+        return new ModelAndView("/shop/home.ftl", model);
+    }*/
+
+
+    //商品的新增
+    @PostMapping("/shop/mat/addShShopMat")
+    public ModelOps addShShopMat(@Pd(name = "userId") Long userId, @Pd(name = "matName") String matName, @Pd(name = "matNum") Integer matNum) throws Exception {
+        return ModelOps.newSuccess(shShopMatService.addShShopMat(userId, matName, matNum));
+    }
+
+    //商品的置顶2、下架0修改
+    @PostMapping("/shop/mat/editShShopMatStatus")
+    public ModelOps editShShopMatStatus(@Pd(name = "matId") Long matId, @Pd(name = "status") Integer status) throws Exception {
+        return ModelOps.newSuccess(shShopMatService.editShShopMatStatus(matId, status));
+    }
+
+    //    //我的商品
+    @GetMapping("/shop/mat/queryMyShShopMat")
+    public Model<List<ShShopMat>> queryMyShShopMat(@Pd(name = "userId"/*, required = false*/) Long userId) throws Exception {
+        return Model.newSuccess(shShopMatService.queryMyShShopMat(userId));
+    }
+
+
+//    //家庭求助
+//    @GetMapping("/home/home/addFimaly")
+//    public ModelOps family(@Pd(name = "taskTitle") String taskTitle,
+//                           @Pd(name = "taskTarget") String taskTarget,
+//                           @Pd(name = "remark") String remark) {
+//        return ModelOps.newSuccess(qzTaskService.addHelp(taskTitle, taskTarget, remark));
+//    }
+//
+//    //我的在求助的展示
+//    @GetMapping("/home/home/queryQzTask")
+//    public Model<List<QzTask>> queryQzTask(@Pd(name = "taskStatus", required = false) Integer taskStatus) {
+//        return Model.newSuccess(qzTaskService.queryQzTask(taskStatus));
+//    }
+//
+//    //小区求助的查看
+//    @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);
+//    }
+}

+ 9 - 1
whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java

@@ -93,7 +93,15 @@ public class YeWeiHuiController {
         return new ModelAndView("/yeweihui/qiuzhuDetail.ftl", model);
     }
 
-    @PostMapping("/yeweihui/qiuzhu/reply/add.json")
+    @PostMapping("/yeweihui/qiuzhu/queryTasksByStatus.json")
+    public Model queryTasksByStatus(@Pd(name = "status") Integer status) {
+
+       // List<QzTask> taskList = qzTaskService.queryQzTask(status);
+
+        return Model.newSuccess(null);
+    }
+
+        @PostMapping("/yeweihui/qiuzhu/reply/add.json")
     public ModelOps replyQiuzhuInsert(QzTaskReply qzTaskReply) {
 
         Integer success = qzTaskReplyService.insertQzTaskReply(qzTaskReply);

+ 1 - 1
whepi-web/src/main/resources/application-dev.yml

@@ -22,7 +22,7 @@ yvan:
   upload_domain: /static
   wechat:
     #测试帐号
-    token: yuliang
+    token: guojing
     appID: wxa3991865de920847
     appsecret: 4ac7ffba92e934f944a9d78ecc1807b5
 

+ 76 - 0
whepi-web/src/main/resources/application-songjiaqing.yml

@@ -0,0 +1,76 @@
+logging:
+  level:
+    root: INFO
+    jdbc.sqltiming: INFO
+  pattern:
+    console: '%d %-5level %logger{32} - %msg%n'
+
+debug: false
+ui-path: file:whepi-ui
+secret: 456 # jwt私钥
+salt: 123 #密码加盐
+token_time_minutes: 720 #12小时有效期
+token_time_minutes_mobile: 525600 #1年有效
+
+server:
+  port: 8086
+
+yvan:
+  debug: false
+  static_version: v20170728
+  static_domain: /static
+  upload_domain: /static
+  wechat:
+    #测试帐号
+    #token: yuliang
+    #appID: wxa3991865de920847
+    #appsecret: 4ac7ffba92e934f944a9d78ecc1807b5
+    token: songjiaqing
+    appID: wxebf68e8013033658
+    appsecret: 31aca318c5555c3806a53c90b50865f2
+
+#    token: yuliang
+#    appID: wx1b020f76b18f0294
+#    appsecret: 69f06d671d445dc14b04a097fe50f4cc
+
+    #token: slxtoken
+    #appID: wx79c1af613d5d22dd
+    #appsecret: 2de3b4abfe30ff7523f464ace8322b44
+    #EncodingAESKey: wb4IyoD7FZa0yB2BMU8HWQ0inWJuAfJSiRR6jlfivo2
+    ## 商户编号
+    #pay_mch_id: 1499356522
+    ## 回调地址
+    #notify_url: http://central.good5you.com/pay/wx/notify
+
+    ## 绑定客户的二维码有效时间
+    #qrcode_bind_expire_second: 10800
+    ## 找到用户的二维码有效时间
+    #qrcode_match_cust_expire_second: 10800
+
+    ##domain: http://wx.good5you.com/
+#    domain: http://bofeng.ng.good5you.com
+    domain: http://songjiaqing.ng.yvanui.com
+#    domain: http://yyc21fmd42.hkhttp.cn
+#    tmpTicketExpireSeconds: 10800
+    templates:
+      预定信息: 'MLNz8YVi7zofQOBeLS0Ruhr-3fJpTnfsKjyPeDB879s'
+      修改预定信息: 'FsPj2Syigep3ctUd0aBmE4JMsuxjW-U0JgmoLAXjJtc'
+      结账信息: '5t4LSW4cb7j4mcHxoYyzTvLHnp2gehpxn1faf7G4ABs'
+      结算信息: 'GoZBKvyqAfP8uM3xrJk40YHhMoM_E44aPLEoKV_1-pQ'
+    #  round_out_template_id: 'xpQJsBwlhZ5r7P7Glur8hiNl1IgjQxtMGTVwdVOfGKg'
+    #  round_in_template_id: 'oobiXKFatguG1H7K-HPi2lipzF-Qv0pMY12e1JaQxdA'
+
+spring:
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    #driverClassName: com.mysql.jdbc.Driver
+    #url: jdbc:mysql://localhost:3306/bofeng_test?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
+    driverClassName: net.sf.log4jdbc.DriverSpy
+    url: jdbc:log4jdbc:mysql://39.99.148.1:3306/whepi_test?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
+    username: whepi_test
+    password: 123456
+
+  redis:
+    database: 4
+    host: localhost
+    port: 6379

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

@@ -17,14 +17,35 @@
     update qz_task set task_status=#{status} where task_id=#{taskId}
   </update>
 
+    <select id="queryQzTaskByStatus" resultType="com.bofeng.entity.QzTask">
+        select * from qz_task where task_status=#{taskStatus}
+    </select>
+
     <select id="queryQzTask" resultType="com.bofeng.entity.QzTask">
         select * from qz_task
         <where>
             <if test="taskStatus!=null and taskStatus!=''">
                 task_status=#{taskStatus}
             </if>
+            <if test="taskTitle!=null and taskTitle!=''">
+                and task_title like concat('%',#{taskTitle},'%')
+            </if>
+            <if test="userId!=null and userId!=''">
+                and user_id=#{userId}
+            </if>
         </where>
         order by time_update desc
     </select>
 
+    <select id="selectUserName" resultType="com.bofeng.entity.QzTask">
+        select nick_name as userName from sys_user_open where user_id=#{userId} limit 1
+    </select>
+
+    <select id="selectHome" resultType="com.bofeng.entity.QzTask">
+        SELECT b.house_id ,b.doorplate as houseNumber
+        from sys_user_role a
+        INNER JOIN sys_uptown_house b on a.property_id=b.house_id
+        where a.user_id=#{userId}
+    </select>
+
 </mapper>

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

@@ -4,8 +4,11 @@
 
 
     <select id="taskQuery" resultType="com.bofeng.entity.QzTaskReply">
-     select * from qz_task a
+     select a.task_title,a.remark,b.time_update,c.nick_name,b.reply_content,
+     a.task_id,a.task_status
+     from qz_task a
      INNER 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
      where a.task_id=#{taskId}
     </select>
 

+ 36 - 0
whepi-web/src/main/resources/mapper/ShShop.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bofeng.dao.ShShopMapper">
+
+    <!--<select id="selectAll" resultType="com.bofeng.entity.ShShop">-->
+    <!--select * from sh_shop-->
+    <!--</select>-->
+
+    <!--<select id="queryById" resultType="com.bofeng.entity.ShShop">-->
+    <!--select * from sh_shop where shop_id=#{shopId} and user_id=#{userId}-->
+    <!--</select>-->
+
+    <select id="queryMyShShop" resultType="com.bofeng.entity.ShShop">
+        select * from sh_shop where  user_id=#{userId}
+        order by time_update desc
+  </select>
+
+    <!--<select id="queryByHouseNumber" resultType="com.bofeng.entity.ShShop">-->
+    <!--select * from sh_shop where task_status=#{status} and house_number like concat('%', #{houseNumber}, '%')-->
+    <!--</select>-->
+
+    <!--<update id="updateStatusById">-->
+    <!--update sh_shop set task_status=#{status} where task_id=#{taskId}-->
+    <!--</update>-->
+
+    <!--<select id="queryShShop" resultType="com.bofeng.entity.ShShop">-->
+    <!--select * from sh_shop-->
+    <!--<where>-->
+    <!--<if test="taskStatus!=null and taskStatus!=''">-->
+    <!--task_status=#{taskStatus}-->
+    <!--</if>-->
+    <!--</where>-->
+    <!--order by time_update desc-->
+    <!--</select>-->
+
+</mapper>

+ 35 - 0
whepi-web/src/main/resources/mapper/ShShopMat.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bofeng.dao.ShShopMatMapper">
+
+
+    <select id="queryMyShShopMat" resultType="com.bofeng.entity.ShShopMat">
+      select * from sh_shop_mat where  shop_id=#{shopId}
+      order by status, time_update desc
+    </select>
+
+    <select id="queryAllShShopMat" resultType="com.bofeng.entity.ShShopMat">
+      select * from sh_shop_mat
+      order by time_update desc
+    </select>
+
+
+    <!--<select id="queryByHouseNumber" resultType="com.bofeng.entity.ShShop">-->
+    <!--select * from sh_shop where task_status=#{status} and house_number like concat('%', #{houseNumber}, '%')-->
+    <!--</select>-->
+
+    <!--<update id="cancelMyShopMat">-->
+    <!--update sh_shop_mat set status=#{status} where mat_id=#{matId}-->
+    <!--</update>-->
+
+    <!--<select id="queryShShop" resultType="com.bofeng.entity.ShShop">-->
+    <!--select * from sh_shop-->
+    <!--<where>-->
+    <!--<if test="taskStatus!=null and taskStatus!=''">-->
+    <!--task_status=#{taskStatus}-->
+    <!--</if>-->
+    <!--</where>-->
+    <!--order by time_update desc-->
+    <!--</select>-->
+
+</mapper>