开课互动

beetlsql3-dev
Mlxa0324 3 years ago
parent bdefefcebf
commit bd8c08d2a0

@ -1,5 +1,6 @@
package com.ibeetl.admin.core.service;
import cn.hutool.core.util.ReflectUtil;
import com.ibeetl.admin.core.conf.PasswordConfig.PasswordEncryptService;
import com.ibeetl.admin.core.dao.CoreOrgDao;
import com.ibeetl.admin.core.dao.CoreUserDao;
@ -14,7 +15,9 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.lang.reflect.Method;
import java.util.List;
import java.util.function.Consumer;
@Service
@Transactional
@ -94,4 +97,40 @@ public class CoreUserService {
public List<CoreUser> getCoreUserList(CoreUser coreUser){
return userDao.template(coreUser);
}
/**
* ID
* @param coreUser
* @return
*/
public Long tryToGetIdByIdentity(CoreUser coreUser, Consumer<Long> consumer) throws ClassNotFoundException {
Long id = null;
// 如果是超管
if (coreUser.isAdmin()) {
id = coreUser.getId();
// 如果是教师
} else if (coreUser.isTeacher()) {
Class<?> mapperInterface = Class.forName("com.ibeetl.jlw.dao.TeacherDao");
Class<?> teacherClass = Class.forName("com.ibeetl.jlw.entity.Teacher");
Method getByUserId = ReflectUtil.getMethodByName(mapperInterface, "getByUserId");
Object invoke = ReflectUtil.invoke(sqlManager.getMapper(mapperInterface), getByUserId);
// 获取ID
id = (Long)ReflectUtil.getFieldValue(invoke, ReflectUtil.getField(teacherClass, "teacherId"));
// 如果是学生
} else if (coreUser.isStudent()) {
Class<?> mapperInterface = Class.forName("com.ibeetl.jlw.dao.StudentDao");
Class<?> studentClass = Class.forName("com.ibeetl.jlw.entity.Student");
Method getByUserId = ReflectUtil.getMethodByName(mapperInterface, "getByUserId");
Object invoke = ReflectUtil.invoke(sqlManager.getMapper(mapperInterface), getByUserId);
// 获取ID
id = (Long)ReflectUtil.getFieldValue(invoke, ReflectUtil.getField(studentClass, "studentId"));
}
consumer.accept(id);
return id;
}
}

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{BA33ABB7-B246-4DB0-85DE-396EDDB46458}" Label="" LastModificationDate="1663402313" Name="cjks" Objects="1057" Symbols="96" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{BA33ABB7-B246-4DB0-85DE-396EDDB46458}" Label="" LastModificationDate="1663518151" Name="cjks" Objects="1057" Symbols="96" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -4553,9 +4553,9 @@ Shadow=0</a:DisplayPreferences>
</o:ExtendedDependencySymbol>
<o:ExtendedDependencySymbol Id="o60">
<a:CreationDate>1662020600</a:CreationDate>
<a:ModificationDate>1663078111</a:ModificationDate>
<a:Rect>((307940,-926), (325909,24981))</a:Rect>
<a:ListOfPoints>((325909,-926),(325909,11662),(308240,11662),(308240,24981))</a:ListOfPoints>
<a:ModificationDate>1663511274</a:ModificationDate>
<a:Rect>((307940,-926), (328444,24981))</a:Rect>
<a:ListOfPoints>((328444,-926),(328444,11662),(308240,11662),(308240,24981))</a:ListOfPoints>
<a:CornerStyle>1</a:CornerStyle>
<a:ArrowStyle>8</a:ArrowStyle>
<a:LineColor>16744576</a:LineColor>
@ -4739,9 +4739,9 @@ Shadow=0</a:DisplayPreferences>
</o:ExtendedDependencySymbol>
<o:ExtendedDependencySymbol Id="o85">
<a:CreationDate>1662865795</a:CreationDate>
<a:ModificationDate>1663078108</a:ModificationDate>
<a:Rect>((287323,12394), (337544,23674))</a:Rect>
<a:ListOfPoints>((337544,12394),(319070,12394),(319070,23374),(287323,23374))</a:ListOfPoints>
<a:ModificationDate>1663518151</a:ModificationDate>
<a:Rect>((287323,12044), (337544,23674))</a:Rect>
<a:ListOfPoints>((337544,12044),(319070,12044),(319070,23374),(287323,23374))</a:ListOfPoints>
<a:CornerStyle>1</a:CornerStyle>
<a:ArrowStyle>8</a:ArrowStyle>
<a:LineColor>16744576</a:LineColor>
@ -6246,9 +6246,9 @@ LABL 0 新宋体,8,N</a:FontList>
</o:TableSymbol>
<o:TableSymbol Id="o61">
<a:CreationDate>1661963144</a:CreationDate>
<a:ModificationDate>1663078111</a:ModificationDate>
<a:ModificationDate>1663511274</a:ModificationDate>
<a:IconMode>-1</a:IconMode>
<a:Rect>((316487,-8835), (335487,6555))</a:Rect>
<a:Rect>((316487,-8835), (340599,6555))</a:Rect>
<a:AutoAdjustToText>0</a:AutoAdjustToText>
<a:LineColor>12615680</a:LineColor>
<a:FillColor>16570034</a:FillColor>
@ -6543,9 +6543,9 @@ LABL 0 新宋体,8,N</a:FontList>
</o:TableSymbol>
<o:TableSymbol Id="o86">
<a:CreationDate>1662865695</a:CreationDate>
<a:ModificationDate>1663078108</a:ModificationDate>
<a:ModificationDate>1663518151</a:ModificationDate>
<a:IconMode>-1</a:IconMode>
<a:Rect>((329272,7420), (345816,17368))</a:Rect>
<a:Rect>((329272,7070), (345816,17018))</a:Rect>
<a:AutoAdjustToText>0</a:AutoAdjustToText>
<a:LineColor>12615680</a:LineColor>
<a:FillColor>16570034</a:FillColor>
@ -15561,7 +15561,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>teacher_open_course_chat_log</a:Code>
<a:CreationDate>1661850632</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1662048320</a:ModificationDate>
<a:ModificationDate>1663511956</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>课程开课-互动-评论日志</a:Comment>
<a:PhysicalOptions>auto_increment = 1
@ -15606,14 +15606,15 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:Column>
<o:Column Id="o861">
<a:ObjectID>D7BD01D2-4D7E-4228-B94F-711BB78D809D</a:ObjectID>
<a:Name>school_class_id</a:Name>
<a:Code>school_class_id</a:Code>
<a:Name>school_class_ids</a:Name>
<a:Code>school_class_ids</a:Code>
<a:CreationDate>1661963176</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1661963461</a:ModificationDate>
<a:ModificationDate>1663515539</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>班级ID</a:Comment>
<a:DataType>bigint</a:DataType>
<a:Comment>班级ID集合</a:Comment>
<a:DataType>varchar(4000)</a:DataType>
<a:Length>4000</a:Length>
</o:Column>
<o:Column Id="o862">
<a:ObjectID>18589108-4394-4335-8B90-7E3795F82B8A</a:ObjectID>
@ -15621,7 +15622,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>teacher_id</a:Code>
<a:CreationDate>1661952562</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1661963144</a:ModificationDate>
<a:ModificationDate>1663511267</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>教师ID</a:Comment>
<a:DataType>bigint</a:DataType>
@ -15643,11 +15644,13 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>chat_content</a:Code>
<a:CreationDate>1661963176</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1662020042</a:ModificationDate>
<a:Modifier>87966</a:Modifier>
<a:ModificationDate>1663511779</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>讨论内容</a:Comment>
<a:DataType>varchar(2000)</a:DataType>
<a:Length>2000</a:Length>
<a:DataType>text</a:DataType>
<a:ExtendedAttributesText>{F4F16ECD-F2F1-4006-AF6F-638D5C65F35E},MYSQL50,58={9480E6AA-83DD-4AA7-9C91-E48F709C29D9},CharSet,7=utf8mb4
</a:ExtendedAttributesText>
</o:Column>
<o:Column Id="o865">
<a:ObjectID>D2108D51-47D4-4398-942C-4DA987E91A52</a:ObjectID>
@ -15696,6 +15699,17 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o869">
<a:ObjectID>F4E24A74-7879-4FA7-A31A-1DF43C87CCA9</a:ObjectID>
<a:Name>teacher_open_course_chat_log_add_time</a:Name>
<a:Code>teacher_open_course_chat_log_add_time</a:Code>
<a:CreationDate>1661957411</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1663511956</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>创建时间</a:Comment>
<a:DataType>datetime</a:DataType>
</o:Column>
<o:Column Id="o870">
<a:ObjectID>915B6210-D43D-4773-A051-C208B1123038</a:ObjectID>
<a:Name>org_id</a:Name>
<a:Code>org_id</a:Code>
@ -15706,7 +15720,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Comment>组织ID</a:Comment>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o870">
<o:Column Id="o871">
<a:ObjectID>052B1726-9F05-49F3-9AE1-E73D36F22ED1</a:ObjectID>
<a:Name>user_id</a:Name>
<a:Code>user_id</a:Code>
@ -15717,17 +15731,6 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Comment>用户ID</a:Comment>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o871">
<a:ObjectID>F4E24A74-7879-4FA7-A31A-1DF43C87CCA9</a:ObjectID>
<a:Name>create_time</a:Name>
<a:Code>create_time</a:Code>
<a:CreationDate>1661957411</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1661963144</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>创建时间</a:Comment>
<a:DataType>datetime</a:DataType>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o872">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{BA33ABB7-B246-4DB0-85DE-396EDDB46458}" Label="" LastModificationDate="1663402313" Name="cjks" Objects="1057" Symbols="96" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{BA33ABB7-B246-4DB0-85DE-396EDDB46458}" Label="" LastModificationDate="1663518168" Name="cjks" Objects="1057" Symbols="96" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -4553,9 +4553,9 @@ Shadow=0</a:DisplayPreferences>
</o:ExtendedDependencySymbol>
<o:ExtendedDependencySymbol Id="o60">
<a:CreationDate>1662020600</a:CreationDate>
<a:ModificationDate>1663078111</a:ModificationDate>
<a:Rect>((307940,-926), (325909,24981))</a:Rect>
<a:ListOfPoints>((325909,-926),(325909,11662),(308240,11662),(308240,24981))</a:ListOfPoints>
<a:ModificationDate>1663511274</a:ModificationDate>
<a:Rect>((307940,-926), (328444,24981))</a:Rect>
<a:ListOfPoints>((328444,-926),(328444,11662),(308240,11662),(308240,24981))</a:ListOfPoints>
<a:CornerStyle>1</a:CornerStyle>
<a:ArrowStyle>8</a:ArrowStyle>
<a:LineColor>16744576</a:LineColor>
@ -4739,9 +4739,9 @@ Shadow=0</a:DisplayPreferences>
</o:ExtendedDependencySymbol>
<o:ExtendedDependencySymbol Id="o85">
<a:CreationDate>1662865795</a:CreationDate>
<a:ModificationDate>1663078108</a:ModificationDate>
<a:Rect>((287323,12394), (337544,23674))</a:Rect>
<a:ListOfPoints>((337544,12394),(319070,12394),(319070,23374),(287323,23374))</a:ListOfPoints>
<a:ModificationDate>1663518168</a:ModificationDate>
<a:Rect>((287323,15194), (337794,23674))</a:Rect>
<a:ListOfPoints>((337794,15194),(319320,15194),(319320,23374),(287323,23374))</a:ListOfPoints>
<a:CornerStyle>1</a:CornerStyle>
<a:ArrowStyle>8</a:ArrowStyle>
<a:LineColor>16744576</a:LineColor>
@ -6246,9 +6246,9 @@ LABL 0 新宋体,8,N</a:FontList>
</o:TableSymbol>
<o:TableSymbol Id="o61">
<a:CreationDate>1661963144</a:CreationDate>
<a:ModificationDate>1663078111</a:ModificationDate>
<a:ModificationDate>1663511274</a:ModificationDate>
<a:IconMode>-1</a:IconMode>
<a:Rect>((316487,-8835), (335487,6555))</a:Rect>
<a:Rect>((316487,-8835), (340599,6555))</a:Rect>
<a:AutoAdjustToText>0</a:AutoAdjustToText>
<a:LineColor>12615680</a:LineColor>
<a:FillColor>16570034</a:FillColor>
@ -6543,9 +6543,9 @@ LABL 0 新宋体,8,N</a:FontList>
</o:TableSymbol>
<o:TableSymbol Id="o86">
<a:CreationDate>1662865695</a:CreationDate>
<a:ModificationDate>1663078108</a:ModificationDate>
<a:ModificationDate>1663518151</a:ModificationDate>
<a:IconMode>-1</a:IconMode>
<a:Rect>((329272,7420), (345816,17368))</a:Rect>
<a:Rect>((329272,7070), (345816,17018))</a:Rect>
<a:AutoAdjustToText>0</a:AutoAdjustToText>
<a:LineColor>12615680</a:LineColor>
<a:FillColor>16570034</a:FillColor>
@ -15561,7 +15561,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>teacher_open_course_chat_log</a:Code>
<a:CreationDate>1661850632</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1662048320</a:ModificationDate>
<a:ModificationDate>1663511956</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>课程开课-互动-评论日志</a:Comment>
<a:PhysicalOptions>auto_increment = 1
@ -15606,14 +15606,15 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:Column>
<o:Column Id="o861">
<a:ObjectID>D7BD01D2-4D7E-4228-B94F-711BB78D809D</a:ObjectID>
<a:Name>school_class_id</a:Name>
<a:Code>school_class_id</a:Code>
<a:Name>school_class_ids</a:Name>
<a:Code>school_class_ids</a:Code>
<a:CreationDate>1661963176</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1661963461</a:ModificationDate>
<a:ModificationDate>1663515539</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>班级ID</a:Comment>
<a:DataType>bigint</a:DataType>
<a:Comment>班级ID集合</a:Comment>
<a:DataType>varchar(4000)</a:DataType>
<a:Length>4000</a:Length>
</o:Column>
<o:Column Id="o862">
<a:ObjectID>18589108-4394-4335-8B90-7E3795F82B8A</a:ObjectID>
@ -15621,7 +15622,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>teacher_id</a:Code>
<a:CreationDate>1661952562</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1661963144</a:ModificationDate>
<a:ModificationDate>1663511267</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>教师ID</a:Comment>
<a:DataType>bigint</a:DataType>
@ -15643,11 +15644,13 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>chat_content</a:Code>
<a:CreationDate>1661963176</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1662020042</a:ModificationDate>
<a:Modifier>87966</a:Modifier>
<a:ModificationDate>1663511779</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>讨论内容</a:Comment>
<a:DataType>varchar(2000)</a:DataType>
<a:Length>2000</a:Length>
<a:DataType>text</a:DataType>
<a:ExtendedAttributesText>{F4F16ECD-F2F1-4006-AF6F-638D5C65F35E},MYSQL50,58={9480E6AA-83DD-4AA7-9C91-E48F709C29D9},CharSet,7=utf8mb4
</a:ExtendedAttributesText>
</o:Column>
<o:Column Id="o865">
<a:ObjectID>D2108D51-47D4-4398-942C-4DA987E91A52</a:ObjectID>
@ -15696,6 +15699,17 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o869">
<a:ObjectID>F4E24A74-7879-4FA7-A31A-1DF43C87CCA9</a:ObjectID>
<a:Name>teacher_open_course_chat_log_add_time</a:Name>
<a:Code>teacher_open_course_chat_log_add_time</a:Code>
<a:CreationDate>1661957411</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1663511956</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>创建时间</a:Comment>
<a:DataType>datetime</a:DataType>
</o:Column>
<o:Column Id="o870">
<a:ObjectID>915B6210-D43D-4773-A051-C208B1123038</a:ObjectID>
<a:Name>org_id</a:Name>
<a:Code>org_id</a:Code>
@ -15706,7 +15720,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Comment>组织ID</a:Comment>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o870">
<o:Column Id="o871">
<a:ObjectID>052B1726-9F05-49F3-9AE1-E73D36F22ED1</a:ObjectID>
<a:Name>user_id</a:Name>
<a:Code>user_id</a:Code>
@ -15717,17 +15731,6 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Comment>用户ID</a:Comment>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o871">
<a:ObjectID>F4E24A74-7879-4FA7-A31A-1DF43C87CCA9</a:ObjectID>
<a:Name>create_time</a:Name>
<a:Code>create_time</a:Code>
<a:CreationDate>1661957411</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1661963144</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>创建时间</a:Comment>
<a:DataType>datetime</a:DataType>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o872">

@ -0,0 +1,11 @@
### 教师发表评论
POST {{baseURL}}/jlw/teacherOpenCourseChatLog/add.json
Content-Type: application/json
Cookie: JSESSIONID={{session}}
{
"chatContent": "我是讨论的内容_{{$timestamp}}",
"keywords": "讨论,内容",
"schoolClassIds": "1,2",
"teacherId": "2"
}

@ -1,6 +1,6 @@
{
"dev": {
"baseURL": "http://localhost:9090/server/",
"session": "497889C2B1819A5699DB4FB749932184"
"session": "DDA76B28B0EA912BEC98C6A156685858"
}
}

@ -19,6 +19,8 @@ public interface TeacherOpenCourseChatLogDao extends BaseMapper<TeacherOpenCours
@Update
void deleteTeacherOpenCourseChatLogByIds(String ids);
@Update
void deleteByIds(String ids);
@Update
int updateGivenByIds(TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery);
List<TeacherOpenCourseChatLog> getByIds(String ids);
List<TeacherOpenCourseChatLog> getValuesByQuery(TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery);

@ -1,10 +1,9 @@
package com.ibeetl.jlw.entity;
import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig;
import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.InsertIgnore;
import org.beetl.sql.annotation.entity.LogicDelete;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
@ -28,18 +27,21 @@ public class TeacherOpenCourseChatLog extends BaseEntity{
private Long teacherOpenCourseChatLogParentId ;
//课程开课ID
@Dict(type="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1")
private Long teacherOpenCourseId ;
//班级ID
//班级ID集合
private Long schoolClassId ;
private String schoolClassIds ;
//教师ID
@Dict(type="teacher.teacher_name.teacher_status=1")
private Long teacherId ;
//学生ID
@Dict(type="student.student_name.student_status=1")
private Long studentId ;
@ -59,12 +61,14 @@ public class TeacherOpenCourseChatLog extends BaseEntity{
private String chatFiles ;
//删除状态
/*逻辑删除标志*/
@InsertIgnore
@LogicDelete(value = 1)
//状态 1正常 2删除
@Dict(type="global_status")
private Integer delFlag ;
private Integer teacherOpenCourseChatLogStatus ;
//创建时间
private Date teacherOpenCourseChatLogAddTime ;
//组织ID
@ -74,10 +78,6 @@ public class TeacherOpenCourseChatLog extends BaseEntity{
private Long userId ;
//创建时间
private Date createTime ;
public TeacherOpenCourseChatLog(){
}
@ -120,17 +120,17 @@ public class TeacherOpenCourseChatLog extends BaseEntity{
this.teacherOpenCourseId = teacherOpenCourseId;
}
/**ID
/**ID
*@return
*/
public Long getSchoolClassId(){
return schoolClassId;
public String getSchoolClassIds(){
return schoolClassIds;
}
/**ID
*@param schoolClassId
/**ID
*@param schoolClassIds
*/
public void setSchoolClassId(Long schoolClassId){
this.schoolClassId = schoolClassId;
public void setSchoolClassIds(String schoolClassIds){
this.schoolClassIds = schoolClassIds;
}
/**ID
@ -211,17 +211,30 @@ public class TeacherOpenCourseChatLog extends BaseEntity{
this.chatFiles = chatFiles;
}
/**
/** 1 2
*@return
*/
public Integer getTeacherOpenCourseChatLogStatus(){
return teacherOpenCourseChatLogStatus;
}
/** 1 2
*@param teacherOpenCourseChatLogStatus
*/
public void setTeacherOpenCourseChatLogStatus(Integer teacherOpenCourseChatLogStatus){
this.teacherOpenCourseChatLogStatus = teacherOpenCourseChatLogStatus;
}
/**
*@return
*/
public Integer getDelFlag(){
return delFlag;
public Date getTeacherOpenCourseChatLogAddTime(){
return teacherOpenCourseChatLogAddTime;
}
/**
*@param delFlag
/**
*@param teacherOpenCourseChatLogAddTime
*/
public void setDelFlag(Integer delFlag){
this.delFlag = delFlag;
public void setTeacherOpenCourseChatLogAddTime(Date teacherOpenCourseChatLogAddTime){
this.teacherOpenCourseChatLogAddTime = teacherOpenCourseChatLogAddTime;
}
/**ID
@ -250,18 +263,5 @@ public class TeacherOpenCourseChatLog extends BaseEntity{
this.userId = userId;
}
/**
*@return
*/
public Date getCreateTime(){
return createTime;
}
/**
*@param createTime
*/
public void setCreateTime(Date createTime){
this.createTime = createTime;
}
}

@ -18,6 +18,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -50,7 +51,7 @@ public class TeacherOpenCourseChatLogService extends CoreBaseService<TeacherOpen
ids += list.get(i).toString()+(i==list.size()-1?"":",");
}
if(StringUtils.isNotBlank(ids)){
teacherOpenCourseChatLogDao.deleteTeacherOpenCourseChatLogByIds(ids);
teacherOpenCourseChatLogDao.deleteByIds(ids);
}
}
@ -87,6 +88,7 @@ public class TeacherOpenCourseChatLogService extends CoreBaseService<TeacherOpen
public JsonResult add(TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery){
String msg = "";
TeacherOpenCourseChatLog teacherOpenCourseChatLog = teacherOpenCourseChatLogQuery.pojo();
teacherOpenCourseChatLog.setTeacherOpenCourseChatLogAddTime(new Date());
teacherOpenCourseChatLogDao.insert(teacherOpenCourseChatLog);
teacherOpenCourseChatLogQuery.setTeacherOpenCourseChatLogId(teacherOpenCourseChatLog.getTeacherOpenCourseChatLogId());
JsonResult jsonResult = new JsonResult();
@ -127,6 +129,7 @@ public class TeacherOpenCourseChatLogService extends CoreBaseService<TeacherOpen
public TeacherOpenCourseChatLog getInfo (Long teacherOpenCourseChatLogId){
TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery = new TeacherOpenCourseChatLogQuery();
teacherOpenCourseChatLogQuery.setTeacherOpenCourseChatLogId(teacherOpenCourseChatLogId);
teacherOpenCourseChatLogQuery.setTeacherOpenCourseChatLogStatusPlural("1,2");//需要根据实际情况来
List<TeacherOpenCourseChatLog> list = teacherOpenCourseChatLogDao.getValuesByQuery(teacherOpenCourseChatLogQuery);
if(null != list && list.size()>0){
return list.get(0);

@ -1,10 +1,12 @@
package com.ibeetl.jlw.web;
import cn.hutool.core.lang.Assert;
import cn.jlw.Interceptor.SCoreUser;
import cn.jlw.validate.ValidateConfig;
import com.ibeetl.admin.core.annotation.Function;
import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.file.FileService;
import com.ibeetl.admin.core.service.CoreUserService;
import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.jlw.entity.TeacherOpenCourseChatLog;
import com.ibeetl.jlw.service.TeacherOpenCourseChatLogService;
@ -15,10 +17,7 @@ import org.apache.commons.logging.LogFactory;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
@ -40,6 +39,8 @@ public class TeacherOpenCourseChatLogController{
@Resource private TeacherOpenCourseChatLogService teacherOpenCourseChatLogService;
@Resource FileService fileService;
@Resource
private CoreUserService coreUserService;
/* 前端接口 */
@ -113,12 +114,27 @@ public class TeacherOpenCourseChatLogController{
@PostMapping(MODEL + "/list.json")
@Function("teacherOpenCourseChatLog.query")
public JsonResult<PageQuery> list(TeacherOpenCourseChatLogQuery condition){
public JsonResult<PageQuery> list(TeacherOpenCourseChatLogQuery condition, @SCoreUser CoreUser coreUser) {
PageQuery page = condition.getPageQuery();
teacherOpenCourseChatLogService.queryByCondition(page);
return JsonResult.success(page);
}
/**
* -
* @param condition
* @param coreUser
* @return
*/
@PostMapping(MODEL + "/details.json")
@Function("teacherOpenCourseChatLog.query")
public JsonResult<PageQuery> details(TeacherOpenCourseChatLogQuery condition, @SCoreUser CoreUser coreUser) {
PageQuery page = condition.getPageQuery();
Assert.notNull(condition.getTeacherOpenCourseChatLogParentId(), "评论的上级ID不能为空");
teacherOpenCourseChatLogService.queryByCondition(page);
return JsonResult.success(page);
}
@PostMapping(MODEL + "/addAll.json")
@Function("teacherOpenCourseChatLog.add")
public JsonResult addAll(TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery,@SCoreUser CoreUser coreUser){
@ -138,19 +154,22 @@ public class TeacherOpenCourseChatLogController{
@PostMapping(MODEL + "/add.json")
@Function("teacherOpenCourseChatLog.add")
public JsonResult add(@Validated(ValidateConfig.ADD.class) TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery, BindingResult result,@SCoreUser CoreUser coreUser){
public JsonResult add(@Validated(ValidateConfig.ADD.class) @RequestBody TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery, BindingResult result,@SCoreUser CoreUser coreUser){
if(result.hasErrors()){
return JsonResult.failMessage(result);
}else{
teacherOpenCourseChatLogQuery.setUserId(coreUser.getId());
teacherOpenCourseChatLogQuery.setOrgId(coreUser.getOrgId());
if(null == teacherOpenCourseChatLogQuery.getTeacherOpenCourseChatLogStatus()){
teacherOpenCourseChatLogQuery.setTeacherOpenCourseChatLogStatus(1);
}
return teacherOpenCourseChatLogService.add(teacherOpenCourseChatLogQuery);
}
}
@PostMapping(MODEL + "/edit.json")
@Function("teacherOpenCourseChatLog.edit")
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery, BindingResult result) {
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) @RequestBody TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery, BindingResult result) {
if(result.hasErrors()){
return JsonResult.failMessage(result);
}else {

@ -13,19 +13,25 @@ import java.util.Date;
*
*/
public class TeacherOpenCourseChatLogQuery extends PageParam {
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
@Query(name = "课程开课--讨论-日志ID", display = false)
private Long teacherOpenCourseChatLogId;
@NotNull(message = "上级ID不能为空", groups =ValidateConfig.ADD.class)
@Query(name = "上级ID", display = false)
private Long teacherOpenCourseChatLogParentId;
@Query(name = "课程开课ID", display = false)
@NotNull(message = "课程开课ID不能为空", groups =ValidateConfig.ADD.class)
@Query(name = "课程开课ID", display = true,type=Query.TYPE_DICT,dict="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1")
private Long teacherOpenCourseId;
@Query(name = "班级ID", display = false)
private Long schoolClassId;
@Query(name = "教师ID", display = false)
@Query(name = "班级ID集合", display = false)
private String schoolClassIds;
@NotNull(message = "教师ID不能为空", groups =ValidateConfig.ADD.class)
@Query(name = "教师ID", display = true,type=Query.TYPE_DICT,dict="teacher.teacher_name.teacher_status=1")
private Long teacherId;
@Query(name = "学生ID", display = false)
@NotNull(message = "学生ID不能为空", groups =ValidateConfig.ADD.class)
@Query(name = "学生ID", display = true,type=Query.TYPE_DICT,dict="student.student_name.student_status=1")
private Long studentId;
@NotNull(message = "讨论内容不能为空", groups =ValidateConfig.ADD.class)
@Query(name = "讨论内容", display = false)
private String chatContent;
@Query(name = "关键字(多个逗号隔开)", display = false)
@ -34,21 +40,21 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
private BigDecimal studentScore;
@Query(name = "附件上传(仅支持图片,多个逗号隔开)", display = false)
private String chatFiles;
@Query(name = "删除状态", display = false)
private Integer delFlag;
@Query(name = "状态 1正常 2删除", display = true,type=Query.TYPE_DICT,dict="global_status")
private Integer teacherOpenCourseChatLogStatus;
@Query(name = "创建时间", display = false)
private Date teacherOpenCourseChatLogAddTime;
@Query(name = "组织ID", display = false)
private Long orgId;
@Query(name = "用户ID", display = false)
private Long userId;
@Query(name = "创建时间", display = false)
private Date createTime;
private String teacherOpenCourseChatLogIdPlural;
private String teacherOpenCourseChatLogParentIdPlural;
private String teacherOpenCourseIdPlural;
private String schoolClassIdPlural;
private String teacherIdPlural;
private String studentIdPlural;
private String teacherOpenCourseChatLogStatusPlural;
private String orgIdPlural;
private String userIdPlural;
@ -74,11 +80,11 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
public void setTeacherOpenCourseId(Long teacherOpenCourseId ){
this.teacherOpenCourseId = teacherOpenCourseId;
}
public Long getSchoolClassId(){
return schoolClassId;
public String getSchoolClassIds(){
return schoolClassIds;
}
public void setSchoolClassId(Long schoolClassId ){
this.schoolClassId = schoolClassId;
public void setSchoolClassIds(String schoolClassIds ){
this.schoolClassIds = schoolClassIds;
}
public Long getTeacherId(){
return teacherId;
@ -116,11 +122,17 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
public void setChatFiles(String chatFiles ){
this.chatFiles = chatFiles;
}
public Integer getDelFlag(){
return delFlag;
public Integer getTeacherOpenCourseChatLogStatus(){
return teacherOpenCourseChatLogStatus;
}
public void setDelFlag(Integer delFlag ){
this.delFlag = delFlag;
public void setTeacherOpenCourseChatLogStatus(Integer teacherOpenCourseChatLogStatus ){
this.teacherOpenCourseChatLogStatus = teacherOpenCourseChatLogStatus;
}
public Date getTeacherOpenCourseChatLogAddTime(){
return teacherOpenCourseChatLogAddTime;
}
public void setTeacherOpenCourseChatLogAddTime(Date teacherOpenCourseChatLogAddTime ){
this.teacherOpenCourseChatLogAddTime = teacherOpenCourseChatLogAddTime;
}
public Long getOrgId(){
return orgId;
@ -134,29 +146,23 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
public void setUserId(Long userId ){
this.userId = userId;
}
public Date getCreateTime(){
return createTime;
}
public void setCreateTime(Date createTime ){
this.createTime = createTime;
}
public TeacherOpenCourseChatLog pojo(){
TeacherOpenCourseChatLog pojo = new TeacherOpenCourseChatLog();
pojo.setTeacherOpenCourseChatLogId(this.getTeacherOpenCourseChatLogId());
pojo.setTeacherOpenCourseChatLogParentId(this.getTeacherOpenCourseChatLogParentId());
pojo.setTeacherOpenCourseId(this.getTeacherOpenCourseId());
pojo.setSchoolClassId(this.getSchoolClassId());
pojo.setSchoolClassIds(this.getSchoolClassIds());
pojo.setTeacherId(this.getTeacherId());
pojo.setStudentId(this.getStudentId());
pojo.setChatContent(this.getChatContent());
pojo.setKeywords(this.getKeywords());
pojo.setStudentScore(this.getStudentScore());
pojo.setChatFiles(this.getChatFiles());
pojo.setDelFlag(this.getDelFlag());
pojo.setTeacherOpenCourseChatLogStatus(this.getTeacherOpenCourseChatLogStatus());
pojo.setTeacherOpenCourseChatLogAddTime(this.getTeacherOpenCourseChatLogAddTime());
pojo.setOrgId(this.getOrgId());
pojo.setUserId(this.getUserId());
pojo.setCreateTime(this.getCreateTime());
return pojo;
}
@ -178,12 +184,6 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
public void setTeacherOpenCourseIdPlural(String teacherOpenCourseIdPlural){
this.teacherOpenCourseIdPlural = teacherOpenCourseIdPlural;
}
public String getSchoolClassIdPlural(){
return schoolClassIdPlural;
}
public void setSchoolClassIdPlural(String schoolClassIdPlural){
this.schoolClassIdPlural = schoolClassIdPlural;
}
public String getTeacherIdPlural(){
return teacherIdPlural;
}
@ -196,6 +196,12 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
public void setStudentIdPlural(String studentIdPlural){
this.studentIdPlural = studentIdPlural;
}
public String getTeacherOpenCourseChatLogStatusPlural(){
return teacherOpenCourseChatLogStatusPlural;
}
public void setTeacherOpenCourseChatLogStatusPlural(String teacherOpenCourseChatLogStatusPlural){
this.teacherOpenCourseChatLogStatusPlural = teacherOpenCourseChatLogStatusPlural;
}
public String getOrgIdPlural(){
return orgIdPlural;
}

@ -5,6 +5,12 @@ queryByCondition
select
@pageTag(){
t.*
@if(!isEmpty(teacherOpenCourseChatLogParentId)){
,(select count(1) from teacher_open_course_chat_log a
where a.teacher_open_course_chat_log_status = 1
and teacher_open_course_chat_log_parent_id = #teacherOpenCourseChatLogParentId#
) as comment_count
@}
@}
from teacher_open_course_chat_log t
where 1=1
@ -28,11 +34,8 @@ queryByCondition
@if(!isEmpty(teacherOpenCourseIdPlural)){
and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#)
@}
@if(!isEmpty(schoolClassId)){
and t.school_class_id =#schoolClassId#
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(t.school_class_id,#schoolClassIdPlural#)
@if(!isEmpty(schoolClassIds)){
and t.school_class_ids =#schoolClassIds#
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@ -58,8 +61,17 @@ queryByCondition
@if(!isEmpty(chatFiles)){
and t.chat_files =#chatFiles#
@}
@if(!isEmpty(delFlag)){
and t.del_flag =#delFlag#
@if(isEmpty(teacherOpenCourseChatLogStatus) && isEmpty(teacherOpenCourseChatLogStatusPlural)){
and t.teacher_open_course_chat_log_status != 2
@}else{
@if(!isEmpty(teacherOpenCourseChatLogStatus)){
and t.teacher_open_course_chat_log_status =#teacherOpenCourseChatLogStatus#
@}else if(!isEmpty(teacherOpenCourseChatLogStatusPlural)){
and find_in_set(t.teacher_open_course_chat_log_status,#teacherOpenCourseChatLogStatusPlural#)
@}
@}
@if(!isEmpty(teacherOpenCourseChatLogAddTime)){
and t.teacher_open_course_chat_log_add_time =#teacherOpenCourseChatLogAddTime#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -73,8 +85,8 @@ queryByCondition
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@if(!isEmpty(teacherOpenCourseChatLogParentId)){
order by create_time desc
@}
@ -106,11 +118,8 @@ queryByConditionQuery
@if(!isEmpty(teacherOpenCourseIdPlural)){
and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#)
@}
@if(!isEmpty(schoolClassId)){
and t.school_class_id =#schoolClassId#
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(t.school_class_id,#schoolClassIdPlural#)
@if(!isEmpty(schoolClassIds)){
and t.school_class_ids =#schoolClassIds#
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@ -136,8 +145,17 @@ queryByConditionQuery
@if(!isEmpty(chatFiles)){
and t.chat_files =#chatFiles#
@}
@if(!isEmpty(delFlag)){
and t.del_flag =#delFlag#
@if(isEmpty(teacherOpenCourseChatLogStatus) && isEmpty(teacherOpenCourseChatLogStatusPlural)){
and t.teacher_open_course_chat_log_status != 2
@}else{
@if(!isEmpty(teacherOpenCourseChatLogStatus)){
and t.teacher_open_course_chat_log_status =#teacherOpenCourseChatLogStatus#
@}else if(!isEmpty(teacherOpenCourseChatLogStatusPlural)){
and find_in_set(t.teacher_open_course_chat_log_status,#teacherOpenCourseChatLogStatusPlural#)
@}
@}
@if(!isEmpty(teacherOpenCourseChatLogAddTime)){
and t.teacher_open_course_chat_log_add_time =#teacherOpenCourseChatLogAddTime#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -151,9 +169,6 @@ queryByConditionQuery
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
@ -161,7 +176,15 @@ queryByConditionQuery
deleteTeacherOpenCourseChatLogByIds
===
* 批量删除
* 批量删除(假删除)
update teacher_open_course_chat_log set teacher_open_course_chat_log_status = 2 where find_in_set(teacher_open_course_chat_log_id,#ids#)
deleteByIds
===
* 批量删除(真删除)
delete from teacher_open_course_chat_log where find_in_set(teacher_open_course_chat_log_id,#ids#)
@ -194,11 +217,11 @@ updateGivenByIds
teacher_open_course_id = #teacherOpenCourseId# ,
@}
@}
@if(contain("schoolClassId",_given)){
@if(isEmpty(schoolClassId)){
school_class_id = null ,
@if(contain("schoolClassIds",_given)){
@if(isEmpty(schoolClassIds)){
school_class_ids = null ,
@}else{
school_class_id = #schoolClassId# ,
school_class_ids = #schoolClassIds# ,
@}
@}
@if(contain("teacherId",_given)){
@ -243,11 +266,18 @@ updateGivenByIds
chat_files = #chatFiles# ,
@}
@}
@if(contain("delFlag",_given)){
@if(isEmpty(delFlag)){
del_flag = null ,
@if(contain("teacherOpenCourseChatLogStatus",_given)){
@if(isEmpty(teacherOpenCourseChatLogStatus)){
teacher_open_course_chat_log_status = null ,
@}else{
del_flag = #delFlag# ,
teacher_open_course_chat_log_status = #teacherOpenCourseChatLogStatus# ,
@}
@}
@if(contain("teacherOpenCourseChatLogAddTime",_given)){
@if(isEmpty(teacherOpenCourseChatLogAddTime)){
teacher_open_course_chat_log_add_time = null ,
@}else{
teacher_open_course_chat_log_add_time = #teacherOpenCourseChatLogAddTime# ,
@}
@}
@if(contain("orgId",_given)){
@ -264,13 +294,6 @@ updateGivenByIds
user_id = #userId# ,
@}
@}
@if(contain("createTime",_given)){
@if(isEmpty(createTime)){
create_time = null ,
@}else{
create_time = #createTime# ,
@}
@}
teacher_open_course_chat_log_id = teacher_open_course_chat_log_id
where find_in_set(teacher_open_course_chat_log_id,#teacherOpenCourseChatLogIdPlural#)
@ -293,8 +316,8 @@ getTeacherOpenCourseChatLogValues
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@}
@if(!isEmpty(schoolClassId)){
and t.school_class_id =#schoolClassId#
@if(!isEmpty(schoolClassIds)){
and t.school_class_ids =#schoolClassIds#
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@ -314,8 +337,13 @@ getTeacherOpenCourseChatLogValues
@if(!isEmpty(chatFiles)){
and t.chat_files =#chatFiles#
@}
@if(!isEmpty(delFlag)){
and t.del_flag =#delFlag#
@if(!isEmpty(teacherOpenCourseChatLogStatus)){
and t.teacher_open_course_chat_log_status =#teacherOpenCourseChatLogStatus#
@}else{
and t.teacher_open_course_chat_log_status != 2
@}
@if(!isEmpty(teacherOpenCourseChatLogAddTime)){
and t.teacher_open_course_chat_log_add_time =#teacherOpenCourseChatLogAddTime#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -323,9 +351,6 @@ getTeacherOpenCourseChatLogValues
@if(!isEmpty(userId)){
and t.user_id =#userId#
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
getValuesByQuery
@ -354,11 +379,8 @@ getValuesByQuery
@if(!isEmpty(teacherOpenCourseIdPlural)){
and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#)
@}
@if(!isEmpty(schoolClassId)){
and t.school_class_id =#schoolClassId#
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(t.school_class_id,#schoolClassIdPlural#)
@if(!isEmpty(schoolClassIds)){
and t.school_class_ids =#schoolClassIds#
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@ -384,8 +406,17 @@ getValuesByQuery
@if(!isEmpty(chatFiles)){
and t.chat_files =#chatFiles#
@}
@if(!isEmpty(delFlag)){
and t.del_flag =#delFlag#
@if(isEmpty(teacherOpenCourseChatLogStatus) && isEmpty(teacherOpenCourseChatLogStatusPlural)){
and t.teacher_open_course_chat_log_status != 2
@}else{
@if(!isEmpty(teacherOpenCourseChatLogStatus)){
and t.teacher_open_course_chat_log_status =#teacherOpenCourseChatLogStatus#
@}else if(!isEmpty(teacherOpenCourseChatLogStatusPlural)){
and find_in_set(t.teacher_open_course_chat_log_status,#teacherOpenCourseChatLogStatusPlural#)
@}
@}
@if(!isEmpty(teacherOpenCourseChatLogAddTime)){
and t.teacher_open_course_chat_log_add_time =#teacherOpenCourseChatLogAddTime#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -399,9 +430,6 @@ getValuesByQuery
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}

@ -49,32 +49,32 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
hide:$.isEmpty(sx_['teacherOpenCourseChatLogParentId'])?false:sx_['teacherOpenCourseChatLogParentId'],
},
{
field : 'teacherOpenCourseId',
field : 'teacherOpenCourseIdText', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title : '课程开课ID',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['teacherOpenCourseId'])?false:sx_['teacherOpenCourseId'],
hide:$.isEmpty(sx_['teacherOpenCourseIdText'])?false:sx_['teacherOpenCourseIdText'],
},
{
field : 'schoolClassId',
title : '班级ID',
field : 'schoolClassIds',
title : '班级ID集合',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['schoolClassId'])?false:sx_['schoolClassId'],
hide:$.isEmpty(sx_['schoolClassIds'])?false:sx_['schoolClassIds'],
},
{
field : 'teacherId',
field : 'teacherIdText', //数据字典类型为 teacher.teacher_name.teacher_status=1
title : '教师ID',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['teacherId'])?false:sx_['teacherId'],
hide:$.isEmpty(sx_['teacherIdText'])?false:sx_['teacherIdText'],
},
{
field : 'studentId',
field : 'studentIdText', //数据字典类型为 student.student_name.student_status=1
title : '学生ID',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentId'])?false:sx_['studentId'],
hide:$.isEmpty(sx_['studentIdText'])?false:sx_['studentIdText'],
},
{
field : 'chatContent',
@ -104,6 +104,20 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
hideField :false,
hide:$.isEmpty(sx_['chatFiles'])?false:sx_['chatFiles'],
},
{
field : 'teacherOpenCourseChatLogStatusText', //数据字典类型为 global_status
title : '状态 1正常 2删除',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['teacherOpenCourseChatLogStatusText'])?false:sx_['teacherOpenCourseChatLogStatusText'],
},
{
field : 'teacherOpenCourseChatLogAddTime',
title : '创建时间',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['teacherOpenCourseChatLogAddTime'])?false:sx_['teacherOpenCourseChatLogAddTime'],
},
{
field : 'orgId',
title : '组织ID',
@ -117,13 +131,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
align:"center",
hideField :false,
hide:$.isEmpty(sx_['userId'])?false:sx_['userId'],
},
{
field : 'createTime',
title : '创建时间',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['createTime'])?false:sx_['createTime'],
}
,{
field : 'operation_',title : '操作',align:"center", templet: function (d) {

@ -12,7 +12,8 @@
<div class="layui-inline">
<label class="layui-form-label">课程开课ID</label>
<div class="layui-input-inline">
<input type="text" id="teacherOpenCourseId" name="teacherOpenCourseId" value="${teacherOpenCourseChatLog.teacherOpenCourseId}" class="layui-input" >
<layui:simpleDictSelect style='layui-input-inline' type="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1"
id="teacherOpenCourseId" name="teacherOpenCourseId" value="${teacherOpenCourseChatLog.teacherOpenCourseId}" layVerify="" />
</div>
</div>
</div>
@ -20,15 +21,16 @@
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">班级ID</label>
<label class="layui-form-label">班级ID集合</label>
<div class="layui-input-inline">
<input type="text" id="schoolClassId" name="schoolClassId" value="${teacherOpenCourseChatLog.schoolClassId}" class="layui-input" >
<input type="text" id="schoolClassIds" name="schoolClassIds" value="${teacherOpenCourseChatLog.schoolClassIds}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">教师ID</label>
<div class="layui-input-inline">
<input type="text" id="teacherId" name="teacherId" value="${teacherOpenCourseChatLog.teacherId}" class="layui-input" >
<layui:simpleDictSelect style='layui-input-inline' type="teacher.teacher_name.teacher_status=1"
id="teacherId" name="teacherId" value="${teacherOpenCourseChatLog.teacherId}" layVerify="" />
</div>
</div>
</div>
@ -38,7 +40,8 @@
<div class="layui-inline">
<label class="layui-form-label">学生ID</label>
<div class="layui-input-inline">
<input type="text" id="studentId" name="studentId" value="${teacherOpenCourseChatLog.studentId}" class="layui-input" >
<layui:simpleDictSelect style='layui-input-inline' type="student.student_name.student_status=1"
id="studentId" name="studentId" value="${teacherOpenCourseChatLog.studentId}" layVerify="" />
</div>
</div>
<div class="layui-inline">
@ -73,20 +76,27 @@
<input type="text" id="chatFiles" name="chatFiles" value="${teacherOpenCourseChatLog.chatFiles}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">状态 1正常 2删除</label>
<div class="layui-input-inline">
<layui:simpleDictSelect style='layui-input-inline' type="global_status"
id="teacherOpenCourseChatLogStatus" name="teacherOpenCourseChatLogStatus" value="${teacherOpenCourseChatLog.teacherOpenCourseChatLogStatus}" layVerify="" />
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">组织ID</label>
<label class="layui-form-label">创建时间</label>
<div class="layui-input-inline">
<input type="text" id="orgId" name="orgId" value="${teacherOpenCourseChatLog.orgId}" class="layui-input" >
<input type="text" id="teacherOpenCourseChatLogAddTime" name="teacherOpenCourseChatLogAddTime" value="${teacherOpenCourseChatLog.teacherOpenCourseChatLogAddTime,"yyyy-MM-dd"}" class="layui-input input-date" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">用户ID</label>
<label class="layui-form-label">组织ID</label>
<div class="layui-input-inline">
<input type="text" id="userId" name="userId" value="${teacherOpenCourseChatLog.userId}" class="layui-input" >
<input type="text" id="orgId" name="orgId" value="${teacherOpenCourseChatLog.orgId}" class="layui-input" >
</div>
</div>
</div>
@ -94,15 +104,14 @@
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">创建时间</label>
<label class="layui-form-label">用户ID</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" value="${teacherOpenCourseChatLog.createTime,"yyyy-MM-dd"}" class="layui-input input-date" >
<input type="text" id="userId" name="userId" value="${teacherOpenCourseChatLog.userId}" class="layui-input" >
</div>
</div>
</div>
</div>
<!-- 业务对象须有hidden字段保存delFlag和version字段-->
<input type="hidden" name="delFlag" value=${teacherOpenCourseChatLog.delFlag} />
<input type="hidden" name="teacherOpenCourseChatLogId" value="${teacherOpenCourseChatLog.teacherOpenCourseChatLogId}" />
<layui:submitButtons id="addButton" buttonType="" showExamine="2" />
</form>

@ -12,7 +12,8 @@
<div class="layui-inline">
<label class="layui-form-label">课程开课ID</label>
<div class="layui-input-inline">
<input type="text" id="teacherOpenCourseId" name="teacherOpenCourseId" value="${teacherOpenCourseChatLog.teacherOpenCourseId}" class="layui-input" >
<layui:simpleDictSelect style='layui-input-inline' type="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1"
id="teacherOpenCourseId" name="teacherOpenCourseId" value="${teacherOpenCourseChatLog.teacherOpenCourseId}" layVerify="" />
</div>
</div>
</div>
@ -20,15 +21,16 @@
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">班级ID</label>
<label class="layui-form-label">班级ID集合</label>
<div class="layui-input-inline">
<input type="text" id="schoolClassId" name="schoolClassId" value="${teacherOpenCourseChatLog.schoolClassId}" class="layui-input" >
<input type="text" id="schoolClassIds" name="schoolClassIds" value="${teacherOpenCourseChatLog.schoolClassIds}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">教师ID</label>
<div class="layui-input-inline">
<input type="text" id="teacherId" name="teacherId" value="${teacherOpenCourseChatLog.teacherId}" class="layui-input" >
<layui:simpleDictSelect style='layui-input-inline' type="teacher.teacher_name.teacher_status=1"
id="teacherId" name="teacherId" value="${teacherOpenCourseChatLog.teacherId}" layVerify="" />
</div>
</div>
</div>
@ -38,7 +40,8 @@
<div class="layui-inline">
<label class="layui-form-label">学生ID</label>
<div class="layui-input-inline">
<input type="text" id="studentId" name="studentId" value="${teacherOpenCourseChatLog.studentId}" class="layui-input" >
<layui:simpleDictSelect style='layui-input-inline' type="student.student_name.student_status=1"
id="studentId" name="studentId" value="${teacherOpenCourseChatLog.studentId}" layVerify="" />
</div>
</div>
<div class="layui-inline">
@ -73,20 +76,27 @@
<input type="text" id="chatFiles" name="chatFiles" value="${teacherOpenCourseChatLog.chatFiles}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">状态 1正常 2删除</label>
<div class="layui-input-inline">
<layui:simpleDictSelect style='layui-input-inline' type="global_status"
id="teacherOpenCourseChatLogStatus" name="teacherOpenCourseChatLogStatus" value="${teacherOpenCourseChatLog.teacherOpenCourseChatLogStatus}" layVerify="" />
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">组织ID</label>
<label class="layui-form-label">创建时间</label>
<div class="layui-input-inline">
<input type="text" id="orgId" name="orgId" value="${teacherOpenCourseChatLog.orgId}" class="layui-input" >
<input type="text" id="teacherOpenCourseChatLogAddTime" name="teacherOpenCourseChatLogAddTime" value="${teacherOpenCourseChatLog.teacherOpenCourseChatLogAddTime,"yyyy-MM-dd"}" class="layui-input input-date" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">用户ID</label>
<label class="layui-form-label">组织ID</label>
<div class="layui-input-inline">
<input type="text" id="userId" name="userId" value="${teacherOpenCourseChatLog.userId}" class="layui-input" >
<input type="text" id="orgId" name="orgId" value="${teacherOpenCourseChatLog.orgId}" class="layui-input" >
</div>
</div>
</div>
@ -94,15 +104,14 @@
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">创建时间</label>
<label class="layui-form-label">用户ID</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" value="${teacherOpenCourseChatLog.createTime,"yyyy-MM-dd"}" class="layui-input input-date" >
<input type="text" id="userId" name="userId" value="${teacherOpenCourseChatLog.userId}" class="layui-input" >
</div>
</div>
</div>
</div>
<!-- 业务对象须有hidden字段保存delFlag和version字段-->
<input type="hidden" name="delFlag" value=${teacherOpenCourseChatLog.delFlag} />
<input type="hidden" name="teacherOpenCourseChatLogId" value="${teacherOpenCourseChatLog.teacherOpenCourseChatLogId}" />
<layui:submitButtons id="updateButton" buttonType="" showExamine="2" />
</form>

Loading…
Cancel
Save