60 lines
2.6 KiB
XML
60 lines
2.6 KiB
XML
<?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.muyu.cloud.mart.mapper.ConnectorMapper">
|
|
<update id="updateConnector">
|
|
update connector set connector_name=#{connectorName},connector_sort=#{connectorSort},connector_describe=#{connectorDescribe},connector_picture=#{connectorPicture},connector_company=#{connectorCompany},connector_time=#{connectorTime},connector_status=#{connectorStatus},connector_apiurl=#{connectorApiurl},connector_apikey=#{connectorApikey},connector_request=#{connectorRequest} where connector_id=#{connectorId}
|
|
</update>
|
|
<delete id="getDeleteConnector">
|
|
delete from connector where connector_id=#{connectorId}
|
|
</delete>
|
|
<select id="findConnectorUserList" resultType="com.muyu.domain.ConnectorUser">
|
|
SELECT
|
|
connector_user.connector_user_id,
|
|
connector_user.connector_residue_degree,
|
|
connector_user.connector_frequency,
|
|
sys_user.user_name,
|
|
sys_user.remark,
|
|
sys_user.user_id,
|
|
connector.connector_name
|
|
FROM
|
|
connector_user
|
|
LEFT JOIN sys_user ON connector_user.user_id = sys_user.user_id
|
|
LEFT JOIN connector ON connector_user.connector_id = connector.connector_id
|
|
<where>
|
|
<if test="remark!='管理员' ">
|
|
and sys_user.user_id=#{userId}
|
|
</if>
|
|
<if test="userName!=null and userName!='' ">
|
|
and sys_user.user_name like '%${userName}%'
|
|
</if>
|
|
<if test="connectorName!=null and connector_name!='' ">
|
|
and connector.connector_name like '%${connectorName}%'
|
|
</if>
|
|
</where>
|
|
order by sys_user.user_name desc
|
|
|
|
</select>
|
|
<select id="findApiList" resultType="com.muyu.domain.Connector">
|
|
select *from connector
|
|
<where>
|
|
connector_status=1
|
|
<if test="connectorName!=null and connectorName!='' ">
|
|
and connector_name like '%${connectorName}%'
|
|
</if>
|
|
<if test="connectorSort!=null and connectorSort!='' ">
|
|
and connector_sort = #{connectorSort}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<select id="userId" resultType="com.muyu.domain.SysUser">
|
|
select *from sys_user where user_id=#{userId}
|
|
</select>
|
|
<select id="findConnectSort" resultType="com.muyu.domain.req.ConnectorSortGroupBy">
|
|
SELECT connector_sort,COUNT(connector_sort) AS count FROM connector GROUP BY connector_sort
|
|
</select>
|
|
|
|
|
|
</mapper>
|