1
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package com.peanut.modules.sociology.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.common.entity.CourseSociologyEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CourseSociologyService extends IService<CourseSociologyEntity> {
|
||||
|
||||
List<CourseSociologyEntity> getSociologyLabels(Integer id);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.peanut.modules.sociology.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.common.dao.CourseSociologyDao;
|
||||
import com.peanut.modules.common.entity.CourseSociologyEntity;
|
||||
import com.peanut.modules.sociology.service.CourseSociologyService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service("sociologyCourseSociologyService")
|
||||
public class CourseSociologyServiceImpl extends ServiceImpl<CourseSociologyDao, CourseSociologyEntity> implements CourseSociologyService {
|
||||
|
||||
@Override
|
||||
public List<CourseSociologyEntity> getSociologyLabels(Integer id) {
|
||||
LambdaQueryWrapper<CourseSociologyEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CourseSociologyEntity::getPid,id);
|
||||
wrapper.orderByAsc(CourseSociologyEntity::getSort);
|
||||
List<CourseSociologyEntity> list = this.list(wrapper);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user