feat(car): 添加保单图片字段并优化时间格式化

- 在HjmCar实体类中新增bdImg字段用于存储保单图片- 在HjmCarParam参数类中新增bdImg字段用于查询保单图片
- 优化HjmViolationServiceImpl中的时间格式化逻辑,使用Date替代LocalDateTime
This commit is contained in:
2025-10-15 00:23:38 +08:00
parent b1a8fc3dee
commit 19f21db483
3 changed files with 8 additions and 1 deletions

View File

@@ -66,6 +66,9 @@ public class HjmCar implements Serializable {
@Schema(description = "保险状态")
private String insuranceStatus;
@Schema(description = "保单图片")
private String bdImg;
@Schema(description = "GPS设备编号")
private String gpsNo;

View File

@@ -61,6 +61,9 @@ public class HjmCarParam extends BaseParam {
@QueryField(type = QueryType.EQ)
private String insuranceStatus;
@Schema(description = "保险图片")
private String bdImg;
@Schema(description = "GPS设备编号")
private String gpsNo;

View File

@@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -95,7 +96,7 @@ public class HjmViolationServiceImpl extends ServiceImpl<HjmViolationMapper, Hjm
map.put("car_number1", new TemplateMessageRequest.TemplateDataItem(item.getCode()));
// 获取当前时间,格式2024年1月1号 10:20
map.put("time2", new TemplateMessageRequest.TemplateDataItem(
new SimpleDateFormat("yyyy年M月d日 HH:mm").format(LocalDateTime.now()), "#173177")
new SimpleDateFormat("yyyy年M月d日 HH:mm").format(new Date()), "#173177")
);
System.out.println("map = " + map);
templateMessageRequest.setData(map);