|
|
@ -6,8 +6,10 @@ import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
import com.ibeetl.jlw.dao.CourseLabelDao;
|
|
|
|
import com.ibeetl.jlw.dao.CourseLabelDao;
|
|
|
|
import com.ibeetl.jlw.entity.CourseLabel;
|
|
|
|
import com.ibeetl.jlw.entity.CourseLabel;
|
|
|
|
import com.ibeetl.jlw.web.query.CourseLabelQuery;
|
|
|
|
import com.ibeetl.jlw.web.query.CourseLabelQuery;
|
|
|
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
import org.beetl.sql.core.SqlId;
|
|
|
|
import org.beetl.sql.core.SqlId;
|
|
|
|
import org.beetl.sql.core.engine.PageQuery;
|
|
|
|
import org.beetl.sql.core.engine.PageQuery;
|
|
|
|
|
|
|
|
import org.beetl.sql.core.page.PageResult;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@ -15,27 +17,24 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* CourseLabel Service
|
|
|
|
* CourseLabel Service
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
@Transactional
|
|
|
|
@Transactional
|
|
|
|
public class CourseLabelService extends CoreBaseService<CourseLabel>{
|
|
|
|
public class CourseLabelService extends CoreBaseService<CourseLabel> {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired private CourseLabelDao courseLabelDao;
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private CourseLabelDao courseLabelDao;
|
|
|
|
|
|
|
|
|
|
|
|
public PageQuery<CourseLabel>queryByCondition(PageQuery query){
|
|
|
|
public PageQuery<CourseLabel> queryByCondition(PageQuery query) {
|
|
|
|
PageQuery ret = courseLabelDao.queryByCondition(query);
|
|
|
|
PageQuery ret = courseLabelDao.queryByCondition(query);
|
|
|
|
queryListAfter(ret.getList());
|
|
|
|
queryListAfter(ret.getList());
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void deleteCourseLabel(String ids){
|
|
|
|
public void deleteCourseLabel(String ids) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
courseLabelDao.deleteCourseLabelByIds(ids);
|
|
|
|
courseLabelDao.deleteCourseLabelByIds(ids);
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
@ -43,12 +42,13 @@ public class CourseLabelService extends CoreBaseService<CourseLabel>{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<CourseLabel> getValues (Object paras){
|
|
|
|
public List<CourseLabel> getValues(Object paras) {
|
|
|
|
List<CourseLabel> list = sqlManager.select(SqlId.of("jlw.courseLabel.getCourseLabelValues"), CourseLabel.class, paras);
|
|
|
|
List<CourseLabel> list = sqlManager.select(SqlId.of("jlw.courseLabel.getCourseLabelValues"), CourseLabel.class, paras);
|
|
|
|
dictParser(list);
|
|
|
|
dictParser(list);
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public List<CourseLabel> getValuesByQueryNotWithPermission (CourseLabelQuery query){
|
|
|
|
|
|
|
|
|
|
|
|
public List<CourseLabel> getValuesByQueryNotWithPermission(CourseLabelQuery query) {
|
|
|
|
List<CourseLabel> list = courseLabelDao.getValuesByQueryNotWithPermission(query);
|
|
|
|
List<CourseLabel> list = courseLabelDao.getValuesByQueryNotWithPermission(query);
|
|
|
|
dictParser(list);
|
|
|
|
dictParser(list);
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
@ -56,10 +56,15 @@ public class CourseLabelService extends CoreBaseService<CourseLabel>{
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取course_label_type字段去重
|
|
|
|
* 获取course_label_type字段去重
|
|
|
|
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public List<String> disLabelType() {
|
|
|
|
public List<String> disLabelType() {
|
|
|
|
return courseLabelDao.createLambdaQuery().distinct().select(String.class, "course_label_type");
|
|
|
|
return courseLabelDao.createLambdaQuery().distinct().select(String.class, "course_label_type");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public CourseLabel getOnce(CourseLabel courseLabel) {
|
|
|
|
|
|
|
|
PageResult<CourseLabel> page = courseLabelDao.createLambdaQuery().addParam(courseLabel).page(1, 1);
|
|
|
|
|
|
|
|
return CollectionUtils.isEmpty(page.getList()) ? null : page.getList().get(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|