rocketmq,收益管理,资源管理模块代码
This commit is contained in:
+54
-1
@@ -11,11 +11,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="resourceName" column="resource_name" />
|
||||
<result property="ipAddress" column="ip_address" />
|
||||
<result property="resourcePort" column="resource_port" />
|
||||
<result property="otherPortName" column="other_port_name" />
|
||||
<result property="protocol" column="protocol" />
|
||||
<result property="resourceVersion" column="resource_version" />
|
||||
<result property="rwPermission" column="rw_permission" />
|
||||
<result property="securityLevel" column="security_level" />
|
||||
<result property="encryption" column="encryption" />
|
||||
<result property="resourceUserName" column="resource_user_name" />
|
||||
<result property="resourcePwd" column="resource_pwd" />
|
||||
<result property="registrationStatus" column="registration_status" />
|
||||
<result property="onlineStatus" column="online_status" />
|
||||
@@ -32,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmResourceRegistrationVo">
|
||||
select id, hardware_sn, resource_type, resource_name, ip_address, resource_port, protocol, resource_version, rw_permission, security_level, encryption, resource_pwd, registration_status, online_status, description, customer_id, customer_name, service_number, create_time, update_time, creator_id, creator_name, updater_id, updater_name from rm_resource_registration
|
||||
select id, hardware_sn, resource_type, resource_name, ip_address, resource_port, other_port_name, protocol, resource_version, rw_permission, security_level, encryption, resource_user_name,resource_pwd, registration_status, online_status, description, customer_id, customer_name, service_number, create_time, update_time, creator_id, creator_name, updater_id, updater_name from rm_resource_registration
|
||||
</sql>
|
||||
|
||||
<select id="selectRmResourceRegistrationList" parameterType="RmResourceRegistration" resultMap="RmResourceRegistrationResult">
|
||||
@@ -43,11 +45,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
|
||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
|
||||
<if test="resourcePort != null and resourcePort != ''"> and resource_port = #{resourcePort}</if>
|
||||
<if test="otherPortName != null and otherPortName != ''"> and other_port_name = #{otherPortName}</if>
|
||||
<if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
|
||||
<if test="resourceVersion != null and resourceVersion != ''"> and resource_version = #{resourceVersion}</if>
|
||||
<if test="rwPermission != null and rwPermission != ''"> and rw_permission = #{rwPermission}</if>
|
||||
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
|
||||
<if test="encryption != null and encryption != ''"> and encryption = #{encryption}</if>
|
||||
<if test="resourceUserName != null and resourceUserName != ''"> and resource_user_name = #{resourceUserName}</if>
|
||||
<if test="resourcePwd != null and resourcePwd != ''"> and resource_pwd = #{resourcePwd}</if>
|
||||
<if test="registrationStatus != null and registrationStatus != ''"> and registration_status = #{registrationStatus}</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
||||
@@ -66,6 +70,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectRmResourceRegistrationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="countBySn" parameterType="String">
|
||||
select count(1) from rm_resource_registration
|
||||
where hardware_sn = #{hardwareSn}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmResourceRegistration" parameterType="RmResourceRegistration" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rm_resource_registration
|
||||
@@ -75,11 +83,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="resourceName != null">resource_name,</if>
|
||||
<if test="ipAddress != null">ip_address,</if>
|
||||
<if test="resourcePort != null">resource_port,</if>
|
||||
<if test="otherPortName != null">other_port_name,</if>
|
||||
<if test="protocol != null">protocol,</if>
|
||||
<if test="resourceVersion != null">resource_version,</if>
|
||||
<if test="rwPermission != null">rw_permission,</if>
|
||||
<if test="securityLevel != null">security_level,</if>
|
||||
<if test="encryption != null">encryption,</if>
|
||||
<if test="resourceUserName != null">resource_user_name,</if>
|
||||
<if test="resourcePwd != null">resource_pwd,</if>
|
||||
<if test="registrationStatus != null">registration_status,</if>
|
||||
<if test="onlineStatus != null">online_status,</if>
|
||||
@@ -100,11 +110,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="resourceName != null">#{resourceName},</if>
|
||||
<if test="ipAddress != null">#{ipAddress},</if>
|
||||
<if test="resourcePort != null">#{resourcePort},</if>
|
||||
<if test="otherPortName != null">#{otherPortName},</if>
|
||||
<if test="protocol != null">#{protocol},</if>
|
||||
<if test="resourceVersion != null">#{resourceVersion},</if>
|
||||
<if test="rwPermission != null">#{rwPermission},</if>
|
||||
<if test="securityLevel != null">#{securityLevel},</if>
|
||||
<if test="encryption != null">#{encryption},</if>
|
||||
<if test="resourceUserName != null">#{resourceUserName},</if>
|
||||
<if test="resourcePwd != null">#{resourcePwd},</if>
|
||||
<if test="registrationStatus != null">#{registrationStatus},</if>
|
||||
<if test="onlineStatus != null">#{onlineStatus},</if>
|
||||
@@ -129,11 +141,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="resourceName != null">resource_name = #{resourceName},</if>
|
||||
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
|
||||
<if test="resourcePort != null">resource_port = #{resourcePort},</if>
|
||||
<if test="otherPortName != null">other_port_name = #{otherPortName},</if>
|
||||
<if test="protocol != null">protocol = #{protocol},</if>
|
||||
<if test="resourceVersion != null">resource_version = #{resourceVersion},</if>
|
||||
<if test="rwPermission != null">rw_permission = #{rwPermission},</if>
|
||||
<if test="securityLevel != null">security_level = #{securityLevel},</if>
|
||||
<if test="encryption != null">encryption = #{encryption},</if>
|
||||
<if test="resourceUserName != null">resource_user_name = #{resourceUserName},</if>
|
||||
<if test="resourcePwd != null">resource_pwd = #{resourcePwd},</if>
|
||||
<if test="registrationStatus != null">registration_status = #{registrationStatus},</if>
|
||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
||||
@@ -161,4 +175,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<!-- 查询所有资源名称(包含设备使用)-->
|
||||
<select id="selectAllResourceName" resultType="java.util.Map">
|
||||
select resource_name resourceName from rm_resource_registration
|
||||
<where>
|
||||
and registration_status = 1
|
||||
</where>
|
||||
group by resource_name
|
||||
</select>
|
||||
<!-- 查询所有资源名称-->
|
||||
<select id="selectAllResourceNameByType" parameterType="RmResourceRegistration" resultType="java.util.Map">
|
||||
select resource_name resourceName from rm_resource_registration
|
||||
<where>
|
||||
and registration_status = 1
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
|
||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
|
||||
<if test="resourcePort != null and resourcePort != ''"> and resource_port = #{resourcePort}</if>
|
||||
<if test="otherPortName != null and otherPortName != ''"> and other_port_name = #{otherPortName}</if>
|
||||
<if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
|
||||
<if test="resourceVersion != null and resourceVersion != ''"> and resource_version = #{resourceVersion}</if>
|
||||
<if test="rwPermission != null and rwPermission != ''"> and rw_permission = #{rwPermission}</if>
|
||||
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
|
||||
<if test="encryption != null and encryption != ''"> and encryption = #{encryption}</if>
|
||||
<if test="resourceUserName != null and resourceUserName != ''"> and resource_user_name = #{resourceUserName}</if>
|
||||
<if test="resourcePwd != null and resourcePwd != ''"> and resource_pwd = #{resourcePwd}</if>
|
||||
<if test="registrationStatus != null and registrationStatus != ''"> and registration_status = #{registrationStatus}</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="customerId != null "> and customer_id = #{customerId}</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="serviceNumber != null and serviceNumber != ''"> and service_number = #{serviceNumber}</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
||||
</where>
|
||||
group by resource_name
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user