当前位置:网站首页>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,导出
重启平台
然后就不知道怎么办了,明天问问大佬!
边栏推荐
- 华为机器学习服务语音识别功能,让应用绘“声”绘色
- NOKOV动作捕捉系统使多场协同无人机自主建造成为可能
- subject may not be empty [subject-empty]
- three.js创建的基础框架
- subject may not be empty [subject-empty]
- 想问下 pgsql cdc 账号同一个 多个 task 会有影响吗,我现在3个task 只有一个 有
- 如何在 R 中执行幂回归
- JS position operation
- 多云模式并非“万能钥匙”
- Multi segment curve temperature control FB (SCL program) of PLC function block series
猜你喜欢

SAP license: what is ERP supply chain

解读HarmonyOS 应用与服务生态
![subject may not be empty [subject-empty]](/img/6b/9b57a7ed3ab086036cb6dfe0b31de4.png)
subject may not be empty [subject-empty]

Huitongda officially landed at the Hong Kong Stock Exchange: the gross profit margin continued to decline, and the book value of several shareholders still suffered losses

程序员如何做自媒体?

Spatial simulation model acquisition future land cover tutorial

API管理之利剑 -- Eolink

Eight digit

Window object

Sudoku (easy to understand)
随机推荐
智能合约安全审计入门篇 —— delegatecall (2)
电源噪声分析
Volcano becomes spark default batch scheduler
How to perform robust regression in R
NOKOV动作捕捉系统使多场协同无人机自主建造成为可能
Microsoft planetary computer (MPC) platform introduction, registration and comparison
Sr-gnn shift robot gnns: overlapping the limitations of localized graph training data
API管理之利剑 -- Eolink
Volcano成Spark默认batch调度器
Some knowledge of the beginning of 2022
360 digital released information security trends in January: 120000 fraud risks were captured and users were reminded 2.68 million times
696. count binary substring
JS local storage
Huitongda officially landed at the Hong Kong Stock Exchange: the gross profit margin continued to decline, and the book value of several shareholders still suffered losses
实时渲染:实时、离线、云渲染、混合渲染的区别
ArrayList源码解析
Navigator object
Interpreting harmonyos application and service ecology
如何在 R 中执行幂回归
多云模式并非“万能钥匙”


