src/com/sxt/bus/service/impl/CustomerServiceImpl.java
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.sxt.bus.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.sxt.bus.domain.Customer;
import com.sxt.bus.mapper.CustomerMapper;
import com.sxt.bus.service.CustomerService;
import com.sxt.bus.vo.CustomerVo;
import com.sxt.sys.utils.DataGridView;
@Service
public class CustomerServiceImpl implements CustomerService {
@Autowired
private CustomerMapper customerMapper;
@Override
public DataGridView queryAllCustomer(CustomerVo customerVo) {
Page<Object> page=PageHelper.startPage(customerVo.getPage(), customerVo.getLimit());
List<Customer> data = this.customerMapper.queryAllCustomer(customerVo);
return new DataGridView(page.getTotal(), data);
}
@Override
public void addCustomer(CustomerVo customerVo) {
this.customerMapper.insertSelective(customerVo);
}
@Override
public void deleteCustomer(String identity) {
this.customerMapper.deleteByPrimaryKey(identity);
}
@Override
public void deleteBatchCustomer(String[] identitys) {
for (String identity : identitys) {
this.deleteCustomer(identity);
}
}
@Override
public void updateCustomer(CustomerVo customerVo) {
this.customerMapper.updateByPrimaryKeySelective(customerVo);
}
@Override
public Customer queryCustomerByIdentity(String identity) {
// TODO Auto-generated method stub
return this.customerMapper.selectByPrimaryKey(identity);
}
@Override
public List<Customer> queryAllCustomerForList(CustomerVo customerVo) {
return this.customerMapper.queryAllCustomer(customerVo);
}
后面还有 3 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。