| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <?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.goafanti.common.dao.OrganizationIdentityMapper" >
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationIdentity" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="uid" property="uid" jdbcType="VARCHAR" />
- <result column="contacts" property="contacts" jdbcType="VARCHAR" />
- <result column="fixed_tel" property="fixedTel" jdbcType="VARCHAR" />
- <result column="qq" property="qq" jdbcType="VARCHAR" />
- <result column="postal_address" property="postalAddress" jdbcType="VARCHAR" />
- <result column="postcode" property="postcode" jdbcType="VARCHAR" />
- <result column="legal_person" property="legalPerson" jdbcType="VARCHAR" />
- </resultMap>
-
- <resultMap type="com.goafanti.user.bo.OrgIdentityBo" id="OrgIdentityBoMap">
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="uid" property="uid" jdbcType="VARCHAR" />
- <result column="contacts" property="contacts" jdbcType="VARCHAR" />
- <result column="fixed_tel" property="fixedTel" jdbcType="VARCHAR" />
- <result column="qq" property="qq" jdbcType="VARCHAR" />
- <result column="postal_address" property="postalAddress" jdbcType="VARCHAR" />
- <result column="postcode" property="postcode" jdbcType="VARCHAR" />
- <result column="legal_person" property="legalPerson" jdbcType="VARCHAR" />
- <result column="email" property="email" jdbcType="VARCHAR" />
- </resultMap>
-
- <sql id="Base_Column_List" >
- id, uid, contacts, fixed_tel, qq, postal_address, postcode ,legal_Person
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from organization_identity
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from organization_identity
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity" >
- insert into organization_identity (id, uid, contacts,
- fixed_tel, qq, postal_address,
- postcode, legal_person)
- values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR},
- #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR},
- #{postcode,jdbcType=VARCHAR}, #{legalPerson,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
- insert into organization_identity
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="uid != null" >
- uid,
- </if>
- <if test="contacts != null" >
- contacts,
- </if>
- <if test="fixedTel != null" >
- fixed_tel,
- </if>
- <if test="qq != null" >
- qq,
- </if>
- <if test="postalAddress != null" >
- postal_address,
- </if>
- <if test="postcode != null" >
- postcode,
- </if>
- <if test="legalPerson != null" >
- legal_person,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="uid != null" >
- #{uid,jdbcType=VARCHAR},
- </if>
- <if test="contacts != null" >
- #{contacts,jdbcType=VARCHAR},
- </if>
- <if test="fixedTel != null" >
- #{fixedTel,jdbcType=VARCHAR},
- </if>
- <if test="qq != null" >
- #{qq,jdbcType=VARCHAR},
- </if>
- <if test="postalAddress != null" >
- #{postalAddress,jdbcType=VARCHAR},
- </if>
- <if test="postcode != null" >
- #{postcode,jdbcType=VARCHAR},
- </if>
- <if test="legalPerson != null" >
- #{legalPerson,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
- update organization_identity
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=VARCHAR},
- </if>
- <if test="contacts != null" >
- contacts = #{contacts,jdbcType=VARCHAR},
- </if>
- <if test="fixedTel != null" >
- fixed_tel = #{fixedTel,jdbcType=VARCHAR},
- </if>
- <if test="qq != null" >
- qq = #{qq,jdbcType=VARCHAR},
- </if>
- <if test="postalAddress != null" >
- postal_address = #{postalAddress,jdbcType=VARCHAR},
- </if>
- <if test="postcode != null" >
- postcode = #{postcode,jdbcType=VARCHAR},
- </if>
- <if test="legalPerson != null" >
- legal_person = #{legalPerson,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationIdentity" >
- update organization_identity
- set uid = #{uid,jdbcType=VARCHAR},
- contacts = #{contacts,jdbcType=VARCHAR},
- fixed_tel = #{fixedTel,jdbcType=VARCHAR},
- qq = #{qq,jdbcType=VARCHAR},
- postal_address = #{postalAddress,jdbcType=VARCHAR},
- postcode = #{postcode,jdbcType=VARCHAR}
- legal_person = #{legalPerson,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="selectOrgIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from organization_identity
- where uid = #{uid,jdbcType=VARCHAR}
- </select>
-
-
- <select id="selectOrgIdentityBoByUserId" parameterType="java.lang.String" resultMap="OrgIdentityBoMap">
- select t.id,t.uid,t.contacts,t.fixed_tel,t.qq,t.postal_address,t.postcode,t.legal_person,
- u.email from user u LEFT JOIN organization_identity t
- on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
- </select>
-
- </mapper>
|