package com.thhy.staff.modules.biz.group.service.impl;
|
|
import com.thhy.staff.modules.biz.group.entity.GroupUser;
|
import com.thhy.staff.modules.biz.group.mapper.GroupUserMapper;
|
import com.thhy.staff.modules.biz.group.service.GroupUserService;
|
import org.springframework.stereotype.Service;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.transaction.annotation.Transactional;
|
import java.io.Serializable;
|
import java.util.List;
|
|
/**
|
* 服务实现类
|
* @author zhang_xiao_bo
|
* @since 2023-03-31 15:00:54
|
*/
|
@Service
|
public class GroupUserServiceImpl implements GroupUserService {
|
|
|
|
@Autowired
|
private GroupUserMapper groupUserMapper;
|
|
public GroupUser get(Serializable id){
|
return groupUserMapper.queryById(id);
|
}
|
|
public List<GroupUser> findList(GroupUser groupUser){
|
return groupUserMapper.findList(groupUser);
|
}
|
|
/**
|
* 增加和修改
|
* @param groupUser
|
*/
|
@Transactional
|
public void addGroupUser(GroupUser groupUser){
|
if(groupUser.getId() == null){
|
//增加操作
|
groupUserMapper.insert(groupUser);
|
}else{
|
//修改操作
|
|
groupUserMapper.update(groupUser);
|
}
|
|
}
|
|
/**
|
* 修改
|
* @param groupUser
|
*/
|
public void update(GroupUser groupUser){
|
groupUserMapper.update(groupUser);
|
}
|
}
|