Rev 1946 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?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="in.shop2020.payment.persistence.PaymentGatewayMapper"><resultMap type="gateway" id="gatewayResult"><id property="id" column="id"/><collection property="attributes" javaType="ArrayList" column="id" ofType="gatewayAttribute" select="getAttributesForGateway"/></resultMap><select id="getPaymentGateway" parameterType="int" resultMap="gatewayResult">SELECT * FROM paymentgatewayWHERE id=#{id}</select><select id="getActivePaymentGateways" resultMap="gatewayResult">SELECT * FROM paymentgateway WHERE status = 1</select><select id="getAttributesForGateway" parameterType="int" resultType="gatewayAttribute">SELECT * FROM gatewayattribute where payment_gateway_id = #{id}</select></mapper>