peiguo 5 years ago
parent
commit
25218c8b56

+ 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;