Blame view

parking-module-pay/src/main/resources/mybatis/smapper/TdBParkCardRelSMapper.xml 1.75 KB
55f68655   王彪总   新项目
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  <?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.zteits.pay.mapper.smapper.TdBParkCardRelSMapper" >
    <!-- <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdBParkCardRel" >
      <id column="id" property="id" jdbcType="BIGINT" />
      <result column="pl_no" property="plNo" jdbcType="VARCHAR" />
      <result column="card_no" property="cardNo" jdbcType="VARCHAR" />
      <result column="total_num" property="totalNum" jdbcType="INTEGER" />
      <result column="sell_num" property="sellNum" jdbcType="INTEGER" />
      <result column="price" property="price" jdbcType="BIGINT" />
      <result column="discount_no" property="discountNo" jdbcType="VARCHAR" />
      <result column="data_state" property="dataState" jdbcType="INTEGER" />
      <result column="create_empid" property="createEmpid" jdbcType="BIGINT" />
      <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
      <result column="modify_empid" property="modifyEmpid" jdbcType="BIGINT" />
      <result column="modify_date" property="modifyDate" jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List" >
      id, pl_no, card_no, total_num, sell_num, price, discount_no, data_state, create_empid, 
      create_date, modify_empid, modify_date
    </sql>
    
    查询当前停车场中所有的卡编码
    <select id="queryCardNosByPlNo" resultType="java.lang.String" parameterType="java.lang.String" >
      select 
      card_no as cardNo
      from td_b_park_card_rel
      where 1=1
      and data_state = 1
      AND (total_num - sell_num) > 0   (当前停车场该卡发售总量 - 当前停车场该卡已售数量) > 0
      and pl_no = #{plNo,jdbcType=VARCHAR}
    </select> -->
    
    
  </mapper>