src/main/java/com/byh/biyesheji/service/impl/ZiXunServiceImpl.java
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.byh.biyesheji.service.impl;
import com.byh.biyesheji.dao.CustomerMapper;
import com.byh.biyesheji.dao.ZiXunMapper;
import com.byh.biyesheji.pojo.Customer;
import com.byh.biyesheji.pojo.ZiXun;
import com.byh.biyesheji.pojo.ZiXunExample;
import com.byh.biyesheji.service.ZiXunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ZiXunServiceImpl implements ZiXunService {
@Autowired
private ZiXunMapper ziXunMapper;
@Autowired
private CustomerMapper customerMapper;
@Override
public List<ZiXun> list() {
ZiXunExample example = new ZiXunExample();
example.createCriteria().andStatusEqualTo(1);
List<ZiXun> ziXuns = ziXunMapper.selectByExample(example);
for (ZiXun z:ziXuns){
Customer customer =customerMapper.selectByPrimaryKey(z.getCstid());
z.setCustomer(customer);
}
return ziXuns;
}
@Override
public void save(ZiXun entity) {
ziXunMapper.insert(entity);
}
@Override
public void del(int id) {
ziXunMapper.deleteByPrimaryKey(id);
}
@Override
public ZiXun get(int id) {
return ziXunMapper.selectByPrimaryKey(id);
}
@Override
public void shenhe(int zid) {
ziXunMapper.shenhe(zid);
}
@Override
public List<ZiXun> list1() {
List<ZiXun> ziXuns = ziXunMapper.selectByExample(null);
for (ZiXun z:ziXuns){
Customer customer =customerMapper.selectByPrimaryKey(z.getCstid());
z.setCustomer(customer);
}
后面还有 3 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。