parent
001c064649
commit
31b0ca4a7d
@ -0,0 +1,55 @@
|
||||
package com.example.flower.service;
|
||||
|
||||
import com.example.flower.entity.Staff;
|
||||
import com.example.flower.mapper.StaffMapper;
|
||||
import com.example.flower.service.impl.StaffServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@Service
|
||||
public class StaffService implements StaffServiceImpl {
|
||||
@Resource
|
||||
private StaffMapper staffMapper;
|
||||
|
||||
@Override
|
||||
public Staff staffLogin(String staff_name){
|
||||
return staffMapper.staffLogin(staff_name);
|
||||
}
|
||||
@Override
|
||||
public PageInfo<Staff> staffList(int page, int page_size) {
|
||||
PageHelper.startPage(page,page_size);
|
||||
return new PageInfo<>(staffMapper.staffList());
|
||||
}
|
||||
@Override
|
||||
public PageInfo<Staff> staffListByQuery(int page,int page_size,String staff_name){
|
||||
PageHelper.startPage(page,page_size);
|
||||
return new PageInfo<>(staffMapper.staffListByQuery(staff_name));
|
||||
}
|
||||
@Override
|
||||
public void staffAdd(Staff staff){
|
||||
staffMapper.staffAdd(staff);
|
||||
}
|
||||
@Override
|
||||
public int staffDeletePer(int staff_id){
|
||||
return staffMapper.staffDeletePer(staff_id);
|
||||
}
|
||||
@Override
|
||||
public int staffDeleteMul(int[] staff_ids){
|
||||
return staffMapper.staffDeleteMul(staff_ids);
|
||||
}
|
||||
@Override
|
||||
public Staff staffInfo(int staff_id){
|
||||
return staffMapper.staffInfo(staff_id);
|
||||
}
|
||||
@Override
|
||||
public int staffModify(Staff staff){
|
||||
return staffMapper.staffModify(staff);
|
||||
}
|
||||
@Override
|
||||
public int staffModifyState(int staff_id,int staff_state){
|
||||
return staffMapper.staffModifyState(staff_id, staff_state);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in new issue