Преглед изворни кода

老师,学生根据vip结束时间查询

liujunchi пре 2 година
родитељ
комит
fcd0b1e977

+ 27 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/StudentSearch.java

@@ -36,10 +36,36 @@ public class StudentSearch extends QueryInfo{
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date endTime;
-    
+
+
+    @ApiModelProperty(value = "会员结束开始时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date vipStartTime;
+    @ApiModelProperty(value = "会员结束结束时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date vipEndTime;
+
     @ApiModelProperty("用户状态")
     private String userStatus;
 
+    public Date getVipStartTime() {
+        return vipStartTime;
+    }
+
+    public void setVipStartTime(Date vipStartTime) {
+        this.vipStartTime = vipStartTime;
+    }
+
+    public Date getVipEndTime() {
+        return vipEndTime;
+    }
+
+    public void setVipEndTime(Date vipEndTime) {
+        this.vipEndTime = vipEndTime;
+    }
+
     public String getSearch() {
         return search;
     }

+ 31 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/TeacherSearch.java

@@ -1,11 +1,15 @@
 package com.yonge.cooleshow.biz.dal.dto.search;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.yonge.cooleshow.common.enums.UserLockFlag;
 import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 import com.yonge.toolset.base.page.QueryInfo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
 
 /**
  * @Author: liweifan
@@ -41,7 +45,33 @@ public class TeacherSearch extends QueryInfo{
     @ApiModelProperty("是否测试用户")
 	private Boolean isTestUser;
 
-    public String getSearch() {
+
+	@ApiModelProperty(value = "会员结束开始时间")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date vipStartTime;
+	@ApiModelProperty(value = "会员结束结束时间")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date vipEndTime;
+
+	public Date getVipStartTime() {
+		return vipStartTime;
+	}
+
+	public void setVipStartTime(Date vipStartTime) {
+		this.vipStartTime = vipStartTime;
+	}
+
+	public Date getVipEndTime() {
+		return vipEndTime;
+	}
+
+	public void setVipEndTime(Date vipEndTime) {
+		this.vipEndTime = vipEndTime;
+	}
+
+	public String getSearch() {
         return search;
     }
 

+ 6 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -129,6 +129,12 @@
             <if test="null != param.delFlag">
                 and u.del_flag_ = #{param.delFlag}
             </if>
+            <if test="null != param.vipEndTime">
+                and t.membership_end_time_ &lt;= #{param.vipEndTime}
+            </if>
+            <if test="null != param.vipStartTime">
+                and t.membership_end_time_ &gt;= #{param.vipStartTime}
+            </if>
         </where>
         order by t.create_time_ desc
     </select>

+ 6 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -150,6 +150,12 @@
             <if test="param.isTestUser != null">
             	and t.is_test_user_ = #{param.isTestUser}
             </if>
+            <if test="null != param.vipEndTime">
+                and t.membership_end_time_ &lt;= #{param.vipEndTime}
+            </if>
+            <if test="null != param.vipStartTime">
+                and t.membership_end_time_ &gt;= #{param.vipStartTime}
+            </if>
         </where>
         order by t.create_time_ desc
     </select>