Commit d7d81d9f by 杨林龙

开发警情消费服务

1 parent 2fb0faf1
package cn.com.glsx.stdinterface.modules.entity; package cn.com.glsx.stdinterface.modules.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.glsx.plat.mybatis.base.BaseEntity; import com.glsx.plat.mybatis.base.BaseEntity;
import lombok.Data; import lombok.Data;
...@@ -52,6 +53,7 @@ public class VehicleDevice extends BaseEntity { ...@@ -52,6 +53,7 @@ public class VehicleDevice extends BaseEntity {
* 激活上点时间 * 激活上点时间
*/ */
@Column(name = "active_location_date") @Column(name = "active_location_date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date activeLocationDate; private Date activeLocationDate;
/** /**
......
package cn.com.glsx.stdinterface.modules.service;
import cn.com.glsx.Application;
import cn.com.glsx.stdinterface.dto.VehicleDeviceDto;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class VehicleDeviceServiceTest {
@Autowired
private VehicleDeviceService vehicleDeviceService;
@Test
public void getVehicleDeviceBySn() {
VehicleDeviceDto vehicleDeviceBySn = vehicleDeviceService.getVehicleDeviceBySn("1610507001");
System.out.println("vehicleDeviceBySn = " + JSONUtil.toJsonStr(vehicleDeviceBySn));
}
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!