浏览代码

Merge remote-tracking branch 'origin/master'

guojing 5 年之前
父节点
当前提交
bed5491ebd

+ 1 - 0
whepi-doc/login.sql

@@ -211,6 +211,7 @@ DROP TABLE IF EXISTS out_user;
 CREATE TABLE out_user  (
   tu_id             bigint(20) NOT NULL DEFAULT 0 COMMENT '特殊ID',
   phone             bigint(20) NOT NULL DEFAULT 0 COMMENT '电话号码',
+  start_date        date NOT NULL DEFAULT '0000-01-01' COMMENT '开始时间',
   end_date          date NOT NULL DEFAULT '0000-01-01' COMMENT '结束时间',
   time              int(11) NOT NULL DEFAULT 0 COMMENT '总共时间(天)',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',

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

@@ -11,6 +11,6 @@ import org.springframework.stereotype.Repository;
 @Repository
 public interface OutUserMapper extends BaseMapper<OutUser> {
 
-    @Select("SELECT * FROM out_user WHERE phone = #{phone} and end_date >= curdate()")
+    @Select("SELECT * FROM out_user WHERE phone = #{phone} and start_date <= curdate() and end_date >= curdate()")
     OutUser getOutUserByPhone(@Param("phone") Long phone);
 }

+ 4 - 0
whepi-web/src/main/java/com/bofeng/entity/OutUser.java

@@ -26,6 +26,10 @@ public class OutUser {
     @TableField("phone")
     private Long phone;
 
+    @ApiModelProperty("开始时间")
+    @TableField("start_date")
+    private Date startDate;
+
     @ApiModelProperty("结束时间")
     @TableField("end_date")
     private Date endDate;

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

@@ -137,7 +137,7 @@ public class ScanController {
                 if (outScanConf.getGoOutFre() == 0) {
                     model.put("collor", "red");
                     model.put("into", "禁止外出");
-                    model.put("errorMsg", "最近一段时间非就医、防疫、保运行人员不能外出。");
+                    model.put("errorMsg", "根据武汉市小区封闭管理规定,非特殊人员禁止出行!");
                     scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                     return new ModelAndView("/user/goOut.ftl", model);
                 }
@@ -221,7 +221,7 @@ public class ScanController {
             if (outScanConf.getGoOutFre() == 0) {
                 model.put("collor", "red");
                 model.put("into", "禁止外出");
-                model.put("errorMsg", "最近一段时间非就医、防疫、保运行人员不能外出。");
+                model.put("errorMsg", "根据武汉市小区封闭管理规定,非特殊人员禁止出行!");
                 scanService.saveOutScanEstate(userOpen.getUserId(), -1, model.get("errorMsg").toString());
                 return new ModelAndView("/user/goOut.ftl", model);
             }
@@ -300,7 +300,7 @@ public class ScanController {
             if (outScanConf.getGoOutFre() == 0) {
                 model.put("collor", "red");
                 model.put("into", "禁止外出");
-                model.put("errorMsg", "最近一段时间非就医、防疫、保运行人员不能外出。");
+                model.put("errorMsg", "根据武汉市小区封闭管理规定,非特殊人员禁止出行!");
                 return new ModelAndView("/user/goOut.ftl", model);
             }
             List<MsReport> msReports = msReportMapper.selectMsReportLate(userOpen.getUserId());