苍穹外卖项目初始化代码-提交订单
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
package com.sky.mapper;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.sky.annotation.AutoFill;
|
||||
import com.sky.dto.EmployeePageQueryDTO;
|
||||
import com.sky.entity.Employee;
|
||||
import com.sky.enumeration.OperationType;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
@@ -15,4 +20,22 @@ public interface EmployeeMapper {
|
||||
@Select("select * from employee where username = #{username}")
|
||||
Employee getByUsername(String username);
|
||||
|
||||
|
||||
@AutoFill(OperationType.INSERT)
|
||||
@Insert("insert into employee (name, username, password, phone, sex, id_number, create_time, update_time, create_user, update_user) " +
|
||||
"values (#{name},#{username},#{password},#{phone},#{sex},#{idNumber},#{createTime},#{updateTime},#{createUser},#{updateUser})")
|
||||
void insert(Employee employee);
|
||||
|
||||
Page<Employee> pageQuery(EmployeePageQueryDTO employeePageQueryDTO);
|
||||
|
||||
@AutoFill(OperationType.UPDATE)
|
||||
void update(Employee employee);
|
||||
|
||||
/**
|
||||
* 根据Id查询员工
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Select("select * from employee where id = #{id}")
|
||||
Employee getById(Long id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user