68 lines
2.3 KiB
Java
68 lines
2.3 KiB
Java
package com.engine.salary.biz;
|
|
|
|
import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
|
|
import com.engine.salary.mapper.salarysob.SalarySobRangeMapper;
|
|
import org.apache.ibatis.session.SqlSession;
|
|
import weaver.conn.mybatis.MyBatisFactory;
|
|
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
|
|
public class SalarySobRangeBiz {
|
|
|
|
|
|
public List<SalarySobRangePO> listSome(SalarySobRangePO build) {
|
|
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
|
try {
|
|
SalarySobRangeMapper mapper = sqlSession.getMapper(SalarySobRangeMapper.class);
|
|
return mapper.listSome(build);
|
|
} finally {
|
|
sqlSession.close();
|
|
}
|
|
}
|
|
|
|
public void batchInsert(Collection<SalarySobRangePO> needInsertSalarySobRanges) {
|
|
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
|
try {
|
|
SalarySobRangeMapper mapper = sqlSession.getMapper(SalarySobRangeMapper.class);
|
|
mapper.batchInsert(needInsertSalarySobRanges);
|
|
sqlSession.commit();
|
|
} finally {
|
|
sqlSession.close();
|
|
}
|
|
}
|
|
|
|
public void updateById(SalarySobRangePO po) {
|
|
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
|
try {
|
|
SalarySobRangeMapper mapper = sqlSession.getMapper(SalarySobRangeMapper.class);
|
|
mapper.updateIgnoreNull(po);
|
|
sqlSession.commit();
|
|
} finally {
|
|
sqlSession.close();
|
|
}
|
|
}
|
|
|
|
public void deleteByIds(Collection<Long> ids) {
|
|
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
|
try {
|
|
SalarySobRangeMapper mapper = sqlSession.getMapper(SalarySobRangeMapper.class);
|
|
mapper.deleteByIds(ids);
|
|
sqlSession.commit();
|
|
} finally {
|
|
sqlSession.close();
|
|
}
|
|
}
|
|
|
|
public void deleteBySalarySobIds(Collection<Long> salarySobIds) {
|
|
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
|
try {
|
|
SalarySobRangeMapper mapper = sqlSession.getMapper(SalarySobRangeMapper.class);
|
|
mapper.deleteBySalarySobIds(salarySobIds);
|
|
sqlSession.commit();
|
|
} finally {
|
|
sqlSession.close();
|
|
}
|
|
}
|
|
}
|