| | |
| | | <!--@Table se_client_card--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardAddr" jdbcType="VARCHAR" property="cardaddr" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="cardNum" jdbcType="VARCHAR" property="cardnum" /> |
| | | <result column="clientNum" jdbcType="VARCHAR" property="clientnum" /> |
| | | <result column="money" jdbcType="FLOAT" property="money" /> |
| | | <result column="state" jdbcType="TINYINT" property="state" /> |
| | | <result column="createDt" jdbcType="TIMESTAMP" property="createdt" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardAddr, clientId, money, `state`, createDt, replaceDt, rechargeDt, lossDtDt, |
| | | cancelDt, unlockDt, reversalDt, consumeDt, lastOper, remarks |
| | | id, cardAddr, cardNum, clientNum, money, `state`, createDt, replaceDt, rechargeDt, |
| | | lossDtDt, cancelDt, unlockDt, reversalDt, consumeDt, lastOper, remarks |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <!--依据水卡地址获取水卡编号(主键)--> |
| | | <!--依据水卡地址获取水卡编号(12月19日废弃)--> |
| | | <select id="getCardIdByAddr" resultType="java.lang.Long"> |
| | | SELECT id AS cardId FROM se_client_card WHERE cardAddr = #{cardAddr} |
| | | </select> |
| | | |
| | | <!--根据水卡编号获取水卡表主键(12月19日添加后废弃)--> |
| | | <select id="getCardIdByNum" resultType="java.lang.Long"> |
| | | SELECT id AS cardId FROM se_client_card WHERE cardNum = #{cardNum} |
| | | </select> |
| | | |
| | | <!--根据水卡编号获取水卡表主键及农户编号--> |
| | | <select id="getCardIdAndClientNum" resultType="java.util.Map"> |
| | | SELECT id AS cardId, clientNum FROM se_client_card WHERE cardNum = #{cardNum} |
| | | </select> |
| | | |
| | | |
| | | <!--根据行政区划串模块查询水卡编号--> |
| | | <select id="getCardNumOfMax" resultType="java.lang.String"> |
| | | SELECT cardNum |
| | | FROM se_client_card |
| | | WHERE cardNum LIKE CONCAT('%',#{areaCode},'%') |
| | | ORDER BY cardNum desc |
| | | LIMIT 0,1 |
| | | </select> |
| | | |
| | | <!--添加水卡记录--> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_client_card (cardAddr, clientId, money, |
| | | `state`, createDt, replaceDt, |
| | | rechargeDt, lossDtDt, cancelDt, |
| | | unlockDt, reversalDt, consumeDt, |
| | | lastOper, remarks) |
| | | values (#{cardaddr,jdbcType=VARCHAR}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, |
| | | #{state,jdbcType=TINYINT}, #{createdt,jdbcType=TIMESTAMP}, #{replacedt,jdbcType=TIMESTAMP}, |
| | | #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP}, #{canceldt,jdbcType=TIMESTAMP}, |
| | | #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP}, #{consumedt,jdbcType=TIMESTAMP}, |
| | | #{lastoper,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}) |
| | | insert into se_client_card (id, cardAddr, cardNum, clientNum, |
| | | money, `state`, createDt, |
| | | replaceDt, rechargeDt, lossDtDt, |
| | | cancelDt, unlockDt, reversalDt, |
| | | consumeDt, lastOper, remarks |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{cardaddr,jdbcType=VARCHAR}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR}, |
| | | #{money,jdbcType=FLOAT}, #{state,jdbcType=TINYINT}, #{createdt,jdbcType=TIMESTAMP}, |
| | | #{replacedt,jdbcType=TIMESTAMP}, #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP}, |
| | | #{canceldt,jdbcType=TIMESTAMP}, #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP}, |
| | | #{consumedt,jdbcType=TIMESTAMP}, #{lastoper,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR} |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_client_card |
| | |
| | | <if test="cardaddr != null"> |
| | | cardAddr, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | <if test="cardnum != null"> |
| | | cardNum, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | |
| | | <if test="cardaddr != null"> |
| | | #{cardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | |
| | | <if test="cardaddr != null"> |
| | | cardAddr = #{cardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update se_client_card |
| | | set cardAddr = #{cardaddr,jdbcType=VARCHAR}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | `state` = #{state,jdbcType=TINYINT}, |
| | | createDt = #{createdt,jdbcType=TIMESTAMP}, |