All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.base4j.mvc.sys.service.impl.SysAccountRoleServiceImpl Maven / Gradle / Ivy

The newest version!
package com.base4j.mvc.sys.service.impl;

import com.base4j.mvc.base.service.impl.BaseServiceImpl;
import com.base4j.mvc.sys.entity.SysUserRole;
import com.base4j.mvc.sys.service.SysAccountRoleService;
import com.base4j.mybatis.base.QueryParams;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysAccountRoleServiceImpl extends BaseServiceImpl implements SysAccountRoleService {


    @Override
    public void saveUserRole(List userRoleList) {
        QueryParams queryParams = new QueryParams(SysUserRole.class);
        QueryParams.Criteria criteria = queryParams.createCriteria();
        criteria.andEqualTo("sysUserId", userRoleList.get(0).getSysUserId());
        super.deleteByParams(queryParams);
        super.insertList(userRoleList);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy