insert into attendance_classes( time_offset,clock_count,store_id,clock_type,classes_name,classes_id,leave_offset,late_offset,clock_type_value,max_last_offset ) values ( #{timeOffset},#{clockCount},#{storeId},#{clockType},#{classesName},#{classesId},#{leaveOffset},#{lateOffset},#{clockTypeValue},#{maxLastOffset} ) update attendance_classes t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.time_offset= #{timeOffset} , t.clock_count= #{clockCount} , t.clock_type= #{clockType} , t.classes_name= #{classesName} , t.leave_offset= #{leaveOffset} , t.late_offset= #{lateOffset} , t.max_last_offset= #{maxLastOffset} , t.clock_type_value= #{clockTypeValue} where 1=1 and t.classes_id= #{classesId} and t.store_id= #{storeId}