2025-01-15 10:28:03 +08:00
|
|
|
<?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.ruoyi.app.mapper.AppProviderMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="AppProvider" id="AppProviderResult">
|
|
|
|
|
<result property="providerId" column="provider_id" />
|
|
|
|
|
<result property="providerName" column="provider_name" />
|
|
|
|
|
<result property="providerContact" column="provider_contact" />
|
|
|
|
|
<result property="providerAddress" column="provider_address" />
|
|
|
|
|
<result property="providerStatus" column="provider_status" />
|
2025-03-04 17:11:06 +08:00
|
|
|
<result property="providerType" column="provider_type" />
|
2025-01-15 10:28:03 +08:00
|
|
|
<result property="lastUpdateUser" column="last_update_user" />
|
|
|
|
|
<result property="lastUpdateTime" column="last_update_time" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectAppProviderVo">
|
2025-03-04 17:11:06 +08:00
|
|
|
select provider_id, provider_name, provider_contact, provider_address, provider_status, provider_type,last_update_user, last_update_time from app_provider
|
2025-01-15 10:28:03 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectAppProviderList" parameterType="AppProvider" resultMap="AppProviderResult">
|
|
|
|
|
<include refid="selectAppProviderVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="providerName != null and providerName != ''"> and provider_name like concat('%', #{providerName}, '%')</if>
|
|
|
|
|
<if test="providerContact != null "> and provider_contact = #{providerContact}</if>
|
|
|
|
|
<if test="providerAddress != null and providerAddress != ''"> and provider_address = #{providerAddress}</if>
|
|
|
|
|
<if test="providerStatus != null "> and provider_status = #{providerStatus}</if>
|
2025-03-04 17:11:06 +08:00
|
|
|
<if test="providerType != null "> and provider_type = #{providerType}</if>
|
2025-01-15 10:28:03 +08:00
|
|
|
<if test="lastUpdateUser != null and lastUpdateUser != ''"> and last_update_user = #{lastUpdateUser}</if>
|
|
|
|
|
<if test="lastUpdateTime != null "> and last_update_time = #{lastUpdateTime}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectAppProviderByProviderId" parameterType="String" resultMap="AppProviderResult">
|
|
|
|
|
<include refid="selectAppProviderVo"/>
|
|
|
|
|
where provider_id = #{providerId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertAppProvider" parameterType="AppProvider">
|
|
|
|
|
insert into app_provider
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="providerId != null">provider_id,</if>
|
|
|
|
|
<if test="providerName != null">provider_name,</if>
|
|
|
|
|
<if test="providerContact != null">provider_contact,</if>
|
|
|
|
|
<if test="providerAddress != null">provider_address,</if>
|
|
|
|
|
<if test="providerStatus != null">provider_status,</if>
|
2025-03-04 17:11:06 +08:00
|
|
|
<if test="providerType != null">provider_type,</if>
|
2025-01-15 10:28:03 +08:00
|
|
|
<if test="lastUpdateUser != null">last_update_user,</if>
|
|
|
|
|
<if test="lastUpdateTime != null">last_update_time,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="providerId != null">#{providerId},</if>
|
|
|
|
|
<if test="providerName != null">#{providerName},</if>
|
|
|
|
|
<if test="providerContact != null">#{providerContact},</if>
|
|
|
|
|
<if test="providerAddress != null">#{providerAddress},</if>
|
|
|
|
|
<if test="providerStatus != null">#{providerStatus},</if>
|
2025-03-04 17:11:06 +08:00
|
|
|
<if test="providerType != null">#{providerType},</if>
|
2025-01-15 10:28:03 +08:00
|
|
|
<if test="lastUpdateUser != null">#{lastUpdateUser},</if>
|
|
|
|
|
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateAppProvider" parameterType="AppProvider">
|
|
|
|
|
update app_provider
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="providerName != null">provider_name = #{providerName},</if>
|
|
|
|
|
<if test="providerContact != null">provider_contact = #{providerContact},</if>
|
|
|
|
|
<if test="providerAddress != null">provider_address = #{providerAddress},</if>
|
|
|
|
|
<if test="providerStatus != null">provider_status = #{providerStatus},</if>
|
2025-03-04 17:11:06 +08:00
|
|
|
<if test="providerType != null">provider_type = #{providerType},</if>
|
2025-01-15 10:28:03 +08:00
|
|
|
<if test="lastUpdateUser != null">last_update_user = #{lastUpdateUser},</if>
|
|
|
|
|
<if test="lastUpdateTime != null">last_update_time = #{lastUpdateTime},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where provider_id = #{providerId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteAppProviderByProviderId" parameterType="String">
|
|
|
|
|
delete from app_provider where provider_id = #{providerId}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteAppProviderByProviderIds" parameterType="String">
|
|
|
|
|
delete from app_provider where provider_id in
|
|
|
|
|
<foreach item="providerId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{providerId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
2025-03-04 10:56:49 +08:00
|
|
|
</mapper>
|