com.base4j.mvc.sys.service.impl.SysAccountRoleServiceImpl Maven / Gradle / Ivy
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);
}
}