<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- ========================================================== -->
<!-- Configuration for ibatis sqlmap mapping. -->
<!-- ========================================================== -->
<!-- ============================================================================= -->
<!-- This file is generated by <tt>borncrm-dalgen</tt>, a DAL (Data Access Layer) -->
<!-- code generation utility specially developed for <tt>rent</tt> project. -->
<!-- -->
<!-- PLEASE DO NOT MODIFY THIS FILE MANUALLY, or else your modification may be -->
<!-- OVERWRITTEN by someone else. To modify the file, you should go to directory -->
<!-- <tt>(project-home)/biz/dal/src/conf/dalgen</tt>, and find the corresponding -->
<!-- configuration files. Modify those files according to your needs, then run -->
<!-- <tt>borncrm-dalgen</tt> to generate this file. -->
<!-- -->
<!-- @author peigen -->
<!-- ============================================================================= -->
<sqlMap namespace="borncrm">
<!-- ============================================= -->
<!-- RESULT MAPS -->
<!-- ============================================= -->
<!-- result maps for database table user_info -->
<resultMap />
</resultMap>
<!-- ============================================= -->
<!-- mapped statements for IbatisUserInfoDAO -->
<!-- ============================================= -->
<!-- mapped statement for IbatisUserInfoDAO.insert -->
<insert >
INSERT /*MS-BORNCRM-USER-INFO-INSERT*/ INTO user_info(id,role,user_name,real_name,password,landline,mobile,mail,row_add_time,row_update_time,parent_id)
VALUES (#id#,#role#,#userName#,#realName#,#password#,#landline#,#mobile#,#mail#,#rowAddTime#,#rowUpdateTime#,#parentId#)
</insert>
<!-- mapped statement for IbatisUserInfoDAO.update -->
<update >
<![CDATA[
update /*MS-BORNCRM-USER-INFO-UPDATE*/ user_info set role=#role#, user_name=#userName#, real_name=#realName#, password=#password#, landline=#landline#, mobile=#mobile#, mail=#mail#, row_add_time=#rowAddTime#, row_update_time=#rowUpdateTime#, parent_id=#parentId# where (id = #id#)
]]>
</update>
<!-- mapped statement for IbatisUserInfoDAO.updatePassword -->
<update >
<![CDATA[
update /*MS-BORNCRM-USER-INFO-UPDATE-PASSWORD*/ user_info set password=#password# where (id = #id#)
]]>
</update>
<!-- mapped statement for IbatisUserInfoDAO.deleteById -->
<delete >
<![CDATA[
delete /*MS-BORNCRM-USER-INFO-DELETE-BY-ID*/ from user_info where (id = #value#)
]]>
</delete>
<!-- mapped statement for IbatisUserInfoDAO.findById -->
<select >
<![CDATA[
select /*MS-BORNCRM-USER-INFO-FIND-BY-ID*/ id, role, user_name, real_name, password, landline, mobile, mail, row_add_time, row_update_time, parent_id from user_info where status='1' and (id = #value#)
]]>
</select>
<!-- mapped statement for IbatisUserInfoDAO.findByLoginName -->
<select >
<![CDATA[
select /*MS-BORNCRM-USER-INFO-FIND-BY-LOGIN-NAME*/ id, role, user_name, real_name, password, landline, mobile, mail, row_add_time, row_update_time, parent_id from user_info where status='1' and (user_name = #value#)
]]>
</select>
<!-- mapped statement for IbatisUserInfoDAO.findRealName -->
<select >
<![CDATA[
select /*MS-BORNCRM-USER-INFO-FIND-REAL-NAME*/ id, role, user_name, real_name, password, landline, mobile, mail, row_add_time, row_update_time, parent_id from user_info where status='1' and (real_name = #value#)
]]>
</select>
<!-- mapped statement for IbatisUserInfoDAO.searchDataCount -->
<select >
mail = #mail#
</isNotEmpty>
</dynamic>
</select>
<!-- mapped statement for IbatisUserInfoDAO.loadData -->
<select >
mail = #userInfo.mail#
</isNotEmpty>
</dynamic>
order by row_add_time DESC
LIMIT #limitStart#,#pageSize#;
</select>
<!-- mapped statement for IbatisUserInfoDAO.loadData -->
<select >
SELECT /*MS-USER-INFO-FIND-BY-ROLE*/ id, role, user_name, real_name, password, landline, mobile, mail, row_add_time, row_update_time, parent_id FROM user_info where status=1 and (role = #value#)
</select>
</sqlMap>