<?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.oying.mapper.PayConfigMapper">
|
<resultMap id="BaseResultMap" type="com.oying.domain.PayConfig">
|
<id column="config_id" property="configId"/>
|
<result column="config_name" property="configName"/>
|
<result column="config_type" property="configType"/>
|
<result column="mch_id" property="mchId"/>
|
<result column="enabled" property="enabled"/>
|
<result column="create_by" property="createBy"/>
|
<result column="create_time" property="createTime"/>
|
<result column="update_by" property="updateBy"/>
|
<result column="update_time" property="updateTime"/>
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
config_id, config_name, config_type, mch_id, enabled, create_by, create_time, update_by, update_time
|
</sql>
|
<update id="disabled">
|
update tool_pay_config set enabled = false where config_id != #{configId}
|
</update>
|
<update id="using">
|
update tool_pay_config set enabled = true where config_id = #{configId}
|
</update>
|
|
<select id="findAll" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List"/>
|
from tool_pay_config
|
order by config_id desc
|
</select>
|
<select id="findInfo" resultType="com.oying.domain.PayConfig">
|
select * from tool_pay_config where enabled = true and oying = #{oying} limit 1
|
</select>
|
</mapper>
|