1.Postman
(1) Post http://localhost:5635/admin/timeLineData/setTimeLine
(2)Headers Content-Type application/json
(3)Body Raw JSON
{
"receiveBillId": "1",
"billId": "2",
"createTime": "2023-05-31 23:59:59",
"type": "会议"
}
(4)
{
"timestamp": "2024-03-07 10:58:10",
"status": 404,
"error": "Not Found",
"path": "/admin/timeLineData/timeLineData/setTimeLine"
}
2.后台
@RequiredArgsConstructor
@Component
@RequestMapping("/timeLineData" )
public class TimeLineData {
final CustomSqlService customSqlService;
@Inner(false)
@PostMapping("/setTimeLine")
public void setTimeLine(@RequestBody Map<String,Object> map){
Calendar calendar= Calendar.getInstance();
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd :hh:mm:ss");
System.out.println("【"+dateFormat.format(calendar.getTime())+"】----- 时间轴开始 ----");
}
/** 会议 **/
void setMeeting(){
Calendar calendar= Calendar.getInstance();
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd :hh:mm:ss");
String sNowTime = "【"+dateFormat.format(calendar.getTime())+"】";
String sExplain = " |会议| -> ";
try {
//System.out.println("【"+dateFormat.format(calendar.getTime())+"】 定时任务: |会议|活动|通知| -> 定时短信 ");
//log.error("【"+dateFormat.format(calendar.getTime())+"】 定时任务: |会议|活动|通知| -> 定时短信 ");
}catch (Exception e){
e.printStackTrace();
System.out.println(sNowTime + sExplain + ":"+e.getMessage());
}
}
}
标签:postman,dateFormat,getTime,format,SimpleDateFormat,timeLineData,pigx,calendar,调试
From: https://www.cnblogs.com/linhan8888/p/18058461