| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- <?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.OrganizationInfoMapper" >
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationInfo" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="uid" property="uid" jdbcType="VARCHAR" />
- <result column="identity_type" property="identityType" jdbcType="VARCHAR" />
- <result column="company_name" property="companyName" jdbcType="VARCHAR" />
- <result column="location_province" property="locationProvince" jdbcType="INTEGER" />
- <result column="location_city" property="locationCity" jdbcType="INTEGER" />
- <result column="location_area" property="locationArea" jdbcType="INTEGER" />
- <result column="unit_size" property="unitSize" jdbcType="VARCHAR" />
- <result column="company_introduction" property="companyIntroduction" jdbcType="VARCHAR" />
- <result column="home_unit" property="homeUnit" jdbcType="VARCHAR" />
- <result column="logo_url" property="logoUrl" jdbcType="VARCHAR" />
- <result column="publicity_picture_url" property="publicityPictureUrl" jdbcType="VARCHAR" />
- <result column="country_name_zh" jdbcType="VARCHAR" property="countryNameZh" />
- <result column="company_type" property="companyType" jdbcType="INTEGER"/>
- </resultMap>
- <sql id="Base_Column_List" >
- id, uid, identity_type, company_name, location_province, location_city,location_area,
- unit_size, company_introduction,
- home_unit, logo_url, publicity_picture_url,country_name_zh,company_type
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from organization_info
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from organization_info
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.OrganizationInfo" >
- insert into organization_info (id, uid, identity_type,
- company_name, location_province, location_city,location_area,
- unit_size,
- company_introduction, home_unit,
- logo_url, publicity_picture_url,country_name_zh,company_type)
- values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{identityType,jdbcType=VARCHAR},
- #{companyName,jdbcType=VARCHAR},
- #{locationProvince,jdbcType=INTEGER}, #{locationCity,jdbcType=INTEGER}, #{locationArea,jdbcType=INTEGER},
- #{unitSize,jdbcType=VARCHAR},
- #{companyIntroduction,jdbcType=VARCHAR}, #{homeUnit,jdbcType=VARCHAR},
- #{logoUrl,jdbcType=VARCHAR}, #{publicityPictureUrl,jdbcType=VARCHAR}, #{countryNameZh,jdbcType=VARCHAR},
- #{companyType,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationInfo" >
- insert into organization_info
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="uid != null" >
- uid,
- </if>
- <if test="identityType != null" >
- identity_type,
- </if>
- <if test="companyName != null" >
- company_name,
- </if>
- <if test="locationProvince != null" >
- location_province,
- </if>
- <if test="locationCity != null" >
- location_city,
- </if>
- <if test="locationArea != null" >
- location_area,
- </if>
- <if test="unitSize != null" >
- unit_size,
- </if>
- <if test="companyIntroduction != null" >
- company_introduction,
- </if>
- <if test="homeUnit != null" >
- home_unit,
- </if>
- <if test="logoUrl != null" >
- logo_url,
- </if>
- <if test="publicityPictureUrl != null" >
- publicity_picture_url,
- </if>
- <if test="countryNameZh != null">
- country_name_zh,
- </if>
- <if test="companyType != null">
- company_type,
- </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="identityType != null" >
- #{identityType,jdbcType=VARCHAR},
- </if>
- <if test="companyName != null" >
- #{companyName,jdbcType=VARCHAR},
- </if>
- <if test="locationProvince != null" >
- #{locationProvince,jdbcType=INTEGER},
- </if>
- <if test="locationCity != null" >
- #{locationCity,jdbcType=INTEGER},
- </if>
- <if test="locationArea != null" >
- #{locationArea,jdbcType=INTEGER},
- </if>
- <if test="unitSize != null" >
- #{unitSize,jdbcType=VARCHAR},
- </if>
- <if test="companyIntroduction != null" >
- #{companyIntroduction,jdbcType=VARCHAR},
- </if>
- <if test="homeUnit != null" >
- #{homeUnit,jdbcType=VARCHAR},
- </if>
- <if test="logoUrl != null" >
- #{logoUrl,jdbcType=VARCHAR},
- </if>
- <if test="publicityPictureUrl != null" >
- #{publicityPictureUrl,jdbcType=VARCHAR},
- </if>
- <if test="countryNameZh != null">
- #{countryNameZh,jdbcType=VARCHAR},
- </if>
- <if test="companyType != null">
- #{companyType,jdbcType=INTEGER}
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationInfo" >
- update organization_info
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=VARCHAR},
- </if>
- <if test="identityType != null" >
- identity_type = #{identityType,jdbcType=VARCHAR},
- </if>
- <if test="companyName != null" >
- company_name = #{companyName,jdbcType=VARCHAR},
- </if>
- <if test="locationProvince != null" >
- location_Province = #{locationProvince,jdbcType=INTEGER},
- </if>
- <if test="locationCity != null" >
- location_City = #{locationCity,jdbcType=INTEGER},
- </if>
- <if test="locationArea != null" >
- location_Area = #{locationArea,jdbcType=INTEGER},
- </if>
- <if test="unitSize != null" >
- unit_size = #{unitSize,jdbcType=VARCHAR},
- </if>
- <if test="companyIntroduction != null" >
- company_introduction = #{companyIntroduction,jdbcType=VARCHAR},
- </if>
- <if test="homeUnit != null" >
- home_unit = #{homeUnit,jdbcType=VARCHAR},
- </if>
- <if test="logoUrl != null" >
- logo_url = #{logoUrl,jdbcType=VARCHAR},
- </if>
- <if test="publicityPictureUrl != null" >
- publicity_picture_url = #{publicityPictureUrl,jdbcType=VARCHAR},
- </if>
- <if test="countryNameZh != null">
- country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
- </if>
- <if test="companyType != null">
- company_type = #{companyType,jdbcType=INTEGER}
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationInfo" >
- update organization_info
- set uid = #{uid,jdbcType=VARCHAR},
- identity_type = #{identityType,jdbcType=VARCHAR},
- company_name = #{companyName,jdbcType=VARCHAR},
- location_province = #{locationProvince,jdbcType=INTEGER},
- location_city = #{locationCity,jdbcType=INTEGER},
- location_area = #{locationArea,jdbcType=INTEGER},
- unit_size = #{unitSize,jdbcType=VARCHAR},
- company_introduction = #{companyIntroduction,jdbcType=VARCHAR},
- home_unit = #{homeUnit,jdbcType=VARCHAR},
- logo_url = #{logoUrl,jdbcType=VARCHAR},
- publicity_picture_url = #{publicityPictureUrl,jdbcType=VARCHAR},
- country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
- company_typ e= #{companyType,jdbcType=INTEGER}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="selectOrgInfoByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from organization_info
- where uid = #{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="selectRecommendCompany" resultType="com.goafanti.portal.bo.FinancialListBo">
- select
- b.id,
- b.company_name as companyName,
- b.logo_url as logoUrl,
- b.publicity_picture_url as publicityPictureUrl,
- b.company_introduction as companyIntroduction
- from
- user a
- left join
- organization_info b
- on
- a.id = b.uid
- left join
- user_identity c
- on
- a.id = c.uid
- where b.id is not null
- and c.audit_status = 5 and a.type = 1 and b.identity_type = '企业' <!-- and b.company_type = 1 -->
- order by
- a.create_time asc
- limit 0,10
- </select>
-
- <select id="selectFinancialByPage" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.FinancialListBo">
- select
- b.id,
- b.company_name as companyName,
- b.logo_url as logoUrl,
- b.publicity_picture_url as publicityPictureUrl,
- b.company_introduction as companyIntroduction
- from
- user a
- left join
- organization_info b
- on
- a.id = b.uid
- left join
- user_identity c
- on
- a.id = c.uid
- where
- a.type = 1 and b.id is not null
- <!-- and c.audit_status = 5 -->
- and a.type = 1 and b.identity_type = '企业' and b.company_type = 1
- <if test="provinceId != null and provinceId != ''">
- and b.location_province = #{provinceId,jdbcType=VARCHAR}
- </if>
- <if test="keyword != null and keyword !=''">
- and b.company_name like concat('%',#{keyword},'%')
- </if>
- order by
- a.create_time desc
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
-
- <select id="selectFinancialCount" parameterType="java.lang.String" resultType="java.lang.Integer">
- select
- count(0)
- from
- user a
- left join
- organization_info b
- on
- a.id = b.uid
- left join
- user_identity c
- on
- a.id = c.uid
- where
- a.type = 1 and b.id is not null
- <!-- and c.audit_status = 5 -->
- and a.type = 1 and b.identity_type = '企业' and b.company_type = 1
- <if test="provinceId != null and provinceId != ''">
- and b.location_province = #{provinceId,jdbcType=VARCHAR}
- </if>
- <if test="keyword != null and keyword !=''">
- and b.company_name like concat('%',#{keyword},'%')
- </if>
- </select>
-
- <select id="selectCompanyDetai" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.FinancialListBo">
- select
- b.company_name as companyName,
- b.logo_url as logoUrl,
- b.publicity_picture_url as publicityPictureUrl,
- b.company_introduction as companyIntroduction,
- d.ability_label as abilityLabel,
- e.name as companyLocation
- from user a
- left join organization_info b on a.id = b.uid
- left join user_identity c on a.id = c.uid
- left join user_ability d on a.id = d.uid
- left join district_glossory e on b.location_province = e.id
- where b.id = #{organizationId,jdbcType=VARCHAR}
- </select>
- </mapper>
|