• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ERRINFO函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ERRINFO函数的典型用法代码示例。如果您正苦于以下问题:C++ ERRINFO函数的具体用法?C++ ERRINFO怎么用?C++ ERRINFO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ERRINFO函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: halAe_GetProdInfo

/**
 *****************************************************************************
 * @ingroup icp_hal
 * 
 * @description
 *      Get the CPU Type and product maj/min revisions, and return
 *      the CPU type, and the combined maj and min revision.
 *      
 * @assumptions
 *      None
 * @sideEffects
 *      None
 * @blocking
 *      No
 * @reentrant
 *      No
 * @threadSafe
 *      Yes
 * 
 * @param prodType - IN A pointer to the location of product type
 * @param prodRev - IN A pointer to the location of product revision
 *
 * @retval HALAE_SUCCESS Operation was successful
 * @retval HALAE_BADLIB Bad HAL library which wasn't initialized
 * @retval HALAE_BADARG Bad function argument  
 * @retval HALAE_FAIL Operation failed
 * 
 * 
 *****************************************************************************/
int 
halAe_GetProdInfo(icp_firml_handle_t *handle, 
                  unsigned int *prodType, 
                  unsigned int *prodRev)
{
    if(!handle || !prodType || !prodRev) 
    {
        ERRINFO(("handle=0x%p, prodType=0x%p, prodRev=0x%p\n",
                  handle, prodType, prodRev)); 
        return (HALAE_BADARG);
    }    
    HALAE_VERIFY_LIB(handle);

    switch(handle->halHandle->PrdMinType)
    {
    case HWID_ACCEL_COMP:
        *prodType = ACCEL_COMP_TYPE; 
        *prodRev = 
                (handle->halHandle->PrdMajRev << PID_MAJOR_REV_BITPOS) 
                | handle->halHandle->PrdMinRev;
        break;

    case HWID_ACCEL_COMP_C:
        *prodType = ACCELCOMP_C_CPU_TYPE; 
        *prodRev =
                (handle->halHandle->PrdMajRev << PID_MAJOR_REV_BITPOS)
                | handle->halHandle->PrdMinRev;
        break;

    case HWID_ACCEL_COMP_B:
        *prodType = ACCELCOMP_B_CPU_TYPE; 
        *prodRev =
                (handle->halHandle->PrdMajRev << PID_MAJOR_REV_BITPOS)
                | handle->halHandle->PrdMinRev;
        break;

    case HWID_ACCEL_COMP_RS:
        *prodType = ACCELCOMP_RS_CPU_TYPE; 
        *prodRev =
                (handle->halHandle->PrdMajRev << PID_MAJOR_REV_BITPOS)
                | handle->halHandle->PrdMinRev;
        break;

    case HWID_ACCEL_COMP_R:
        *prodType = ACCELCOMP_R_CPU_TYPE; 
        *prodRev = 
                (handle->halHandle->PrdMajRev << PID_MAJOR_REV_BITPOS) 
                | handle->halHandle->PrdMinRev;
        break;

    default: 
        ERRINFO(("PrdMinType=0x%x\n", handle->halHandle->PrdMinType)); 
        return (HALAE_FAIL);
    }
    return (HALAE_SUCCESS);
}
开发者ID:lecoq,项目名称:qat_c2xxx,代码行数:85,代码来源:halAeChip.c


示例2: UcLo_AssignHalPages

/**
 *****************************************************************************
 * @ingroup uclo
 * 
 * @description
 *    
 *
 * @param pAeData - IN
 * @param hwAeNum - IN
 *
 * @retval   UCLO_SUCCESS, UCLO_MEMFAIL, UCLO_BADARG
 * 
 * 
 *****************************************************************************/
int 
UcLo_AssignHalPages(icp_firml_handle_t *handle,
                    uclo_aedata_t *pAeData, 
                    unsigned int hwAeNum)
{
    int ii=0, halPageNum=0, numPages=0, cc=0;
    unsigned int ss=0;

    if(pAeData == NULL)
    {
        ERRINFO(("bad argument, pAeData is NULL\n")); 
        return (UCLO_BADARG);
    }    
    
    for(ss = 0; ss < pAeData->numSlices; ss++)
    {
        numPages += pAeData->aeSlice[ss].encapImage->imagePtr->numOfPages;
    }
    pAeData->numPageXref = numPages;
    if(numPages == 0) 
    {
        return (UCLO_SUCCESS);
    }
    if(!(pAeData->pageXref =
            (uclo_pagexref_t *)osalMemAlloc(sizeof(uclo_pagexref_t) *
                                            pAeData->numPageXref))) 
    {
        ERRINFO(("malloc error\n"));  
        return (UCLO_MEMFAIL);
    }    
    osalMemSet(pAeData->pageXref, (UINT8)cc,
               sizeof(uclo_pagexref_t) * pAeData->numPageXref);

    halAe_SetNumPages(handle, (unsigned char)hwAeNum, pAeData->numPageXref);
    for(ss = 0; ss < pAeData->numSlices; ss++)
    {
        for(ii = 0;
            ii < pAeData->aeSlice[ss].encapImage->imagePtr->numOfPages;
            ii++)
        {
            halAe_SetPageData(handle, (unsigned char)hwAeNum, halPageNum,
                      pAeData->aeSlice[ss].pages[ii].encapPage->begVirtAddr,
                      pAeData->aeSlice[ss].pages[ii].encapPage->begPhyAddr,
                      pAeData->aeSlice[ss].pages[ii].encapPage->numMicroWords);
            pAeData->aeSlice[ss].pages[ii].halPageNum = halPageNum;
            pAeData->pageXref[halPageNum].aeSliceIndex = ss;
            pAeData->pageXref[halPageNum].pageNum = ii;
            halPageNum++;
        }
    }
    return (UCLO_SUCCESS);
}
开发者ID:lecoq,项目名称:qat_c2xxx,代码行数:66,代码来源:uclo_overlay.c


示例3: doAccount

static int doAccount(TRANS& trans)
{
    int ret=0;
    T_t_account tCardAccount;

    memset(&tCardAccount,0,sizeof(tCardAccount));

    ret=DB_t_account_read_lock_by_c0_and_accno(trans.cardaccno,&tCardAccount);
    if(ret)
    {
        if(DB_NOTFOUND==ret)
            return ERRINFO(E_NOTEXIST_CARDACCNO,trans.cardaccno);
        else
            return E_DB_ACCOUNT_R;
    }
    if(tCardAccount.status[0]!=STATUS_NORMAL)
    {
        DB_t_account_free_lock_by_c0();
        return E_CARDACC_LOGOUT;
    }
    if(amtcmp(tCardAccount.balance,0)!=0)
    {
        writelog(LOG_ERR,"balance[%.2lf]",tCardAccount.balance);
        DB_t_account_free_lock_by_c0();
        return ERRINFO(E_CARDACC_BALANCE_NOZERO,tCardAccount.balance);
    }
    if(amtcmp(tCardAccount.foregift,0)!=0)
    {
        writelog(LOG_ERR,"foregift[%.2lf]",tCardAccount.foregift);
        DB_t_account_free_lock_by_c0();
        return ERRINFO(E_CARDACC_FOREGIFT_NOZERO,tCardAccount.foregift);
    }
    tCardAccount.status[0]=STATUS_DELETE;
    tCardAccount.lastcardbal=trans.cardbefbal;
    tCardAccount.lastpaycnt=trans.paycnt-1;
    tCardAccount.paycnt=trans.paycnt;
    tCardAccount.cardbal=0;
    tCardAccount.frozebal=0;
    tCardAccount.subsidybal=0;
    tCardAccount.availbal=0;
    strcpy(tCardAccount.closedate,trans.accdate);
    ret=DB_t_account_update_lock_by_c0(&tCardAccount);
    if(ret)
    {
        if(DB_NOTFOUND==ret)
            return ERRINFO(E_NOTEXIST_CARDACCNO,tCardAccount.accno);
        else
            return E_DB_ACCOUNT_U;
    }
    return 0;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:51,代码来源:F846303.cpp


示例4: doCard

static int doCard(T_t_card& tCard)
{

	int ret=0;
	CAccTrans *pAccTrans=CAccTrans::getInstance();	
	TRANS& trans=pAccTrans->trans;

	ret=DB_t_card_read_by_cardno(trans.cardno,&tCard);
	if(ret)
	{
		writelog(LOG_ERR,"cardno[%d]",trans.cardno);
		if(DB_NOTFOUND==ret)
			return E_NOTEXIST_CARDNO;
		else 
			return E_DB_CARD_R;
	}
	trans.cardtype=tCard.cardtype;
	trans.feetype=tCard.feetype;
	if(tCard.status[0]!=STATUS_NORMAL)
	{
		return ERRINFO(E_CARD_LOGOUT,trans.cardno);
	}	
	if('1'==tCard.frozeflag[0])
	{
		return ERRINFO(E_CARD_FREEZE,trans.cardno);
	}
	if('1'==tCard.lossflag[0])
	{
		return ERRINFO(E_CARD_LOST,trans.cardno);
	}	
	if('1'==tCard.badflag[0])
	{
		return ERRINFO(E_CARD_BADRECORD,trans.cardno);
	}	
	if('1'==tCard.lockflag[0])
	{
		return ERRINFO(E_CARDNO_LOCKED,trans.cardno);
	}	
	//比较卡物理ID是否相同
	if(strcmp(tCard.cardphyid,trans.cardphyid)!=0)
	{
		writelog(LOG_ERR,"db cardphyid[%s],input cardphyid[%s]",tCard.cardphyid,trans.cardphyid);
		return E_CARD_PHYNO_DIFFER;
	}
	//检查卡的有效期
	if(strcmp(tCard.expiredate,trans.transdate)<=0)
		return E_CARD_EXPIRED;
	return 0;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:49,代码来源:F846336.cpp


示例5: ParseCmd_P

// speed set.
u8 ParseCmd_P(char * pCmdStr, CMD_ST *pstCmd)
{
    ACTION_ST stAction;
    if(pCmdStr == NULL)
    {
        return 0;
    }

    fprintf(stderr,"\t%s:\t开始解析\n",pCmdStr);

    if (HfnParseActionP(pCmdStr,&stAction) == false)
    {
        ERRINFO("P指令解析错误");
        return 0;
    }

    fprintf(stderr,"\t设置目标速度:%d\n",stAction.m_stActionSpeed.m_slSpeed);

    // 执行速度切换的动作.
    pstCmd->m_astNodeChain[pstCmd->m_ucLen].m_stCond.m_ucCondtionType = COND_TYPE_ONCE;
    pstCmd->m_astNodeChain[pstCmd->m_ucLen].m_stAction = stAction;
    pstCmd->m_ucLen++;

    fprintf(stderr,"\t解析完成,命令ID = %u\n",(unsigned)pstCmd->m_ucLen);

    return 1;
}
开发者ID:handsoul,项目名称:gmc,代码行数:28,代码来源:Parser.c


示例6: UcLo_FreeAeData

/**
 *****************************************************************************
 * @ingroup uclo
 * 
 * @description
 *   Free resources associated with Overlay AE data
 *
 * @param pAeData - IN
 *
 * @retval   UCLO_SUCCESS, UCLO_BADARGG
 * 
 * 
 *****************************************************************************/
int 
UcLo_FreeAeData(uclo_aedata_t *pAeData)
{
    unsigned int ss=0;

    if(pAeData == NULL)
    {
        ERRINFO(("bad argument, pAeData is NULL\n ")); 
        return (UCLO_BADARG);
    }    
    
    for(ss=0; ss < pAeData->numSlices; ss++)
    {
        if(pAeData->aeSlice[ss].regions) 
        {
            osalMemFree(pAeData->aeSlice[ss].regions);
        }    
        pAeData->aeSlice[ss].regions = NULL;

        if(pAeData->aeSlice[ss].pages) 
        {
            osalMemFree(pAeData->aeSlice[ss].pages);
        }    
        pAeData->aeSlice[ss].pages = NULL;
    }
    if(pAeData->pageXref) 
    {
        osalMemFree(pAeData->pageXref);
    }
    pAeData->pageXref = NULL;

    pAeData->relocUstoreDram = 0;
    return (UCLO_SUCCESS);
}
开发者ID:lecoq,项目名称:qat_c2xxx,代码行数:47,代码来源:uclo_overlay.c


示例7: ParseCmd_S

// 设置IO. / shM7.
// 信号名称 - shM7.
// 格式: setio = sh + pos + sigName
//             = sl + pos + sigName.
u8 ParseCmd_S(char * pCmdStr,  CMD_ST *pstCmd)
{
    static s8 s_ascSigBuf[40];
    ACTION_ST stAction;

    if (HfnParseActionS(pCmdStr,&stAction) == false)
    {
        ERRINFO("S命令解析错误: %s\n",pCmdStr);
        return false;
    }

    GetSigNameByID(stAction.m_stActionSig.m_ucRid,(char *)s_ascSigBuf);

    // sh/sl.
    fprintf(stderr,"\t设置信号:%s 为 %d,位置:%d\n",
            s_ascSigBuf,stAction.m_stActionSig.m_slSetVal,stAction.m_stActionSig.m_slPos);

    pstCmd->m_astNodeChain[pstCmd->m_ucLen].m_stCond.m_ucCondtionType = COND_TYPE_ONCE;
    pstCmd->m_astNodeChain[pstCmd->m_ucLen].m_stAction.m_iActionType = ACTION_TYPE_SIG;
    pstCmd->m_astNodeChain[pstCmd->m_ucLen].m_stAction = stAction;

    pstCmd->m_ucLen++;

    fprintf(stderr,"\t解析完成,命令ID = %u\n",(unsigned)pstCmd->m_ucLen);

    return 1;
}
开发者ID:handsoul,项目名称:gmc,代码行数:31,代码来源:Parser.c


示例8: checklosecardacc

static int checklosecardacc(int cardno,T_t_card  *tCard,T_t_account *tAccount)
{
	int ret = DB_t_card_read_by_cardno(cardno, tCard);
	if(tCard->status[0]!=STATUS_NORMAL)
	{
		DB_t_card_free_lock_by_cur();
		return ERRINFO(E_CARD_LOGOUT,cardno);
	}	
	/*
	if('1'==tCard->frozeflag[0])
	{
		DB_t_card_free_lock_by_cur();
		return ERRINFO(E_CARD_FREEZE,cardno);
	}
	if('1'==tCard->badflag[0])
	{
		DB_t_card_free_lock_by_cur();
		return ERRINFO(E_CARD_BADRECORD,cardno);
	}	
	// 只有挂失状态才能无卡退
	if('1'!=tCard->lossflag[0])
	{
		DB_t_card_free_lock_by_cur();
		return ERRINFO(E_CARDNO_NOLOST,cardno);
	}
	*/
	ret=DB_t_account_read_by_accno(tCard->accno,tAccount);
	if(ret)
	{
		writelog(LOG_ERR,"accno[%s]",tCard->accno);
		if(DB_NOTFOUND==ret)
			return ERRINFO(E_NOTEXIST_ACCNO,tCard->accno);
		else 
			return E_DB_ACCOUNT_R;
	}
	if(tAccount->status[0]!=STATUS_NORMAL)
	{
		return ERRINFO(E_CARDACC_LOGOUT,tAccount->accno);
	}	
	return 0;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:41,代码来源:F850020.cpp


示例9: F240000

int F240000(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret=0;
	CAccTrans *pAccTrans=CAccTrans::getInstance();
	TRANS& trans=pAccTrans->trans;
	trans.termid=atoi(rPack->sorder2);
	char seed_key[17] = "";
	char sInputPwd[33] = "";											//存放加密前的卡密钥
	char sCryptPwd[33] = "";									//存放加密后的卡密钥

	T_t_card		card;
	memset(&card,0,sizeof(card));


	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);
	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_LVOL0,F_DAMT0,F_DAMT1,F_DAMT2,F_LVOL1,F_LVOL2,F_SDATE0,0);

	trans.cardno=rPack->lvol0;
	if(trans.cardno<1)
		trans.cardno=atoi(rPack->sserial0);
	ret=DB_t_card_read_by_cardno(trans.cardno,&card);
	if(ret)
	{
		writelog(LOG_ERR,"Create serial_no error,error code=[%d]",ret);
		return ERRINFO(E_CARD_LOGOUT,trans.cardno);
	}
	if(card.status[0]!=STATUS_NORMAL)
	{
		return ERRINFO(E_CARD_LOGOUT,trans.cardno);
	}	
	if('1'==card.frozeflag[0])
	{
		return ERRINFO(E_CARD_FREEZE,trans.cardno);
	}
	if('1'==card.lossflag[0])
	{
		return ERRINFO(E_CARD_LOST,trans.cardno);
	}	
	if('1'==card.badflag[0])
	{
		return ERRINFO(E_CARD_BADRECORD,trans.cardno);
	}	
	if('1'==card.lockflag[0])
	{
		return ERRINFO(E_CARDNO_LOCKED,trans.cardno);
	}	
	des2src(sInputPwd,rPack->scust_limit);		//卡密码
	strcpy(seed_key,STATIC_SEED_KEY);			//种子密钥
	EncodePwd(seed_key,sInputPwd,sCryptPwd,0);	//加密
	if(strcmp(sCryptPwd,card.cardpwd)!=0)
	{
		writelog(LOG_ERR,"card err input[%s]db[%s]",sCryptPwd,card.cardpwd);
		return E_CARDPWD;
	}
	PutRow(handle,out_pack,pRetCode,szMsg);
	return 0;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:60,代码来源:F240000.cpp


示例10: F847318

int F847318(TRUSERID *handle,int iRequest,ST_PACK *in_pack,int *pRetCode,char *szMsg)
{

	int cardno=0;
	int custid,ret;
	
	custid = in_pack->lvol0;
	
	if(custid == 0 )
	{
		return E_INPUT_DATA_INVAILD;
	}
	
	if(in_pack->lvol1 >0)
		cardno = in_pack->lvol1;
	else
	{
		ret = get_cardno_by_custid(custid,&cardno);
		if(ret)
		{
			return ret;
		}
	}
	T_t_card tCard;
	memset(&tCard,0,sizeof tCard);
	ret = DB_t_card_read_by_cardno(cardno,&tCard);
	if(ret)
	{
		if(DB_NOTFOUND == ret)
			return  ERRINFO(E_NOTEXIST_CARDNO,cardno);
		else
			return E_DB_CARD_R;
	}
	// 检查卡密码
	if(strcmp(in_pack->sstatus0,TYPE_YES) == 0)
	{
		ret = CheckUserPswd(in_pack->semp_pwd,tCard.cardpwd);
		if(ret)
		{
			return  E_CARDPWD;
		}
	}
	des2src(in_pack->semp,in_pack->scust_limit);
	in_pack->lwithdraw_flag = in_pack->lvol6;
	in_pack->lvol0=tCard.cardno;
	in_pack->sstatus1[0]='1';
	ret = F846307(handle,iRequest,in_pack,pRetCode,szMsg);
	if(ret)
		return ret;
	return 0;
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:51,代码来源:F847318.cpp


示例11: doAccount

static int doAccount(TRANS& trans,char *cardaccno)
{
	int ret=0;
	T_t_account tCardAccount;

	memset(&tCardAccount,0,sizeof(tCardAccount));

	ret=DB_t_account_read_lock_by_c0_and_accno(cardaccno,&tCardAccount);
	if(ret)
	{
		if(DB_NOTFOUND==ret)
			return ERRINFO(E_NOTEXIST_CARDACCNO,cardaccno);
		else
			return E_DB_ACCOUNT_R;
	}
	if(tCardAccount.status[0]!=STATUS_NORMAL)
	{
		DB_t_account_free_lock_by_c0();
		return ERRINFO(E_CARDACC_LOGOUT,tCardAccount.accno);
	}
	if(amtcmp(tCardAccount.balance,0)!=0)
	{
		DB_t_account_free_lock_by_c0();
		return ERRINFO(E_CARDACC_BALANCE_NOZERO,tCardAccount.balance);
	}
	tCardAccount.availbal=0;
	tCardAccount.frozebal=0;
	tCardAccount.lastcardbal=0;
	ret=DB_t_account_update_lock_by_c0(&tCardAccount);
	if(ret)
	{
		if(DB_NOTFOUND==ret)
			return ERRINFO(E_NOTEXIST_CARDACCNO,cardaccno);
		else
			return E_DB_ACCOUNT_U;
	}
	return 0;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:38,代码来源:F846310.cpp


示例12: CheckCardStatus

static int CheckCardStatus()
{
    CAccTrans& ats = CAccTrans::GetInst();
    TRANS& trans = ats.trans;
    T_t_card tCard;
    memset(&tCard, 0, sizeof(tCard));
    int ret = 0;
    ret = DB_t_card_read_by_cardno(trans.cardno, &tCard);
    if(ret)
    {
        writelog(LOG_ERR, "cardno[%d]", trans.cardno);
        if(DB_NOTFOUND == ret)
            return ERRINFO(E_NOTEXIST_CARDNO, trans.cardno);
        else
            return E_DB_CARD_R;
    }
    if(tCard.status[0] != STATUS_NORMAL)
    {
        return ERRINFO(E_CARD_LOGOUT, trans.cardno);
    }
    if('1' == tCard.frozeflag[0])
    {
        return ERRINFO(E_CARD_FREEZE, trans.cardno);
    }
    if('1' == tCard.lossflag[0])
    {
        return ERRINFO(E_CARD_LOST, trans.cardno);
    }
    if('1' == tCard.badflag[0])
    {
        return ERRINFO(E_CARD_BADRECORD, trans.cardno);
    }
    //检查卡的有效期
    if(strcmp(tCard.expiredate, trans.transdate) <= 0)
        return E_CARD_EXPIRED;
    trans.cardphytype = tCard.cardphytype;
    return 0;
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:38,代码来源:F200001.cpp


示例13: HfnParseActionP

bool HfnParseActionP(char * pCmdStr, ACTION_ST * pstAction)
{
    s32 slSpdSeq = 0;
    if (pCmdStr == NULL
       || (*pCmdStr != 'P' && *pCmdStr != 'p'))
    {
        return false;
    }

    pCmdStr++;// 跳过字符[pP]

    if (GetDigit(pCmdStr,&slSpdSeq) == false)
    {
        ERRINFO("速度指针解析错误");
        return false;
    }

    pstAction->m_iActionType = ACTION_TYPE_SPD;
    pstAction->m_stActionPos.m_slPos = slSpdSeq;
 
    return true;
}
开发者ID:handsoul,项目名称:gmc,代码行数:22,代码来源:Parser.c


示例14: UcLo_ClearAeData

/**
 *****************************************************************************
 * @ingroup uclo
 * 
 * @description
 *     Initialize UcLo_AeData structure as unused
 *
 * @param pAeData - IN
 *
 * @retval   UCLO_SUCCESS, UCLO_BADARG
 * 
 * 
 *****************************************************************************/
int 
UcLo_ClearAeData(uclo_aedata_t *pAeData)
{
    unsigned int ss = 0;

    if(pAeData == NULL)
    {
        ERRINFO(("bad argument, pAeData is NULL\n"));  
        return (UCLO_BADARG);
    }    
    
    for(ss=0; ss < pAeData->numSlices; ss++)
    {
        pAeData->aeSlice[ss].regions = NULL;
        pAeData->aeSlice[ss].pages   = NULL;
        pAeData->aeSlice[ss].encapImage = NULL;
    }
    pAeData->numSlices = 0;
    pAeData->numPageXref = 0;
    pAeData->pageXref = NULL;
    pAeData->relocUstoreDram = (unsigned int)-1;
    return (UCLO_SUCCESS);
}
开发者ID:lecoq,项目名称:qat_c2xxx,代码行数:36,代码来源:uclo_overlay.c


示例15: DoCardInsteadCancel

//取消换卡
static int DoCardInsteadCancel(TRUSERID *handle,ST_PACK *rPack,int *pRetCode,char *szMsg) {
    int ret=0;
    CAccTrans *pAccTrans=CAccTrans::getInstance();
    TRANS& trans=pAccTrans->trans;
    ST_CPACK aPack;
    ST_PACK *outPack = &(aPack.pack);

    ResetNormalCPack(&aPack,0,1);

    SetCol(handle,0);

    SetCol(handle,F_LVOL1,F_LSAFE_LEVEL2,F_LVOL4,F_LVOL5,
           F_SALL_NAME,F_SPAGER,F_SCERT_NO,
           F_SEMAIL2,F_SMARKET_CODE,F_SDATE0,
           F_LVOL0,F_STX_PWD,F_LVOL8,F_LVOL6,F_LSAFE_LEVEL,F_SMARKET_CODE2,F_SHOLDER_AC_NO,
           F_SORDER0,F_SEMP,F_SDATE3,F_STIME3,F_LVOL11,F_LVOL12,
           F_LWITHDRAW_FLAG,F_LSERIAL1,F_VSMESS,F_SNAME2,0);

    T_t_card  tCard;
    memset(&tCard,0,sizeof(tCard));
    ret=DB_t_card_read_by_cardno(trans.cardno,&tCard);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return ERRINFO(E_NOTEXIST_CARDNO,trans.cardno);
        else
            return E_DB_CARD_R;
    }
    if(tCard.status[0]!=STATUS_NORMAL) {
        return ERRINFO(E_CARD_LOGOUT,trans.cardno);
    }
    if('1'==tCard.frozeflag[0]) {
        return ERRINFO(E_CARD_FREEZE,trans.cardno);
    }
    if('1'==tCard.lossflag[0]) {
        return ERRINFO(E_CARD_LOST,trans.cardno);
    }
    if('1'==tCard.badflag[0]) {
        return ERRINFO(E_CARD_BADRECORD,trans.cardno);
    }
    T_t_account tCardAccount;
    memset(&tCardAccount,0,sizeof(tCardAccount));
    ret=DB_t_account_read_by_accno(tCard.accno,&tCardAccount);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return ERRINFO(E_NOTEXIST_CARDACCNO,tCard.accno);
        else
            return E_DB_ACCOUNT_R;
    }

    T_t_customer  customer;
    memset(&customer,0,sizeof(customer));
    if(tCard.custid) {
        ret=DB_t_customer_read_by_custid(tCard.custid,&customer);
        if(ret) {
            if(DB_NOTFOUND==ret)
                return ERRINFO(E_NOTEXIST_CUSTOMER,tCard.custid);
            else
                return E_DB_CUSTOMER_R;
        }
    }
    char cardpwd[33]="";
    char key[17]="";
    strcpy(key,STATIC_SEED_KEY);
    EncodePwd(key,cardpwd,tCard.cardpwd, 1);
    T_t_cardinsteaddtl cardinsteaddtl;

    memset(&cardinsteaddtl,0,sizeof(cardinsteaddtl));
    ret=DB_t_cardinsteaddtl_read_lock_by_c0_and_cardno(trans.cardno,&cardinsteaddtl);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return E_DB_CARDINSTEADDTL_N;
        else
            return E_DB_CARDINSTEADDTL_R;
    }
    if(cardinsteaddtl.status[0]==STATUS_NORMAL) {
        T_t_transdtl transdtl;
        memset(&transdtl,0,sizeof(transdtl));

        des2src(transdtl.transdate,trans.transdate);
        des2src(transdtl.transtime,trans.transtime);
        des2src(transdtl.accdate,pAccTrans->trans.accdate);
        des2src(transdtl.acctime,trans.acctime);
        transdtl.termid=trans.termid;
        transdtl.termseqno=trans.termseqno;
        transdtl.transcode=trans.transcode;
        transdtl.paytype=trans.fundtype;
        des2src(transdtl.voucherno,trans.voucherno);
        transdtl.cardno=trans.cardno;
        transdtl.purseno=trans.purseno;
        transdtl.cardcnt=cardinsteaddtl.oldcardcnt;
        transdtl.cardbefbal=cardinsteaddtl.oldcardbal;
        transdtl.cardaftbal=transdtl.cardbefbal;

        transdtl.managefee=trans.totalfeeamt;
        transdtl.amount=trans.totaltransamt;
        transdtl.custid=tCard.custid;
        des2src(transdtl.custname,customer.custname);
        des2src(transdtl.stuempno,customer.stuempno);
        des2src(transdtl.opercode,trans.opercode);
//.........这里部分代码省略.........
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:101,代码来源:F846325.cpp


示例16: DoCardInstead

static int DoCardInstead(TRUSERID *handle,ST_PACK *rPack,int *pRetCode,char *szMsg) {
    int ret=0;
    CAccTrans *pAccTrans=CAccTrans::getInstance();
    TRANS& trans=pAccTrans->trans;
    ST_CPACK aPack;
    ST_PACK *outPack = &(aPack.pack);

    ResetNormalCPack(&aPack,0,1);


    SetCol(handle,0);

    SetCol(handle,F_LVOL1,F_LSAFE_LEVEL2,F_LVOL4,F_LVOL5,
           F_SALL_NAME,F_SPAGER,F_SCERT_NO,F_LSAFE_LEVEL,F_SMARKET_CODE2,F_SHOLDER_AC_NO,
           F_SEMAIL2,F_SMARKET_CODE,F_SDATE0,
           F_LVOL0,F_STX_PWD,F_LVOL8,F_LVOL6,
           F_SORDER0,F_SEMP,F_SDATE3,F_STIME3,F_LVOL11,F_LVOL12,
           F_LWITHDRAW_FLAG,F_LSERIAL1,F_VSMESS,F_SNAME2,0);

    T_t_card  tCard;
    memset(&tCard,0,sizeof(tCard));
    ret=DB_t_card_read_lock_by_cur_and_cardno(trans.cardno,&tCard);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return ERRINFO(E_NOTEXIST_CARDNO,trans.cardno);
        else
            return E_DB_CARD_R;
    }
    if(tCard.status[0]!=STATUS_NORMAL) {
        DB_t_card_free_lock_by_cur();
        return ERRINFO(E_CARD_LOGOUT,trans.cardno);
    }
    if('1'==tCard.frozeflag[0]) {
        DB_t_card_free_lock_by_cur();
        return ERRINFO(E_CARD_FREEZE,trans.cardno);
    }
    if('1'==tCard.lossflag[0]) {
        DB_t_card_free_lock_by_cur();
        return ERRINFO(E_CARD_LOST,trans.cardno);
    }
    if('1'==tCard.badflag[0]) {
        DB_t_card_free_lock_by_cur();
        return ERRINFO(E_CARD_BADRECORD,trans.cardno);
    }
    tCard.status[0]=STATUS_DELETE;
    des2src(tCard.closedate,trans.transdate);
    ret=DB_t_card_update_lock_by_cur(&tCard);
    if(ret) {
        return E_DB_CARD_U;
    }
    memset(tCard.closedate,0,sizeof(tCard.closedate));
    tCard.status[0]=STATUS_NORMAL;
    T_t_account tCardAccount;
    memset(&tCardAccount,0,sizeof(tCardAccount));
    ret=DB_t_account_read_by_accno(tCard.accno,&tCardAccount);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return ERRINFO(E_NOTEXIST_CARDACCNO,tCard.accno);
        else
            return E_DB_ACCOUNT_R;
    }
    int existflag=0;
    ret=IsExistUnGetSubsidy(tCard.cardno,&existflag);
    if(ret) {
        return ret;
    }
    if(existflag) {
        ERRTIP("有未领补助,请领取补助后再换卡");
        return E_COMMON_ERR;
    }
    T_t_customer  customer;
    memset(&customer,0,sizeof(customer));
    if(tCard.custid) {
        ret=DB_t_customer_read_by_custid(tCard.custid,&customer);
        if(ret) {
            if(DB_NOTFOUND==ret)
                return ERRINFO(E_NOTEXIST_CUSTOMER,tCard.custid);
            else
                return E_DB_CUSTOMER_R;
        }
        des2src(trans.stuempno,customer.stuempno);
        des2src(trans.custname,customer.custname);
        trans.custid=customer.custid;
    }
    char cardpwd[33]="";
    char key[17]="";
    strcpy(key,STATIC_SEED_KEY);
    EncodePwd(key,cardpwd,tCard.cardpwd, 1);
    T_t_cardinsteaddtl cardinsteaddtl;
    memset(&cardinsteaddtl,0,sizeof(cardinsteaddtl));
    ret=DB_t_cardinsteaddtl_read_lock_by_c0_and_cardno(trans.cardno,&cardinsteaddtl);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return E_DB_CARDINSTEADDTL_N;
        else
            return E_DB_CARDINSTEADDTL_R;
    }
    //核对登记信息与卡表是否一致
    if(strcmp(cardinsteaddtl.oldcardphyid,tCard.cardphyid)!=0) {
        DB_t_cardinsteaddtl_free_lock_by_c0();
//.........这里部分代码省略.........
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:101,代码来源:F846325.cpp


示例17: SaveOldCardInfo

static int SaveOldCardInfo(TRUSERID *handle,ST_PACK *rPack,int *pRetCode,char *szMsg) {
    int ret=0;
    CAccTrans *pAccTrans=CAccTrans::getInstance();

    TRANS& trans=pAccTrans->trans;

    T_t_card tCard;

    memset(&tCard,0,sizeof(tCard));

    ret=DB_t_card_read_by_cardno(trans.cardno,&tCard);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return ERRINFO(E_NOTEXIST_CARDNO,trans.cardno);
        else
            return E_DB_CARD_R;
    }
    if(tCard.status[0]!=STATUS_NORMAL) {
        return ERRINFO(E_CARD_LOGOUT,trans.cardno);
    }
    if('1'==tCard.frozeflag[0]) {
        return ERRINFO(E_CARD_FREEZE,trans.cardno);
    }
    if('1'==tCard.lossflag[0]) {
        return ERRINFO(E_CARD_LOST,trans.cardno);
    }
    if('1'==tCard.badflag[0]) {
        return ERRINFO(E_CARD_BADRECORD,trans.cardno);
    }
    //比较卡物理ID是否相同
    if(strcmp(tCard.cardphyid,trans.cardphyid)!=0) {
        writelog(LOG_ERR,"db cardphyid[%s],input cardphyid[%s]",tCard.cardphyid,trans.cardphyid);
        return E_CARD_PHYNO_DIFFER;
    }
    T_t_account tCardAccount;
    memset(&tCardAccount,0,sizeof(tCardAccount));
    ret=DB_t_account_read_by_accno(tCard.accno,&tCardAccount);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return ERRINFO(E_NOTEXIST_CARDACCNO,tCard.accno);
        else
            return E_DB_ACCOUNT_R;
    }
    int existflag=0;
    ret=IsExistUnGetSubsidy(tCard.cardno,&existflag);
    if(ret) {
        return ret;
    }
    if(existflag) {
        ERRTIP("有未领补助,请领取补助后再换卡");
        return E_COMMON_ERR;
    }
    ret=DB_t_cardinsteaddtl_del_by_cardno(trans.cardno);
    if(ret) {
        if(DB_NOTFOUND!=ret)
            return E_DB_CARDINSTEADDTL_R;
    }
    T_t_cardinsteaddtl cardinsteaddtl;

    memset(&cardinsteaddtl,0,sizeof(cardinsteaddtl));
    des2src(cardinsteaddtl.accdate,pAccTrans->trans.accdate);
    cardinsteaddtl.termid = trans.termid;
    cardinsteaddtl.termseqno = trans.termseqno;
    cardinsteaddtl.cardno = trans.cardno;
    cardinsteaddtl.oldcardtype=tCard.cardtype;
    des2src(cardinsteaddtl.oldcardphyid,trans.cardphyid);
    des2src(cardinsteaddtl.oldshowcardno,tCard.showcardno);
    cardinsteaddtl.oldcardcnt = trans.paycnt;
    cardinsteaddtl.oldcardbal = trans.cardbefbal;
    cardinsteaddtl.oldsubsidyno=trans.cardsubsidyno;
    cardinsteaddtl.revflag[0]='0';
    cardinsteaddtl.status[0]=STATUS_NORMAL;
    ret=DB_t_cardinsteaddtl_add(&cardinsteaddtl);
    if(ret) {
        if(DB_REPEAT==ret)
            return E_DB_CARDINSTEADDTL_E;
        else
            return E_DB_CARDINSTEADDTL_I;
    }
    T_t_cardver cardver;

    memset(&cardver,0,sizeof(cardver));
    cardver.cardno=tCard.cardno;
    des2src(cardver.accdate,pAccTrans->trans.accdate);
    cardver.termid=trans.termid;
    cardver.termseqno=trans.termseqno;
    cardver.status[0]=STATUS_NORMAL;
    des2src(cardver.cardphyid,cardinsteaddtl.cardphyid);
    des2src(cardver.stuempno,trans.stuempno);
    cardver.cardvertype=CARDVERTYPE_CARDINSTEADOLD;
    ret=getCardVerNo(cardver.cardverno);
    if(ret)
        return ret;

    ret=DB_t_cardver_add(&cardver);
    if(ret) {
        if(DB_REPEAT==ret)
            return E_DB_CARDVER_E;
        else
            return E_DB_CARDVER_I;
//.........这里部分代码省略.........
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:101,代码来源:F846325.cpp


示例18: F846310

int F846310(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret=0;
	CAccTrans *pAccTrans=CAccTrans::getInstance();
//	ret=pAccTrans->checkCfgUpdate();
//	if(ret)
//		return ret;
	des2src(pAccTrans->trans.opercode,rPack->semp);
	pAccTrans->trans.transcode=TC_CARDRETURN;
	ret=pAccTrans->InitTrans();
	if(ret)
		return ret;			
	TRANS& trans=pAccTrans->trans;

	char anonymflag[2]="";

	int returnForgiftFlag=0;
	
	ST_CPACK aPack;
	ST_PACK *outPack = &(aPack.pack);
	ResetNormalCPack(&aPack,0,1);
		
	SetCol(handle,0);

	//检查客户
	trans.cardflag=1;
	trans.usecardflag=1;
	trans.cardno=rPack->lvol0;	
	trans.purseno=PURSE_NO_ONE;
	trans.paycnt = rPack->lvol6+1;
	trans.cardbefbal=rPack->lvol7/100.0;	
	trans.cardaftbal=trans.cardbefbal;
	des2src(trans.cardphyid,rPack->sstation0);
	
	T_t_card tCard;
	
	memset(&tCard,0,sizeof(tCard));
	ret=doCard(trans,tCard);
	if(ret)
	{
		return ret;
	}
	ret=UpdateCardBitmap(trans.cardno,trans.paycnt,CARDBITMAPTYPE_SYS_ONLINE);
	if(ret)
		return ret;
	T_t_account tCardAccount;	
	memset(&tCardAccount,0,sizeof(tCardAccount));
	ret=DB_t_account_read_by_accno(tCard.accno,&tCardAccount);
	if(ret)
	{
			writelog(LOG_ERR,"cardno[%d]",tCard.cardno);
			if(DB_NOTFOUND==ret)
				return ERRINFO(E_NOTEXIST_CARDACCNO,tCard.accno);
			else
				return E_DB_ACCOUNT_R;
	}
	if(tCardAccount.status[0]!=STATUS_NORMAL)
	{
		return ERRINFO(E_CARDACC_LOGOUT,tCardAccount.accno);
	}
	if(amtcmp(tCardAccount.balance,0)<0)
	{
		ERRTIP("账户余额小于0不能直接回收");
		return E_COMMON_ERR;
	}
	else if(amtcmp(tCardAccount.balance,0)==0)
	{
		trans.cardaftbal=0;
	}
	else
	{
		strcpy(trans.cardaccno,tCardAccount.accno);
		trans.feetype=tCard.feetype;
		trans.inputamt=tCardAccount.balance;
		trans.unusedamt = trans.inputamt;
		ret=pAccTrans->doTrans();
		if(ret)
			return ret;	
		ret=pAccTrans->doTransEnd();
		if(ret)
			return ret;	
		//修改帐户
		ret=doAccount(trans,tCardAccount.accno);
		if(ret)
			return ret;
	}
	T_t_customer tCustomer;

	memset(&tCustomer,0,sizeof(tCustomer));

	if(tCard.custid>0)
	{
		ret=DB_t_customer_read_by_custid(tCard.custid,&tCustomer);
		if(ret)
		{
			if(DB_NOTFOUND==ret)
				return E_NOTEXIST_CUSTOMER;
			else
				return E_DB_CUSTOMER_R;
		}
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F846310.cpp


示例19: doCard

static int doCard(TRANS& trans,T_t_card& tCard)
{

	int ret=0;

	ret=DB_t_card_read_lock_by_cur_and_cardno(trans.cardno,&tCard);
	if(ret)
	{
		writelog(LOG_ERR,"cardno[%d]",trans.cardno);
		if(DB_NOTFOUND==ret)
			return ERRINFO(E_NOTEXIST_CARDNO,trans.cardno);
		else 
			return E_DB_CARD_R;
	}
	if(tCard.status[0]!=STATUS_NORMAL)
	{
		DB_t_card_free_lock_by_cur();
		return ERRINFO(E_CARD_LOGOUT,trans.cardno);
	}	
	if('1'==tCard.frozeflag[0])
	{
		DB_t_card_free_lock_by_cur();
		return ERRINFO(E_CARD_FREEZE,trans.cardno);
	}
	if('1'==tCard.lossflag[0])
	{
		DB_t_card_free_lock_by_cur();
		return ERRINFO(E_CARD_LOST,trans.cardno);
	}	
	if('1'==tCard.badflag[0])
	{
		DB_t_card_free_lock_by_cur();
		return ERRINFO(E_CARD_BADRECORD,trans.cardno);
	}	
		//比较卡物理ID是否相同
	if(strcmp(tCard.cardphyid,trans.cardphyid)!=0)
	{
		writelog(LOG_ERR,"db cardphyid[%s],input cardphyid[%s]",tCard.cardphyid,trans.cardphyid);
		DB_t_card_free_lock_by_cur();
		return ERRINFO(E_CARD_PHYNO_DIFFER,trans.cardphyid,tCard.cardphyid);
	}
	//回收卡
	T_t_cardtype tCardType;

	memset(&tCardType,0,sizeof(tCardType));
		
	ret=DB_t_cardtype_read_by_cardtype(tCard.cardtype,&tCardType);
	if(tCardType.recycleable[0]!='1')
	{
		DB_t_card_free_lock_by_cur();
		return	ERRINFO(E_CARDTYPE_CANNOT_REUSE,tCardType.cardtype);
	}
	if(tCardType.fixdaycnt<1)
	{
		DB_t_card_free_lock_by_cur();		
		return ERRINFO(E_NOSET_CARDTYPE_VALIDDAYS,tCardType.cardtype);
	}
	ret=calcEndDate(trans.transdate,tCardType.fixdaycnt,tCard.expiredate);
	if(ret)
	{
		DB_t_card_free_lock_by_cur();		
		return ret;
	}
	char cardpwd[33]="";
	char key[17]="";
	get_init_passwd_by_man_id("",cardpwd);
	strcpy(key,STATIC_SEED_KEY);
	EncodePwd(key,cardpwd,tCard.cardpwd, 0);
//	memset(tCard.cardstatus,'0',sizeof(tCard.cardstatus));
	des2src(tCard.lastsaved,trans.sysdatetime);

	ret=DB_t_card_update_lock_by_cur(&tCard);
	if(ret)
	{
		if(DB_NOTFOUND==ret)
			return E_DB_CARD_N;
		else 
			return E_DB_CARD_U;
	}
	//用来输出卡密码
	strcpy(tCard.cardpwd,cardpwd);
	/*
	//添加卡片回收明细记录
	T_t_carddtl tCarddtl;
	
	memset(&tCarddtl,0,sizeof(tCarddtl));
	/////////////////////////////////rPack2TableStuct////////////////////////
	des2src(tCarddtl.accdate,pAccTrans->sysPara.sSettleDate);
	tCarddtl.termid=trans.termid;
	tCarddtl.termseqno=trans.termseqno;
	tCarddtl.cardtype=tCard.cardtype;
	des2src(tCarddtl.showcardno,tCard.showcardno);
	des2src(tCarddtl.cardphyid,tCard.cardphyid);
	tCarddtl.cardusetype=CARDUSETYPE_RETURNCARD;
	des2src(tCarddtl.opercode,trans.opercode);
	ret=DB_t_carddtl_add(&tCarddtl);
	if(ret)
	{
		if(DB_REPEAT==ret)
			return E_DB_CARDDTL_E;
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F846310.cpp


示例20: F846340

int F846340(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg) {
    int ret=0;

    CAccTrans *pAccTrans=CAccTrans::getInstance();
    TRANS& trans=pAccTrans->trans;
    trans.transcode=TC_EACC2SHOP;
    trans.transtype = TRANSTYPE_EACCPAYMENT; // 支付交易
    //trans.termid=TERMID_WEB;
    trans.termid=rPack->lcert_code; // 使用支付网关的注册ID

    ret=pAccTrans->InitTrans();
    if(ret)
        return ret;

    trans.inputamt=D4U5(rPack->damt0,2);
    trans.unusedamt = trans.inputamt;
    trans.transamt=trans.inputamt;

    if(amtcmp(trans.inputamt,0)==0)
        return E_INPUT_AMT_NULL;

    if(amtcmp(trans.inputamt,0)<0)
        return E_INPUT_AMT;

    //查询电子钱包帐户
    T_t_netacc tNetAccount;
    memset(&tNetAccount,0,sizeof(tNetAccount));
    ret=DB_t_netacc_read_by_accno(rPack->scust_no,&tNetAccount);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return ERRINFO(E_NOTEXIST_EACCNO,rPack->scust_no);
        else
            return E_DB_ACCOUNT_R;
    }

    //检查电子钱包密码
    if(rPack->lvol1 == 0) { // 检查电子账户密码 检查账户余额
        if(strcmp(rPack->snote2,tNetAccount.paypwd)!=0)
            return E_EACCPWD;
    }

    if(tNetAccount.status[0]!=STATUS_NORMAL) // 账户状态
        return ERRINFO(E_EACCNO_LOGOUT,tNetAccount.accno);

    if(tNetAccount.stoppayflag[0]=='1') // 止付标志
        return ERRINFO(E_EACC_STOPPAY,tNetAccount.accno);

    if(rPack->lvol1 == 0) { // 检查电子账户密码 检查账户余额
        if(amtcmp(trans.inputamt,tNetAccount.balance)>0)
            return ERRINFO(E_EACC_BALANCE_SHORTAGE,trans.inputamt-tNetAccount.balance);
    }
    /*
    double CardMaxBal=0;
    ret=GetPurseMaxBal(PURSE_NO_ONE,CardMaxBal);
    if(ret)
    	return ret;
    if(amtcmp(trans.inputamt+trans.cardbefbal,CardMaxBal)>0)
    	return ERRINFO(E_AMT_EXCEED_MAX,CardMaxBal);
    */
    des2src(trans.draccno,tNetAccount.accno);

    trans.custid=tNetAccount.custid;
    des2src(trans.custname,tNetAccount.accname);

    // 支付转账
    T_t_shop shop;

    memset(&shop,0,sizeof(shop));
    ret=DB_t_shop_read_by_shopid(rPack->lvol0,&shop);
    if(ret) {
        if(DB_NOTFOUND==ret)
            return E_NOTEXIST_SHOPID;
        else
            return E_DB_SHOP_R;
    }
    if(shop.status[0]!=STATUS_NORMAL)
        return E_SHOP_LOGOUT;

    if(shop.shoptype!=SHOPTYPE_ESHOP)
        return ERRIF_SHOP_TYPE;

    des2src(trans.craccno,shop.accno);

    // 产生交易参考号
    T_t_refno tRefno;

    memset(&tRefno,0,sizeof(tRefno));
    get_random(tRefno.mac);
    ret= GetNewRefno(tRefno.refno);
    if(ret)
        return ret;

    des2src(tRefno.lastsaved,trans.sysdatetime);
    des2src(tRefno.accdate,trans.accdate);
    tRefno.termid = trans.termid;
    tRefno.termseqno = trans.termseqno;
    tRefno.status = RS_SUCC;

    ret=DB_t_refno_add(&tRefno);
    if(ret) {
//.........这里部分代码省略.........
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:101,代码来源:F846340.cpp



注:本文中的ERRINFO函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ERRLOG函数代码示例发布时间:2022-05-30
下一篇:
C++ ERREXIT2函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap