评论提问类型支持多个逗号隔开

beetlsql3-dev
Mlxa0324 2 years ago
parent aa07e0d5b5
commit 32657063db

@ -1,6 +1,7 @@
package com.ibeetl.jlw.entity;
import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.annotation.DictEnum;
import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig;
import com.ibeetl.jlw.enums.ChatLogSendTypeEnum;
@ -78,7 +79,7 @@ public class TeacherOpenCourseChatLog extends BaseEntity{
private BigDecimal studentScore ;
// 提问方式
@DictEnum
private ChatLogSendTypeEnum chatLogSendType;
//附件上传(仅支持图片,多个逗号隔开)

@ -11,7 +11,8 @@ public enum ChatLogSendTypeEnum {
normal("普通回复"),
student_ask("学生提问"),
teacher_ask("教师提问");
specify_ask("指定提问"),
random_ask("随机抽取");
private String text;
}

@ -51,7 +51,8 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
@Query(name = "学生得分", display = false)
private BigDecimal studentScore;
@Query(name = "提问方式", display = false)
private ChatLogSendTypeEnum chatLogSendType;
// 多个逗号隔开
private String chatLogSendType;
@Query(name = "附件上传(仅支持图片,多个逗号隔开)", display = false)
private String chatFiles;
@ -179,6 +180,11 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
pojo.setChatFiles(this.getChatFiles());
pojo.setTeacherOpenCourseChatLogStatus(this.getTeacherOpenCourseChatLogStatus());
pojo.setTeacherOpenCourseChatLogAddTime(this.getTeacherOpenCourseChatLogAddTime());
try {
pojo.setChatLogSendType(ChatLogSendTypeEnum.valueOf(this.getChatLogSendType().split(",")[0]));
}catch (Exception e) {
pojo.setChatLogSendType(ChatLogSendTypeEnum.normal);
}
pojo.setOrgId(this.getOrgId());
pojo.setUserId(this.getUserId());
return pojo;
@ -245,11 +251,11 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
this._given = _given;
}
public ChatLogSendTypeEnum getChatLogSendType() {
public String getChatLogSendType() {
return chatLogSendType;
}
public void setChatLogSendType(ChatLogSendTypeEnum chatLogSendType) {
public void setChatLogSendType(String chatLogSendType) {
this.chatLogSendType = chatLogSendType;
}

@ -62,7 +62,7 @@ queryByCondition
and t.chat_files =#chatFiles#
@}
@if(!isEmpty(chatLogSendType)){
and t.chat_log_send_type =#chatLogSendType#
and find_in_set(t.chat_log_send_type, #chatLogSendType#)
@}
@if(isEmpty(teacherOpenCourseChatLogStatus) && isEmpty(teacherOpenCourseChatLogStatusPlural)){
and t.teacher_open_course_chat_log_status != 2
@ -171,7 +171,7 @@ queryByConditionQuery
and t.chat_files =#chatFiles#
@}
@if(!isEmpty(chatLogSendType)){
and t.chat_log_send_type =#chatLogSendType#
and find_in_set(t.chat_log_send_type, #chatLogSendType#)
@}
@if(isEmpty(teacherOpenCourseChatLogStatus) && isEmpty(teacherOpenCourseChatLogStatusPlural)){
and t.teacher_open_course_chat_log_status != 2
@ -373,7 +373,7 @@ getTeacherOpenCourseChatLogValues
and t.chat_files =#chatFiles#
@}
@if(!isEmpty(chatLogSendType)){
and t.chat_log_send_type =#chatLogSendType#
and find_in_set(t.chat_log_send_type, #chatLogSendType#)
@}
@if(!isEmpty(teacherOpenCourseChatLogStatus)){
and t.teacher_open_course_chat_log_status =#teacherOpenCourseChatLogStatus#
@ -445,7 +445,7 @@ getValuesByQuery
and t.chat_files =#chatFiles#
@}
@if(!isEmpty(chatLogSendType)){
and t.chat_log_send_type =#chatLogSendType#
and find_in_set(t.chat_log_send_type, #chatLogSendType#)
@}
@if(isEmpty(teacherOpenCourseChatLogStatus) && isEmpty(teacherOpenCourseChatLogStatusPlural)){
and t.teacher_open_course_chat_log_status != 2
@ -526,7 +526,7 @@ getValuesByQueryNotWithPermission
and t.chat_files =#chatFiles#
@}
@if(!isEmpty(chatLogSendType)){
and t.chat_log_send_type =#chatLogSendType#
and find_in_set(t.chat_log_send_type, #chatLogSendType#)
@}
@if(isEmpty(teacherOpenCourseChatLogStatus) && isEmpty(teacherOpenCourseChatLogStatusPlural)){
and t.teacher_open_course_chat_log_status != 2

Loading…
Cancel
Save