<?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.hzya.frame.sys.thirdparty.api.dao.impl.SysThirdpartyapiMapperImpl">
	<resultMap id="get-entity-result" type="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		<!--唯一标识码 -->
		<result property="id" column="id" />
		<!--应用分类id -->
		<result property="thirdpartyProductId" column="thirdparty_product_id" />
		<!--接口名称 -->
		<result property="name" column="name" />
		<!--接口简述 -->
		<result property="sketch" column="sketch" />
		<!--所属产品 -->
		<result property="productId" column="product_id" />
		<!--所属版本 -->
		<result property="productVersionId" column="product_version_id" />
		<!--接口分类 -->
		<result property="apiType" column="api_type" />
		<!--发布日期 -->
		<result property="releaseDate" column="release_date" />
		<!--发布类型 -->
		<result property="releaseType" column="release_type" />
		<!--版权所有 -->
		<result property="copyright" column="copyright" />
		<!--授权控制 -->
		<result property="authorizationControl" column="authorization_control" />
		<!--授权码 -->
		<result property="authorizationCode" column="authorization_code" />
		<!--标题 -->
		<result property="title" column="title" />
		<!--接口描述 -->
		<result property="description" column="description" />
		<!--系统约束 -->
		<result property="systemConstraint" column="system_constraint" />
		<!--业务约束 -->
		<result property="businessConstraint" column="business_constraint" />
		<!--调用说明 -->
		<result property="callSpecification" column="call_specification" />
		<!--接口访问协议 -->
		<result property="apiAgreement" column="api_agreement" />
		<!--接口应用类型 -->
		<result property="apiApplicationType" column="api_application_type" />
		<!--接口服务地址 -->
		<result property="apiServiceAddress" column="api_service_address" />
		<!--content-type -->
		<result property="contentType" column="content_type" />
		<!--编码 -->
		<result property="apiCode" column="api_code" />
		<!--请求方法 -->
		<result property="requestMethod" column="request_method" />
		<!--accept -->
		<result property="accept" column="accept" />
		<!--访问认证 -->
		<result property="accessAuthentication" column="access_authentication" />
		<!--访问认证接口id -->
		<result property="accessAuthenticationApi" column="access_authentication_api" />
		<!--排序号 -->
		<result property="sorts" column="sorts" />
		<!--创建人id -->
		<result property="orgId" column="org_id" />
		<!--状态(Y正常N删除) -->
		<result property="sts" column="sts" />
		<!--创建时间 -->
		<result property="createTime" column="create_time" />
		<!--创建人id -->
		<result property="createUserId" column="create_user_id" />
		<!--修改时间 -->
		<result property="modifyTime" column="modify_time" />
		<!--修改人id -->
		<result property="modifyUserId" column="modify_user_id" />
	</resultMap>

	<sql id="Base_Column_List">
		id,
		thirdparty_product_id,
		name,
		sketch,
		product_id,
		product_version_id,
		api_type,
		release_date,
		release_type,
		copyright,
		authorization_control,
		authorization_code,
		title,
		description,
		system_constraint,
		business_constraint,
		call_specification,
		api_agreement,
		api_application_type,
		api_service_address,
		content_type,
		api_code,
		request_method,
		accept,
		access_authentication,
		access_authentication_api,
		sorts,
		org_id,
		sts,
		create_time,
		create_user_id,
		modify_time,
		modify_user_id
	</sql>

	<!--通过ID获取数据 -->
	<select id="entity_get" resultMap="get-entity-result">
		select
		<include refid="Base_Column_List" />
		from sys_thirdparty_api where id = #{ id } and sts='Y'
	</select>

	<!-- 查询 采用==查询 -->
	<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		select
		<include refid="Base_Column_List" />
		from sys_thirdparty_api
		<trim prefix="where" prefixOverrides="and">
			<if test="id != null and id !='' ">id = #{id} </if>
			<if test="thirdpartyProductId != null and thirdpartyProductId !='' "> and thirdparty_product_id = #{thirdpartyProductId}</if>
			<if test="name != null and name !='' "> and name = #{name}</if>
			<if test="sketch != null and sketch !='' "> and sketch = #{sketch}</if>
			<if test="productId != null and productId !='' "> and product_id = #{productId}</if>
			<if test="productVersionId != null and productVersionId !='' "> and product_version_id = #{productVersionId}</if>
			<if test="apiType != null and apiType !='' "> and api_type = #{apiType}</if>
			<if test="releaseDate != null "> and release_date = #{releaseDate}</if>
			<if test="releaseType != null and releaseType !='' "> and release_type = #{releaseType}</if>
			<if test="copyright != null and copyright !='' "> and copyright = #{copyright}</if>
			<if test="authorizationControl != null and authorizationControl !='' "> and authorization_control = #{authorizationControl}</if>
			<if test="authorizationCode != null and authorizationCode !='' "> and authorization_code = #{authorizationCode}</if>
			<if test="title != null and title !='' "> and title = #{title}</if>
			<if test="description != null and description !='' "> and description = #{description}</if>
			<if test="systemConstraint != null and systemConstraint !='' "> and system_constraint = #{systemConstraint}</if>
			<if test="businessConstraint != null and businessConstraint !='' "> and business_constraint = #{businessConstraint}</if>
			<if test="callSpecification != null and callSpecification !='' "> and call_specification = #{callSpecification}</if>
			<if test="apiAgreement != null and apiAgreement !='' "> and api_agreement = #{apiAgreement}</if>
			<if test="apiApplicationType != null and apiApplicationType !='' "> and api_application_type = #{apiApplicationType}</if>
			<if test="apiServiceAddress != null and apiServiceAddress !='' "> and api_service_address = #{apiServiceAddress}</if>
			<if test="contentType != null and contentType !='' "> and content_type = #{contentType}</if>
			<if test="apiCode != null and apiCode !='' "> and api_code = #{apiCode}</if>
			<if test="requestMethod != null and requestMethod !='' "> and request_method = #{requestMethod}</if>
			<if test="accept != null and accept !='' "> and accept = #{accept}</if>
			<if test="accessAuthentication != null and accessAuthentication !='' "> and access_authentication = #{accessAuthentication}</if>
			<if test="accessAuthenticationApi != null and accessAuthenticationApi !='' "> and access_authentication_api = #{accessAuthenticationApi}</if>
			<if test="sorts != null "> and sorts = #{sorts}</if>
			<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
			<if test="sts != null and sts !='' "> and sts = #{sts}</if>
			<if test="createTime != null "> and create_time = #{createTime}</if>
			<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
			<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
			<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
		</trim>
		<if test=" sort == null or sort =='' "> order by sorts asc</if>
		<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
	</select>

	<!-- 查询符合条件的数量 -->
	<select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		select count(1) from sys_thirdparty_api
		<trim prefix="where" prefixOverrides="and">
			<if test="id != null and id !='' ">id = #{id} </if>
			<if test="thirdpartyProductId != null and thirdpartyProductId !='' "> and thirdparty_product_id = #{thirdpartyProductId}</if>
			<if test="name != null and name !='' "> and name = #{name}</if>
			<if test="sketch != null and sketch !='' "> and sketch = #{sketch}</if>
			<if test="productId != null and productId !='' "> and product_id = #{productId}</if>
			<if test="productVersionId != null and productVersionId !='' "> and product_version_id = #{productVersionId}</if>
			<if test="apiType != null and apiType !='' "> and api_type = #{apiType}</if>
			<if test="releaseDate != null "> and release_date = #{releaseDate}</if>
			<if test="releaseType != null and releaseType !='' "> and release_type = #{releaseType}</if>
			<if test="copyright != null and copyright !='' "> and copyright = #{copyright}</if>
			<if test="authorizationControl != null and authorizationControl !='' "> and authorization_control = #{authorizationControl}</if>
			<if test="authorizationCode != null and authorizationCode !='' "> and authorization_code = #{authorizationCode}</if>
			<if test="title != null and title !='' "> and title = #{title}</if>
			<if test="description != null and description !='' "> and description = #{description}</if>
			<if test="systemConstraint != null and systemConstraint !='' "> and system_constraint = #{systemConstraint}</if>
			<if test="businessConstraint != null and businessConstraint !='' "> and business_constraint = #{businessConstraint}</if>
			<if test="callSpecification != null and callSpecification !='' "> and call_specification = #{callSpecification}</if>
			<if test="apiAgreement != null and apiAgreement !='' "> and api_agreement = #{apiAgreement}</if>
			<if test="apiApplicationType != null and apiApplicationType !='' "> and api_application_type = #{apiApplicationType}</if>
			<if test="apiServiceAddress != null and apiServiceAddress !='' "> and api_service_address = #{apiServiceAddress}</if>
			<if test="contentType != null and contentType !='' "> and content_type = #{contentType}</if>
			<if test="apiCode != null and apiCode !='' "> and api_code = #{apiCode}</if>
			<if test="requestMethod != null and requestMethod !='' "> and request_method = #{requestMethod}</if>
			<if test="accept != null and accept !='' "> and accept = #{accept}</if>
			<if test="accessAuthentication != null and accessAuthentication !='' "> and access_authentication = #{accessAuthentication}</if>
			<if test="accessAuthenticationApi != null and accessAuthenticationApi !='' "> and access_authentication_api = #{accessAuthenticationApi}</if>
			<if test="sorts != null "> and sorts = #{sorts}</if>
			<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
			<if test="sts != null and sts !='' "> and sts = #{sts}</if>
			<if test="createTime != null "> and create_time = #{createTime}</if>
			<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
			<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
			<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
		</trim>
	</select>

	<!-- 分页查询列表 采用like格式 -->
	<select id="entity_list_like" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		select
		<include refid="Base_Column_List" />
		from sys_thirdparty_api
		<trim prefix="where" prefixOverrides="and">
			<if test="id != null and id !='' "> id like concat('%',#{id},'%') </if>
			<if test="thirdpartyProductId != null and thirdpartyProductId !='' "> and thirdparty_product_id like concat('%',#{thirdpartyProductId},'%') </if>
			<if test="name != null and name !='' "> and name like concat('%',#{name},'%') </if>
			<if test="sketch != null and sketch !='' "> and sketch like concat('%',#{sketch},'%') </if>
			<if test="productId != null and productId !='' "> and product_id like concat('%',#{productId},'%') </if>
			<if test="productVersionId != null and productVersionId !='' "> and product_version_id like concat('%',#{productVersionId},'%') </if>
			<if test="apiType != null and apiType !='' "> and api_type like concat('%',#{apiType},'%') </if>
			<if test="releaseDate != null and releaseDate !='' "> and release_date like concat('%',#{releaseDate},'%') </if>
			<if test="releaseType != null and releaseType !='' "> and release_type like concat('%',#{releaseType},'%') </if>
			<if test="copyright != null and copyright !='' "> and copyright like concat('%',#{copyright},'%') </if>
			<if test="authorizationControl != null and authorizationControl !='' "> and authorization_control like concat('%',#{authorizationControl},'%') </if>
			<if test="authorizationCode != null and authorizationCode !='' "> and authorization_code like concat('%',#{authorizationCode},'%') </if>
			<if test="title != null and title !='' "> and title like concat('%',#{title},'%') </if>
			<if test="description != null and description !='' "> and description like concat('%',#{description},'%') </if>
			<if test="systemConstraint != null and systemConstraint !='' "> and system_constraint like concat('%',#{systemConstraint},'%') </if>
			<if test="businessConstraint != null and businessConstraint !='' "> and business_constraint like concat('%',#{businessConstraint},'%') </if>
			<if test="callSpecification != null and callSpecification !='' "> and call_specification like concat('%',#{callSpecification},'%') </if>
			<if test="apiAgreement != null and apiAgreement !='' "> and api_agreement like concat('%',#{apiAgreement},'%') </if>
			<if test="apiApplicationType != null and apiApplicationType !='' "> and api_application_type like concat('%',#{apiApplicationType},'%') </if>
			<if test="apiServiceAddress != null and apiServiceAddress !='' "> and api_service_address like concat('%',#{apiServiceAddress},'%') </if>
			<if test="contentType != null and contentType !='' "> and content_type like concat('%',#{contentType},'%') </if>
			<if test="apiCode != null and apiCode !='' "> and api_code like concat('%',#{apiCode},'%') </if>
			<if test="requestMethod != null and requestMethod !='' "> and request_method like concat('%',#{requestMethod},'%') </if>
			<if test="accept != null and accept !='' "> and accept like concat('%',#{accept},'%') </if>
			<if test="accessAuthentication != null and accessAuthentication !='' "> and access_authentication like concat('%',#{accessAuthentication},'%') </if>
			<if test="accessAuthenticationApi != null and accessAuthenticationApi !='' "> and access_authentication_api like concat('%',#{accessAuthenticationApi},'%') </if>
			<if test="sorts != null "> and sorts = #{sorts}</if>
			<if test="orgId != null and orgId !='' "> and org_id like concat('%',#{orgId},'%') </if>
			<if test="sts != null and sts !='' "> and sts like concat('%',#{sts},'%') </if>
			<if test="createTime != null and createTime !='' "> and create_time like concat('%',#{createTime},'%') </if>
			<if test="createUserId != null and createUserId !='' "> and create_user_id like concat('%',#{createUserId},'%') </if>
			<if test="modifyTime != null and modifyTime !='' "> and modify_time like concat('%',#{modifyTime},'%') </if>
			<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id like concat('%',#{modifyUserId},'%') </if>
		</trim>
		<if test=" sort == null or sort =='' "> order by sorts asc</if>
		<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by  ${sort} ${order}</if>
	</select>

	<!-- 查询列表 字段采用or格式 -->
	<select id="entity_list_or" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		select
		<include refid="Base_Column_List" />
		from sys_thirdparty_api
		<trim prefix="where" prefixOverrides="or">
			<if test="id != null and id !='' ">id = #{id} </if>
			<if test="thirdpartyProductId != null and thirdpartyProductId !='' "> or thirdparty_product_id = #{thirdpartyProductId} </if>
			<if test="name != null and name !='' "> or name = #{name} </if>
			<if test="sketch != null and sketch !='' "> or sketch = #{sketch} </if>
			<if test="productId != null and productId !='' "> or product_id = #{productId} </if>
			<if test="productVersionId != null and productVersionId !='' "> or product_version_id = #{productVersionId} </if>
			<if test="apiType != null and apiType !='' "> or api_type = #{apiType} </if>
			<if test="releaseDate != null and releaseDate !='' "> or release_date = #{releaseDate} </if>
			<if test="releaseType != null and releaseType !='' "> or release_type = #{releaseType} </if>
			<if test="copyright != null and copyright !='' "> or copyright = #{copyright} </if>
			<if test="authorizationControl != null and authorizationControl !='' "> or authorization_control = #{authorizationControl} </if>
			<if test="authorizationCode != null and authorizationCode !='' "> or authorization_code = #{authorizationCode} </if>
			<if test="title != null and title !='' "> or title = #{title} </if>
			<if test="description != null and description !='' "> or description = #{description} </if>
			<if test="systemConstraint != null and systemConstraint !='' "> or system_constraint = #{systemConstraint} </if>
			<if test="businessConstraint != null and businessConstraint !='' "> or business_constraint = #{businessConstraint} </if>
			<if test="callSpecification != null and callSpecification !='' "> or call_specification = #{callSpecification} </if>
			<if test="apiAgreement != null and apiAgreement !='' "> or api_agreement = #{apiAgreement} </if>
			<if test="apiApplicationType != null and apiApplicationType !='' "> or api_application_type = #{apiApplicationType} </if>
			<if test="apiServiceAddress != null and apiServiceAddress !='' "> or api_service_address = #{apiServiceAddress} </if>
			<if test="contentType != null and contentType !='' "> or content_type = #{contentType} </if>
			<if test="apiCode != null and apiCode !='' "> or api_code = #{apiCode} </if>
			<if test="requestMethod != null and requestMethod !='' "> or request_method = #{requestMethod} </if>
			<if test="accept != null and accept !='' "> or accept = #{accept} </if>
			<if test="accessAuthentication != null and accessAuthentication !='' "> or access_authentication = #{accessAuthentication} </if>
			<if test="accessAuthenticationApi != null and accessAuthenticationApi !='' "> or access_authentication_api = #{accessAuthenticationApi} </if>
			<if test="sorts != null "> or sorts = #{sorts}</if>
			<if test="orgId != null and orgId !='' "> or org_id = #{orgId} </if>
			<if test="sts != null and sts !='' "> or sts = #{sts} </if>
			<if test="createTime != null and createTime !='' "> or create_time = #{createTime} </if>
			<if test="createUserId != null and createUserId !='' "> or create_user_id = #{createUserId} </if>
			<if test="modifyTime != null and modifyTime !='' "> or modify_time = #{modifyTime} </if>
			<if test="modifyUserId != null and modifyUserId !='' "> or modify_user_id = #{modifyUserId} </if>
		</trim>
		<if test=" sort == null or sort =='' "> order by sorts asc</if>
		<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by  ${sort} ${order}</if>
	</select>
	<!-- 新增 -->
	<insert id="entity_insert" parameterType="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		insert into sys_thirdparty_api(
		<trim suffix="" suffixOverrides=",">
			<if test="id != null and id !='' "> id, </if>
			<if test="thirdpartyProductId != null and thirdpartyProductId !='' "> thirdparty_product_id, </if>
			<if test="name != null and name !='' "> name, </if>
			<if test="sketch != null and sketch !='' "> sketch, </if>
			<if test="productId != null and productId !='' "> product_id, </if>
			<if test="productVersionId != null and productVersionId !='' "> product_version_id, </if>
			<if test="apiType != null and apiType !='' "> api_type, </if>
			<if test="releaseDate != null ">release_date,</if>
			<if test="releaseType != null and releaseType !='' "> release_type, </if>
			<if test="copyright != null and copyright !='' "> copyright, </if>
			<if test="authorizationControl != null and authorizationControl !='' "> authorization_control, </if>
			<if test="authorizationCode != null and authorizationCode !='' "> authorization_code, </if>
			<if test="title != null and title !='' "> title, </if>
			<if test="description != null and description !='' "> description, </if>
			<if test="systemConstraint != null and systemConstraint !='' "> system_constraint, </if>
			<if test="businessConstraint != null and businessConstraint !='' "> business_constraint, </if>
			<if test="callSpecification != null and callSpecification !='' "> call_specification, </if>
			<if test="apiAgreement != null and apiAgreement !='' "> api_agreement, </if>
			<if test="apiApplicationType != null and apiApplicationType !='' "> api_application_type, </if>
			<if test="apiServiceAddress != null and apiServiceAddress !='' "> api_service_address, </if>
			<if test="contentType != null and contentType !='' "> content_type, </if>
			<if test="apiCode != null and apiCode !='' "> api_code, </if>
			<if test="requestMethod != null and requestMethod !='' "> request_method, </if>
			<if test="accept != null and accept !='' "> accept, </if>
			<if test="accessAuthentication != null and accessAuthentication !='' "> access_authentication, </if>
			<if test="accessAuthenticationApi != null and accessAuthenticationApi !='' "> access_authentication_api, </if>
			<if test="sorts != null ">sorts,</if>
			<if test="orgId != null and orgId !='' "> org_id, </if>
			<if test="sts != null and sts !='' "> sts, </if>
			<if test="createTime != null ">create_time,</if>
			<if test="createUserId != null and createUserId !='' "> create_user_id, </if>
			<if test="modifyTime != null ">modify_time,</if>
			<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id, </if>
		</trim>
		)values
		(
		<trim suffix="" suffixOverrides=",">
			<if test="id != null and id !='' "> #{id}, </if>
			<if test="thirdpartyProductId != null and thirdpartyProductId !='' "> #{thirdpartyProductId}, </if>
			<if test="name != null and name !='' "> #{name}, </if>
			<if test="sketch != null and sketch !='' "> #{sketch}, </if>
			<if test="productId != null and productId !='' "> #{productId}, </if>
			<if test="productVersionId != null and productVersionId !='' "> #{productVersionId}, </if>
			<if test="apiType != null and apiType !='' "> #{apiType}, </if>
			<if test="releaseDate != null ">#{releaseDate},</if>
			<if test="releaseType != null and releaseType !='' "> #{releaseType}, </if>
			<if test="copyright != null and copyright !='' "> #{copyright}, </if>
			<if test="authorizationControl != null and authorizationControl !='' "> #{authorizationControl}, </if>
			<if test="authorizationCode != null and authorizationCode !='' "> #{authorizationCode}, </if>
			<if test="title != null and title !='' "> #{title}, </if>
			<if test="description != null and description !='' "> #{description}, </if>
			<if test="systemConstraint != null and systemConstraint !='' "> #{systemConstraint}, </if>
			<if test="businessConstraint != null and businessConstraint !='' "> #{businessConstraint}, </if>
			<if test="callSpecification != null and callSpecification !='' "> #{callSpecification}, </if>
			<if test="apiAgreement != null and apiAgreement !='' "> #{apiAgreement}, </if>
			<if test="apiApplicationType != null and apiApplicationType !='' "> #{apiApplicationType}, </if>
			<if test="apiServiceAddress != null and apiServiceAddress !='' "> #{apiServiceAddress}, </if>
			<if test="contentType != null and contentType !='' "> #{contentType}, </if>
			<if test="apiCode != null and apiCode !='' "> #{apiCode}, </if>
			<if test="requestMethod != null and requestMethod !='' "> #{requestMethod}, </if>
			<if test="accept != null and accept !='' "> #{accept}, </if>
			<if test="accessAuthentication != null and accessAuthentication !='' "> #{accessAuthentication}, </if>
			<if test="accessAuthenticationApi != null and accessAuthenticationApi !='' "> #{accessAuthenticationApi}, </if>
			<if test="sorts != null ">#{sorts},</if>
			<if test="orgId != null and orgId !='' "> #{orgId}, </if>
			<if test="sts != null and sts !='' "> #{sts}, </if>
			<if test="createTime != null ">#{createTime},</if>
			<if test="createUserId != null and createUserId !='' "> #{createUserId}, </if>
			<if test="modifyTime != null ">#{modifyTime},</if>
			<if test="modifyUserId != null and modifyUserId !='' "> #{modifyUserId}, </if>
		</trim>
		)
	</insert>

	<!-- 修改 -->
	<update id="entity_update" parameterType="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		update sys_thirdparty_api set
		<trim suffix="" suffixOverrides=",">
				<if test="thirdpartyProductId != null and thirdpartyProductId !='' "> thirdparty_product_id = #{thirdpartyProductId},</if>
				<if test="name != null and name !='' "> name = #{name},</if>
				<if test="sketch != null and sketch !='' "> sketch = #{sketch},</if>
				<if test="productId != null and productId !='' "> product_id = #{productId},</if>
				<if test="productVersionId != null and productVersionId !='' "> product_version_id = #{productVersionId},</if>
				<if test="apiType != null and apiType !='' "> api_type = #{apiType},</if>
				<if test="releaseDate != null ">release_date = #{releaseDate},</if>
				<if test="releaseType != null and releaseType !='' "> release_type = #{releaseType},</if>
				<if test="copyright != null and copyright !='' "> copyright = #{copyright},</if>
				<if test="authorizationControl != null and authorizationControl !='' "> authorization_control = #{authorizationControl},</if>
				<if test="authorizationCode != null and authorizationCode !='' "> authorization_code = #{authorizationCode},</if>
				<if test="title != null and title !='' "> title = #{title},</if>
				<if test="description != null and description !='' "> description = #{description},</if>
				<if test="systemConstraint != null and systemConstraint !='' "> system_constraint = #{systemConstraint},</if>
				<if test="businessConstraint != null and businessConstraint !='' "> business_constraint = #{businessConstraint},</if>
				<if test="callSpecification != null and callSpecification !='' "> call_specification = #{callSpecification},</if>
				<if test="apiAgreement != null and apiAgreement !='' "> api_agreement = #{apiAgreement},</if>
				<if test="apiApplicationType != null and apiApplicationType !='' "> api_application_type = #{apiApplicationType},</if>
				<if test="apiServiceAddress != null and apiServiceAddress !='' "> api_service_address = #{apiServiceAddress},</if>
				<if test="contentType != null and contentType !='' "> content_type = #{contentType},</if>
				<if test="apiCode != null and apiCode !='' "> api_code = #{apiCode},</if>
				<if test="requestMethod != null and requestMethod !='' "> request_method = #{requestMethod},</if>
				<if test="accept != null and accept !='' "> accept = #{accept},</if>
				<if test="accessAuthentication != null and accessAuthentication !='' "> access_authentication = #{accessAuthentication},</if>
				<if test="accessAuthenticationApi != null and accessAuthenticationApi !='' "> access_authentication_api = #{accessAuthenticationApi},</if>
				<if test="sorts != null ">sorts = #{sorts},</if>
				<if test="orgId != null and orgId !='' "> org_id = #{orgId},</if>
				<if test="sts != null and sts !='' "> sts = #{sts},</if>
				<if test="createTime != null ">create_time = #{createTime},</if>
				<if test="createUserId != null and createUserId !='' "> create_user_id = #{createUserId},</if>
				<if test="modifyTime != null ">modify_time = #{modifyTime},</if>
				<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id = #{modifyUserId},</if>
		</trim>
		where id = #{id}
	</update>

	<!-- 逻辑删除 -->
	<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		update sys_thirdparty_api set
		sts='N',modify_time = now(),modify_user_id = #{modifyUserId} where
		id = #{id}
	</update>

	<!-- 逻辑删除多条件 -->
	<update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		update sys_thirdparty_api set
		sts='N',modify_time = now(),modify_user_id = #{modifyUserId}
		<trim prefix="where" prefixOverrides="and">
			<if test="id != null and id !='' ">id = #{id} </if>
			<if test="thirdpartyProductId != null and thirdpartyProductId !='' "> and thirdparty_product_id = #{thirdpartyProductId}</if>
			<if test="name != null and name !='' "> and name = #{name}</if>
			<if test="sketch != null and sketch !='' "> and sketch = #{sketch}</if>
			<if test="productId != null and productId !='' "> and product_id = #{productId}</if>
			<if test="productVersionId != null and productVersionId !='' "> and product_version_id = #{productVersionId}</if>
			<if test="apiType != null and apiType !='' "> and api_type = #{apiType}</if>
			<if test="releaseDate != null and releaseDate !='' "> and release_date = #{releaseDate}</if>
			<if test="releaseType != null and releaseType !='' "> and release_type = #{releaseType}</if>
			<if test="copyright != null and copyright !='' "> and copyright = #{copyright}</if>
			<if test="authorizationControl != null and authorizationControl !='' "> and authorization_control = #{authorizationControl}</if>
			<if test="authorizationCode != null and authorizationCode !='' "> and authorization_code = #{authorizationCode}</if>
			<if test="title != null and title !='' "> and title = #{title}</if>
			<if test="description != null and description !='' "> and description = #{description}</if>
			<if test="systemConstraint != null and systemConstraint !='' "> and system_constraint = #{systemConstraint}</if>
			<if test="businessConstraint != null and businessConstraint !='' "> and business_constraint = #{businessConstraint}</if>
			<if test="callSpecification != null and callSpecification !='' "> and call_specification = #{callSpecification}</if>
			<if test="apiAgreement != null and apiAgreement !='' "> and api_agreement = #{apiAgreement}</if>
			<if test="apiApplicationType != null and apiApplicationType !='' "> and api_application_type = #{apiApplicationType}</if>
			<if test="apiServiceAddress != null and apiServiceAddress !='' "> and api_service_address = #{apiServiceAddress}</if>
			<if test="contentType != null and contentType !='' "> and content_type = #{contentType}</if>
			<if test="apiCode != null and apiCode !='' "> and api_code = #{apiCode}</if>
			<if test="requestMethod != null and requestMethod !='' "> and request_method = #{requestMethod}</if>
			<if test="accept != null and accept !='' "> and accept = #{accept}</if>
			<if test="accessAuthentication != null and accessAuthentication !='' "> and access_authentication = #{accessAuthentication}</if>
			<if test="accessAuthenticationApi != null and accessAuthenticationApi !='' "> and access_authentication_api = #{accessAuthenticationApi}</if>
			<if test="sorts != null "> and sorts = #{sorts}</if>
			<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
			<if test="sts != null and sts !='' "> and sts = #{sts}</if>
			<if test="createTime != null and createTime !='' "> and create_time = #{createTime}</if>
			<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
		</trim>
	</update>

	<!-- 物理删除 -->
	<delete id="entity_delete" parameterType="com.hzya.frame.sys.thirdparty.api.entity.SysThirdpartyapi">
		delete from sys_thirdparty_api where id =#{id}
	</delete>



	<!-- 查询 采用==查询 -->
	<select id="entity_getID_by_thirdpartyProductId" resultType="java.lang.String" parameterType="java.lang.String">
		select
		id
		from sys_thirdparty_api
		WHERE sts = 'Y' and thirdparty_product_id in
		<foreach item="ids" collection="list" open="(" separator="," close=")">
			#{ids}
		</foreach>

	</select>

	<!-- 逻辑删除多条件 -->
	<update id="delect_by_Id" parameterType="java.lang.String">
		update sys_thirdparty_api set
		sts='N',modify_time = now()
		WHERE id in
		<foreach item="ids" collection="list" open="(" separator="," close=")">
			#{ids}
		</foreach>
	</update>

</mapper>
