You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB
Java

package com.ibeetl.jlw.service;
import com.ibeetl.admin.core.service.CoreBaseService;
import com.ibeetl.admin.core.util.PlatformException;
import com.ibeetl.jlw.dao.CourseLabelDao;
import com.ibeetl.jlw.entity.CourseLabel;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* CourseLabel Service
*/
@Service
@Transactional
public class CourseLabelService extends CoreBaseService<CourseLabel>{
@Resource private CourseLabelDao courseLabelDao;
public PageQuery<CourseLabel>queryByCondition(PageQuery query){
PageQuery ret = courseLabelDao.queryByCondition(query);
queryListAfter(ret.getList());
return ret;
}
public void deleteCourseLabel(String ids){
try {
courseLabelDao.deleteCourseLabelByIds(ids);
} catch (Exception e) {
throw new PlatformException("批量删除CourseLabel失败", e);
}
}
public List<CourseLabel> getValues (Object paras){
return sqlManager.select(SqlId.of("jlw.courseLabel.getCourseLabelValues"),CourseLabel.class,paras);
}
/**
* 获取course_label_type字段去重
* @return
*/
public List<String> disLabelType() {
return courseLabelDao.createLambdaQuery().distinct().select(String.class, "course_label_type");
}
}