PhoneUidCameraMapper.xml 1.23 KB
<?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.yoho.order.dal.PhoneUidCameraMapper" >
  <resultMap id="BaseResultMap" type="com.yoho.order.model.PhoneUidCamera" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="camera_code" property="cameraCode" jdbcType="INTEGER" />
    <result column="phone_uid" property="phoneUid" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, camera_code, phone_uid
  </sql>
  <select id="selectByphoneUid" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select  <include refid="Base_Column_List" /> from phone_uid_camera
    where phone_uid = #{phoneUid,jdbcType=VARCHAR}
  </select>

  <insert id="insert" parameterType="com.yoho.order.model.PhoneUidCamera" >
    insert into phone_uid_camera (camera_code, phone_uid) values (#{cameraCode,jdbcType=INTEGER}, #{phoneUid,jdbcType=VARCHAR})
  </insert>

  <update id="updateByphoneUid" parameterType="com.yoho.order.model.PhoneUidCamera" >
    update phone_uid_camera set camera_code = #{cameraCode,jdbcType=INTEGER}
    where  phone_uid = #{phoneUid,jdbcType=VARCHAR}
  </update>
</mapper>