我试图让它尽可能简单。我是春季批次的新手,我有一个小问题,了解如何将弹簧项目联系在一起,特别是在涉及多步骤作业时,但这是我的逻辑而不是代码(简化),我不知道在春季批次中实施它所以我认为这可能是正确的结构
- reader_money
- 读者详细信息
- 小任务
- 读者利润
- tasklet_calculation
- 作家
但是,如果我错了,请纠正我并尽可能提供一些代码。非常感谢您
逻辑:
sql = "select * from MONEY where id= user input"; //the user will input the condition
while (records are available) {
int currency= resultset(currency column);
sql= "select * from DETAILS where D_currency = currency";
while (records are available) {
int amount= resultset(amount column);
string money_flag= resultset(money_type column);
sql= "select * from PROFIT where Mtypes = money_type";
while (records are available) {
int revenue= resultset(revenue);
if (money_type== 1) {
int net_profit= revenue * 3.75;
sql = "update PROFIT set Nprofit = net_profit";
}
else (money_type== 2) {
int net_profit = (revenue - 5 ) * 3.7 ;
sql = "update PROFIT set Nprofit = net_profit";
}
}
sql="update DETAILS set detail_falg = 001 ";
}
sql = "update MONEY set currency_flag = 009";
}