TLqdataAddMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.chinaitop.depot.intelligent.grainsituation.mapper.TLqdataAddMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="v_lq_data_id" property="vLqDataId" jdbcType="INTEGER" />
  7. <result column="i_floor_num" property="iFloorNum" jdbcType="INTEGER" />
  8. <result column="f_max_f_data" property="fMaxFData" jdbcType="DECIMAL" />
  9. <result column="f_min_f_data" property="fMinFData" jdbcType="DECIMAL" />
  10. <result column="f_avg_f_data" property="fAvgFData" jdbcType="DECIMAL" />
  11. <result column="f_max_around" property="fMaxAround" jdbcType="DECIMAL" />
  12. <result column="f_min_ around" property="fMinAround" jdbcType="DECIMAL" />
  13. <result column="f_avg_ around" property="fAvgAround" jdbcType="DECIMAL" />
  14. <result column="f_max_center" property="fMaxCenter" jdbcType="DECIMAL" />
  15. <result column="f_min_center" property="fMinCenter" jdbcType="DECIMAL" />
  16. <result column="f_avg_center" property="fAvgCenter" jdbcType="DECIMAL" />
  17. </resultMap>
  18. <sql id="Example_Where_Clause" >
  19. <where >
  20. <foreach collection="oredCriteria" item="criteria" separator="or" >
  21. <if test="criteria.valid" >
  22. <trim prefix="(" suffix=")" prefixOverrides="and" >
  23. <foreach collection="criteria.criteria" item="criterion" >
  24. <choose >
  25. <when test="criterion.noValue" >
  26. and ${criterion.condition}
  27. </when>
  28. <when test="criterion.singleValue" >
  29. and ${criterion.condition} #{criterion.value}
  30. </when>
  31. <when test="criterion.betweenValue" >
  32. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  33. </when>
  34. <when test="criterion.listValue" >
  35. and ${criterion.condition}
  36. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  37. #{listItem}
  38. </foreach>
  39. </when>
  40. </choose>
  41. </foreach>
  42. </trim>
  43. </if>
  44. </foreach>
  45. </where>
  46. </sql>
  47. <sql id="Update_By_Example_Where_Clause" >
  48. <where >
  49. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  50. <if test="criteria.valid" >
  51. <trim prefix="(" suffix=")" prefixOverrides="and" >
  52. <foreach collection="criteria.criteria" item="criterion" >
  53. <choose >
  54. <when test="criterion.noValue" >
  55. and ${criterion.condition}
  56. </when>
  57. <when test="criterion.singleValue" >
  58. and ${criterion.condition} #{criterion.value}
  59. </when>
  60. <when test="criterion.betweenValue" >
  61. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  62. </when>
  63. <when test="criterion.listValue" >
  64. and ${criterion.condition}
  65. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  66. #{listItem}
  67. </foreach>
  68. </when>
  69. </choose>
  70. </foreach>
  71. </trim>
  72. </if>
  73. </foreach>
  74. </where>
  75. </sql>
  76. <sql id="Base_Column_List" >
  77. id, v_lq_data_id, i_floor_num, f_max_f_data, f_min_f_data, f_avg_f_data, f_max_around,
  78. "f_min_ around", "f_avg_ around", f_max_center, f_min_center, f_avg_center
  79. </sql>
  80. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAddExample" >
  81. select
  82. <if test="distinct" >
  83. distinct
  84. </if>
  85. <include refid="Base_Column_List" />
  86. from t_lqdata_add
  87. <if test="_parameter != null" >
  88. <include refid="Example_Where_Clause" />
  89. </if>
  90. <if test="orderByClause != null" >
  91. order by ${orderByClause}
  92. </if>
  93. </select>
  94. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  95. select
  96. <include refid="Base_Column_List" />
  97. from t_lqdata_add
  98. where id = #{id,jdbcType=VARCHAR}
  99. </select>
  100. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  101. delete from t_lqdata_add
  102. where id = #{id,jdbcType=VARCHAR}
  103. </delete>
  104. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAddExample" >
  105. delete from t_lqdata_add
  106. <if test="_parameter != null" >
  107. <include refid="Example_Where_Clause" />
  108. </if>
  109. </delete>
  110. <insert id="insert" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
  111. insert into t_lqdata_add (id, v_lq_data_id, i_floor_num,
  112. f_max_f_data, f_min_f_data, f_avg_f_data,
  113. f_max_around, "f_min_ around", "f_avg_ around",
  114. f_max_center, f_min_center, f_avg_center
  115. )
  116. values (#{id,jdbcType=VARCHAR}, #{vLqDataId,jdbcType=INTEGER}, #{iFloorNum,jdbcType=INTEGER},
  117. #{fMaxFData,jdbcType=DECIMAL}, #{fMinFData,jdbcType=DECIMAL}, #{fAvgFData,jdbcType=DECIMAL},
  118. #{fMaxAround,jdbcType=DECIMAL}, #{fMinAround,jdbcType=DECIMAL}, #{fAvgAround,jdbcType=DECIMAL},
  119. #{fMaxCenter,jdbcType=DECIMAL}, #{fMinCenter,jdbcType=DECIMAL}, #{fAvgCenter,jdbcType=DECIMAL}
  120. )
  121. </insert>
  122. <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
  123. insert into t_lqdata_add
  124. <trim prefix="(" suffix=")" suffixOverrides="," >
  125. <if test="id != null" >
  126. id,
  127. </if>
  128. <if test="vLqDataId != null" >
  129. v_lq_data_id,
  130. </if>
  131. <if test="iFloorNum != null" >
  132. i_floor_num,
  133. </if>
  134. <if test="fMaxFData != null" >
  135. f_max_f_data,
  136. </if>
  137. <if test="fMinFData != null" >
  138. f_min_f_data,
  139. </if>
  140. <if test="fAvgFData != null" >
  141. f_avg_f_data,
  142. </if>
  143. <if test="fMaxAround != null" >
  144. f_max_around,
  145. </if>
  146. <if test="fMinAround != null" >
  147. "f_min_ around",
  148. </if>
  149. <if test="fAvgAround != null" >
  150. "f_avg_ around",
  151. </if>
  152. <if test="fMaxCenter != null" >
  153. f_max_center,
  154. </if>
  155. <if test="fMinCenter != null" >
  156. f_min_center,
  157. </if>
  158. <if test="fAvgCenter != null" >
  159. f_avg_center,
  160. </if>
  161. </trim>
  162. <trim prefix="values (" suffix=")" suffixOverrides="," >
  163. <if test="id != null" >
  164. #{id,jdbcType=VARCHAR},
  165. </if>
  166. <if test="vLqDataId != null" >
  167. #{vLqDataId,jdbcType=INTEGER},
  168. </if>
  169. <if test="iFloorNum != null" >
  170. #{iFloorNum,jdbcType=INTEGER},
  171. </if>
  172. <if test="fMaxFData != null" >
  173. #{fMaxFData,jdbcType=DECIMAL},
  174. </if>
  175. <if test="fMinFData != null" >
  176. #{fMinFData,jdbcType=DECIMAL},
  177. </if>
  178. <if test="fAvgFData != null" >
  179. #{fAvgFData,jdbcType=DECIMAL},
  180. </if>
  181. <if test="fMaxAround != null" >
  182. #{fMaxAround,jdbcType=DECIMAL},
  183. </if>
  184. <if test="fMinAround != null" >
  185. #{fMinAround,jdbcType=DECIMAL},
  186. </if>
  187. <if test="fAvgAround != null" >
  188. #{fAvgAround,jdbcType=DECIMAL},
  189. </if>
  190. <if test="fMaxCenter != null" >
  191. #{fMaxCenter,jdbcType=DECIMAL},
  192. </if>
  193. <if test="fMinCenter != null" >
  194. #{fMinCenter,jdbcType=DECIMAL},
  195. </if>
  196. <if test="fAvgCenter != null" >
  197. #{fAvgCenter,jdbcType=DECIMAL},
  198. </if>
  199. </trim>
  200. </insert>
  201. <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAddExample" resultType="java.lang.Integer" >
  202. select count(*) from t_lqdata_add
  203. <if test="_parameter != null" >
  204. <include refid="Example_Where_Clause" />
  205. </if>
  206. </select>
  207. <update id="updateByExampleSelective" parameterType="map" >
  208. update t_lqdata_add
  209. <set >
  210. <if test="record.id != null" >
  211. id = #{record.id,jdbcType=VARCHAR},
  212. </if>
  213. <if test="record.vLqDataId != null" >
  214. v_lq_data_id = #{record.vLqDataId,jdbcType=INTEGER},
  215. </if>
  216. <if test="record.iFloorNum != null" >
  217. i_floor_num = #{record.iFloorNum,jdbcType=INTEGER},
  218. </if>
  219. <if test="record.fMaxFData != null" >
  220. f_max_f_data = #{record.fMaxFData,jdbcType=DECIMAL},
  221. </if>
  222. <if test="record.fMinFData != null" >
  223. f_min_f_data = #{record.fMinFData,jdbcType=DECIMAL},
  224. </if>
  225. <if test="record.fAvgFData != null" >
  226. f_avg_f_data = #{record.fAvgFData,jdbcType=DECIMAL},
  227. </if>
  228. <if test="record.fMaxAround != null" >
  229. f_max_around = #{record.fMaxAround,jdbcType=DECIMAL},
  230. </if>
  231. <if test="record.fMinAround != null" >
  232. "f_min_ around" = #{record.fMinAround,jdbcType=DECIMAL},
  233. </if>
  234. <if test="record.fAvgAround != null" >
  235. "f_avg_ around" = #{record.fAvgAround,jdbcType=DECIMAL},
  236. </if>
  237. <if test="record.fMaxCenter != null" >
  238. f_max_center = #{record.fMaxCenter,jdbcType=DECIMAL},
  239. </if>
  240. <if test="record.fMinCenter != null" >
  241. f_min_center = #{record.fMinCenter,jdbcType=DECIMAL},
  242. </if>
  243. <if test="record.fAvgCenter != null" >
  244. f_avg_center = #{record.fAvgCenter,jdbcType=DECIMAL},
  245. </if>
  246. </set>
  247. <if test="_parameter != null" >
  248. <include refid="Update_By_Example_Where_Clause" />
  249. </if>
  250. </update>
  251. <update id="updateByExample" parameterType="map" >
  252. update t_lqdata_add
  253. set id = #{record.id,jdbcType=VARCHAR},
  254. v_lq_data_id = #{record.vLqDataId,jdbcType=INTEGER},
  255. i_floor_num = #{record.iFloorNum,jdbcType=INTEGER},
  256. f_max_f_data = #{record.fMaxFData,jdbcType=DECIMAL},
  257. f_min_f_data = #{record.fMinFData,jdbcType=DECIMAL},
  258. f_avg_f_data = #{record.fAvgFData,jdbcType=DECIMAL},
  259. f_max_around = #{record.fMaxAround,jdbcType=DECIMAL},
  260. "f_min_ around" = #{record.fMinAround,jdbcType=DECIMAL},
  261. "f_avg_ around" = #{record.fAvgAround,jdbcType=DECIMAL},
  262. f_max_center = #{record.fMaxCenter,jdbcType=DECIMAL},
  263. f_min_center = #{record.fMinCenter,jdbcType=DECIMAL},
  264. f_avg_center = #{record.fAvgCenter,jdbcType=DECIMAL}
  265. <if test="_parameter != null" >
  266. <include refid="Update_By_Example_Where_Clause" />
  267. </if>
  268. </update>
  269. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
  270. update t_lqdata_add
  271. <set >
  272. <if test="vLqDataId != null" >
  273. v_lq_data_id = #{vLqDataId,jdbcType=INTEGER},
  274. </if>
  275. <if test="iFloorNum != null" >
  276. i_floor_num = #{iFloorNum,jdbcType=INTEGER},
  277. </if>
  278. <if test="fMaxFData != null" >
  279. f_max_f_data = #{fMaxFData,jdbcType=DECIMAL},
  280. </if>
  281. <if test="fMinFData != null" >
  282. f_min_f_data = #{fMinFData,jdbcType=DECIMAL},
  283. </if>
  284. <if test="fAvgFData != null" >
  285. f_avg_f_data = #{fAvgFData,jdbcType=DECIMAL},
  286. </if>
  287. <if test="fMaxAround != null" >
  288. f_max_around = #{fMaxAround,jdbcType=DECIMAL},
  289. </if>
  290. <if test="fMinAround != null" >
  291. "f_min_ around" = #{fMinAround,jdbcType=DECIMAL},
  292. </if>
  293. <if test="fAvgAround != null" >
  294. "f_avg_ around" = #{fAvgAround,jdbcType=DECIMAL},
  295. </if>
  296. <if test="fMaxCenter != null" >
  297. f_max_center = #{fMaxCenter,jdbcType=DECIMAL},
  298. </if>
  299. <if test="fMinCenter != null" >
  300. f_min_center = #{fMinCenter,jdbcType=DECIMAL},
  301. </if>
  302. <if test="fAvgCenter != null" >
  303. f_avg_center = #{fAvgCenter,jdbcType=DECIMAL},
  304. </if>
  305. </set>
  306. where id = #{id,jdbcType=VARCHAR}
  307. </update>
  308. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
  309. update t_lqdata_add
  310. set v_lq_data_id = #{vLqDataId,jdbcType=INTEGER},
  311. i_floor_num = #{iFloorNum,jdbcType=INTEGER},
  312. f_max_f_data = #{fMaxFData,jdbcType=DECIMAL},
  313. f_min_f_data = #{fMinFData,jdbcType=DECIMAL},
  314. f_avg_f_data = #{fAvgFData,jdbcType=DECIMAL},
  315. f_max_around = #{fMaxAround,jdbcType=DECIMAL},
  316. "f_min_ around" = #{fMinAround,jdbcType=DECIMAL},
  317. "f_avg_ around" = #{fAvgAround,jdbcType=DECIMAL},
  318. f_max_center = #{fMaxCenter,jdbcType=DECIMAL},
  319. f_min_center = #{fMinCenter,jdbcType=DECIMAL},
  320. f_avg_center = #{fAvgCenter,jdbcType=DECIMAL}
  321. where id = #{id,jdbcType=VARCHAR}
  322. </update>
  323. </mapper>