|
|
@@ -15,11 +15,12 @@
|
|
|
<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
|
|
|
+ home_unit, logo_url, publicity_picture_url,country_name_zh,company_type
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
select
|
|
|
@@ -36,13 +37,14 @@
|
|
|
company_name, location_province, location_city,location_area,
|
|
|
unit_size,
|
|
|
company_introduction, home_unit,
|
|
|
- logo_url, publicity_picture_url,country_name_zh)
|
|
|
+ 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})
|
|
|
+ #{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
|
|
|
@@ -86,6 +88,9 @@
|
|
|
<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" >
|
|
|
@@ -127,6 +132,9 @@
|
|
|
<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" >
|
|
|
@@ -168,6 +176,9 @@
|
|
|
<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>
|
|
|
@@ -184,7 +195,8 @@
|
|
|
home_unit = #{homeUnit,jdbcType=VARCHAR},
|
|
|
logo_url = #{logoUrl,jdbcType=VARCHAR},
|
|
|
publicity_picture_url = #{publicityPictureUrl,jdbcType=VARCHAR},
|
|
|
- country_name_zh = #{countryNameZh,jdbcType=VARCHAR}
|
|
|
+ country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
|
|
|
+ company_typ e= #{companyType,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
@@ -194,4 +206,98 @@
|
|
|
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
|
|
|
+ <!-- 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
|
|
|
+ <!-- c.audit_status = 5 and a.type = 1 and b.identity_type = '企业' and b.company_type = 1 -->
|
|
|
+ <if test="locationProvince != null and locationProvince != ''">
|
|
|
+ and b.location_province = #{locationProvince,jdbcType=VARCHAR}
|
|
|
+ </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
|
|
|
+ <!-- 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>
|