src/main/java/com/byh/biyesheji/service/impl/CustomerServiceImpl.java
(完整代码) 1KBpackage com.byh.biyesheji.service.impl;
import com.byh.biyesheji.dao.CustomerMapper;
import com.byh.biyesheji.pojo.Customer;
import com.byh.biyesheji.pojo.CustomerExample;
import com.byh.biyesheji.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CustomerServiceImpl implements CustomerService {
@Autowired
private CustomerMapper customerMapper;
@Override
public Customer foreLogin(Customer customer) {
CustomerExample example = new CustomerExample();
example.createCriteria().andNameEqualTo(customer.getName()).andPasswordEqualTo(customer.getPassword());
List<Customer> customers = customerMapper.selectByExample(example);
return customers.size()>0?customers.get(0):null;
}
@Override
public void save(Customer customer) {
customerMapper.insert(customer);
}
@Override
public Customer get(int cstid) {
return customerMapper.selectByPrimaryKey(cstid);
}
@Override
public List<Customer> list() {
return customerMapper.selectByExample(null);
}
@Override
public void shezhihuiyuan(int id) {
customerMapper.enableStatus(id);
}
@Override
public void del(int id) {
customerMapper.deleteByPrimaryKey(id);
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。