|
|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
package cn.iocoder.mall.systemservice.dal.mysql.mapper.permission;
|
|
|
|
|
|
|
|
|
|
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.AccountRoleDO;
|
|
|
|
|
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.AdminRoleDO;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
@ -10,22 +10,22 @@ import java.util.Collection;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@Repository
|
|
|
|
|
public interface AccountRoleMapper extends BaseMapper<AccountRoleDO> {
|
|
|
|
|
public interface AccountRoleMapper extends BaseMapper<AdminRoleDO> {
|
|
|
|
|
|
|
|
|
|
default List<AccountRoleDO> selectByAccountId(Integer accountId) {
|
|
|
|
|
return selectList(new QueryWrapper<AccountRoleDO>().eq("account_id", accountId));
|
|
|
|
|
default List<AdminRoleDO> selectByAccountId(Integer accountId) {
|
|
|
|
|
return selectList(new QueryWrapper<AdminRoleDO>().eq("account_id", accountId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default List<AccountRoleDO> selectListByAccountIds(Collection<Integer> accountIds) {
|
|
|
|
|
return selectList(new QueryWrapper<AccountRoleDO>().in("account_id", accountIds));
|
|
|
|
|
default List<AdminRoleDO> selectListByAccountIds(Collection<Integer> accountIds) {
|
|
|
|
|
return selectList(new QueryWrapper<AdminRoleDO>().in("account_id", accountIds));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default int deleteByAccountId(Integer accountId) {
|
|
|
|
|
return delete(new QueryWrapper<AccountRoleDO>().eq("account_id", accountId));
|
|
|
|
|
return delete(new QueryWrapper<AdminRoleDO>().eq("account_id", accountId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default int deleteByRoleId(Integer roleId) {
|
|
|
|
|
return delete(new QueryWrapper<AccountRoleDO>().eq("role_id", roleId));
|
|
|
|
|
return delete(new QueryWrapper<AdminRoleDO>().eq("role_id", roleId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -33,6 +33,6 @@ public interface AccountRoleMapper extends BaseMapper<AccountRoleDO> {
|
|
|
|
|
*
|
|
|
|
|
* @param accountRoleDOs 数组
|
|
|
|
|
*/
|
|
|
|
|
int insertList(@Param("accountRoleDOs") List<AccountRoleDO> accountRoleDOs);
|
|
|
|
|
int insertList(@Param("accountRoleDOs") List<AdminRoleDO> accountRoleDOs);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|