def Update_Status_OpTime(dbConn, iRecID, iNewStatus, operateTime): strClause = 'id=%d' % (iRecID) CSkLBDB_CommFuncShare.ExecUpdateRecField1( dbConn, CSkLBDB_dest_param_status.s_strTableName, strClause, "status", str(iNewStatus)) CSkLBDB_dest_param_status.UpdateRecOperateTime(dbConn, iRecID, operateTime)
def AddNewdRec(dbConn, strObjName, strPwdHash, strDbName, strTableName, strFieldName, strSignIDField, iLastExID): strObjName = CTYLB_MainSys_MiscFunc.SafeGetUnicode(strObjName) strPwdHash = CTYLB_MainSys_MiscFunc.SafeGetUnicode(strPwdHash) strDbName = CTYLB_MainSys_MiscFunc.SafeGetUnicode(strDbName) strTableName = CTYLB_MainSys_MiscFunc.SafeGetUnicode(strTableName) strFieldName = CTYLB_MainSys_MiscFunc.SafeGetUnicode(strFieldName) strSignIDField = CTYLB_MainSys_MiscFunc.SafeGetUnicode(strSignIDField) iOrigRecID = CSkLBDB_dest_operate.GetRecID_By_Name(dbConn, strObjName) if (iOrigRecID == 0): iRetNewRecID = CSkLBDB_CommFuncShare.ExecInsertRecField7( dbConn, CSkLBDB_dest_operate.s_strTableName, "obj_name", strObjName, "pwd_hash", strPwdHash, "database_name", strDbName, "table_name", strTableName, "read_field_name_array", strFieldName, "sign_field_id", strSignIDField, "last_ex_id_value", str(iLastExID)) else: # 更新字段 strClause = 'id=%d' % (iOrigRecID) CSkLBDB_CommFuncShare.ExecUpdateRecField4( dbConn, CSkLBDB_dest_operate.s_strTableName, strClause, "pwd_hash", strPwdHash, "database_name", strDbName, "table_name", strTableName, "read_field_name_array", strFieldName) CSkLBDB_CommFuncShare.ExecUpdateRecField1( dbConn, CSkLBDB_dest_operate.s_strTableName, strClause, "sign_field_id", strSignIDField) iRetNewRecID = iOrigRecID return iRetNewRecID
def Update_LastIDValue(dbConn, iRecID, iLastIDValue): strClause = "id=%d" % (iRecID) CSkLBDB_CommFuncShare.ExecUpdateRecField1( dbConn, CSkLBDB_dest_operate.s_strTableName, strClause, "last_ex_id_value", str(iLastIDValue))