Java后台实现方法
首先后台结构分为四个部分(以表schedule为例)
entity>mapper>service>controller
1. 在entity里面写好实体,新建目录schedule,再建子文件Schedule.java,在里面定义好全部表名的字段
package com.eisp.eoms.entity.schedule;
import java.sql.Timestamp;
//日志信息
public class Schedule {
private Long scheId;
private String schCode;
private String userCode;
private String orgCode;
private String scheduleContent;
private Timestamp startDate;
private Timestamp endDate;
private String comments;
}
2.在mapper里面写好接口
建立schedule目录,再建立ScheduleMapper.java文件
里面写sql语句
/**
* @author Administrator
*
*/
package com.eisp.eoms.mapper.schedule;
import java.util.List;
import com.eisp.eoms.entity.schedule.Schedule;
public interface ScheduleMapper {