EnclosedParkingLotConfigSMapper.xml 2.93 KB
<?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.zteits.park.mapper.smapper.EnclosedParkingLotConfigSMapper">
  <resultMap id="BaseResultMap" type="com.zteits.clouds.api.dto.park.dto.ConfigDTO">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="config_type" jdbcType="VARCHAR" property="configType" />
    <result column="config_name" jdbcType="VARCHAR" property="configName" />
    <result column="config_code" jdbcType="VARCHAR" property="configCode" />
    <result column="config_value" jdbcType="VARCHAR" property="configValue" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <result column="sort" jdbcType="INTEGER" property="sort" />
      <collection property="detailList" ofType="com.zteits.clouds.api.dto.park.dto.DetailDTO"
                  select="queryParkRuleDetailList"
                  column="config_code">
      </collection>
  </resultMap>


  <select id="queryAllRuleConfiguration" parameterType="com.zteits.clouds.api.dto.park.param.closecarpark.QueryAllRuleConfigurationRequest"
          resultType="com.zteits.clouds.api.dto.park.dto.AllConfigDTO">
   SELECT
	l.config_code configCode,
	l.config_name configName,
	l.config_type configType,
	l.config_value configValue,
	l.sort,
	l.remarks,
	t.type
    FROM
	enclosed_parking_lot_config l
	LEFT JOIN enclosed_parking_type_code t ON l.config_code = t.config_code
    where t.is_park = #{isPark,jdbcType=VARCHAR}
    group by l.sort asc
  </select>


    <select id="queryParkRuleList" parameterType="com.zteits.clouds.api.dto.park.param.closecarpark.QueryParkRuleConfigurationRequest"
            resultMap="BaseResultMap">
   SELECT
	l.config_code,
	l.config_name,
	l.config_type,
	l.config_value,
	l.sort,
	l.remarks,
	t.type
    FROM
	enclosed_parking_lot_config l
	LEFT JOIN enclosed_parking_type_code t ON l.config_code = t.config_code
    where t.is_park = #{isPark,jdbcType=VARCHAR}
     GROUP BY l.config_code order by l.sort asc
  </select>

    <select id="queryParkRuleDetailList" parameterType="com.zteits.clouds.api.dto.park.param.closecarpark.QueryParkRuleConfigurationRequest"
            resultType="com.zteits.clouds.api.dto.park.dto.DetailDTO">
   SELECT
	c.config_code configCode,
	c.value_detail_code valueDetailCode,
	c.value_desc valueDesc
    FROM
	enclosed_parking_code_detail c
    where c.config_code = #{configCode,jdbcType=VARCHAR}
  </select>


    <select id="queryPlNoRuleList" parameterType="com.zteits.clouds.api.dto.park.param.closecarpark.QueryParkRuleConfigurationRequest"
            resultType="com.zteits.clouds.api.dto.park.dto.ConfigPlNoDTO">
   SELECT
	l.config_code configCode,
	l.config_name configName,
	l.config_type configType,
	l.config_value configValue,
	l.sort,
	l.remarks,
	l.id,
	l.pl_no plNo
    FROM
	enclosed_parking_lot_config l
    where l.pl_no = #{plNo,jdbcType=VARCHAR}
  </select>

</mapper>