|
@@ -4,64 +4,84 @@
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.admin.Photo" >
|
|
<resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.admin.Photo" >
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
- <result column="photo_code" property="photo_code" jdbcType="INTEGER" />
|
|
|
|
- <result column="photo_title" property="photo_title" jdbcType="VARCHAR" />
|
|
|
|
|
|
+ <result column="photo_type" property="photo_type" jdbcType="INTEGER" />
|
|
|
|
+ <result column="resume_code" property="resume_code" jdbcType="INTEGER" />
|
|
|
|
+ <result column="servant_code" property="servant_code" jdbcType="VARCHAR" />
|
|
|
|
+ <result column="photo_path" property="photo_path" jdbcType="VARCHAR" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
<sql id="Base_Column_List" >
|
|
- id, photo_code, photo_title
|
|
|
|
|
|
+ id, photo_type, resume_code,photo_path,servant_code
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<!-- 得到所有的照片信息 -->
|
|
<!-- 得到所有的照片信息 -->
|
|
<select id="getAll" resultMap="BaseResultMap" >
|
|
<select id="getAll" resultMap="BaseResultMap" >
|
|
select
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
<include refid="Base_Column_List" />
|
|
- from photo
|
|
|
|
|
|
+ from mm_info_photo
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 根据id查找某个照片信息 -->
|
|
<!-- 根据id查找某个照片信息 -->
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
select
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
<include refid="Base_Column_List" />
|
|
- from photo
|
|
|
|
- where photo_code = #{photo_code,jdbcType=INTEGER}
|
|
|
|
|
|
+ from mm_info_photo
|
|
|
|
+ where resume_code = #{resume_code,jdbcType=INTEGER}
|
|
</select>
|
|
</select>
|
|
<!-- 根据id删除某个照片信息 -->
|
|
<!-- 根据id删除某个照片信息 -->
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
- delete from photo
|
|
|
|
|
|
+ delete from mm_info_photo
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<!-- 插入一条照片信息 -->
|
|
<!-- 插入一条照片信息 -->
|
|
<insert id="insertSelective" parameterType="com.ygj.yuemum.domain.admin.Photo" >
|
|
<insert id="insertSelective" parameterType="com.ygj.yuemum.domain.admin.Photo" >
|
|
- insert into photo
|
|
|
|
|
|
+ insert into mm_info_photo
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
- <if test="photo_code != null" >
|
|
|
|
- photo_code,
|
|
|
|
|
|
+ <if test="resume_code != null" >
|
|
|
|
+ resume_code,
|
|
</if>
|
|
</if>
|
|
- <if test="photo_title != null" >
|
|
|
|
- photo_title,
|
|
|
|
|
|
+ <if test="photo_type != null" >
|
|
|
|
+ photo_type,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="photo_path != null" >
|
|
|
|
+ photo_path,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="servant_code != null" >
|
|
|
|
+ servant_code
|
|
</if>
|
|
</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
- <if test="photo_code != null" >
|
|
|
|
- #{photo_code,jdbcType=INTEGER},
|
|
|
|
|
|
+ <if test="resume_code != null" >
|
|
|
|
+ #{resume_code,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="photo_type != null" >
|
|
|
|
+ #{photo_type,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
- <if test="photo_title != null" >
|
|
|
|
- #{photo_title,jdbcType=VARCHAR}
|
|
|
|
|
|
+ <if test="photo_path != null" >
|
|
|
|
+ #{photo_path,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="servant_code != null" >
|
|
|
|
+ #{servant_code,jdbcType=VARCHAR}
|
|
</if>
|
|
</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!-- 根据id更新一条照片信息 -->
|
|
<!-- 根据id更新一条照片信息 -->
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.admin.Photo" >
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.admin.Photo" >
|
|
- update photo
|
|
|
|
|
|
+ update mm_info_photo
|
|
<set >
|
|
<set >
|
|
- <if test="photo_code != null" >
|
|
|
|
- photo_code = #{photo_code,jdbcType=INTEGER},
|
|
|
|
|
|
+ <if test="resume_code != null" >
|
|
|
|
+ resume_code = #{resume_code,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="photo_type != null" >
|
|
|
|
+ photo_type = #{photo_type,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="photo_path != null" >
|
|
|
|
+ photo_path = #{photo_path,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
- <if test="photo_title != null" >
|
|
|
|
- photo_title = #{photo_title,jdbcType=VARCHAR}
|
|
|
|
|
|
+ <if test="servant_code != null" >
|
|
|
|
+ servant_code = #{servant_code,jdbcType=VARCHAR}
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|