|
|
|
@ -22,11 +22,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="isUnsubscribe" column="is_unsubscribe" /> |
|
|
|
<result property="isDelete" column="is_delete" /> |
|
|
|
<result property="salt" column="salt" /> |
|
|
|
<result property="enterpriseTel" column="enterprise_tel" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectEnterpriseInformationVo"> |
|
|
|
select id, enterprise_name, enterprise_number, enterprise_type, enterprise_address, legal_person, registered_capital, establishment_time, |
|
|
|
operating_term, business_scope, create_time, create_by, user_id, dept_id,is_unsubscribe ,is_delete,salt from enterprise_information |
|
|
|
operating_term, business_scope, create_time, create_by, user_id, dept_id,is_unsubscribe ,is_delete,salt,enterprise_tel from enterprise_information |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectEnterpriseInformationList" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult"> |
|
|
|
@ -105,6 +106,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
<!-- <if test="enterpriseNumber != null and enterpriseNumber != ''">enterprise_number = #{enterpriseNumber},</if>--> |
|
|
|
<update id="updateEnterpriseInformation" parameterType="EnterpriseInformation"> |
|
|
|
update enterprise_information |
|
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
|
<if test="enterpriseName != null and enterpriseName != ''">enterprise_name = #{enterpriseName},</if> |
|
|
|
<if test="enterpriseType != null and enterpriseType != ''">enterprise_type = #{enterpriseType},</if> |
|
|
|
<if test="enterpriseAddress != null and enterpriseAddress != ''">enterprise_address = #{enterpriseAddress},</if> |
|
|
|
<if test="legalPerson != null and legalPerson != ''">legal_person = #{legalPerson},</if> |
|
|
|
<if test="registeredCapital != null and registeredCapital != ''">registered_capital = #{registeredCapital},</if> |
|
|
|
<if test="establishmentTime != null ">establishment_time = #{establishmentTime},</if> |
|
|
|
<if test="operatingTerm != null ">operating_term = #{operatingTerm},</if> |
|
|
|
<if test="businessScope != null and businessScope != ''">business_scope = #{businessScope},</if> |
|
|
|
<if test="createTime != null ">create_time = #{createTime},</if> |
|
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if> |
|
|
|
<if test="isUnsubscribe != null">is_unsubscribe = #{isUnsubscribe},</if> |
|
|
|
<if test="salt != null and salt != ''">salt = #{isUnsubscribe}</if> |
|
|
|
</trim> |
|
|
|
where enterprise_number = #{enterpriseNumber} |
|
|
|
</update> |
|
|
|
<update id="updateEnterpriseInformationByEnterpriseNumber" parameterType="EnterpriseInformation"> |
|
|
|
update enterprise_information |
|
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
|
<if test="enterpriseName != null and enterpriseName != ''">enterprise_name = #{enterpriseName},</if> |
|
|
|
@ -132,5 +151,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
#{id} |
|
|
|
</foreach> |
|
|
|
</delete> |
|
|
|
|
|
|
|
<select id="selectEnterpriseInformationByName" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult"> |
|
|
|
<include refid="selectEnterpriseInformationVo"/> |
|
|
|
where enterprise_name like concat('%', #{enterpriseName}, '%') |
|
|
|
and is_delete = |
|
|
|
order by create_time desc |
|
|
|
</select> |
|
|
|
</mapper> |