Przeglądaj źródła

Merge branch 'dev_20230202'

Eric 2 lat temu
rodzic
commit
10e327797c

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

@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
+import java.util.Optional;
 
 /**
  * @Author: liweifan
@@ -57,6 +58,9 @@ public class StudentSearch extends QueryInfo{
     @ApiModelProperty("用户状态")
     private String userStatus;
 
+    @ApiModelProperty("隐藏标识")
+    private Integer hideFlag;
+
     public Date getVipStartTime() {
         return vipStartTime;
     }
@@ -170,4 +174,12 @@ public class StudentSearch extends QueryInfo{
     public void setEvaluateFlag(YesOrNoEnum evaluateFlag) {
         this.evaluateFlag = evaluateFlag;
     }
+
+    public Integer getHideFlag() {
+        return Optional.ofNullable(hideFlag).orElse(0);
+    }
+
+    public void setHideFlag(Integer hideFlag) {
+        this.hideFlag = hideFlag;
+    }
 }

+ 12 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Student.java

@@ -79,6 +79,10 @@ public class Student implements Serializable {
     @TableField(value = "union_id_")
     private Long unionId;
 
+    @ApiModelProperty("隐藏标识 ")
+    @TableField(value = "hide_flag_")
+    private Integer hideFlag;
+
 	@TableField(value = "create_time_")
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@@ -191,4 +195,12 @@ public class Student implements Serializable {
     public void setUnionId(Long unionId) {
         this.unionId = unionId;
     }
+
+    public Integer getHideFlag() {
+        return hideFlag;
+    }
+
+    public void setHideFlag(Integer hideFlag) {
+        this.hideFlag = hideFlag;
+    }
 }

+ 3 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java

@@ -274,7 +274,8 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
                 student.setUserId(user.getId());
                 student.setSubjectId(subjectId);
                 student.setUnionId(info.getUnionId());
-                student.setLockFlag(UserLockFlag.codeOf(Optional.ofNullable(info.getLockFlag()).orElse(0)));
+                student.setLockFlag(UserLockFlag.NORMAL);
+                student.setHideFlag(Optional.ofNullable(info.getLockFlag()).orElse(0));
                 save(student);
 
                 // 更新标识
@@ -329,7 +330,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
                 lambdaUpdate()
                         .eq(Student::getUserId, student.getUserId())
                         .set(Student::getUnionId, info.getUnionId())
-                        .set(Student::getLockFlag, UserLockFlag.codeOf(Optional.ofNullable(info.getLockFlag()).orElse(0)))
+                        .set(Student::getHideFlag, Optional.ofNullable(info.getLockFlag()).orElse(0))
                         .update();
             } else {
                 studentResp.setUnionId(student.getUnionId());

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

@@ -143,6 +143,9 @@
             <if test="param.evaluateFlag != null">
                 AND t.evaluate_time_ > 0
             </if>
+            <if test="param.hideFlag != null">
+                and t.hide_flag_ = #{param.hideFlag}
+            </if>
         </where>
         order by t.create_time_ desc
     </select>