Files
nanguangszwlback/mhd_bms/src/main/resources/mapper/BillingParamsMapper.xml
T
2026-02-09 14:41:55 +08:00

83 lines
3.9 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.mhd.bms.domain.billingRules.repository.mapper.BillingParamsMapper">
<resultMap type="com.mhd.bms.domain.billingRules.repository.po.BillingParamsPO" id="BillingParamsResult">
<result property="billingParamsId" column="billing_params_id" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="createByName" column="create_by_name" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="updateByName" column="update_by_name" />
<result property="delFlag" column="del_flag" />
<result property="topOrganizationId" column="top_organization_id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="billingParamsName" column="billing_params_name" />
<result property="billingIllustrate" column="billing_illustrate" />
<result property="billingParamsJson" column="billing_params_json" />
<result property="billingOutputJson" column="billing_output_json" />
<result property="preSetRules" column="pre_set_rules" />
</resultMap>
<sql id="selectBillingParamsPo">
select billing_params_id, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag, top_organization_id, organization_id, organization_name, billing_params_name, billing_illustrate, billing_params_json, billing_output_json, pre_set_rules from billing_params
</sql>
<sql id="selectBillingParamsPo1">
<where>
<if test="createByName != null and createByName != ''">
and create_by_name like concat('%', #{createByName}, '%')
</if>
<if test="updateByName != null and updateByName != ''">
and update_by_name like concat('%', #{updateByName}, '%')
</if>
<if test="topOrganizationId != null ">
and top_organization_id = #{topOrganizationId}
</if>
<if test="organizationId != null ">
and organization_id = #{organizationId}
</if>
<if test="organizationName != null and organizationName != ''">
and organization_name like concat('%', #{organizationName}, '%')
</if>
<if test="billingParamsName != null and billingParamsName != ''">
and billing_params_name like concat('%', #{billingParamsName}, '%')
</if>
<if test="billingIllustrate != null and billingIllustrate != ''">
and billing_illustrate = #{billingIllustrate}
</if>
<if test="billingParamsJson != null and billingParamsJson != ''">
and billing_params_json = #{billingParamsJson}
</if>
<if test="billingOutputJson != null and billingOutputJson != ''">
and billing_output_json = #{billingOutputJson}
</if>
<if test="preSetRules != null and preSetRules != ''">
and pre_set_rules = #{preSetRules}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.billingRules.repository.todo.BillingParamsDO" resultMap="BillingParamsResult">
<include refid="selectBillingParamsPo"/>
<include refid="selectBillingParamsPo1"/>
</select>
<select id="queryListByRulesId" resultType="com.mhd.bms.domain.billingRules.repository.po.BillingParamsPO" parameterType="java.lang.Long">
SELECT
*
FROM
billing_params
WHERE
del_flag = 1
AND billing_rules_id = #{billingRulesId}
</select>
</mapper>