当前位置:网站首页>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,导出
重启平台
然后就不知道怎么办了,明天问问大佬!
边栏推荐
- Introduction and download tutorial of administrative division vector data
- 实时渲染:实时、离线、云渲染、混合渲染的区别
- 想问下 pgsql cdc 账号同一个 多个 task 会有影响吗,我现在3个task 只有一个 有
- Necessary fault handling system for enterprise network administrator
- High dimension low code: component rendering sub component
- Vite+web3:报错出现ReferenceError: process is not defined
- Exponential regression in R
- 制造业项目MDM主数据项目实施心得
- three.js创建的基础框架
- How to perform robust regression in R
猜你喜欢

Do you have all the basic embedded knowledge points that novices often ignore?

Microsoft planetary computer (MPC) platform introduction, registration and comparison

R语言 4.1.0软件安装包和安装教程

Interpreting harmonyos application and service ecology

Source code analysis of ArrayList

Tkde2022: Dialogue recommendation system based on knowledge enhanced sampling

Sudoku (easy to understand)

Introduction and download tutorial of two types of soil data

Location object

Volcano becomes spark default batch scheduler
随机推荐
Vite+web3: referenceerror: process is not defined
实时渲染:实时、离线、云渲染、混合渲染的区别
Volcano成Spark默认batch调度器
LabView之MQTT协议使用
Volcano becomes spark default batch scheduler
西北工业大学遭黑客攻击?双因素认证改变局面!
SAP license: what is ERP supply chain
佛祖保佑 永无BUG
three.js创建的基础框架
JS picture display and hiding cases
Sudoku (easy to understand)
In depth learning of movement methods
The verifiable certificate of geoscience remote sensing industry
Using alicloud RDS for SQL Server Performance insight to optimize database load - first understanding of performance insight
一文理解OpenStack网络
Introduction and download of nine npp\gpp datasets
Leetcode weekly buckle 281
特尔携手微软发挥边云协同势能,推动AI规模化部署
Apifox与其他接口开发工具的博弈
【计算讲谈社】第三讲:如何提出关键问题?


