You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?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.epmet.dao.stats.DimGridDao">
|
|
|
|
|
|
|
|
<select id="getLastCreatedGridDimEntity" resultType="com.epmet.entity.stats.DimGridEntity">
|
|
|
|
SELECT *
|
|
|
|
FROM dim_grid
|
|
|
|
WHERE DEL_FLAG = 0
|
|
|
|
ORDER BY CREATED_TIME DESC
|
|
|
|
LIMIT 1
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectCustomerGrid" resultType="com.epmet.dto.group.result.CustomerGridInfoResultDTO">
|
|
|
|
SELECT
|
|
|
|
dg.agency_id AS agencyId,
|
|
|
|
dg.id AS gridId,
|
|
|
|
dc.id AS customerId
|
|
|
|
FROM
|
|
|
|
dim_grid dg
|
|
|
|
LEFT JOIN dim_customer dc ON dc.id = dg.customer_id
|
|
|
|
WHERE
|
|
|
|
dc.del_flag = 0
|
|
|
|
AND dg.del_flag = 0
|
|
|
|
</select>
|
|
|
|
<select id="getGridListByCustomerId" resultType="com.epmet.entity.stats.DimGridEntity">
|
|
|
|
SELECT
|
|
|
|
ID,
|
|
|
|
CUSTOMER_ID,
|
|
|
|
AGENCY_ID
|
|
|
|
FROM
|
|
|
|
dim_grid
|
|
|
|
WHERE
|
|
|
|
DEL_FLAG = 0
|
|
|
|
AND CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|