Commit d3529fda authored by 李博今's avatar 李博今

Merge branch 'V2.0.3' of http://103.249.252.28:90/lcy/education

parents 5dca11ad 5401980c
...@@ -161,8 +161,7 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -161,8 +161,7 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation(value="根据条件分页查询", notes="根据URL中的参数分页查询") @ApiOperation(value="根据条件分页查询", notes="根据URL中的参数分页查询")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar"), @ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonName", value = "课程名称", required = false, dataType = "varchar"), @ApiImplicitParam(name = "condition", value = "模糊查询条件", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "directionId", value = "课程方向ID", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "classHour", value = "课时", required = false, dataType = "varchar"), @ApiImplicitParam(name = "classHour", value = "课时", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "credits", value = "学分", required = false, dataType = "varchar")}) @ApiImplicitParam(name = "credits", value = "学分", required = false, dataType = "varchar")})
@GetMapping(value = "/queryBLessonsByPagination") @GetMapping(value = "/queryBLessonsByPagination")
......
...@@ -30,9 +30,8 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -30,9 +30,8 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"left join b_lesson_direction bld on bld.lession_id = b.business_id " + "left join b_lesson_direction bld on bld.lession_id = b.business_id " +
"left join b_direction bd on bd.business_id = bld.direction_id "+ "left join b_direction bd on bd.business_id = bld.direction_id "+
"where b.del_flag != 1 and b.flag = 1 " + "where b.del_flag != 1 and b.flag = 1 " +
"<if test=\"lessonName!=null and lessonName != ''\">and b.`lesson_name` LIKE CONCAT('%',#{lessonName},'%') </if>"+
"<if test=\"directionId!=null and directionId != ''\">and bld.direction_id = #{directionId} </if>"+ "<if test=\"directionId!=null and directionId != ''\">and bld.direction_id = #{directionId} </if>"+
"<if test=\"code!=null and code != ''\">and b.`code` LIKE CONCAT('%',#{code},'%') </if></script>") "<if test=\"condition!=null and condition != ''\">and b.`code` LIKE CONCAT('%',#{condition},'%') or b.lesson_name LIKE CONCAT('%',#{condition},'%') </if></script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
List<BLesson> queryBLessons(BLesson param); List<BLesson> queryBLessons(BLesson param);
......
...@@ -51,6 +51,9 @@ public class BLesson extends IdEntity<BLesson> { ...@@ -51,6 +51,9 @@ public class BLesson extends IdEntity<BLesson> {
@Transient @Transient
private String chapterClassHour;//目前已添加总学时 private String chapterClassHour;//目前已添加总学时
@Transient
private String condition;//模糊查询条件
public BLesson(String code) { public BLesson(String code) {
this.code = code; this.code = code;
} }
......
...@@ -114,6 +114,9 @@ public class BRoomsController extends FileController<BRooms> { ...@@ -114,6 +114,9 @@ public class BRoomsController extends FileController<BRooms> {
} }
@ApiOperation(value="查看 集合", notes="查看单 集合") @ApiOperation(value="查看 集合", notes="查看单 集合")
@ApiImplicitParams({
@ApiImplicitParam(name = "condition", value = "condition", required = false, dataType = "varchar")
})
@GetMapping(value = "/queryBRoomsByPagination") @GetMapping(value = "/queryBRoomsByPagination")
public GridModel listByPagination(BRooms bRooms) { public GridModel listByPagination(BRooms bRooms) {
bRooms.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID)); bRooms.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID));
......
...@@ -23,8 +23,7 @@ public interface BRoomsRepository extends BaseMapper<BRooms> { ...@@ -23,8 +23,7 @@ public interface BRoomsRepository extends BaseMapper<BRooms> {
*/ */
@Select("<script>select * from b_rooms where 1=1 " @Select("<script>select * from b_rooms where 1=1 "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> " + "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"classroomName !=null and classroomName != '' \">and classroom_name like concat(concat(\"%\",#{classroomName}),\"%\") </if> " + "<if test=\"condition !=null and condition != '' \">and classroom_name like concat(concat(\"%\",#{condition}),\"%\") or code like concat(concat(\"%\",#{condition}),\"%\") </if> "
+ "<if test=\"code !=null and code != '' \">and code like concat(concat(\"%\",#{code}),\"%\") </if> "
+ "<if test=\"category !=null and category != '' \">and category = #{category} </if> " + "<if test=\"category !=null and category != '' \">and category = #{category} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> " + "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "order by create_date desc" + "order by create_date desc"
......
...@@ -69,6 +69,9 @@ public class BRooms extends IdEntity<BRooms> { ...@@ -69,6 +69,9 @@ public class BRooms extends IdEntity<BRooms> {
@Transient @Transient
private String transitCategory; private String transitCategory;
@Transient
private String condition;//模糊查询条件
public BRooms(String code) { public BRooms(String code) {
this.code = code; this.code = code;
} }
......
...@@ -89,7 +89,7 @@ public class BStudentController extends PaginationController<BStudent> { ...@@ -89,7 +89,7 @@ public class BStudentController extends PaginationController<BStudent> {
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询学生信息") @ApiOperation(value="根据条件分页查询", notes="根据条件分页查询学生信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "学号", required = false, dataType = "varchar"), @ApiImplicitParam(name = "condition", value = "模糊查询条件", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"), @ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"),
......
...@@ -32,8 +32,7 @@ public interface BStudentRepository extends BaseMapper<BStudent> { ...@@ -32,8 +32,7 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
"LEFT JOIN s_user u ON b.`code` = u.login_name\n" + "LEFT JOIN s_user u ON b.`code` = u.login_name\n" +
"LEFT JOIN b_grade bg ON b.grade_code = bg.`code`\n" + "LEFT JOIN b_grade bg ON b.grade_code = bg.`code`\n" +
"where b.del_flag != 1 and b.flag = 1 "+ "where b.del_flag != 1 and b.flag = 1 "+
"<if test=\"name!=null and name != ''\">and u.`name` like CONCAT('%',#{name},'%') </if>"+ "<if test=\"condition!=null and condition != ''\">and u.`name` like CONCAT('%',#{condition},'%') or b.`code` like CONCAT('%',#{condition},'%') </if>"+
"<if test=\"code!=null and code != ''\">and b.`code` like CONCAT('%',#{code},'%') </if>" +
"order by b.grade_code desc" + "order by b.grade_code desc" +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap" ) @ResultMap(value = "BaseResultMap" )
......
...@@ -86,5 +86,9 @@ public class BStudent extends IdEntity<BStudent> { ...@@ -86,5 +86,9 @@ public class BStudent extends IdEntity<BStudent> {
/**年级名称*/ /**年级名称*/
@Transient @Transient
private String gradeName; private String gradeName;
@Transient
private String condition;//模糊查询条件
} }
...@@ -102,7 +102,7 @@ public class BTeacherController extends PaginationController<BTeacher> { ...@@ -102,7 +102,7 @@ public class BTeacherController extends PaginationController<BTeacher> {
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询教师信息") @ApiOperation(value="根据条件分页查询", notes="根据条件分页查询教师信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "教师工号", required = false, dataType = "varchar"), @ApiImplicitParam(name = "condition", value = "模糊查询条件", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"), @ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"),
......
...@@ -16,7 +16,7 @@ public interface BTeacherRepository extends BaseMapper<BTeacher> { ...@@ -16,7 +16,7 @@ public interface BTeacherRepository extends BaseMapper<BTeacher> {
/** /**
* 根据条件查找 * 根据条件查找
* @param param * @param model
* @return * @return
*/ */
@Select("<script>SELECT b.`business_id`,b.`is_recommend`,b.`recommend_date`,b.`recommend_order`,b.`recommend_course`,b.`code`,\n" + @Select("<script>SELECT b.`business_id`,b.`is_recommend`,b.`recommend_date`,b.`recommend_order`,b.`recommend_course`,b.`code`,\n" +
...@@ -26,11 +26,10 @@ public interface BTeacherRepository extends BaseMapper<BTeacher> { ...@@ -26,11 +26,10 @@ public interface BTeacherRepository extends BaseMapper<BTeacher> {
"LEFT JOIN s_user u ON b.`code` = u.login_name\n" + "LEFT JOIN s_user u ON b.`code` = u.login_name\n" +
"LEFT JOIN b_agency ba ON b.agency_code = ba.`code`\n" + "LEFT JOIN b_agency ba ON b.agency_code = ba.`code`\n" +
"where b.del_flag != 1" + "where b.del_flag != 1" +
"<if test=\"name!=null\">and u.`name` like #{name}</if>"+ "<if test=\"condition != null and condition != ''\">and u.`name` like CONCAT('%',#{condition},'%') or b.`code` like CONCAT('%',#{condition},'%')</if>"+
"<if test=\"code!=null\">and b.`code` like #{code}</if>" +
"<if test=\"teacherCode!=null\">and b.`code` != #{teacherCode}</if></script>") "<if test=\"teacherCode!=null\">and b.`code` != #{teacherCode}</if></script>")
@ResultMap(value = "BaseResultMap" ) @ResultMap(value = "BaseResultMap" )
List<BTeacher> queryBTeachers(Map<String, Object> param); List<BTeacher> queryBTeachers(BTeacher model);
@Insert("<script>INSERT INTO b_teacher" + @Insert("<script>INSERT INTO b_teacher" +
"(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,code,agency_code)VALUES" + "(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,code,agency_code)VALUES" +
......
...@@ -72,6 +72,8 @@ public class BTeacher extends IdEntity<BTeacher> { ...@@ -72,6 +72,8 @@ public class BTeacher extends IdEntity<BTeacher> {
@Transient @Transient
private String agencyName; private String agencyName;
@Transient
private String condition;//模糊查询条件
public BTeacher(String code, String agencyCode) { public BTeacher(String code, String agencyCode) {
this.code = code; this.code = code;
......
...@@ -66,12 +66,13 @@ public class BTeacherServiceImpl implements BTeacherService { ...@@ -66,12 +66,13 @@ public class BTeacherServiceImpl implements BTeacherService {
@Override @Override
public List<BTeacher> queryBTeachersByPagination(PageUtil pageUtil, BTeacher model) { public List<BTeacher> queryBTeachersByPagination(PageUtil pageUtil, BTeacher model) {
return bTeacherRepository.queryBTeachers(queryParamHandler(model)); return bTeacherRepository.queryBTeachers(model);
} }
@Override @Override
public List<BTeacher> queryBTeachers(BTeacher model) { public List<BTeacher> queryBTeachers(BTeacher model) {
return bTeacherRepository.queryBTeachers(queryParamHandler(model)); return bTeacherRepository.queryBTeachers(model);
// return bTeacherRepository.queryBTeachers(queryParamHandler(model));
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment