权限管理

This commit is contained in:
liulu
2024-12-06 16:39:30 +08:00
parent 04cfab2f82
commit 48fb1db044
11 changed files with 157 additions and 9 deletions
@@ -1,8 +1,13 @@
package com.sunyard.chsm.mapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunyard.chsm.model.entity.CryptoServiceApi;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.util.CollectionUtils;
import java.util.Collections;
import java.util.List;
/**
* @author liulu
@@ -10,4 +15,17 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface CryptoServiceApiMapper extends BaseMapper<CryptoServiceApi> {
default List<CryptoServiceApi> selectByServiceIds(List<Long> serviceIds) {
if (CollectionUtils.isEmpty(serviceIds)) {
return Collections.emptyList();
}
return selectList(
new LambdaQueryWrapper<CryptoServiceApi>()
.in(CryptoServiceApi::getCryptoServiceId, serviceIds)
);
}
}