Longlin 5 лет назад
Родитель
Сommit
6eecbafb75

+ 1 - 1
whepi-doc/task.sql

@@ -5,8 +5,8 @@ drop table if exists qz_task;
 create table qz_task (
     task_id         bigint(20)      NOT NULL DEFAULT 0          COMMENT '求助任务ID',
     task_target     varchar(20)     NOT NULL DEFAULT ''         COMMENT '求助对象:A业委会,B居委会,C物业,D志愿者',
-    task_type       int(11)         NOT NULL DEFAULT 0          COMMENT '求助类型:1生活必需品,2医药求助,3其他求助',
     task_status     int(11)         NOT NULL DEFAULT 0          COMMENT '求助状态:1未解决,2处理中,3已处理',
+    task_title      varchar(20)     NOT NULL DEFAULT ''         COMMENT '求助标题',
     remark          varchar(100)    NOT NULL DEFAULT ''         COMMENT '备注',
     user_id         bigint(20)      NOT NULL DEFAULT 0          COMMENT '用户ID',
     user_name       varchar(20)     NOT NULL DEFAULT ''         COMMENT '用户名称',

+ 5 - 0
whepi-ui/templates/yeweihui/home.ftl

@@ -50,6 +50,11 @@
         });
     });
 
+    <#--console.log('ssssss');-->
+    <#--var tasks = ${taskList!'[]'};-->
+    // console.log('ssssss', tasks);
+    console.log('asdsfdgfhjghfgdf');
+
     ribao_init();
     qiuzhu_init();
 })(jQuery);

+ 24 - 4
whepi-ui/templates/yeweihui/qiuzhu.ftl

@@ -16,7 +16,30 @@
         </div>
         <div class="weui-tab__panel">
             <div id="qz_nav1" class="weui-tab__bd-item weui_tab_bd_item_active">
-                内容一
+                <div class="weui-btn-area">
+                    <a id="btnQZ" class="weui-btn weui-btn_primary" href="javascript:">查询</a>
+                </div>
+                <div class="weui-panel weui-panel_access">
+                    <div class="weui-panel__bd">
+                        <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">
+                            <div class="weui-media-box__bd">
+                                <div style="display: flex; flex-direction: row; justify-content: space-between;">
+                                    <p class="weui-media-box__desc">1. &nbsp;&nbsp; 7-2-202</p>
+                                    <p class="weui-media-box__desc">2020-02-02 14:30</p>
+                                </div>
+                                <h4 class="weui-media-box__title">家庭求助</h4>
+                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">
+                            <div class="weui-media-box__bd">
+                                <h4 class="weui-media-box__title">医药求助</h4>
+                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
+                            </div>
+                        </a>
+                    </div>
+                </div>
+
             </div>
             <div id="qz_nav2" class="weui-tab__bd-item">
                 内容二
@@ -26,7 +49,4 @@
             </div>
         </div>
     </div>
-    <div class="weui-btn-area">
-        <a id="btnQZ" class="weui-btn weui-btn_primary" href="javascript:">求助</a>
-    </div>
 </div>

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

@@ -1,5 +1,7 @@
 function qiuzhu_init() {
   $('#btnQZ').on('click', function () {
-    alert("求助");
+    alert("查询");
   });
+
+
 }

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

@@ -0,0 +1,16 @@
+package com.bofeng.dao;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.bofeng.entity.QzTask;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface QzTaskDao extends BaseMapper<QzTask> {
+
+    List<QzTask> selectAll();
+
+}

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

@@ -0,0 +1,79 @@
+package com.bofeng.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * qz_task
+ * @author 
+ */
+@Data
+public class QzTask implements Serializable {
+    /**
+     * 求助任务ID
+     */
+    private Long taskId;
+
+    /**
+     * 求助对象:A业委会,B居委会,C物业,D志愿者
+     */
+    private String taskTarget;
+
+    /**
+     * 求助状态:1未解决,2处理中,3已处理
+     */
+    private Integer taskStatus;
+
+    /**
+     * 求助标题
+     */
+    private String taskTitle;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 用户ID
+     */
+    private Long userId;
+
+    /**
+     * 用户名称
+     */
+    private String userName;
+
+    /**
+     * 门牌号
+     */
+    private String houseNumber;
+
+    /**
+     * 门牌号ID
+     */
+    private String houseId;
+
+    /**
+     * 新增人
+     */
+    private Long userCreate;
+
+    /**
+     * 新增时间
+     */
+    private Date timeCreate;
+
+    /**
+     * 修改人
+     */
+    private Long userUpdate;
+
+    /**
+     * 修改时间
+     */
+    private Date timeUpdate;
+
+    private static final long serialVersionUID = 1L;
+}

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

@@ -0,0 +1,18 @@
+package com.bofeng.service;
+
+import com.bofeng.dao.QzTaskDao;
+import com.bofeng.entity.QzTask;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class QzTaskService {
+
+    @Autowired
+    private QzTaskDao qzTaskDao;
+    public List<QzTask> selectAll () {
+        return qzTaskDao.selectAll();
+    }
+}

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

@@ -1,16 +1,23 @@
 package com.bofeng.wx.controller;
 
+import com.bofeng.entity.QzTask;
+import com.bofeng.service.QzTaskService;
 import com.google.common.collect.Maps;
+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;
 
+import java.util.List;
 import java.util.Map;
 
 @RestController
 public class YeWeiHuiController {
 
+    @Autowired
+    private QzTaskService qzTaskService;
+
     @GetMapping("/yeweihui/home.html")
     public ModelAndView yeweihui(ModelMap model) {
 
@@ -18,7 +25,9 @@ public class YeWeiHuiController {
         queryParam.put("userId", "12345677");
         queryParam.put("statistics", "M");
 
-        model.put("user", "{}");
+        List<QzTask> taskList = qzTaskService.selectAll();
+
+        model.put("taskList", taskList);
         return new ModelAndView("/yeweihui/home.ftl", model);
     }
 }

+ 75 - 0
whepi-web/src/main/resources/application-lll.yml

@@ -0,0 +1,75 @@
+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: lilonglin
+    appID: wx58caf223ab1d9e4b
+    appsecret: d919bc819fb69a99aab164e1e0517e84
+
+    domain: http://lilonglin.ng.yvanui.com/
+
+    #    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://yuliang.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

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

@@ -43,7 +43,7 @@ endpoints:
 #  whitelabel.enabled: false
 
 spring:
-  profiles.active: dev
+  profiles.active: lll
 
   application:
     name: bofeng-web

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

@@ -0,0 +1,7 @@
+<?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.QzTaskDao">
+  <select id="selectAll" resultType="com.bofeng.entity.QzTask">
+    select * from qz_task
+  </select>
+</mapper>