当前位置:网站首页>starring开发HttpJson接入点+数据库
starring开发HttpJson接入点+数据库
2022-06-24 18:48:00 【51CTO】
开发一个创建订单的交易,使用Http协议的接入点,json报文,使用mysql数据库保存订单信息。
系统架构设计
JFDesign透视图,系统架构设计,新建接入点,名称为:pay_input;描述为:支付系统接入点。选择HttpJSON通讯协议
用连接线连接此接入点及中间业务。保存

服务定义
新增一条服务定义,服务名为:orderCrt;描述为:创建支付订单

JFDesign新增数据字典

数据模型设计
JFDesign透视图->中间业务->数据模型设计->数据库表,新增数据库表

表字段对应的数据字典

新增服务逻辑输入输出数据对象
JFBuilder透视图->中间业务->起步阶段的第一个ALA->数据对象,新增服务逻辑输入输出数据对象

java代码编写
import java.text.SimpleDateFormat;
import java.util.Date;
import com.adtec.starring.respool.StarringSeq;
import com.adtec.starring.struct.dta.DtaInfo;
public class PubBean {
/**
* 获取通用流水号的方法,根据传入参数查询不同的编号
* @param id 流水号序号
* @return
*/
public int getSeqNo(String id) {
/*取序号发生器生成的值*/
int seq = StarringSeq.getCustomSeq(id);
DtaInfo dtaInfo = DtaInfo.getInstance();
String nodeName = dtaInfo.getNodeName(); //取机器节点号
int nodeNo = Integer.parseInt(nodeName); //转化为整型的节点号
/*根据节点号、序号发生器产生的值生成最终的平台流水号*/
seq = nodeNo*100000000 + seq;
return seq;
}
/**
* 获取机器日期
* @return
*/
public String getNowDate(){
Date date= new Date();//创建一个时间对象,获取到当前的时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String str = sdf.format(date);//将当前时间格式化为需要的类型
return str;
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
新增Bean对象
处理逻辑
JFBuilder透视图->中间业务->起步阶段的第一个ALA->处理逻辑,打开orderCrt服务逻辑,在输入输出tab页,选择输入输出数据对象
流水号配置
JFConfig透视图->流水号配置,增加订单流水号,最小值:1;最大值:99999999;步长:1
运行
JFConfig透视图->运行菜单->导出全部,勾选自动上传和上传class,导出
重启平台
然后就不知道怎么办了,明天问问大佬!
边栏推荐
- Multi segment curve temperature control FB (SCL program) of PLC function block series
- API管理之利剑 -- Eolink
- next_ Permutation full permutation function
- Interprétation de la thèse (SR - gnn) Shift Robust GNNS: Overcoming the Limits of Localized Graph Training Data
- Solve the problem that the MapReduce program console does not have log information warn please initialize the log4j system properly
- Knowledge points in T-SQL
- Sentry series satellite introduction and download tutorial
- 初步学习Nuxt3
- 如何在 R 中创建线性模型预测区间 并可视化
- Set up your own website (8)
猜你喜欢

Eight digit

Graph traversal (BFS and DFS) C language pure handwriting

TKDE2022:基于知识增强采样的对话推荐系统

SAP license: what is ERP supply chain

Sr-gnn shift robot gnns: overlapping the limitations of localized graph training data

微服务系统设计——子服务项目构建

Necessary fault handling system for enterprise network administrator

JS event details

使用阿里云RDS for SQL Server性能洞察优化数据库负载-初识性能洞察

Freeswitch uses origin to dialplan
随机推荐
How to perform power regression in R
Stored procedures in sqlserver
想问下 pgsql cdc 账号同一个 多个 task 会有影响吗,我现在3个task 只有一个 有
Volcano成Spark默认batch调度器
Interview algorithm - string question summary
###脚本实现raid0自动化部署
Usage of typedef enum (enumeration)
SDL: cannot play audio after upgrading openaudio to openaudiodevice
使用阿里云RDS for SQL Server性能洞察优化数据库负载-初识性能洞察
时间溯源的系统设计思路
Make track map
实时渲染:实时、离线、云渲染、混合渲染的区别
Introduction and download tutorial of administrative division vector data
Introduction to smart contract security audit delegatecall (2)
MySQL basic commands
解读HarmonyOS 应用与服务生态
JS event details
JS picture display and hiding cases
Why is nodejs so fast?
論文解讀(SR-GNN)《Shift-Robust GNNs: Overcoming the Limitations of Localized Graph Training Data》


