Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	whepi-web/src/main/resources/application.yml
maoyunfeng 5 éve
szülő
commit
82df07d6e0

+ 15 - 1
whepi-doc/login.sql

@@ -192,7 +192,7 @@ CREATE TABLE sys_uptown_house  (
 DROP TABLE IF EXISTS out_scan;
 CREATE TABLE out_scan  (
   scan_id           bigint(20) NOT NULL DEFAULT 0 COMMENT '扫码ID',
-  user_id           bigint(20) NOT NULL DEFAULT 0 COMMENT '人员ID',
+  user_id           bigint(20) NOT NULL DEFAULT 0 COMMENT '人员ID',
   uptown_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '小区ID,下拉选ID',
   into_door_id      bigint(20) NOT NULL DEFAULT 0 COMMENT '进入小区大门ID',
   into_date         datetime(0) NOT NULL DEFAULT '0000-01-01 00:00:00' COMMENT '进入时间',
@@ -205,6 +205,20 @@ CREATE TABLE out_scan  (
   PRIMARY KEY (scan_id) USING BTREE
 ) ENGINE = InnoDB default charset=utf8mb4 comment = '用户外出扫码信息';
 
+DROP TABLE IF EXISTS out_scan_estate;
+CREATE TABLE out_scan_estate  (
+  se_id             bigint(20) NOT NULL DEFAULT 0 COMMENT '扫码ID',
+  user_id           bigint(20) NOT NULL DEFAULT 0 COMMENT '人员ID',
+  now_date          date NOT NULL DEFAULT '0000-01-01' COMMENT '当天时间',
+  scan_date         datetime(0) NOT NULL DEFAULT '0000-01-01 00:00:00' COMMENT '扫码时间',
+  user_create       bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
+  time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
+  user_update       bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
+  time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
+  PRIMARY KEY (se_id) USING BTREE,
+  INDEX user_id(user_id) USING BTREE
+) ENGINE = InnoDB default charset=utf8mb4 comment = '校园公共区域巡检扫码信息';
+
 DROP TABLE IF EXISTS out_scan_conf;
 CREATE TABLE out_scan_conf  (
   sc_id        		bigint(20) NOT NULL DEFAULT 0 COMMENT '扫码配置ID',

+ 0 - 35
whepi-ui/templates/user/scan.ftl

@@ -3,9 +3,6 @@
 
 <div class="weui-tab">
     <div class="weui-tab__bd">
-        <input id="userId" type="text" hidden="hidden" value=${user_id!}/>
-        <input id="uptownId" type="text" hidden="hidden" value=${uptown_id!}/>
-        <input id="uptownName" type="text" hidden="hidden" value=${uptown_name!}/>
         <div class="weui-tab__bd-item weui-tab__bd-item--active">
             <div class="page__bd">
                 <header class="user-header">
@@ -23,22 +20,6 @@
                     <br/>
                     <br/>
                     <p class="user-title-long  ${collor!''}">${errorMsg!""}</p>
-
-
-<#--                    <#if (inType?? )&&(inType = 1) >-->
-<#--                        <#if (type?? )&&(type !="1") ><h1 class="user-title green">可以进入</h1></#if>-->
-<#--                        <#if (type?? )&&(type ="-1") ><h1 class="user-title red">禁止进入</h1></#if>-->
-<#--                        <#if (type?? )&&(type ="-1") ><p class="user-title-long">非本小区居民,禁止进入。</p></#if>-->
-<#--                    </#if>-->
-<#--                    <#if (inType?? )&&(inType != 1) ><#if (type?? )&&(type ="1") ><h1 class="user-title green">可以外出</h1></#if>-->
-<#--                            <#if (type?? )&&(type !="1") ><h1 class="user-title red">禁止外出</h1></#if>-->
-
-<#--                    <#if (type?? )&&(type ="1") ><p class="user-title-long">请佩戴口罩,避免近距离接触,不得长时间在外逗留。</p></#if>-->
-<#--                    <#if (type?? )&&(type ="-1") ><p class="user-title-long">非本小区居民,禁止外出。</p></#if>-->
-<#--                    <#if (type?? )&&(type ="-2") ><p class="user-title-long">外出时间间隔不满三日,禁止外出,请配合,上次外出时间 ${lastTime!''}。</p></#if>-->
-<#--                    <#if (type?? )&&(type ="-3") ><p class="user-title-long">因近期您未提交健康日报,无法确认您当前健康状态,静止外出,请配合。</p></#if>-->
-
-<#--                    </#if>-->
                     <br/>
                     <br/>
                 </header>
@@ -53,20 +34,4 @@
 </body>
 <#include "/home/frag.foot.ftl" />
 <script>
-
-    (function ($) {
-        if ($("#uptownId").val() == '1238790987234') {
-            $("#adminName").text('管理员');
-            $("#homeName").text('员工');
-        }
-    })(jQuery);
-
-    function yes() {
-        var userType = $('input:radio:checked').val();
-        if (!userType) {
-            $.alert("请选择用户角色!")
-            return false;
-        }
-        window.location.href = "/user/homeIndex.html?userId=" + $("#userId").val() + "&userType=" + userType;
-    }
 </script>

+ 36 - 0
whepi-ui/templates/user/scanEstate.ftl

@@ -0,0 +1,36 @@
+<#assign title="校园公共区域巡检"/>
+<#include "/home/frag.head.ftl" />
+
+<div class="weui-tab">
+    <div class="weui-tab__bd">
+        <div class="weui-tab__bd-item weui-tab__bd-item--active">
+            <div class="page__bd">
+                <header class="user-header">
+                    <br/>
+                    <br/>
+                    <br/>
+                    <br/>
+                    <br/>
+                    <p class="user-title-long">${doorplate!''}
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${name!''}</p>
+                    <br/>
+                    <br/>
+                    <h1 class="user-title ${collor!''}">${into!""}</h1>
+                    <br/>
+                    <br/>
+                    <p class="user-title-long  ${collor!''}">${errorMsg!""}</p>
+                    <br/>
+                    <br/>
+                </header>
+                <br/>
+                <br/>
+                <p class="user-title-long">${now!''}</p>
+            </div>
+        </div>
+    </div>
+</div>
+</div>
+</body>
+<#include "/home/frag.foot.ftl" />
+<script>
+</script>

+ 1 - 0
whepi-ui/templates/yeweihui/tgPublish.ftl

@@ -183,6 +183,7 @@
             tgGoods: goods,
             tgPrice: price,
             tgMinNum: minnum,
+            tgMaxNum: maxnum,
             endTime: end_time,
             deliverTime: deliver_time,
             tgPhoneNumber: phone_number,

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

@@ -20,6 +20,8 @@ public interface JmTuangouDao extends BaseMapper<JmTuangou> {
 
   List<JmTuangou> queryTuangouListByUserIdAndTitle(@Param("userId") Long userId, @Param("title") String title);
 
+  List<JmTuangou> whepiTuangoulist(@Param("userId") Long userId, @Param("uptownId") Long uptownId, @Param("queryProperties") String queryProperties, @Param("status") Long status);
+
   JmTuangou selectJmTuangouByJmId(@Param("JmId") Long JmId);
 
   Integer updateRemarkByJmId(@Param("JmId") Long JmId, @Param("remark") String remark);

+ 8 - 0
whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java

@@ -53,4 +53,12 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
             "select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 3 day) and user_create=#{userId}")
     List<MsReport> selectMsReportLate(@Param("userId") Long userId);
 
+    /**
+     * 用户自身的健康状态, list大于0健康,等于0不健康
+     * @param userId
+     * @return
+     */
+    @Select("select * from ms_report where report_status=1 and report_date=curdate() and ms_status=1 and user_create=#{userId}")
+    List<MsReport> selectMsReportToday(@Param("userId") Long userId);
+
 }

+ 23 - 0
whepi-web/src/main/java/com/bofeng/dao/OutScanEstateMapper.java

@@ -0,0 +1,23 @@
+package com.bofeng.dao;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.bofeng.entity.OutScanEstate;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface OutScanEstateMapper extends BaseMapper<OutScanEstate> {
+
+    /**
+     * 该人员今天扫码次数
+     * @param userId
+     * @return
+     */
+    @Select("select * from out_scan_estate where now_date=curdate() and user_id=#{userId}")
+    List<OutScanEstate> getOutScanEstateTodayByUser(@Param("userId") Long userId);
+}

+ 48 - 0
whepi-web/src/main/java/com/bofeng/entity/OutScanEstate.java

@@ -0,0 +1,48 @@
+package com.bofeng.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.joda.time.DateTime;
+
+import java.util.Date;
+
+/**
+ * 校园公共区域巡检扫码信息
+ */
+@Getter
+@Setter
+@TableName("out_scan_estate")
+public class OutScanEstate {
+
+    @ApiModelProperty("扫码ID")
+    @TableId("se_id")
+    private Long seId;
+
+    @ApiModelProperty("用户ID")
+    @TableField("user_id")
+    private Long userId;
+
+    @ApiModelProperty("当天时间")
+    @TableField("now_date")
+    private Date nowDate;
+
+    @ApiModelProperty("扫码时间")
+    @TableField("scan_date")
+    private DateTime scanDate;
+
+    @TableField("user_create")
+    private Long userCreate;
+
+    @TableField(exist = false)
+    private DateTime timeCreate;
+
+    @TableField("user_update")
+    private Long userUpdate;
+
+    @TableField(exist = false)
+    private DateTime timeUpdate;
+}

+ 41 - 0
whepi-web/src/main/java/com/bofeng/service/JmTuangouService.java

@@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
@@ -61,6 +62,38 @@ public class JmTuangouService {
     }
 
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public Integer whepiTuangouPublish(String uptownIds, JmTuangou jmTuangou) {
+
+        Integer success = 0;
+        List<String> uptownIdArray = Arrays.asList(uptownIds.split(","));
+        for (String uptownId : uptownIdArray) {
+
+            jmTuangou.setJmId(IdWorker.getId());
+
+            jmTuangou.setUptownId(Long.parseLong(uptownId));
+
+            jmTuangou.setTgStatus(1);
+
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+
+            Date tgEndTime = new Date();
+            Date tgDeliverTime = new Date();
+            try {
+                tgEndTime = sdf.parse(jmTuangou.getEndTime());
+                tgDeliverTime = sdf.parse(jmTuangou.getDeliverTime());
+            }
+            catch (ParseException e) {
+                e.printStackTrace();
+            }
+
+            jmTuangou.setTgEndTime(tgEndTime);
+            jmTuangou.setTgDeliverTime(tgDeliverTime);
+            success = jmTuangouDao.insert(jmTuangou);
+        }
+        return success;
+    }
+
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     public List<JmTuangou> queryTuangouListByTitle(Long userId, String title) {
 
         buyService.updateStatus();
@@ -94,6 +127,14 @@ public class JmTuangouService {
     }
 
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public List<JmTuangou> whepiTuangoulist(Long userId, Long uptownId, String queryProperties, Long status) {
+
+        buyService.updateStatus();
+
+        return jmTuangouDao.whepiTuangoulist(userId, uptownId, queryProperties, status);
+    }
+
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     public Integer updateRemarkByJmId(Long jmId, Long status, String remark) {
         if (status == 0) {
             return jmTuangouDao.updateRemarkByJmId(jmId, remark);

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

@@ -1,20 +1,26 @@
 package com.bofeng.service;
 
 import com.baomidou.mybatisplus.toolkit.IdWorker;
+import com.bofeng.dao.OutScanEstateMapper;
 import com.bofeng.dao.OutScanMapper;
 import com.bofeng.entity.OutScan;
+import com.bofeng.entity.OutScanEstate;
 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.Date;
+
 @Service
 @Transactional(readOnly = true)
 public class ScanService {
 
     @Autowired
     private OutScanMapper outScanMapper;
+    @Autowired
+    private OutScanEstateMapper outScanEstateMapper;
 
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     public void saveOutScan(Long userId, Integer inType, Long uptownId, Long doorId) {
@@ -56,4 +62,16 @@ public class ScanService {
             outScanMapper.insert(outScan);
         }
     }
+
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public void saveOutScanEstate(Long userId) {
+        OutScanEstate o = new OutScanEstate();
+        o.setSeId(IdWorker.getId());
+        o.setUserId(userId);
+        o.setNowDate(new Date());
+        o.setScanDate(new DateTime());
+        o.setUserCreate(userId);
+        o.setUserUpdate(userId);
+        outScanEstateMapper.insert(o);
+    }
 }

+ 41 - 6
whepi-web/src/main/java/com/bofeng/wx/controller/ScanController.java

@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
 
+import javax.servlet.http.HttpServletRequest;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -49,11 +50,14 @@ public class ScanController {
     private MsReportMapper msReportMapper;
     @Autowired
     private ScanService scanService;
+    @Autowired
+    private OutScanEstateMapper outScanEstateMapper;
 
     @ApiOperation("进出扫码页面")
     @GetMapping("/user/scan.html")
-    public ModelAndView home(ModelMap model, @RequestParam(value = "doorId", required = false, defaultValue = "0") Long doorId,
-            @RequestParam(value = "inType", required = false, defaultValue = "0") Integer inType) {
+    public ModelAndView scan(HttpServletRequest request, ModelMap model, @RequestParam(value = "doorId", required = false, defaultValue = "0") Long doorId,
+                             @RequestParam(value = "inType", required = false, defaultValue = "0") Integer inType) {
+//        String code = request.getParameter("code");
         UserOpen userOpen = homeService.getUserOpen();
         List<UserRole> list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());
 //        List<UserRole> list = userRoleMapper.getUserRoleByUserId(1L);
@@ -73,7 +77,6 @@ public class ScanController {
             model.put("now", format.format(new Date()));
             model.put("inType", inType);
             if (!unit.getUptownId().equals(uptownDoor.getUptownId())) {
-                model.put("type", "-1");//小区不对
                 model.put("into", "禁止" + getMsg(inType));
                 model.put("collor", "red");
                 model.put("errorMsg", "非本小区居民,禁止" + getMsg(inType) + "。");
@@ -83,7 +86,6 @@ public class ScanController {
                 OutScanConf outScanConf = outScanConfMapper.getOutScanConfByUptown(uptownDoor.getUptownId());
                 OutScan outScan = outScanMapper.getOutScanByUserlimit(userOpen.getUserId());
                 if (outScan != null && !compareTime(new Date(), outScan.getOutDate(), outScanConf.getGoOutFre())) {
-                    model.put("type", "-2");//时间短了
                     model.put("collor", "red");
                     model.put("into", "禁止" + getMsg(inType));
                     model.put("errorMsg", "外出时间间隔不满三日,禁止外出,请配合,上次外出时间 "+format.format(new Date(outScan.getOutDate().getMillis()))+"。");
@@ -91,14 +93,12 @@ public class ScanController {
                 }
                 List<MsReport> msReports = msReportMapper.selectMsReportLate(userOpen.getUserId());
                 if (msReports.size() != 3) {
-                    model.put("type", "-3");//最近3天未提交健康日报
                     model.put("collor", "red");
                     model.put("into", "禁止" + getMsg(inType));
                     model.put("errorMsg", "因近期您未提交健康日报,无法确认您当前健康状态,禁止外出,请配合。");
                     return new ModelAndView("/user/scan.ftl", model);
                 }
             }
-            model.put("type", "1");
             model.put("collor", "green");
             model.put("into", "可以" + getMsg(inType));
             if (inType == 2) {
@@ -109,6 +109,41 @@ public class ScanController {
         }
     }
 
+    @ApiOperation("巡检人员检查扫码信息")
+    @GetMapping("/user/scanEstate.html")
+    public ModelAndView scanEstate(HttpServletRequest request, ModelMap model) {
+        String code = request.getParameter("code");
+        UserOpen userOpen = homeService.getUserOpen();
+        List<UserRole> list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());
+//        List<UserRole> list = userRoleMapper.getUserRoleByUserId(1L);
+//        UserOpen userOpen = userOpenMapper.selectByUserId(1L);
+        model.put("user", userOpen);
+        model.put("user_id", "\"" + userOpen.getUserId() + "\"");
+        if (list.size() == 0) {
+            return new ModelAndView("/user/home.ftl", model);
+        } else {
+            List<UptownHome> uptownHomes =  uptownHomeMapper.getUptownHomeByUserId(userOpen.getUserId());
+            UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userOpen.getUserId());
+            model.put("doorplate", unit.getRidgepole() + "栋" + unit.getUnit() + "单元" +unit.getDoorplate());
+            model.put("name", uptownHomes.get(0).getLinkman());
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            model.put("now", format.format(new Date()));
+            List<OutScanEstate> list1 = outScanEstateMapper.getOutScanEstateTodayByUser(userOpen.getUserId());
+            int conut = list1.size() + 1;
+            if (list1.size() < 2) {
+                model.put("collor", "green");
+                model.put("into", "允许行动");
+                model.put("errorMsg", "这是您今天第" + conut + "次出行,允许同行,注意安全。");
+            } else {
+                model.put("collor", "red");
+                model.put("into", "劝您回家");
+                model.put("errorMsg", "这是您今天第" + conut + "次出行,为了您的安全,请尽快回家。");
+            }
+            scanService.saveOutScanEstate(userOpen.getUserId());
+            return new ModelAndView("/user/scanEstate.ftl", model);
+        }
+    }
+
     public Boolean compareTime(Date time1, DateTime time2, Integer day) {
         Date date = new Date(time2.getMillis() + 1000L*3600*24*day);
         if (changeTime(date).equals(changeTime(time1))) {

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

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

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

@@ -20,10 +20,7 @@ import io.swagger.annotations.ApiOperation;
 import lombok.SneakyThrows;
 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.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletResponse;
@@ -368,6 +365,26 @@ public class YeWeiHuiController {
         }
     }
 
+    @PostMapping("/whepi/yeweihui/tglist")
+    public Model whepiTuangoulist(@Pd(name = "userId") Long userId, @Pd(name = "uptownId", required = false) Long uptownId, @Pd(name = "queryProperties", required = false) String queryProperties, @Pd(name = "status", required = false) Long status) {
+
+        List<JmTuangou> myList = jmTuangouService.whepiTuangoulist(userId, uptownId, queryProperties, status);
+
+        return Model.newSuccess(myList);
+    }
+
+    @PostMapping("/whepi/yeweihui/tgPublish")
+    public Model whepiTuangouPublish(@Pd(name = "uptownIds") String uptownIds, JmTuangou jmTuangou) {
+
+        Integer success = jmTuangouService.whepiTuangouPublish(uptownIds, jmTuangou);
+        if (success == 1) {
+            return Model.newSuccess("操作成功");
+        }
+        else {
+            return Model.newFail("操作失败");
+        }
+    }
+
     @PostMapping("/yeweihui/tuangou/list/query.json")
     public Model queryTuangouListByTitle(@Pd(name = "userId") Long userId, @Pd(name = "title", required = false) String title) {
 

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

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

+ 18 - 0
whepi-web/src/main/resources/mapper/JmTuangouMapper.xml

@@ -30,6 +30,24 @@
         order by a.tg_end_time desc
     </select>
 
+    <select id="whepiTuangoulist" resultType="com.bofeng.entity.JmTuangou">
+        select a.*, IFNULL((select SUM(b.buy_count) FROM jm_buy b where b.jm_id=a.jm_id and buy_status=1),0) as currentNum
+        from jm_tuangou a
+        <where>
+            a.user_id=#{userId}
+            <if test="uptownId!=null and uptownId!=''">
+                and a.uptown_id=#{uptownId}
+            </if>
+            <if test="queryProperties!=null and queryProperties!=''">
+                and a.tg_title like concat('%',#{queryProperties},'%')
+            </if>
+            <if test="status!=null and status!=''">
+                and a.tg_status=#{status}
+            </if>
+        </where>
+        order by a.tg_end_time desc
+    </select>
+
     <select id="selectJmTuangouByJmId" resultType="com.bofeng.entity.JmTuangou">
         select a.*, IFNULL((select SUM(b.buy_count) FROM jm_buy b where b.jm_id=a.jm_id and buy_status=1),0) as currentNum
         from jm_tuangou a

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

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.bofeng.dao.MsReportMapper">
     <select id="selectByReportDate" resultType="com.bofeng.entity.MsReport">
-        select * from ms_report where report_date = #{reportDate} and  user_create = #{userCreate}
+        select * from ms_report where report_date = #{reportDate} and  user_create = #{userCreate} and report_status=1
         order by report_date desc
     </select>
 </mapper>