This commit is contained in:
阿沐 2024-02-24 12:31:56 +08:00
parent 117501472c
commit 058d7045ec
3 changed files with 16 additions and 2 deletions

View File

@ -20,6 +20,8 @@ public interface SysPostService extends BaseService<SysPostEntity> {
List<SysPostVO> getList();
List<String> getNameList(List<Long> idList);
void save(SysPostVO vo);
void update(SysPostVO vo);

View File

@ -10,9 +10,9 @@ import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
import net.maku.system.convert.SysPostConvert;
import net.maku.system.dao.SysPostDao;
import net.maku.system.entity.SysPostEntity;
import net.maku.system.query.SysPostQuery;
import net.maku.system.service.SysPostService;
import net.maku.system.service.SysUserPostService;
import net.maku.system.query.SysPostQuery;
import net.maku.system.vo.SysPostVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -47,7 +47,16 @@ public class SysPostServiceImpl extends BaseServiceImpl<SysPostDao, SysPostEntit
return SysPostConvert.INSTANCE.convertList(entityList);
}
private Wrapper<SysPostEntity> getWrapper(SysPostQuery query){
@Override
public List<String> getNameList(List<Long> idList) {
if (idList.isEmpty()) {
return null;
}
return baseMapper.selectBatchIds(idList).stream().map(SysPostEntity::getPostName).toList();
}
private Wrapper<SysPostEntity> getWrapper(SysPostQuery query) {
LambdaQueryWrapper<SysPostEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.like(StrUtil.isNotBlank(query.getPostCode()), SysPostEntity::getPostCode, query.getPostCode());
wrapper.like(StrUtil.isNotBlank(query.getPostName()), SysPostEntity::getPostName, query.getPostName());

View File

@ -74,6 +74,9 @@ public class SysUserVO implements Serializable, TransPojo {
@Schema(description = "岗位ID列表")
private List<Long> postIdList;
@Schema(description = "岗位名称列表")
private List<String> postNameList;
@Schema(description = "超级管理员 0否 1")
private Integer superAdmin;