def AddNewdRec(dbConn, ustrContent, ustrTypeS, ustrToS, ustrToType, ustrToGroupName, ustrStatusS, execSendTime=None): ustrContent = CTYLB_MainSys_MiscFunc.SafeGetUnicode(ustrContent) ustrTypeS = CTYLB_MainSys_MiscFunc.SafeGetUnicode(ustrTypeS) ustrToS = CTYLB_MainSys_MiscFunc.SafeGetUnicode(ustrToS) ustrToType = CTYLB_MainSys_MiscFunc.SafeGetUnicode(ustrToType) ustrToGroupName = CTYLB_MainSys_MiscFunc.SafeGetUnicode( ustrToGroupName) ustrStatusS = CTYLB_MainSys_MiscFunc.SafeGetUnicode(ustrStatusS) iRetNewRecID = CSkLBDB_CommFuncShare.ExecInsertRecField6( dbConn, CSkLBDB_ow_bot_in_sendchatcontent.s_strTableName, "content", ustrContent, "type_s", ustrTypeS, "to_s", ustrToS, "to_type", ustrToType, "to_group_name", ustrToGroupName, "status_s", ustrStatusS) if (iRetNewRecID > 0): createTime = datetime.now() CSkLBDB_CommFuncShare.ExecUpdateRecField_To_DateTime( dbConn, CSkLBDB_ow_bot_in_sendchatcontent.s_strTableName, "createtime", createTime, "id", str(iRetNewRecID)) if (execSendTime): CSkLBDB_CommFuncShare.ExecUpdateRecField_To_DateTime( dbConn, CSkLBDB_ow_bot_in_sendchatcontent.s_strTableName, "exec_send_time", execSendTime, "id", str(iRetNewRecID)) return iRetNewRecID
def AddNewdRec(dbConn, ustrContent, iTypeS, ustrFromS, iFromType, ustrFromGroupName, iExecStatus): ustrContent = CTYLB_MainSys_MiscFunc.SafeGetUnicode(ustrContent) ustrFromS = CTYLB_MainSys_MiscFunc.SafeGetUnicode(ustrFromS) ustrFromGroupName = CTYLB_MainSys_MiscFunc.SafeGetUnicode( ustrFromGroupName) iRetNewRecID = CSkLBDB_CommFuncShare.ExecInsertRecField6( dbConn, CSkLBDB_ow_bot_out_chatcontent.s_strTableName, "content", ustrContent, "type_s", str(iTypeS), "from_s", ustrFromS, "fromtype", str(iFromType), "from_group_name", ustrFromGroupName, "ex_status", str(iExecStatus)) if (iRetNewRecID > 0): createTime = datetime.now() CSkLBDB_CommFuncShare.ExecUpdateRecField_To_DateTime( dbConn, CSkLBDB_ow_bot_out_chatcontent.s_strTableName, "createtime", createTime, "id", str(iRetNewRecID)) return iRetNewRecID