|  |  | 
 |  |  |                     <result column="name" property="name" /> | 
 |  |  |                     <result column="desc" property="desc" /> | 
 |  |  |                     <result column="code" property="code" /> | 
 |  |  |                     <result column="upper" property="upper" /> | 
 |  |  |                     <result column="lower" property="lower" /> | 
 |  |  |                     <result column="default_unit_key" property="defaultUnitKey" /> | 
 |  |  |                     <result column="create_time" property="createTime" /> | 
 |  |  |                     <result column="update_time" property="updateTime" /> | 
 |  |  |                     <result column="is_delete" property="isDelete" /> | 
 |  |  |         </resultMap> | 
 |  |  |  | 
 |  |  |     <sql id="Base_Column_List"> | 
 |  |  |             s.id,s.name,s.code,s.desc,s.create_time,s.update_time,s.is_delete | 
 |  |  |             s.id,s.name,s.code,s.desc,s.upper,s.lower,s.default_unit_key,s.create_time,s.update_time,s.is_delete | 
 |  |  |     </sql> | 
 |  |  |  | 
 |  |  |     <insert id="insertOne" parameterType="com.moral.api.entity.Sensor"> | 
 |  |  | 
 |  |  |             <if test="desc != null"> | 
 |  |  |                 `desc`, | 
 |  |  |             </if> | 
 |  |  |             <if test="upper != null"> | 
 |  |  |                 upper, | 
 |  |  |             </if> | 
 |  |  |             <if test="lower != null"> | 
 |  |  |                 lower, | 
 |  |  |             </if> | 
 |  |  |             <if test="defaultUnitKey != null"> | 
 |  |  |                 default_unit_key, | 
 |  |  |             </if> | 
 |  |  |         </trim> | 
 |  |  |         <trim prefix="values (" suffix=")" suffixOverrides=","> | 
 |  |  |             <if test="name != null"> | 
 |  |  | 
 |  |  |             </if> | 
 |  |  |             <if test="desc != null"> | 
 |  |  |                 #{desc}, | 
 |  |  |             </if> | 
 |  |  |             <if test="upper != null"> | 
 |  |  |                 #{upper}, | 
 |  |  |             </if> | 
 |  |  |             <if test="lower != null"> | 
 |  |  |                 #{lower}, | 
 |  |  |             </if> | 
 |  |  |             <if test="defaultUnitKey != null"> | 
 |  |  |                 #{defaultUnitKey}, | 
 |  |  |             </if> | 
 |  |  |         </trim> | 
 |  |  |     </insert> | 
 |  |  | 
 |  |  |             <if test="code != null"> | 
 |  |  |                 code = #{code}, | 
 |  |  |             </if> | 
 |  |  |             <if test="upper != null"> | 
 |  |  |                 <if test="upper == ''"> | 
 |  |  |                     upper = null, | 
 |  |  |                 </if> | 
 |  |  |                 <if test="upper != ''"> | 
 |  |  |                     upper = #{upper}, | 
 |  |  |                 </if> | 
 |  |  |             </if> | 
 |  |  |             <if test="lower != null"> | 
 |  |  |                 <if test="lower == ''"> | 
 |  |  |                     lower = null, | 
 |  |  |                 </if> | 
 |  |  |                 <if test="lower != ''"> | 
 |  |  |                     lower = #{lower}, | 
 |  |  |                 </if> | 
 |  |  |             </if> | 
 |  |  |             <if test="default_unit_key != null"> | 
 |  |  |                 default_unit_key = #{default_unit_key}, | 
 |  |  |             </if> | 
 |  |  |             <if test="isDelete != null"> | 
 |  |  |                 is_delete = #{isDelete}, | 
 |  |  |             </if> |