package com.hx.other.service.service.impl;
|
|
import javax.annotation.Resource;
|
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import com.hx.exception.TipsException;
|
import com.hx.other.service.dao.mapper.OrdersTotalMapper;
|
import com.hx.other.service.model.OrdersTotal;
|
import com.hx.other.service.service.OrdersTotalService;
|
import com.hx.mybatisTool.SqlSentence;
|
import java.util.List;
|
import java.util.Map;
|
|
@Transactional
|
@Service
|
public class OrdersTotalServiceImpl implements OrdersTotalService {
|
|
@Resource
|
private OrdersTotalMapper ordersTotalMapper;
|
|
/**查询列表*/
|
@Override
|
public List<OrdersTotal> selectList(SqlSentence sqlSentence) {
|
return ordersTotalMapper.selectList(sqlSentence);
|
}
|
|
/**查询列表*/
|
@Override
|
public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) {
|
return ordersTotalMapper.selectListMap(sqlSentence);
|
}
|
|
/**查询单个*/
|
@Override
|
public OrdersTotal selectOne(SqlSentence sqlSentence) {
|
return ordersTotalMapper.selectOne(sqlSentence);
|
}
|
|
/**查询单个*/
|
@Override
|
public Map<String,Object> selectOneMap(SqlSentence sqlSentence) {
|
return ordersTotalMapper.selectOneMap(sqlSentence);
|
}
|
|
/**查询单个,大数据不拿取*/
|
@Override
|
public OrdersTotal selectOneByKey(Object object) {
|
return ordersTotalMapper.selectOneByKey(object);
|
}
|
|
/**查询单个,大数据拿取*/
|
@Override
|
public OrdersTotal selectOneByKeyBlob(Object object) {
|
return ordersTotalMapper.selectOneByKeyBlob(object);
|
}
|
|
/**新增*/
|
@Override
|
public void insert(OrdersTotal ordersTotal) {
|
int count = ordersTotalMapper.insert(ordersTotal);
|
if(count != 1) {
|
throw new TipsException("新增失败!");
|
}
|
}
|
|
/**修改*/
|
@Override
|
public void updateAll(OrdersTotal ordersTotal) {
|
int count = ordersTotalMapper.updateAll(ordersTotal);
|
if(count!=1) {
|
throw new TipsException("保存失败!");
|
}
|
}
|
|
/**修改*/
|
@Override
|
public void updateWhere(SqlSentence sqlSentence) {
|
int count = ordersTotalMapper.updateWhere(sqlSentence);
|
if(count!=1) {
|
throw new TipsException("保存失败!");
|
}
|
}
|
|
/**删除一个*/
|
@Override
|
public void deleteOne(String delId) {
|
int count = ordersTotalMapper.deleteById(delId);
|
if(count!=1) {
|
throw new TipsException("删除失败!");
|
}
|
}
|
|
/**查询条数*/
|
@Override
|
public int selectCount(SqlSentence sqlSentence) {
|
int count = ordersTotalMapper.selectCount(sqlSentence);
|
return count;
|
}
|
}
|