导图社区 业务流程
总结通过业务全景图发现并优化业务流程问题的方法,这是一篇关于业务流程的思维导图,希望能够对你有所启发。
编辑于2022-03-28 14:33:47topic
getTicket
校验输入
appid : 对象ID appkey : 对象授权码 mobile : 手机号 cardNo :* 用于支付的卡号 operFlag : 操作标识(N:新申请 C:超时,接上一次) timeout : 有效时间 ,(目前为yyyyMMddHHmmss格式,建议修改为3000毫秒格式)remark : 备注(保留)
mobile混淆
mobile同步锁
IP授权校验
根据appid和请求IP,校验ip是否获得授权
APP校验
根据appid和appkey,校验appid是否获得授权
商品池APP授权校验
作废旧券
生成券
mobile同步锁释放
返回券码
dealTicket
校验输入
解密电子码
根据appid查询appkey,用appkey解密电子码。
36渠道,提货券支付
调用frontsale系统ticketPay接口,发起支付。支付完成后,结束dealticket。
mobile同步锁
IP授权校验
根据appid和请求IP,校验ip是否获得授权
APP校验
根据appid和appkey,校验appid是否获得授权
商品池APP授权校验
交易控制
调用存储过程,验证是否允许交易proc_can_tranding( pi_mobile_number varchar2 /*手机号*/ ,pi_merchant_number varchar2 /*商户号*/ ,pi_terminial_number varchar2 /*终端号*/ ,pi_amount number /*交易金额*/ ,po_is_ok out number /*1允许交易0不允许交易*/)
交易渠道支付配置查询
--查询渠道支付配置select * from t_code_mgr where s_code=? and s_sys_state='1'public String sys_id;public String sys_state;//数据状态([系统],0失效 1有效)public String code; //标识码public String name; //名称public String times_one; //一级次数限制public String times_two; //二级次数限制public String money_one; //一级金额限制public String money_two; //二级金额限制public String times_one_init; //一级次数限制初始public String times_two_init; //二级次数限制初始public String money_one_init; //一级金额限制初始public String money_two_init; //二级金额限制初始public String pay_url;//支付地址public String pay_tag_namespace;//支付命名空间public String pay_func;//支付函数 (payFunc,cancleFunc)填写public String notice_url;//通知地址public String mobile;//通知手机
交易渠道金额一二级金额校验
满足一级限制,日志***********x1 满足二级限制,日志***********x2限制通过,正常交易,日志***********x3
校验电子券
select * from " + ticketTable + " where s_sys_goods_id='0' and s_tid=? and s_mobile=? and s_sys_state='1'code:3;msg:失败;remark:电子券号不存在;***********x4 多条电子券 code:1;msg:失败;remark:系统错误;
电子券失效
code:6;msg:失败;remark:电子券号已失效;日志:>>>>state:>>>>timeout:
手机校验失败
code:4;msg:失败;remark:手机号校验失败;
校验通过
查询商户名称
select distinct a.merchant_number s_mid ,a.shop_name s_mname ,a.shop_number s_sid ,a.shop_address s_saddr " +"from v_merchant_more_info a where a.merchant_number=? and a.terminal_number=?供回调APP时使用
校验order
order不存在
code:3;msg:失败;remark:电子券号不存在;
order存在
五粮液51渠道校验手机号是否为卡号前8位
code:4;msg:失败;remark:手机号校验失败;
黑名单交易控制
调用ptcp接口,重复调用3次(APPCALLBACK_TIMES配置项),查询是否违反黑白名单限制。http://192.168.2.107:30080/ptcp/services/entranceInterfaceService?wsdlhttp://service.business.comdoTradingWithXML请求报文:<DATA><TTYPE>0800</TTYPE><CARD>0000000000000082841</CARD><SEQ>006697</SEQ><TK2>000000000000000000</TK2><TID>00000453</TID><MID>510990310400307</MID><AMOUNT>300</AMOUNT></DATA>参数:card, seq, tk2, tid, mid,amount返回:<DATA><TTYPE>0810</TTYPE><RTEXT>成功</RTEXT><CARD>0000000000000082841</CARD><TK2>000000000000000000</TK2><SEQ>006697</SEQ><STAN>1623295657714</STAN><RESP>00</RESP><TID>00000453</TID><MID>510990310400307</MID></DATA>TTYPE=0810并且RESP=00,则允许交易。TTYPE=0810并且RESP=01,则不允许交易。
校验接口调用失败
返回code:5;msg:失败;remark:P1,96
电子券置为失败
手机号解锁
回调通知
校验不通过
返回code:5;msg:失败;remark:P1,93
电子券置为失败
手机号解锁
回调通知
校验通过
33和信通渠道,校验当日消费金额
查询用户当日消费总额
调用存储过程ticket.p_get_dad_amt_today,获取用户当日消费总额po_user_dad_amt_today create or replace procedure p_get_dad_amt_today( pi_card_number varchar2 /*用户卡号代表*/ ,po_user_real_auth out number /*是否已经实名认证*/ ,po_card_dad_amt_today out number /*返回卡的当日消费金额*/ ,po_user_dad_amt_today out number /*返回用户的当日消费金额*/)
加上本次消费金额
实名认证限额验证
用户当日消费总额+本次消费金额<=1000元
校验失败
返回:code:5;msg:实名认证触发;remark:61,61
通知app:code:9;msg:实名认证触发;remark:authenticate;
电子券置为失败
手机号解锁
回调通知
校验通过
数字证书限额限制
用户当日消费总额+本次消费金额<=5000
校验失败
返回:code:5;msg:数字证书限额触发;remark:61,61
通知app:code:17;msg:数字证书限额触发;remark:数字证书限额触发;
电子券置为失败
手机号解锁
回调通知
校验通过
进入支付流程
无渠道配置
记录关联发送扣费时的UID,商户号,终端号
update t_ticket set s_ps_uid='?', s_ps_smchtid='?', s_ps_stermid='?' where s_sys_id='?'
扣费
调用frontsale的payManageTag接口扣费http://192.168.2.21:16080/frontsale/services/frontSaleQuotaManagerhttp://core.business.compayManageTag参数:{ mobilePhone, cardNo, amt, bill, stn, ps_uid, password, ps_merchantNo, ps_merchantname, ps_terminalNo }
修改电子券记录,status=2,记录商户号终端号
修改最大限制数据库,累计减一
update t_config_mobile_pay set s_max_number=s_max_number-?, s_call_state=?
修改标识配置池记录,一二级金额累加,一二级次数减一
五粮液交易,记录交易流水
insert into t_order_wly_trans(s_order_no,s_term_id,s_tran_time,s_sys_order_id,s_mobile,s_cardno,s_mcht_id,s_fromto,s_stn,s_btn,s_tran_amount,s_tran_status)" +"values(?,?,sysdate,?,?,?,?,?,?,?,?,?)
交易成功,返回:code:0;msg:成功;remark:msg;cardNo:cardNo
记录交易明细 t_card_trans_detail
insert into t_card_trans_detail
计算红包
procedure p_get_rp1_amt_batch ( pi_tids varchar2 /*交易标示*/ ,pi_mobile_number varchar2 /*手机号*/ ,pi_card_number varchar2 /*组合支付代表卡号 ,用来集中发放多个交易的红包 非组合支付不填*/ ,pi_commit number /*1提交0不提交*/ ,po_rp1_type out number /*红包类型*/ ,po_rp1_amt out number /*消费红包金额*/ ,po_rp1_msg out varchar2 /*消费红包描述*/ ,po_success out number /*1成功0失败*/ ,po_message out varchar2 /*消息*/ )
手机号解锁
回调和信通
http://192.168.2.211/index.php/app/freecardpayments/paymentbackpost请求key = "8aea62a787d598f49b5f9fe0722066b1"verification = md5_base(key + smchtid + stermid + mobile + orderNo){"smchtid":"510990310400323","stermid":"00000332","mobile":"13699481090","tid":"744AB701EB5A4B4B","stn":"000351","btn":"000001","number":"3.50","orderNo":"40644928531869697","type":"1","status":{"code":"0","msg":"成功","remark":"P0,交易成功"},"name":"00000332","cardNo":"8333028011137931814","paper_info_rp1_amt":"0.00","paper_info_rp1_msg":"[appmsg]您尾号1814的和信通会员卡15:13在00000332消费了3.50元。[:appmsg][paymsg][:paymsg]","paper_info_success":"1","paper_info_message":"操作成功","verification":"922e202b37f6a2b3b0be52e0a12affc2"}
回到五粮液
http://192.168.2.107:36922/hexinInterface/services/hmjService?wsdl请求报文:{"flag":"37","smchtid":"510990120400191","stermid":"00000375","mobile":"13258128484","tid":"501C5F83821ECF7F","stn":"000005","btn":"000004","number":"10.00","orderNo":"40280464702844929","type":"1","status":{"code":"0","msg":"成功","remark":"00,成功","indexNumber":"24594630"},"name":"00000375","cardNo":"0000000000000000001","ticketOrderNo":"9926220","appId":"scoreSys","verification":"3faf538b950b97d761b3a88f5449e1b5"} key = "8aea62a787d598f49b5f9fe0722066b1"verification = md5_base(key + smchtid + stermid + mobile + orderNo)
其他交易,记录订单流水
update t_order set s_stn=?, s_btn=?, s_orderno=?, s_state='1' where s_sys_id=?
交易成功,返回:code:0;msg:成功;remark:msg;cardNo:cardNo
和信通33和五粮液51渠道
记录关联发送扣费时的UID,商户号,终端号
update t_ticket set s_ps_uid='?', s_ps_smchtid='?', s_ps_stermid='?' where s_sys_id='?'
扣费
调用frontsale的payManageTag接口扣费http://192.168.2.21:16080/frontsale/services/frontSaleQuotaManagerhttp://core.business.compayManageTag参数:{ mobilePhone, cardNo, amt, bill, stn, ps_uid, password, ps_merchantNo, ps_merchantname, ps_terminalNo }其中password 为1返回:第一个参数返回P0,交易成功。返回P1,交易失败
修改电子券记录,status=2,记录商户号终端号
修改最大限制数据库,累计减一
update t_config_mobile_pay set s_max_number=s_max_number-?, s_call_state=?
修改标识配置池记录,一二级金额累加,一二级次数减一
五粮液交易,记录交易流水
insert into t_order_wly_trans(s_order_no,s_term_id,s_tran_time,s_sys_order_id,s_mobile,s_cardno,s_mcht_id,s_fromto,s_stn,s_btn,s_tran_amount,s_tran_status)" +"values(?,?,sysdate,?,?,?,?,?,?,?,?,?)
交易成功,返回:code:0;msg:成功;remark:msg;cardNo:cardNo
其他交易,记录订单流水
update t_order set s_stn=?, s_btn=?, s_orderno=?, s_state='1' where s_sys_id=?
交易成功,返回:code:0;msg:成功;remark:msg;cardNo:cardNo
其他渠道
调用配置接口
配置表t_code_mgr,准生产环境数据1 121 1 30 积分平台 10000000 10000000 1000000000 1000000000 10000000 10000000 1000000000 1000000000 http://192.168.2.107:36922/hexinInterface/services/codeService http://service.hexinpass.code codeSale 2018/5/21 17:09:02 15 2099/1/1 1:01:01 scoreSys 186028645162 61 0 34 TEST 10 15 1100 1600 10 15 1100 1600 http://192.168.2.107:36922/eAccountInter/services/eAccService http://service.eacct.com bCardSale 2017/4/10 14:51:28 15 2099/1/1 1:01:01 hxgh001 151981996293 141 1 28 蓝光BRC 1000000 2000000 1000000000 2000000000 1000000 2000000 1000000000 2000000000 http://192.168.2.107:36922/hexinInterface/services/codeService http://service.hexinpass.code codeSale 2018/12/6 15:18:59 15 2099/1/1 1:01:01 dzmh01 186028645164 161 1 35 蛋糕券 1000000000 1000000000 100000000000 100000000000 1000000000 1000000000 100000000000 100000000000 http://192.168.2.107:36922/hexinInterface/services/codeService http://service.hexinpass.code codeSale 2019/5/5 11:34:12 15 2099/1/1 1:01:01 gh001 151981996295 162 1 29 四川交投工会 1000000000 1000000000 100000000000 100000000000 1000000000 1000000000 100000000000 100000000000 http://192.168.2.107:36922/hexinInterface/services/codeService http://service.hexinpass.code codeSale 2019/5/5 14:32:16 15 2099/1/1 1:01:01 151981996296 163 1 51 五粮液蛋糕券 1000000000 1000000000 100000000000 100000000000 1000000000 1000000000 100000000000 100000000000 wsPay_new 2020/3/5 13:24:44 15 2099/1/1 1:01:01 gh002 186157750807 2 1 32 工会(E账户) 1000000 2000000 1000000000 2000000000 1000000 2000000 1000000000 2000000000 http://192.168.2.107:36922/eAccountInter/services/eAccService http://service.eacct.com bCardSale 2017/4/5 17:11:17 1 2099/1/1 1:01:01 hxgh001 186028645168 81 1 40 文化厅 5000000 5000000 500000000 500000000 5000000 5000000 500000000 500000000 http://192.168.2.107:36922/eAccountInter/services/eAccService http://service.eacct.com bCardSale 2017/12/14 15:22:46 15 2099/1/1 1:01:01 hxgh001 186028645169 183 1 37 和乐关爱 10000000 10000000 100000000000 100000000000 10000000 10000000 100000000000 100000000000 http://192.168.2.107:36922/hexinInterface/services/codeService http://service.hexinpass.code codeSale 2021/10/21 14:37:31 15 2099/1/1 1:01:01 1861577508010 184 1 38 和乐关爱开放平台 10000000 10000000 100000000000 100000000000 10000000 10000000 100000000000 100000000000 http://192.168.2.107:36922/hexinInterface/services/codeService http://service.hexinpass.code codeSale 2021/10/25 10:08:57 15 2099/1/1 1:01:01 11 70 1 60 邮储 10000000 10000000 100000000000 100000000000 10000000 10000000 100000000000 100000000000 http://192.168.2.107:36922/hexinInterface/services/codeService http://service.hexinpass.code codeSale 2021/10/21 14:37:31 15 2099/1/1 1:01:01 bankAcct 1861577508012 43 1 33 和信通 1000000 2000000 1000000000 2000000000 1000000 2000000 1000000000 2000000000 wsPay_new 2017/4/7 14:57:49 15 2099/1/1 1:01:01 1860286451613 102 1 31 账户支付(五粮液工会) 10000000 1000000000 1000000000 100000000000 10000000 1000000000 1000000000 100000000000 http://192.168.2.107:36922/hexinInterface/services/codeService http://service.hexinpass.code codeSale 2018/3/27 10:48:04 15 2099/1/1 1:01:01 gh001 15198199629
扣费
接口调用,webservice:参数:{"mobilePhone":"11857670496","amount":"19.90","orderNo":"SUN16476873456332873","iprfOrderNo":"40115283583578113","merchantNo":"510990120400191","terminalNo":"00000375","appId":"scoreSys","channelId":"37","transType":"2","mac":"2e2db4fa3856b759eb7816bf71905176"}其中mac校验生成规则:amount + orderNo + mobilePhone + appId + channelId + "00000000"然后用MD5处理此处参数为xml中elment对象返回:{"code":"00","infos":[{"amount":"19.9","cardNo":"6333028011237526870","serial":"24594590"}],"msg":"成功"}
修改电子券记录,status=2,记录商户号终端号
修改最大限制数据库,累计减一
update t_config_mobile_pay set s_max_number=s_max_number-?, s_call_state=?
修改标识配置池记录,一二级金额累加,一二级次数减一
五粮液交易,记录交易流水
insert into t_order_wly_trans(s_order_no,s_term_id,s_tran_time,s_sys_order_id,s_mobile,s_cardno,s_mcht_id,s_fromto,s_stn,s_btn,s_tran_amount,s_tran_status)" +"values(?,?,sysdate,?,?,?,?,?,?,?,?,?)
交易成功,返回:code:0;msg:成功;remark:msg;cardNo:cardNo
循环记录每张卡交易流水t_card_trans_detail
其他交易,记录订单流水
update t_order set s_stn=?, s_btn=?, s_orderno=?, s_state='1' where s_sys_id=?
交易成功,返回:code:0;msg:成功;remark:msg;cardNo:cardNo
循环记录每张卡交易流水t_card_trans_detail
交易没有返回
返回code:1;msg:失败;remark:系统错误;
日志显示:***********x5
扣款失败
code:5;msg:失败;remark:P0;msg
cancelTicket