beetlsql3-dev
Mlxa0324 2 years ago
parent aebaab61c3
commit 08d160e113

@ -3,13 +3,14 @@ package com.ibeetl.jlw.entity;
import com.ibeetl.admin.core.annotation.Dict; import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity; import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig; import com.ibeetl.admin.core.util.ValidateConfig;
import lombok.Data;
import lombok.experimental.Accessors;
import org.beetl.sql.annotation.entity.AssignID; import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.fetch.annotation.Fetch; import org.beetl.sql.fetch.annotation.Fetch;
import org.beetl.sql.fetch.annotation.FetchSql; import org.beetl.sql.fetch.annotation.FetchSql;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.Date; import java.util.Date;
import java.util.Map;
/* /*
* -- * --
@ -37,7 +38,20 @@ public class TeacherMergeApplication extends BaseEntity{
@FetchSql("select resources_application_id, application_name, application_link, application_carousel, application_introduction, application_info, application_introduction_original, application_info_original " + @FetchSql("select resources_application_id, application_name, application_link, application_carousel, application_introduction, application_info, application_introduction_original, application_info_original " +
" from resources_application t where t.resources_application_id = #resourcesApplicationId# ") " from resources_application t where t.resources_application_id = #resourcesApplicationId# ")
private Map resourcesApplication; private ResourcesApplicationInfo resourcesApplication;
@Data
@Accessors(chain = true)
public static class ResourcesApplicationInfo {
private Long resourcesApplicationId;
private String applicationName;
private String applicationLink;
private String applicationCarousel;
private String applicationIntroduction;
private String applicationInfo;
private String applicationIntroductionOriginal;
private String applicationInfoOriginal;
}
//排序 //排序
@ -150,11 +164,11 @@ public class TeacherMergeApplication extends BaseEntity{
} }
public Map getResourcesApplication() { public ResourcesApplicationInfo getResourcesApplication() {
return resourcesApplication; return resourcesApplication;
} }
public void setResourcesApplication(Map resourcesApplication) { public void setResourcesApplication(ResourcesApplicationInfo resourcesApplication) {
this.resourcesApplication = resourcesApplication; this.resourcesApplication = resourcesApplication;
} }
} }

@ -3,6 +3,9 @@ package com.ibeetl.jlw.entity;
import com.ibeetl.admin.core.annotation.Dict; import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity; import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig; import com.ibeetl.admin.core.util.ValidateConfig;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.beetl.sql.annotation.entity.AssignID; import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.fetch.annotation.Fetch; import org.beetl.sql.fetch.annotation.Fetch;
import org.beetl.sql.fetch.annotation.FetchSql; import org.beetl.sql.fetch.annotation.FetchSql;
@ -45,20 +48,18 @@ public class TeacherOpenCourse extends BaseEntity{
private Integer teacherOpenCourseStatus ; private Integer teacherOpenCourseStatus ;
//教师ID外表可以直接使用。 @FetchSql("select t.teacher_id, teacher_open_course_merge_teacher_auth_code from teacher_open_course_merge_teacher t " +
@Dict(type="teacher.teacher_name.teacher_status=1")
@FetchSql("select teacher_id from teacher_open_course_merge_teacher t " +
"where t.teacher_open_course_id = #teacherOpenCourseId# and t.teacher_open_course_merge_teacher_status = 1 " + "where t.teacher_open_course_id = #teacherOpenCourseId# and t.teacher_open_course_merge_teacher_status = 1 " +
"order by teacher_id limit 1 ") "order by teacher_id limit 1 ")
private Long teacherId ; private MergeTeacherInfo teacherInfo;
// 开课授权码(外表)可以直接使用。
@FetchSql("select teacher_open_course_merge_teacher_auth_code from teacher_open_course_merge_teacher t " + @Setter
"where t.teacher_open_course_id = #teacherOpenCourseId# and t.teacher_open_course_merge_teacher_status = 1 " + @Getter
"order by teacher_id limit 1 ") @Accessors(chain = true)
private String teacherOpenCourseMergeTeacherAuthCode ; public static class MergeTeacherInfo {
private Long teacherId;
private String teacherOpenCourseMergeTeacherAuthCode;
}
//开课时间 //开课时间
@ -213,22 +214,6 @@ public class TeacherOpenCourse extends BaseEntity{
this.createTime = createTime; this.createTime = createTime;
} }
public Long getTeacherId() {
return teacherId;
}
public void setTeacherId(Long teacherId) {
this.teacherId = teacherId;
}
public String getTeacherOpenCourseMergeTeacherAuthCode() {
return teacherOpenCourseMergeTeacherAuthCode;
}
public void setTeacherOpenCourseMergeTeacherAuthCode(String teacherOpenCourseMergeTeacherAuthCode) {
this.teacherOpenCourseMergeTeacherAuthCode = teacherOpenCourseMergeTeacherAuthCode;
}
public String getTeacherOpenCourseSummary() { public String getTeacherOpenCourseSummary() {
return teacherOpenCourseSummary; return teacherOpenCourseSummary;
} }
@ -236,4 +221,12 @@ public class TeacherOpenCourse extends BaseEntity{
public void setTeacherOpenCourseSummary(String teacherOpenCourseSummary) { public void setTeacherOpenCourseSummary(String teacherOpenCourseSummary) {
this.teacherOpenCourseSummary = teacherOpenCourseSummary; this.teacherOpenCourseSummary = teacherOpenCourseSummary;
} }
public void setTeacherInfo(MergeTeacherInfo teacherInfo) {
this.teacherInfo = teacherInfo;
}
public MergeTeacherInfo getTeacherInfo() {
return teacherInfo;
}
} }

@ -3,13 +3,14 @@ package com.ibeetl.jlw.entity;
import com.ibeetl.admin.core.annotation.Dict; import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity; import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig; import com.ibeetl.admin.core.util.ValidateConfig;
import lombok.Data;
import lombok.experimental.Accessors;
import org.beetl.sql.annotation.entity.AssignID; import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.fetch.annotation.Fetch; import org.beetl.sql.fetch.annotation.Fetch;
import org.beetl.sql.fetch.annotation.FetchSql; import org.beetl.sql.fetch.annotation.FetchSql;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.Date; import java.util.Date;
import java.util.Map;
/* /*
* - * -
@ -34,9 +35,23 @@ public class TeacherOpenCourseMergeSchoolClass extends BaseEntity{
private Long teacherOpenCourseId ; private Long teacherOpenCourseId ;
@FetchSql("select teacher_open_course_code, teacher_open_course_cover,teacher_open_course_id,teacher_open_course_title " + @FetchSql("select teacher_open_course_id, teacher_open_course_title, teacher_open_course_code, " +
"from teacher_open_course t where t.teacher_open_course_id = #teacherOpenCourseId# ") "teacher_open_course_cover, teacher_open_course_summary, start_time,end_time,create_time " +
private Map teacherOpenCourse; "from teacher_open_course where teacher_open_course_status = 1 and teacher_open_course_id = #teacherOpenCourseId# ")
private TeacherOpenCourseInfo teacherOpenCourse;
@Data
@Accessors(chain = true)
public static class TeacherOpenCourseInfo {
private Long teacherOpenCourseId;
private String teacherOpenCourseTitle;
private String teacherOpenCourseCode;
private String teacherOpenCourseCover;
private String teacherOpenCourseSummary;
private Date startTime;
private Date endTime;
private Date createTime;
}
//班级ID //班级ID
@Dict(type="school_class.class_name.class_status=1") @Dict(type="school_class.class_name.class_status=1")
@ -153,11 +168,11 @@ public class TeacherOpenCourseMergeSchoolClass extends BaseEntity{
public void setUserId(Long userId){ public void setUserId(Long userId){
this.userId = userId; this.userId = userId;
} }
public Map getTeacherOpenCourse() { public TeacherOpenCourseInfo getTeacherOpenCourse() {
return teacherOpenCourse; return teacherOpenCourse;
} }
public void setTeacherOpenCourse(Map teacherOpenCourse) { public void setTeacherOpenCourse(TeacherOpenCourseInfo teacherOpenCourse) {
this.teacherOpenCourse = teacherOpenCourse; this.teacherOpenCourse = teacherOpenCourse;
} }

@ -3,13 +3,14 @@ package com.ibeetl.jlw.entity;
import com.ibeetl.admin.core.annotation.Dict; import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity; import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig; import com.ibeetl.admin.core.util.ValidateConfig;
import lombok.Data;
import lombok.experimental.Accessors;
import org.beetl.sql.annotation.entity.AssignID; import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.fetch.annotation.Fetch; import org.beetl.sql.fetch.annotation.Fetch;
import org.beetl.sql.fetch.annotation.FetchSql; import org.beetl.sql.fetch.annotation.FetchSql;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.Date; import java.util.Date;
import java.util.Map;
/* /*
* -- * --
@ -33,7 +34,20 @@ public class TeacherOpenCourseMergeTeacher extends BaseEntity{
@FetchSql("select teacher_open_course_id, teacher_open_course_title, teacher_open_course_code, " + @FetchSql("select teacher_open_course_id, teacher_open_course_title, teacher_open_course_code, " +
"teacher_open_course_cover, teacher_open_course_summary, start_time,end_time,create_time " + "teacher_open_course_cover, teacher_open_course_summary, start_time,end_time,create_time " +
"from teacher_open_course where teacher_open_course_status = 1 and teacher_open_course_id = #teacherOpenCourseId# ") "from teacher_open_course where teacher_open_course_status = 1 and teacher_open_course_id = #teacherOpenCourseId# ")
private Map teacherOpenCourse; private TeacherOpenCourseInfo teacherOpenCourse;
@Data
@Accessors(chain = true)
public static class TeacherOpenCourseInfo {
private String teacherOpenCourseId;
private String teacherOpenCourseTitle;
private String teacherOpenCourseCode;
private String teacherOpenCourseCover;
private String teacherOpenCourseSummary;
private Date startTime;
private Date endTime;
private Date createTime;
}
//教师ID //教师ID
@Dict(type="teacher.teacher_name.teacher_status=1") @Dict(type="teacher.teacher_name.teacher_status=1")
@ -163,11 +177,11 @@ public class TeacherOpenCourseMergeTeacher extends BaseEntity{
this.teacherOpenCourseMergeTeacherAuthCode = teacherOpenCourseMergeTeacherAuthCode; this.teacherOpenCourseMergeTeacherAuthCode = teacherOpenCourseMergeTeacherAuthCode;
} }
public Map getTeacherOpenCourse() { public TeacherOpenCourseInfo getTeacherOpenCourse() {
return teacherOpenCourse; return teacherOpenCourse;
} }
public void setTeacherOpenCourse(Map teacherOpenCourse) { public void setTeacherOpenCourse(TeacherOpenCourseInfo teacherOpenCourse) {
this.teacherOpenCourse = teacherOpenCourse; this.teacherOpenCourse = teacherOpenCourse;
} }
} }

@ -103,9 +103,9 @@ public class TeacherOpenCourseService extends CoreBaseService<TeacherOpenCourse>
teacherOpenCourseDao.insert(teacherOpenCourse); teacherOpenCourseDao.insert(teacherOpenCourse);
// 开课和教师关联数据 // 开课和教师关联数据
if (ObjectUtil.isNotEmpty(teacherOpenCourse.getTeacherId())) { if (ObjectUtil.isNotEmpty(teacherOpenCourse.getTeacherInfo().getTeacherId())) {
TeacherOpenCourseMergeTeacher teacherOpenCourseMergeTeacher = new TeacherOpenCourseMergeTeacher(); TeacherOpenCourseMergeTeacher teacherOpenCourseMergeTeacher = new TeacherOpenCourseMergeTeacher();
teacherOpenCourseMergeTeacher.setTeacherId(teacherOpenCourse.getTeacherId()); teacherOpenCourseMergeTeacher.setTeacherId(teacherOpenCourse.getTeacherInfo().getTeacherId());
teacherOpenCourseMergeTeacher.setTeacherOpenCourseId(teacherOpenCourse.getTeacherOpenCourseId()); teacherOpenCourseMergeTeacher.setTeacherOpenCourseId(teacherOpenCourse.getTeacherOpenCourseId());
teacherOpenCourseMergeTeacher.setTeacherOpenCourseMergeTeacherAddTime(new Date()); teacherOpenCourseMergeTeacher.setTeacherOpenCourseMergeTeacherAddTime(new Date());
teacherOpenCourseMergeTeacher.setTeacherOpenCourseMergeTeacherStatus(1); teacherOpenCourseMergeTeacher.setTeacherOpenCourseMergeTeacherStatus(1);

@ -141,7 +141,7 @@ public class TeacherOpenCourseQuery extends PageParam {
pojo.setOrgId(this.getOrgId()); pojo.setOrgId(this.getOrgId());
pojo.setUserId(this.getUserId()); pojo.setUserId(this.getUserId());
pojo.setCreateTime(this.getCreateTime()); pojo.setCreateTime(this.getCreateTime());
pojo.setTeacherId(this.getTeacherId()); pojo.setTeacherInfo(new TeacherOpenCourse.MergeTeacherInfo().setTeacherId(this.getTeacherId()));
return pojo; return pojo;
} }

Loading…
Cancel
Save