-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
805 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
124 changes: 124 additions & 0 deletions
124
com.tk.orm/bin/Debug/mappers/DEVICE_STATUS_CLEANMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<sqlMap namespace="EntityModel" xmlns="http://ibatis.apache.org/mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<alias> | ||
<!--类的别名--> | ||
<typeAlias alias="DEVICE_STATUS_CLEAN" type="com.tk.orm.model.DEVICE_STATUS_CLEAN,com.tk.orm"/> | ||
</alias> | ||
<parameterMaps> | ||
<parameterMap id="DEVICE_STATUS_CLEAN_params"> | ||
<parameter property="GPSIndex" column="GPSIndex" type="long" dbType="bigint" ></parameter> | ||
<parameter property="aDatetime" column="aDatetime" type="DateTime" dbType="datetime" ></parameter> | ||
<parameter property="X" column="X" type="double" dbType="float" ></parameter> | ||
<parameter property="Y" column="Y" type="double" dbType="float" ></parameter> | ||
<parameter property="Height" column="Height" type="double" dbType="float" ></parameter> | ||
<parameter property="XSpeed" column="XSpeed" type="double" dbType="float" ></parameter> | ||
<parameter property="YSpeed" column="YSpeed" type="double" dbType="float" ></parameter> | ||
<parameter property="Hspeed" column="Hspeed" type="double" dbType="float" ></parameter> | ||
<parameter property="Style" column="Style" type="int" dbType="int" ></parameter> | ||
<parameter property="tableName" column="tableName" ></parameter> | ||
</parameterMap> | ||
</parameterMaps> | ||
<resultMaps> | ||
<resultMap id="DEVICE_STATUS_CLEANResult" class="DEVICE_STATUS_CLEAN"> | ||
<result property="GPSIndex" column="GPSIndex"/> | ||
<result property="aDatetime" column="aDatetime"/> | ||
<result property="X" column="X"/> | ||
<result property="Y" column="Y"/> | ||
<result property="Height" column="Height"/> | ||
<result property="XSpeed" column="XSpeed"/> | ||
<result property="YSpeed" column="YSpeed"/> | ||
<result property="Hspeed" column="Hspeed"/> | ||
<result property="Style" column="Style"/> | ||
</resultMap> | ||
</resultMaps> | ||
<statements> | ||
<!--查询所有记录--> | ||
<select id="SelectAllDEVICE_STATUS_CLEAN" resultMap="DEVICE_STATUS_CLEANResult"> | ||
<![CDATA[SELECT | ||
GPSIndex, | ||
aDatetime, | ||
X, | ||
Y, | ||
Height, | ||
XSpeed, | ||
YSpeed, | ||
Hspeed, | ||
Style | ||
FROM [$tableName$]]]> | ||
</select> | ||
<!--查询单条记录--> | ||
<select id="SelectDEVICE_STATUS_CLEANById" parameterMap="DEVICE_STATUS_CLEAN_params" resultMap="DEVICE_STATUS_CLEANResult" extends="SelectAllDEVICE_STATUS_CLEAN"> | ||
<![CDATA[ where GPSIndex = #GPSIndex# ]]> | ||
</select> | ||
|
||
|
||
|
||
<!--插入新记录--> | ||
<insert id="InsertDEVICE_STATUS_CLEAN" parameterMap="DEVICE_STATUS_CLEAN_params"> | ||
select 1; | ||
<!--id自动生成的示例用法--> | ||
<selectKey property="GPSIndex" type="post" resultClass="int"> | ||
< | ||
VALUES(#aDatetime#, #X#, #Y#, #Height#, #XSpeed#, #YSpeed#, #Hspeed#, #Style# ) | ||
SELECT SCOPE_IDENTITY() as GPSIndex | ||
]]> | ||
</selectKey> | ||
|
||
</insert> | ||
|
||
<!--更新单条记录--> | ||
<update id="UpdateDEVICE_STATUS_CLEAN" parameterMap="DEVICE_STATUS_CLEAN_params"> | ||
<![CDATA[Update [$tableName$] | ||
SET | ||
aDatetime=#aDatetime# | ||
, | ||
X=#X# | ||
, | ||
Y=#Y# | ||
, | ||
Height=#Height# | ||
, | ||
XSpeed=#XSpeed# | ||
, | ||
YSpeed=#YSpeed# | ||
, | ||
Hspeed=#Hspeed# | ||
, | ||
Style=#Style# | ||
Where GPSIndex=#GPSIndex#]]> | ||
</update> | ||
|
||
<!--根据主键删除单条记录--> | ||
<delete id="DeleteDEVICE_STATUS_CLEANById" parameterMap="DEVICE_STATUS_CLEAN_params"> | ||
<![CDATA[Delete From [$tableName$] Where GPSIndex=#value#]]> | ||
</delete> | ||
<select id="SelectDEVICE_STATUS_CLEANQuery" parameterMap="DEVICE_STATUS_CLEAN_params" resultMap="DEVICE_STATUS_CLEANResult" extends="SelectAllDEVICE_STATUS_CLEAN"> | ||
<dynamic prepend="where"> | ||
<isPropertyAvailable prepend="" property="GPSIndex"> | ||
<isGreaterThan prepend="and" property="GPSIndex" compareValue="0"> | ||
GPSIndex = #GPSIndex# | ||
</isGreaterThan> | ||
</isPropertyAvailable> | ||
<isPropertyAvailable prepend="and" property="aDatetime"> | ||
aDatetime =#aDatetime# | ||
</isPropertyAvailable> | ||
</dynamic> | ||
<!--order by--> | ||
<dynamic> | ||
order by | ||
GPSIndex | ||
</dynamic> | ||
</select> | ||
</statements> | ||
</sqlMap> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using com.tk.orm.model; | ||
using System.Collections; | ||
namespace com.tk.orm.dao | ||
{ | ||
public class DEVICE_STATUSDao | ||
{ | ||
public static object Insert(DEVICE_STATUS parameterObject, string tableName) | ||
{ | ||
Hashtable inparam = new Hashtable(); | ||
if (parameterObject != null) | ||
{ | ||
if (parameterObject.aDatetime != null) | ||
{ | ||
inparam.Add("aDatetime", parameterObject.aDatetime); | ||
} | ||
if (parameterObject.dltaH != null) | ||
{ | ||
inparam.Add("dltaH", parameterObject.dltaH); | ||
} | ||
if (parameterObject.dltaX != null) | ||
{ | ||
inparam.Add("dltaX", parameterObject.dltaX); | ||
} | ||
if (parameterObject.dltaY != null) | ||
{ | ||
inparam.Add("dltaY", parameterObject.dltaY); | ||
} | ||
if (parameterObject.GPSIndex != null) | ||
{ | ||
inparam.Add("GPSIndex", parameterObject.GPSIndex); | ||
} | ||
if (parameterObject.Height != null) | ||
{ | ||
inparam.Add("Height", parameterObject.Height); | ||
} | ||
if (parameterObject.X != null) | ||
{ | ||
inparam.Add("X", parameterObject.X); | ||
} | ||
if (parameterObject.Y != null) | ||
{ | ||
inparam.Add("Y", parameterObject.Y); | ||
} | ||
} | ||
inparam.Add("tableName", tableName); | ||
|
||
return BaseDA.Insert2("InsertDEVICE_STATUS", inparam); | ||
} | ||
|
||
public static int Update(DEVICE_STATUS parameterObject, string tableName) | ||
{ | ||
Hashtable inparam = new Hashtable(); | ||
if (parameterObject != null) | ||
{ | ||
if (parameterObject.aDatetime != null) | ||
{ | ||
inparam.Add("aDatetime", parameterObject.aDatetime); | ||
} | ||
if (parameterObject.dltaH != null) | ||
{ | ||
inparam.Add("dltaH", parameterObject.dltaH); | ||
} | ||
if (parameterObject.dltaX != null) | ||
{ | ||
inparam.Add("dltaX", parameterObject.dltaX); | ||
} | ||
if (parameterObject.dltaY != null) | ||
{ | ||
inparam.Add("dltaY", parameterObject.dltaY); | ||
} | ||
if (parameterObject.GPSIndex != null) | ||
{ | ||
inparam.Add("GPSIndex", parameterObject.GPSIndex); | ||
} | ||
if (parameterObject.Height != null) | ||
{ | ||
inparam.Add("Height", parameterObject.Height); | ||
} | ||
if (parameterObject.X != null) | ||
{ | ||
inparam.Add("X", parameterObject.X); | ||
} | ||
if (parameterObject.Y != null) | ||
{ | ||
inparam.Add("Y", parameterObject.Y); | ||
} | ||
} | ||
inparam.Add("tableName", tableName); | ||
return BaseDA.Update2("UpdateDEVICE_STATUS", inparam); | ||
} | ||
|
||
public static int Delete(int primaryKeyId, string tableName) | ||
{ | ||
Hashtable inparam = new Hashtable(); | ||
inparam.Add("GPSIndex", primaryKeyId); | ||
inparam.Add("tableName", tableName); | ||
return BaseDA.Delete2("DeleteDEVICE_STATUSById", inparam); | ||
} | ||
|
||
public static DEVICE_STATUS Get(int primaryKeyId, string tableName) | ||
{ | ||
Hashtable inparam = new Hashtable(); | ||
inparam.Add("GPSIndex", primaryKeyId); | ||
inparam.Add("tableName", tableName); | ||
return BaseDA.QueryForObject<DEVICE_STATUS>("SelectDEVICE_STATUSById", inparam); | ||
} | ||
|
||
public static IList<DEVICE_STATUS> QueryForList(string tableName, DEVICE_STATUS parameterObject = null) | ||
{ | ||
Hashtable inparam = new Hashtable(); | ||
if (parameterObject != null) | ||
{ | ||
if (parameterObject.aDatetime != null) | ||
{ | ||
inparam.Add("aDatetime", parameterObject.aDatetime); | ||
} | ||
|
||
} | ||
inparam.Add("tableName", tableName); | ||
return BaseDA.QueryForList<DEVICE_STATUS>("SelectDEVICE_STATUSQuery", inparam); | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.