|  |  | 
 |  |  |     WHERE client_id = ${clientId} | 
 |  |  |     LIMIT 0,1 | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <!--根据农户姓名获取电子钱包账户记录数--> | 
 |  |  |   <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> | 
 |  |  |     SELECT | 
 |  |  |         COUNT(*) AS recordCount | 
 |  |  |     FROM se_wallet wal | 
 |  |  |     INNER JOIN se_client cli ON wal.client_id = cli.id | 
 |  |  |     <where> | 
 |  |  |       <if test = "clientName != null and clientName !=''"> | 
 |  |  |         AND cli.name like CONCAT('%',#{clientName},'%') | 
 |  |  |       </if> | 
 |  |  |     </where> | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <!--根据农户姓名获取电子钱包账户记录--> | 
 |  |  |   <select id="getWallets" resultType="com.dy.pipIrrGlobal.voSe.VoWallet"> | 
 |  |  |     SELECT | 
 |  |  |         CAST(cli.id AS char) AS clientId, | 
 |  |  |         cli.`name`, | 
 |  |  |         cli.clientNum, | 
 |  |  |         cli.phone, | 
 |  |  |         wal.money | 
 |  |  |     FROM se_wallet wal | 
 |  |  |         INNER JOIN se_client cli ON wal.client_id = cli.id | 
 |  |  |     <where> | 
 |  |  |       <if test = "clientName != null and clientName !=''"> | 
 |  |  |         AND cli.name like CONCAT('%',#{clientName},'%') | 
 |  |  |       </if> | 
 |  |  |     </where> | 
 |  |  |     ORDER BY wal.last_operate_time DESC | 
 |  |  |     <trim prefix="limit " > | 
 |  |  |       <if test="start != null and count != null"> | 
 |  |  |         #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
 |  |  |       </if> | 
 |  |  |     </trim> | 
 |  |  |   </select> | 
 |  |  | </mapper> |