|
@@ -0,0 +1,26 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.siwei.apply.mapper.ProjectMapper">
|
|
|
+ <resultMap id="projectMap" type="com.siwei.apply.domain.Project">
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <result column="name" property="name"/>
|
|
|
+ <result column="company" property="company"/>
|
|
|
+ <result column="created_at" property="createAt"/>
|
|
|
+ <result column="updated_at" property="updateAt"/>
|
|
|
+ <result column="project_type" property="projectType"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <insert id="insertProject" parameterType="com.siwei.apply.domain.Project">
|
|
|
+ INSERT INTO t_project (id, name, company,
|
|
|
+ created_at, updated_at, project_type)
|
|
|
+ VALUES (#{id}, #{name}, #{company}, now(), now(), #{projectType})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="getProject" resultMap="projectMap">
|
|
|
+ SELECT *
|
|
|
+ FROM t_project
|
|
|
+ where t_project.id = #{projectId}
|
|
|
+ </select>
|
|
|
+</mapper>
|