beetlsql3-dev
Mlxa0324 3 years ago
parent c2d2486500
commit 2f60209555

@ -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);
@ -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);

@ -160,7 +160,7 @@ public class TeacherOpenCourseScheduleSessionController{
teacherOpenCourseScheduleSessionQuery.setTeacherOpenCourseScheduleSessionStatus(1);
}
teacherOpenCourseScheduleSessionService.add(teacherOpenCourseScheduleSessionQuery);
teacherOpenCourseScheduleSessionService.mAdd(teacherOpenCourseScheduleSessionQuery);
// teacherOpenCourseScheduleSessionService.mAdd(teacherOpenCourseScheduleSessionQuery);
return JsonResult.success();
}
}

@ -12,7 +12,8 @@ admin.isOnline=false
spring.cache.type=simple
logging.level.root=info
logging.level.root=INFO
#logging.level.root=DEBUG
logging.level.org.springframework.web=DEBUG
logging.level.org.springframework.web.servlet.mvc.method.annotation=DEBUG
logging.file = my.log

Loading…
Cancel
Save