general_create_trans_flowchart
2016-03-09 13:06:13 0 举报
`general_create_trans_flowchart` 是一个用于创建通用事务流程图的函数。该函数接受一系列参数,包括起始节点、结束节点和中间节点,以及它们之间的连接关系。通过调用此函数,用户可以快速生成一个直观的事务流程图,以便于理解和分析复杂的业务流程。此外,该函数还支持自定义节点样式和颜色,以满足不同用户的需求。总之,`general_create_trans_flowchart` 是一个实用且功能强大的工具,适用于各种场景下的事务流程图绘制。
作者其他创作
大纲/内容
计算并行支付类型,放入info.parallel_type1)如传入有付款方案,10102)如传入有分润或分账方案,01013)啥都没有,0000
info.channel_id = trans_settlement_info::CHANNEL_ID_DEFAULT(1)
N
从in_pack读入其它MISC信息,放入infoext_time、deadline_time放入info.extrasource_ip、user_mac、comments
Y
从in_pack读取交易属性,放入infotrans_id_exttrans_typetrans_tagcan_modifytrans_mode从模板获取payment_mode,放入info
委托分账必须实时分润is_entrust_billing_solution && info.share_profit_type != SHARE_PROFIT_TYPE_REALTIME
从in_pack读取买家属性,放入info.buyeruser_idlogin_nametrue_namecurrency赋默认值info.buyer.sub_account_type = SUB_ACCOUNT_TYPE_DEFAULT
卖家买家user_id不同
if (has_share_profit_solution && is_entrust_billing_solution)|| has_share_profit_solution && info.share_billing_type != trans_info::SHARE_TRANS_TYPE_NORMAL如果传入有分润方案,则不能为委托分账或分普通类型分账
fee_account != info.seller收益账户不与卖家相同
从in_pack读入商品信息,放入infogoods_namegoods_urlgoods_typegoods_channelgoods_channel_sp_id
目前只有中介和直付交易才支持多进并行支付类型if ((info.PARALLEL_TYPE_MULTIPLE_IN_MASK & info.parallel_type)&& (info.PAYMENT_MODE_MEDIATE != payment_mode)&& (info.PAYMENT_MODE_DIRECT != payment_mode))
从In_pack读取分润与分账信息,放入infoshare_profit_typeshare_billing_type设置has_share_profit_type、is_entrust_billing_solution
buyer_fee_account必须存在(查DB)
buyer_fee_amount != 0
info.share_profit_type = info.SHARE_PROFIT_TYPE_REALTIME如果有分润方案默认使用实时分润
has_share_profit_solution
seller是customer或者merchantuser_id分布规则
获取redis重入keyredis_key = cmd_trans_id_ext_logid;
校验金额info.validate()total_good_amount = unit_price_amount * unit_count + transport_amount + adjust_price_amount + adjust_transport_amount;total_payment_amount = cash_amount + coupon_amount + pay_solution_amount + mkt_solution_amount + coupon_amount_new;total_good_amount必须等于total_payment_amount
if ((has_share_profit_solution || is_entrust_billing_solution)&& (info.SETTLEMENT_TYPE_REALTIME != info.settlement_type))前只有实时结算才支持分润或者分账
check_up_merchant_info
info.seller.sub_account_type = SUB_ACCOUNT_TYPE_DEFAULT(1)卖家使用已结算账户
buyer_fee_account != info.seller收益账户不与卖家相同
赋值给pay_solution_amountinfo.pay_solution_amount = solution_info.pay_trans_solution().get_total_amount();
info.seller.sub_account_type = SUB_ACCOUNT_TYPE_UNSETTLED(3)卖家使用待结算账户
buyer_fee_account != info.buer收益账户不与买家相同
if (0 != info.fee_amount)只有fee_amount不为0时才需要fee_user_id
fee_account收益账户必须是C账户
if (0 info.coupon_strategy_id)
从in_pack读入端信息,放入infoclient_source_flag_create并设置has_client_source_flag_create
从in_pack读入价格、优惠信息,放入infounit_price_amountunit_counttransport_amountadjust_price_amountadjust_transport_amountcash_amountcash_amount_newcoupon_amountcoupon_startegycoupon_strategy_id
从in_pack读入info.fee_account.user_idinfo.fee_account.sub_account_type = SUB_ACCOUNT_TYPE_DEFAULT(1)info.fee_account.currency = info.buyer.currency
has_read_channel_id?
buyer_fee_account收益账户必须是C账户
从In_pack读取付款以及分润方案信息,放入solution_infopay_trans_solutionshare_profit_solution设置has_pay_trans_solution、has_share_profit_solution
if (0 != info.coupon_amount)目前不支持coupon_amount,所以coupon_amount一定要为0
service_exception
手续费不能大于交易总现金金额if (info.fee_amount info.get_total_cash_amount())((cash_amount + pay_solution_amount + mkt_solution_amount - _mkt_total_no_settlement_amount))
从in_pack读入结算信息,放入infochannel_idfee_amountsettlement_typebuyer_fee_amount设置has_read_channel_id
本地变量trans_create_info info;trans_create_info merchant_trans;trans_solution_info solution_info;string coupon_error_info;up_merchant_info merchant_info;bool has_up_merchant;
fee_account必须存在(查DB)
分润总金额不能大于分润前支付给卖家的金额if (solution_info.share_profit_solution().get_total_amount() (info.get_total_cash_amount() - info.fee_amount))
has_pay_trans_solution如果传入有付款方案
从in_pack读入上层商户信息,放入infoup_merchant_info设置has_up_merchant
从in_pack读入卖家信息,放入info.sellersp_iduser_idlogin_nametrue_name设置seller.currency=buyer.currency
buyer是customer或者merchantuser_id分布规则
info.settlement_type!=realtime为异步结算
从in_pack读入info.buyer_fee_account.user_idinfo.buyer_fee_account.sub_account_type = SUB_ACCOUNT_TYPE_DEFAULT(1)info.buyer_fee_account.currency = info.buyer.currency
0 条评论
下一页
为你推荐
查看更多