| 1946 |
chandransh |
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
3 |
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
4 |
|
|
|
5 |
<mapper namespace="in.shop2020.payment.persistence.PaymentGatewayMapper">
|
|
|
6 |
|
|
|
7 |
<resultMap type="gateway" id="gatewayResult">
|
|
|
8 |
<id property="id" column="id"/>
|
|
|
9 |
<collection property="attributes" javaType="ArrayList" column="id" ofType="gatewayAttribute" select="getAttributesForGateway"/>
|
|
|
10 |
</resultMap>
|
|
|
11 |
|
|
|
12 |
<select id="getPaymentGateway" parameterType="int" resultMap="gatewayResult">
|
|
|
13 |
SELECT * FROM paymentgateway
|
|
|
14 |
WHERE id=#{id}
|
|
|
15 |
</select>
|
|
|
16 |
|
| 4600 |
varun.gupt |
17 |
<select id="getActivePaymentGateways" resultMap="gatewayResult">
|
|
|
18 |
SELECT * FROM paymentgateway WHERE status = 1
|
|
|
19 |
</select>
|
|
|
20 |
|
| 1946 |
chandransh |
21 |
<select id="getAttributesForGateway" parameterType="int" resultType="gatewayAttribute">
|
|
|
22 |
SELECT * FROM gatewayattribute where payment_gateway_id = #{id}
|
|
|
23 |
</select>
|
|
|
24 |
</mapper>
|