|
|
|
@ -10,7 +10,6 @@ import cn.jlw.util.ToolUtils;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.Master;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreBaseService;
|
|
|
|
|
import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
@ -27,8 +26,8 @@ import com.ibeetl.jlw.web.query.TeacherOpenCourseScheduleSessionQuery;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.beetl.sql.core.SqlId;
|
|
|
|
|
import org.beetl.sql.core.engine.PageQuery;
|
|
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
@ -45,14 +44,11 @@ import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN;
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
@DSTransactional
|
|
|
|
|
@Transactional
|
|
|
|
|
public class TeacherOpenCourseScheduleSessionService extends CoreBaseService<TeacherOpenCourseScheduleSession>{
|
|
|
|
|
|
|
|
|
|
@Resource private TeacherOpenCourseScheduleSessionDao teacherOpenCourseScheduleSessionDao;
|
|
|
|
|
|
|
|
|
|
@Lazy
|
|
|
|
|
@Resource TeacherOpenCourseScheduleSessionService teacherOpenCourseScheduleSessionService;
|
|
|
|
|
|
|
|
|
|
@Master
|
|
|
|
|
public PageQuery<TeacherOpenCourseScheduleSession>queryByCondition(PageQuery query){
|
|
|
|
|
PageQuery ret = teacherOpenCourseScheduleSessionDao.queryByCondition(query);
|
|
|
|
@ -108,7 +104,7 @@ public class TeacherOpenCourseScheduleSessionService extends CoreBaseService<Tea
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Master
|
|
|
|
|
public JsonResult add(TeacherOpenCourseScheduleSessionQuery teacherOpenCourseScheduleSessionQuery){
|
|
|
|
|
public JsonResult add(TeacherOpenCourseScheduleSessionQuery teacherOpenCourseScheduleSessionQuery) {
|
|
|
|
|
String msg = "";
|
|
|
|
|
TeacherOpenCourseScheduleSession teacherOpenCourseScheduleSession = teacherOpenCourseScheduleSessionQuery.pojo();
|
|
|
|
|
teacherOpenCourseScheduleSessionDao.insert(teacherOpenCourseScheduleSession);
|
|
|
|
@ -117,11 +113,13 @@ public class TeacherOpenCourseScheduleSessionService extends CoreBaseService<Tea
|
|
|
|
|
jsonResult.setData(teacherOpenCourseScheduleSession.getTeacherOpenCourseScheduleSessionId());//自增的ID丢进去
|
|
|
|
|
jsonResult.setCode(JsonReturnCode.SUCCESS.getCode());
|
|
|
|
|
jsonResult.setMsg(msg);
|
|
|
|
|
// 自己类调用自己类的方法,是支持回滚的
|
|
|
|
|
// mAdd(teacherOpenCourseScheduleSessionQuery);
|
|
|
|
|
return jsonResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DS("ds2")
|
|
|
|
|
public JsonResult mAdd(TeacherOpenCourseScheduleSessionQuery teacherOpenCourseScheduleSessionQuery){
|
|
|
|
|
public JsonResult mAdd(TeacherOpenCourseScheduleSessionQuery teacherOpenCourseScheduleSessionQuery) throws RuntimeException{
|
|
|
|
|
String msg = "";
|
|
|
|
|
TeacherOpenCourseScheduleSession teacherOpenCourseScheduleSession = teacherOpenCourseScheduleSessionQuery.pojo();
|
|
|
|
|
teacherOpenCourseScheduleSessionDao.insert(teacherOpenCourseScheduleSession);
|
|
|
|
|