| | |
| | | private Integer bms_battery_charging_times;// BMS 电池组充电次数 |
| | | private Integer bms_battery_property_rights;// BMS 电池组产权标识 |
| | | private Integer reserved;// 预留位 |
| | | private String vim;// BMS 车辆识别码 |
| | | private String vin;// BMS 车辆识别码 |
| | | private Integer bms_software_version;// BMS 软件版本号 |
| | | |
| | | |
| | |
| | | public R<TChargingOrder> getOrderByCode(String code) { |
| | | return R.fail("通过流水号查询订单调用失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> updateHandshakeVin(String orderCode, String vin) { |
| | | return R.fail("写入订单握手VIN失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void endCharge(String code) { |
| | |
| | | */ |
| | | @PostMapping(value = "/t-charging-order/getOrderByCode/{code}") |
| | | R<TChargingOrder> getOrderByCode(@PathVariable("code") String code); |
| | | |
| | | /** |
| | | * 根据订单编号前缀将握手 VIN 写入对应订单表 |
| | | */ |
| | | @PostMapping(value = "/t-charging-order/updateHandshakeVin") |
| | | R<Boolean> updateHandshakeVin(@RequestParam("orderCode") String orderCode, |
| | | @RequestParam("vin") String vin); |
| | | |
| | | |
| | | /** |
| | |
| | | @TableField("reservation_time") |
| | | private LocalDateTime reservationTime; |
| | | |
| | | @ApiModelProperty(value = "握手报文VIN") |
| | | @TableField("vin") |
| | | private String vin; |
| | | |
| | | @ApiModelProperty(value = "支付车辆VIN快照") |
| | | @TableField("expected_vin") |
| | | private String expectedVin; |
| | |
| | | @TableField("vin_id") |
| | | private Long vinId; |
| | | |
| | | @ApiModelProperty("VIN码快照") |
| | | @TableField("vin") |
| | | private String vin; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.ruoyi.order.api.model.TChargingOrder; |
| | | import com.ruoyi.order.api.model.TOrderEvaluate; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @Data |
| | | @ApiModel(value = "ChargingOrderVO对象",description = "充电订单列表VO") |
| | | public class ChargingOrderVO extends TChargingOrder { |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @Override |
| | | public Long getId() { |
| | | return super.getId(); |
| | | } |
| | | |
| | | @ApiModelProperty(value = "站点名称") |
| | | private String siteName; |
| | | @ApiModelProperty(value = "充电终端名称 桩+枪") |
| | |
| | | private BigDecimal chargeVoltage; |
| | | @ApiModelProperty(value = "实时功率") |
| | | private BigDecimal chargePower; |
| | | @ApiModelProperty(value = "电流占比") |
| | | private String electronicProportion; |
| | | @ApiModelProperty(value = "1明星充电 2快电 3新电途") |
| | | private Integer orderSource; |
| | | } |
| New file |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.api.dto.ChargingCardBalanceDTO; |
| | | import com.ruoyi.account.api.dto.ChargingCardExcelDTO; |
| | | import com.ruoyi.account.api.dto.ChargingCardQueryDTO; |
| | | import com.ruoyi.account.api.dto.ChargingCardSaveDTO; |
| | | import com.ruoyi.account.api.dto.ChargingCardStatusDTO; |
| | | import com.ruoyi.account.api.model.TChargingCard; |
| | | import com.ruoyi.account.service.TChargingCardService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import org.junit.jupiter.api.BeforeEach; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.mockito.Mock; |
| | | import org.mockito.junit.jupiter.MockitoExtension; |
| | | import org.springframework.mock.web.MockHttpServletResponse; |
| | | import org.springframework.mock.web.MockMultipartFile; |
| | | import org.springframework.test.util.ReflectionTestUtils; |
| | | import org.junit.jupiter.api.extension.ExtendWith; |
| | | |
| | | import java.util.Collections; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.assertEquals; |
| | | import static org.junit.jupiter.api.Assertions.assertTrue; |
| | | import static org.mockito.ArgumentMatchers.any; |
| | | import static org.mockito.Mockito.verify; |
| | | import static org.mockito.Mockito.when; |
| | | |
| | | @ExtendWith(MockitoExtension.class) |
| | | class TChargingCardControllerTest { |
| | | |
| | | @Mock |
| | | private TChargingCardService service; |
| | | |
| | | private TChargingCardController controller; |
| | | |
| | | @BeforeEach |
| | | void setUp() { |
| | | controller = new TChargingCardController(); |
| | | ReflectionTestUtils.setField(controller, "chargingCardService", service); |
| | | } |
| | | |
| | | @Test |
| | | void pageDelegatesToService() { |
| | | ChargingCardQueryDTO query = new ChargingCardQueryDTO(); |
| | | Page<TChargingCard> expected = new Page<>(1, 10); |
| | | when(service.selectCardPage(query)).thenReturn(expected); |
| | | |
| | | R<?> result = controller.page(query); |
| | | |
| | | assertEquals(200, result.getCode()); |
| | | assertEquals(expected, result.getData()); |
| | | verify(service).selectCardPage(query); |
| | | } |
| | | |
| | | @Test |
| | | void addEditDeleteStatusAndBalanceDelegateToService() { |
| | | ChargingCardSaveDTO save = new ChargingCardSaveDTO(); |
| | | ChargingCardStatusDTO status = new ChargingCardStatusDTO(); |
| | | ChargingCardBalanceDTO balance = new ChargingCardBalanceDTO(); |
| | | when(service.saveCard(save)).thenReturn(true); |
| | | when(service.updateCard(save)).thenReturn(true); |
| | | when(service.deleteCards(Collections.singletonList(1L))).thenReturn(true); |
| | | when(service.updateStatus(status)).thenReturn(true); |
| | | when(service.updateBalance(balance)).thenReturn(true); |
| | | |
| | | assertTrue(controller.add(save).getData()); |
| | | assertTrue(controller.edit(save).getData()); |
| | | assertTrue(controller.delete(Collections.singletonList(1L)).getData()); |
| | | assertTrue(controller.status(status).getData()); |
| | | assertTrue(controller.balance(balance).getData()); |
| | | |
| | | verify(service).saveCard(save); |
| | | verify(service).updateCard(save); |
| | | verify(service).deleteCards(Collections.singletonList(1L)); |
| | | verify(service).updateStatus(status); |
| | | verify(service).updateBalance(balance); |
| | | } |
| | | |
| | | @Test |
| | | void exportWritesExcelResponse() { |
| | | ChargingCardQueryDTO query = new ChargingCardQueryDTO(); |
| | | ChargingCardExcelDTO card = new ChargingCardExcelDTO(); |
| | | card.setCardNo("CARD-1"); |
| | | when(service.selectExportList(query)).thenReturn(Collections.singletonList(card)); |
| | | MockHttpServletResponse response = new MockHttpServletResponse(); |
| | | |
| | | controller.export(response, query); |
| | | |
| | | assertEquals(200, response.getStatus()); |
| | | assertTrue(response.getContentAsByteArray().length > 0); |
| | | assertTrue(response.getContentType().contains("application/")); |
| | | verify(service).selectExportList(query); |
| | | } |
| | | |
| | | @Test |
| | | void importTemplateWritesExcelResponse() { |
| | | MockHttpServletResponse response = new MockHttpServletResponse(); |
| | | |
| | | controller.importTemplate(response); |
| | | |
| | | assertEquals(200, response.getStatus()); |
| | | assertTrue(response.getContentAsByteArray().length > 0); |
| | | } |
| | | |
| | | @Test |
| | | void importDataReadsFileAndDelegates() throws Exception { |
| | | MockMultipartFile file = new MockMultipartFile("file", "cards.xlsx", |
| | | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", excelBytes()); |
| | | when(service.importCards(any())).thenReturn("成功导入1条卡片数据"); |
| | | |
| | | R<String> result = controller.importData(file); |
| | | |
| | | assertEquals(200, result.getCode()); |
| | | assertEquals("成功导入1条卡片数据", result.getData()); |
| | | verify(service).importCards(any()); |
| | | } |
| | | |
| | | private byte[] excelBytes() throws Exception { |
| | | org.apache.poi.xssf.usermodel.XSSFWorkbook workbook = new org.apache.poi.xssf.usermodel.XSSFWorkbook(); |
| | | try { |
| | | org.apache.poi.ss.usermodel.Sheet sheet = workbook.createSheet("卡片数据"); |
| | | sheet.createRow(0).createCell(0).setCellValue("卡号"); |
| | | sheet.createRow(1).createCell(0).setCellValue("CARD-1"); |
| | | java.io.ByteArrayOutputStream output = new java.io.ByteArrayOutputStream(); |
| | | workbook.write(output); |
| | | return output.toByteArray(); |
| | | } finally { |
| | | workbook.close(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.api.dto.VinManagementExcelDTO; |
| | | import com.ruoyi.account.api.dto.VinManagementQueryDTO; |
| | | import com.ruoyi.account.api.dto.VinManagementSaveDTO; |
| | | import com.ruoyi.account.api.model.TVinManagement; |
| | | import com.ruoyi.account.service.TVinManagementService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.mockito.ArgumentCaptor; |
| | | import org.springframework.mock.web.MockHttpServletResponse; |
| | | import org.springframework.mock.web.MockMultipartFile; |
| | | import org.springframework.test.util.ReflectionTestUtils; |
| | | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.assertEquals; |
| | | import static org.junit.jupiter.api.Assertions.assertSame; |
| | | import static org.junit.jupiter.api.Assertions.assertTrue; |
| | | import static org.mockito.ArgumentMatchers.any; |
| | | import static org.mockito.ArgumentMatchers.anyList; |
| | | import static org.mockito.Mockito.mock; |
| | | import static org.mockito.Mockito.verify; |
| | | import static org.mockito.Mockito.verifyNoInteractions; |
| | | import static org.mockito.Mockito.when; |
| | | |
| | | class TVinManagementControllerTest { |
| | | |
| | | private TVinManagementController buildController(TVinManagementService service) { |
| | | TVinManagementController controller = new TVinManagementController(); |
| | | ReflectionTestUtils.setField(controller, "service", service); |
| | | return controller; |
| | | } |
| | | |
| | | @Test |
| | | void pageReturnsOkWithPageData() { |
| | | TVinManagementService service = mock(TVinManagementService.class); |
| | | Page<TVinManagement> page = new Page<>(1, 10); |
| | | page.setRecords(Collections.singletonList(new TVinManagement())); |
| | | when(service.selectPageList(any())).thenReturn(page); |
| | | TVinManagementController controller = buildController(service); |
| | | |
| | | VinManagementQueryDTO query = new VinManagementQueryDTO(); |
| | | query.setVin("LSV"); |
| | | |
| | | R<?> result = controller.page(query); |
| | | |
| | | assertEquals(200, result.getCode()); |
| | | assertSame(page, result.getData()); |
| | | verify(service).selectPageList(query); |
| | | } |
| | | |
| | | @Test |
| | | void addReturnsOkWhenSaved() { |
| | | TVinManagementService service = mock(TVinManagementService.class); |
| | | when(service.saveVin(any())).thenReturn(true); |
| | | TVinManagementController controller = buildController(service); |
| | | |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setVin("LSVAM4187C2184842"); |
| | | |
| | | R<Boolean> result = controller.add(dto); |
| | | |
| | | assertEquals(200, result.getCode()); |
| | | assertEquals(Boolean.TRUE, result.getData()); |
| | | verify(service).saveVin(dto); |
| | | } |
| | | |
| | | @Test |
| | | void editReturnsOkWhenUpdated() { |
| | | TVinManagementService service = mock(TVinManagementService.class); |
| | | when(service.updateVin(any())).thenReturn(true); |
| | | TVinManagementController controller = buildController(service); |
| | | |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setId(9L); |
| | | dto.setVin("LSVAM4187C2184842"); |
| | | |
| | | R<Boolean> result = controller.edit(dto); |
| | | |
| | | assertEquals(200, result.getCode()); |
| | | assertEquals(Boolean.TRUE, result.getData()); |
| | | verify(service).updateVin(dto); |
| | | } |
| | | |
| | | @Test |
| | | void deleteReturnsOkWhenRemoved() { |
| | | TVinManagementService service = mock(TVinManagementService.class); |
| | | when(service.deleteVins(anyList())).thenReturn(true); |
| | | TVinManagementController controller = buildController(service); |
| | | |
| | | List<Long> ids = Arrays.asList(1L, 2L); |
| | | |
| | | R<Boolean> result = controller.delete(ids); |
| | | |
| | | assertEquals(200, result.getCode()); |
| | | assertEquals(Boolean.TRUE, result.getData()); |
| | | verify(service).deleteVins(ids); |
| | | } |
| | | |
| | | @Test |
| | | void statusDelegatesIdAndStatusFromDto() { |
| | | TVinManagementService service = mock(TVinManagementService.class); |
| | | when(service.updateStatus(9L, 2)).thenReturn(true); |
| | | TVinManagementController controller = buildController(service); |
| | | |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setId(9L); |
| | | dto.setStatus(2); |
| | | |
| | | R<Boolean> result = controller.status(dto); |
| | | |
| | | assertEquals(200, result.getCode()); |
| | | assertEquals(Boolean.TRUE, result.getData()); |
| | | verify(service).updateStatus(9L, 2); |
| | | } |
| | | |
| | | @Test |
| | | void exportWritesExcelAndDelegatesQuery() throws Exception { |
| | | TVinManagementService service = mock(TVinManagementService.class); |
| | | VinManagementExcelDTO item = new VinManagementExcelDTO(); |
| | | item.setVin("LSVAM4187C2184842"); |
| | | item.setStatus("1"); |
| | | when(service.selectExportList(any())).thenReturn(Collections.singletonList(item)); |
| | | TVinManagementController controller = buildController(service); |
| | | |
| | | MockHttpServletResponse response = new MockHttpServletResponse(); |
| | | VinManagementQueryDTO query = new VinManagementQueryDTO(); |
| | | query.setStatus(1); |
| | | |
| | | controller.export(response, query); |
| | | |
| | | assertTrue(response.getContentType().contains("spreadsheetml")); |
| | | assertTrue(response.getContentAsByteArray().length > 0); |
| | | verify(service).selectExportList(query); |
| | | } |
| | | |
| | | @Test |
| | | void templateDownloadsImportTemplateExcel() { |
| | | TVinManagementService service = mock(TVinManagementService.class); |
| | | TVinManagementController controller = buildController(service); |
| | | |
| | | MockHttpServletResponse response = new MockHttpServletResponse(); |
| | | |
| | | controller.template(response); |
| | | |
| | | assertTrue(response.getContentType().contains("spreadsheetml")); |
| | | assertTrue(response.getContentAsByteArray().length > 0); |
| | | verifyNoInteractions(service); |
| | | } |
| | | |
| | | @Test |
| | | void importDataParsesExcelAndReturnsResult() throws Exception { |
| | | TVinManagementService service = mock(TVinManagementService.class); |
| | | when(service.importVins(anyList())).thenReturn("成功导入1条VIN码数据"); |
| | | TVinManagementController controller = buildController(service); |
| | | |
| | | MockMultipartFile file = vinExcelFile(); |
| | | |
| | | R<String> result = controller.importData(file); |
| | | |
| | | assertEquals(200, result.getCode()); |
| | | assertEquals("成功导入1条VIN码数据", result.getData()); |
| | | @SuppressWarnings("unchecked") |
| | | ArgumentCaptor<List<VinManagementExcelDTO>> captor = ArgumentCaptor.forClass(List.class); |
| | | verify(service).importVins(captor.capture()); |
| | | assertEquals(1, captor.getValue().size()); |
| | | VinManagementExcelDTO parsed = captor.getValue().get(0); |
| | | assertEquals("LSVAM4187C2184842", parsed.getVin()); |
| | | assertEquals("川A12345", parsed.getPlateNumber()); |
| | | assertEquals("13800138000", parsed.getPhone()); |
| | | assertEquals("测试公司", parsed.getCompanyName()); |
| | | assertEquals("备注", parsed.getRemark()); |
| | | assertEquals("1", parsed.getStatus()); |
| | | } |
| | | |
| | | private MockMultipartFile vinExcelFile() throws Exception { |
| | | try (XSSFWorkbook workbook = new XSSFWorkbook(); ByteArrayOutputStream output = new ByteArrayOutputStream()) { |
| | | Sheet sheet = workbook.createSheet("VIN码数据"); |
| | | Row header = sheet.createRow(0); |
| | | header.createCell(0).setCellValue("VIN码"); |
| | | header.createCell(1).setCellValue("车牌号"); |
| | | header.createCell(2).setCellValue("手机号"); |
| | | header.createCell(3).setCellValue("所属公司"); |
| | | header.createCell(4).setCellValue("备注"); |
| | | header.createCell(5).setCellValue("启用状态"); |
| | | Row row = sheet.createRow(1); |
| | | row.createCell(0).setCellValue("LSVAM4187C2184842"); |
| | | row.createCell(1).setCellValue("川A12345"); |
| | | row.createCell(2).setCellValue("13800138000"); |
| | | row.createCell(3).setCellValue("测试公司"); |
| | | row.createCell(4).setCellValue("备注"); |
| | | row.createCell(5).setCellValue("启用"); |
| | | workbook.write(output); |
| | | return new MockMultipartFile("file", "vin.xlsx", |
| | | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", output.toByteArray()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ruoyi.account.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.api.dto.ChargingCardBalanceDTO; |
| | | import com.ruoyi.account.api.dto.ChargingCardExcelDTO; |
| | | import com.ruoyi.account.api.dto.ChargingCardSaveDTO; |
| | | import com.ruoyi.account.api.dto.ChargingCardStatusDTO; |
| | | import com.ruoyi.account.api.model.TChargingCard; |
| | | import com.ruoyi.account.mapper.TChargingCardMapper; |
| | | import com.ruoyi.common.core.context.SecurityContextHolder; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import org.junit.jupiter.api.AfterEach; |
| | | import org.junit.jupiter.api.BeforeEach; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.junit.jupiter.api.extension.ExtendWith; |
| | | import org.mockito.ArgumentCaptor; |
| | | import org.mockito.Mock; |
| | | import org.mockito.junit.jupiter.MockitoExtension; |
| | | import org.springframework.test.util.ReflectionTestUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.assertEquals; |
| | | import static org.junit.jupiter.api.Assertions.assertNotNull; |
| | | import static org.junit.jupiter.api.Assertions.assertSame; |
| | | import static org.junit.jupiter.api.Assertions.assertThrows; |
| | | import static org.junit.jupiter.api.Assertions.assertTrue; |
| | | import static org.mockito.ArgumentMatchers.any; |
| | | import static org.mockito.ArgumentMatchers.anyList; |
| | | import static org.mockito.ArgumentMatchers.anyString; |
| | | import static org.mockito.ArgumentMatchers.isNull; |
| | | import static org.mockito.Mockito.doReturn; |
| | | import static org.mockito.Mockito.never; |
| | | import static org.mockito.Mockito.spy; |
| | | import static org.mockito.Mockito.verify; |
| | | import static org.mockito.Mockito.when; |
| | | |
| | | @ExtendWith(MockitoExtension.class) |
| | | class TChargingCardServiceImplTest { |
| | | |
| | | @Mock private TChargingCardMapper mapper; |
| | | @Mock private TokenService tokenService; |
| | | @Mock private SysUserClient sysUserClient; |
| | | private TChargingCardServiceImpl service; |
| | | |
| | | @BeforeEach |
| | | void setUp() { |
| | | service = spy(new TChargingCardServiceImpl()); |
| | | ReflectionTestUtils.setField(service, "baseMapper", mapper); |
| | | ReflectionTestUtils.setField(service, "tokenService", tokenService); |
| | | ReflectionTestUtils.setField(service, "sysUserClient", sysUserClient); |
| | | SecurityContextHolder.setUserId("123"); |
| | | } |
| | | |
| | | @AfterEach |
| | | void tearDown() { |
| | | SecurityContextHolder.remove(); |
| | | } |
| | | |
| | | @Test |
| | | void selectCardPageUsesSafeDefaultsAndPassesQuery() { |
| | | Page<TChargingCard> expected = new Page<>(1, 10); |
| | | when(mapper.selectCardPage(any(Page.class), any())).thenReturn(expected); |
| | | |
| | | IPage<TChargingCard> result = service.selectCardPage(null); |
| | | |
| | | ArgumentCaptor<Page<TChargingCard>> page = ArgumentCaptor.forClass(Page.class); |
| | | verify(mapper).selectCardPage(page.capture(), any()); |
| | | assertEquals(1, page.getValue().getCurrent()); |
| | | assertEquals(50, page.getValue().getSize()); |
| | | assertSame(expected, result); |
| | | } |
| | | |
| | | @Test |
| | | void saveCardTrimsAndSetsDefaults() { |
| | | when(mapper.countByCardNo(anyString(), isNull())).thenReturn(0); |
| | | when(mapper.insert(any(TChargingCard.class))).thenAnswer(invocation -> 1); |
| | | ChargingCardSaveDTO dto = new ChargingCardSaveDTO(); |
| | | dto.setCardNo(" CARD-1 "); |
| | | |
| | | assertTrue(service.saveCard(dto)); |
| | | |
| | | ArgumentCaptor<TChargingCard> card = ArgumentCaptor.forClass(TChargingCard.class); |
| | | verify(mapper).insert(card.capture()); |
| | | assertEquals("CARD-1", card.getValue().getCardNo()); |
| | | assertEquals(BigDecimal.ZERO, card.getValue().getBalance()); |
| | | assertEquals(Integer.valueOf(1), card.getValue().getStatus()); |
| | | assertEquals(Integer.valueOf(0), card.getValue().getDelFlag()); |
| | | assertEquals(Long.valueOf(123), card.getValue().getCreateBy()); |
| | | assertNotNull(card.getValue().getCreateTime()); |
| | | } |
| | | |
| | | @Test |
| | | void saveCardRejectsDuplicate() { |
| | | when(mapper.countByCardNo("CARD-1", null)).thenReturn(1); |
| | | ChargingCardSaveDTO dto = new ChargingCardSaveDTO(); |
| | | dto.setCardNo("CARD-1"); |
| | | |
| | | ServiceException exception = assertThrows(ServiceException.class, () -> service.saveCard(dto)); |
| | | |
| | | assertEquals("卡号已存在", exception.getMessage()); |
| | | verify(mapper, never()).insert(any()); |
| | | } |
| | | |
| | | @Test |
| | | void updateCardRequiresExistingCardAndDoesNotChangeBalance() { |
| | | ChargingCardSaveDTO dto = new ChargingCardSaveDTO(); |
| | | dto.setId(7L); |
| | | dto.setCardNo(" CARD-7 "); |
| | | dto.setBalance(new BigDecimal("999.99")); |
| | | when(mapper.countByCardNo("CARD-7", 7L)).thenReturn(0); |
| | | TChargingCard existing = new TChargingCard(); |
| | | existing.setId(7L); |
| | | when(mapper.selectById(7L)).thenReturn(existing); |
| | | when(mapper.updateById(any(TChargingCard.class))).thenReturn(1); |
| | | |
| | | assertTrue(service.updateCard(dto)); |
| | | |
| | | ArgumentCaptor<TChargingCard> card = ArgumentCaptor.forClass(TChargingCard.class); |
| | | verify(mapper).updateById(card.capture()); |
| | | assertEquals("CARD-7", card.getValue().getCardNo()); |
| | | assertEquals(null, card.getValue().getBalance()); |
| | | } |
| | | |
| | | @Test |
| | | void deleteCardsRemovesDistinctIds() { |
| | | TChargingCard first = new TChargingCard(); |
| | | first.setId(1L); |
| | | TChargingCard second = new TChargingCard(); |
| | | second.setId(2L); |
| | | doReturn(Arrays.asList(first, second)).when(service).listByIds(anyList()); |
| | | doReturn(true).when(service).removeByIds(anyList()); |
| | | |
| | | assertTrue(service.deleteCards(Arrays.asList(1L, 1L, 2L))); |
| | | |
| | | verify(service).removeByIds(anyList()); |
| | | } |
| | | |
| | | @Test |
| | | void updateStatusRejectsInvalidStatus() { |
| | | ChargingCardStatusDTO dto = new ChargingCardStatusDTO(); |
| | | dto.setId(1L); |
| | | dto.setStatus(3); |
| | | |
| | | ServiceException exception = assertThrows(ServiceException.class, () -> service.updateStatus(dto)); |
| | | |
| | | assertEquals("卡片状态参数错误", exception.getMessage()); |
| | | } |
| | | |
| | | @Test |
| | | void updateBalanceAdjustsAndRecordsForAllCards() { |
| | | LoginUser loginUser = new LoginUser(); |
| | | loginUser.setUserid(123L); |
| | | SysUser user = new SysUser(); |
| | | user.setOperationPassword(com.ruoyi.common.security.utils.SecurityUtils.encryptPassword("pwd")); |
| | | when(tokenService.getLoginUser()).thenReturn(loginUser); |
| | | when(sysUserClient.getSysUser(123L)).thenReturn(R.ok(user)); |
| | | TChargingCard first = new TChargingCard(); |
| | | first.setId(1L); |
| | | TChargingCard second = new TChargingCard(); |
| | | second.setId(2L); |
| | | when(mapper.selectBatchIds(anyList())).thenReturn(Arrays.asList(first, second)); |
| | | when(mapper.adjustBalance(anyList(), any(BigDecimal.class), any(Integer.class), any(BigDecimal.class), any(Long.class))) |
| | | .thenReturn(2); |
| | | ChargingCardBalanceDTO dto = new ChargingCardBalanceDTO(); |
| | | dto.setIds(Arrays.asList(1L, 2L)); |
| | | dto.setType(1); |
| | | dto.setAmount(new BigDecimal("10.00")); |
| | | dto.setOperationPassword("pwd"); |
| | | dto.setRemark(" test "); |
| | | |
| | | assertTrue(service.updateBalance(dto)); |
| | | |
| | | verify(mapper).insertBalanceRecord(1L, 1, new BigDecimal("10.00"), "test", 123L); |
| | | verify(mapper).insertBalanceRecord(2L, 1, new BigDecimal("10.00"), "test", 123L); |
| | | } |
| | | |
| | | @Test |
| | | void updateBalanceRejectsMissingPasswordBeforeDatabaseUpdate() { |
| | | ChargingCardBalanceDTO dto = new ChargingCardBalanceDTO(); |
| | | dto.setIds(Collections.singletonList(1L)); |
| | | dto.setType(1); |
| | | dto.setAmount(BigDecimal.ONE); |
| | | |
| | | ServiceException exception = assertThrows(ServiceException.class, () -> service.updateBalance(dto)); |
| | | |
| | | assertEquals("请输入操作密码", exception.getMessage()); |
| | | verify(mapper, never()).adjustBalance(anyList(), any(), any(), any(), any()); |
| | | } |
| | | |
| | | @Test |
| | | void importCardsRejectsDuplicateRows() { |
| | | ChargingCardExcelDTO first = new ChargingCardExcelDTO(); |
| | | first.setCardNo("CARD-1"); |
| | | ChargingCardExcelDTO second = new ChargingCardExcelDTO(); |
| | | second.setCardNo(" CARD-1 "); |
| | | |
| | | ServiceException exception = assertThrows(ServiceException.class, |
| | | () -> service.importCards(Arrays.asList(first, second))); |
| | | |
| | | assertEquals("第3行卡号在文件中重复", exception.getMessage()); |
| | | } |
| | | |
| | | @Test |
| | | void selectExportListUsesEmptyQueryWhenNull() { |
| | | when(mapper.selectExportList(any())).thenReturn(Collections.emptyList()); |
| | | |
| | | assertTrue(service.selectExportList(null).isEmpty()); |
| | | verify(mapper).selectExportList(any()); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ruoyi.account.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.MybatisConfiguration; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.builder.MapperBuilderAssistant; |
| | | import com.ruoyi.account.api.dto.VinManagementExcelDTO; |
| | | import com.ruoyi.account.api.dto.VinManagementQueryDTO; |
| | | import com.ruoyi.account.api.dto.VinManagementSaveDTO; |
| | | import com.ruoyi.account.api.model.TVinManagement; |
| | | import com.ruoyi.account.mapper.TVinManagementMapper; |
| | | import com.ruoyi.common.core.context.SecurityContextHolder; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import org.junit.jupiter.api.AfterEach; |
| | | import org.junit.jupiter.api.BeforeAll; |
| | | import org.junit.jupiter.api.BeforeEach; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.junit.jupiter.api.extension.ExtendWith; |
| | | import org.mockito.ArgumentCaptor; |
| | | import org.mockito.Captor; |
| | | import org.mockito.Mock; |
| | | import org.mockito.junit.jupiter.MockitoExtension; |
| | | import org.springframework.test.util.ReflectionTestUtils; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.assertEquals; |
| | | import static org.junit.jupiter.api.Assertions.assertNotNull; |
| | | import static org.junit.jupiter.api.Assertions.assertSame; |
| | | import static org.junit.jupiter.api.Assertions.assertThrows; |
| | | import static org.junit.jupiter.api.Assertions.assertTrue; |
| | | import static org.mockito.ArgumentMatchers.any; |
| | | import static org.mockito.ArgumentMatchers.anyCollection; |
| | | import static org.mockito.ArgumentMatchers.anyString; |
| | | import static org.mockito.ArgumentMatchers.eq; |
| | | import static org.mockito.ArgumentMatchers.isNull; |
| | | import static org.mockito.Mockito.never; |
| | | import static org.mockito.Mockito.times; |
| | | import static org.mockito.Mockito.verify; |
| | | import static org.mockito.Mockito.verifyNoInteractions; |
| | | import static org.mockito.Mockito.when; |
| | | |
| | | @ExtendWith(MockitoExtension.class) |
| | | class TVinManagementServiceImplTest { |
| | | |
| | | private static final Long CURRENT_USER = 123L; |
| | | |
| | | @Mock |
| | | private TVinManagementMapper mapper; |
| | | |
| | | @Captor |
| | | private ArgumentCaptor<Page<TVinManagement>> pageCaptor; |
| | | |
| | | @Captor |
| | | private ArgumentCaptor<VinManagementQueryDTO> queryCaptor; |
| | | |
| | | @Captor |
| | | private ArgumentCaptor<TVinManagement> entityCaptor; |
| | | |
| | | private TVinManagementServiceImpl service; |
| | | |
| | | @BeforeAll |
| | | static void initTableInfo() { |
| | | // MP 的 removeByIds 会通过 TableInfoHelper.getTableInfo 取表元数据, |
| | | // 单元测试不启动 Spring,需要手动初始化 TableInfo,否则返回 null 导致 NPE |
| | | TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), ""), TVinManagement.class); |
| | | } |
| | | |
| | | @BeforeEach |
| | | void setUp() { |
| | | service = new TVinManagementServiceImpl(); |
| | | ReflectionTestUtils.setField(service, "baseMapper", mapper); |
| | | SecurityContextHolder.setUserId(String.valueOf(CURRENT_USER)); |
| | | } |
| | | |
| | | @AfterEach |
| | | void tearDown() { |
| | | SecurityContextHolder.remove(); |
| | | } |
| | | |
| | | // ---------------- selectPageList ---------------- |
| | | |
| | | @Test |
| | | void selectPageListWithNullQueryUsesDefaultPagination() { |
| | | Page<TVinManagement> expected = new Page<>(1, 10); |
| | | when(mapper.selectPageList(any(Page.class), any())).thenReturn(expected); |
| | | |
| | | IPage<TVinManagement> result = service.selectPageList(null); |
| | | |
| | | verify(mapper).selectPageList(pageCaptor.capture(), queryCaptor.capture()); |
| | | assertEquals(1, pageCaptor.getValue().getCurrent()); |
| | | assertEquals(50, pageCaptor.getValue().getSize()); // BasePage 默认 pageSize=50 |
| | | assertNotNull(queryCaptor.getValue()); |
| | | assertSame(expected, result); |
| | | } |
| | | |
| | | @Test |
| | | void selectPageListWithInvalidParamsFallsBackToDefaults() { |
| | | VinManagementQueryDTO query = new VinManagementQueryDTO(); |
| | | query.setPageCurr(0); |
| | | query.setPageSize(-1); |
| | | when(mapper.selectPageList(any(Page.class), any())).thenReturn(new Page<>()); |
| | | |
| | | service.selectPageList(query); |
| | | |
| | | verify(mapper).selectPageList(pageCaptor.capture(), any()); |
| | | assertEquals(1, pageCaptor.getValue().getCurrent()); |
| | | assertEquals(10, pageCaptor.getValue().getSize()); |
| | | } |
| | | |
| | | @Test |
| | | void selectPageListPassesQueryAndPagination() { |
| | | VinManagementQueryDTO query = new VinManagementQueryDTO(); |
| | | query.setPageCurr(3); |
| | | query.setPageSize(20); |
| | | query.setVin("LSV"); |
| | | Page<TVinManagement> expected = new Page<>(3, 20); |
| | | expected.setRecords(Collections.singletonList(new TVinManagement())); |
| | | when(mapper.selectPageList(any(Page.class), any())).thenReturn(expected); |
| | | |
| | | IPage<TVinManagement> result = service.selectPageList(query); |
| | | |
| | | verify(mapper).selectPageList(pageCaptor.capture(), queryCaptor.capture()); |
| | | assertEquals(3, pageCaptor.getValue().getCurrent()); |
| | | assertEquals(20, pageCaptor.getValue().getSize()); |
| | | assertSame(query, queryCaptor.getValue()); |
| | | assertEquals(1, result.getRecords().size()); |
| | | } |
| | | |
| | | // ---------------- saveVin ---------------- |
| | | |
| | | @Test |
| | | void saveVinSucceedsAndSetsDefaults() { |
| | | when(mapper.countByVin(anyString(), isNull())).thenReturn(0); |
| | | when(mapper.insert(any(TVinManagement.class))).thenReturn(1); |
| | | |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setVin(" LSVAM4187C2184842 "); |
| | | dto.setPlateNumber(" 川A12345 "); |
| | | dto.setPhone("13800138000"); |
| | | dto.setCompanyName(" 测试公司 "); |
| | | dto.setRemark(" 备注 "); |
| | | |
| | | boolean result = service.saveVin(dto); |
| | | |
| | | assertTrue(result); |
| | | verify(mapper).insert(entityCaptor.capture()); |
| | | TVinManagement saved = entityCaptor.getValue(); |
| | | assertEquals("LSVAM4187C2184842", saved.getVin()); |
| | | assertEquals("川A12345", saved.getPlateNumber()); |
| | | assertEquals("13800138000", saved.getPhone()); |
| | | assertEquals("测试公司", saved.getCompanyName()); |
| | | assertEquals("备注", saved.getRemark()); |
| | | assertEquals(Integer.valueOf(1), saved.getStatus()); |
| | | assertEquals(Integer.valueOf(0), saved.getDelFlag()); |
| | | assertNotNull(saved.getCreateTime()); |
| | | assertEquals(CURRENT_USER, saved.getCreateBy()); |
| | | } |
| | | |
| | | @Test |
| | | void saveVinRejectsNullVin() { |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setVin(null); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.saveVin(dto)); |
| | | |
| | | assertEquals("VIN码不能为空", ex.getMessage()); |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void saveVinRejectsTooLongVin() { |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setVin(longVin(65)); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.saveVin(dto)); |
| | | |
| | | assertEquals("VIN码不能超过64个字符", ex.getMessage()); |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void saveVinRejectsInvalidStatus() { |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setVin("LSVAM4187C2184842"); |
| | | dto.setStatus(3); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.saveVin(dto)); |
| | | |
| | | assertEquals("VIN码状态参数错误", ex.getMessage()); |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void saveVinRejectsDuplicateVin() { |
| | | when(mapper.countByVin(anyString(), isNull())).thenReturn(1); |
| | | |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setVin("LSVAM4187C2184842"); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.saveVin(dto)); |
| | | |
| | | assertEquals("VIN码已存在", ex.getMessage()); |
| | | verify(mapper, never()).insert(any()); |
| | | } |
| | | |
| | | // ---------------- updateVin ---------------- |
| | | |
| | | @Test |
| | | void updateVinSucceedsAndSetsAuditFields() { |
| | | when(mapper.selectById(9L)).thenReturn(new TVinManagement()); |
| | | when(mapper.countByVin(anyString(), eq(9L))).thenReturn(0); |
| | | when(mapper.updateById(any(TVinManagement.class))).thenReturn(1); |
| | | |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setId(9L); |
| | | dto.setVin("LSVAM4187C2184842"); |
| | | dto.setPlateNumber("川B88888"); |
| | | dto.setStatus(2); |
| | | |
| | | boolean result = service.updateVin(dto); |
| | | |
| | | assertTrue(result); |
| | | verify(mapper).updateById(entityCaptor.capture()); |
| | | TVinManagement updated = entityCaptor.getValue(); |
| | | assertEquals(Long.valueOf(9L), updated.getId()); |
| | | assertEquals("LSVAM4187C2184842", updated.getVin()); |
| | | assertEquals("川B88888", updated.getPlateNumber()); |
| | | assertEquals(Integer.valueOf(2), updated.getStatus()); |
| | | assertNotNull(updated.getUpdateTime()); |
| | | assertEquals(CURRENT_USER, updated.getUpdateBy()); |
| | | } |
| | | |
| | | @Test |
| | | void updateVinRejectsMissingId() { |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setVin("LSVAM4187C2184842"); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.updateVin(dto)); |
| | | |
| | | assertEquals("VIN码ID不能为空", ex.getMessage()); |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void updateVinRejectsNotExist() { |
| | | when(mapper.selectById(9L)).thenReturn(null); |
| | | |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setId(9L); |
| | | dto.setVin("LSVAM4187C2184842"); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.updateVin(dto)); |
| | | |
| | | assertEquals("VIN码不存在或已删除", ex.getMessage()); |
| | | verify(mapper, never()).updateById(any()); |
| | | } |
| | | |
| | | @Test |
| | | void updateVinRejectsDuplicateVin() { |
| | | // validate 中 countByVin 命中重复即抛异常,selectById 不会被执行 |
| | | when(mapper.countByVin(anyString(), eq(9L))).thenReturn(1); |
| | | |
| | | VinManagementSaveDTO dto = new VinManagementSaveDTO(); |
| | | dto.setId(9L); |
| | | dto.setVin("LSVAM4187C2184842"); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.updateVin(dto)); |
| | | |
| | | assertEquals("VIN码已存在", ex.getMessage()); |
| | | verify(mapper, never()).updateById(any()); |
| | | } |
| | | |
| | | // ---------------- deleteVins ---------------- |
| | | |
| | | @Test |
| | | void deleteVinsRejectsNullOrEmptyIds() { |
| | | ServiceException ex1 = assertThrows(ServiceException.class, () -> service.deleteVins(null)); |
| | | assertEquals("请选择需要删除的VIN码", ex1.getMessage()); |
| | | |
| | | ServiceException ex2 = assertThrows(ServiceException.class, () -> service.deleteVins(Collections.emptyList())); |
| | | assertEquals("请选择需要删除的VIN码", ex2.getMessage()); |
| | | |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void deleteVinsRejectsMissingRecords() { |
| | | when(mapper.selectBatchIds(anyCollection())).thenReturn(Collections.singletonList(new TVinManagement())); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.deleteVins(Arrays.asList(1L, 2L))); |
| | | |
| | | assertEquals("部分VIN码不存在或已删除", ex.getMessage()); |
| | | verify(mapper, never()).deleteBatchIds(any()); |
| | | } |
| | | |
| | | @Test |
| | | void deleteVinsSucceedsWithDistinctIds() { |
| | | when(mapper.selectBatchIds(anyCollection())) |
| | | .thenReturn(Arrays.asList(new TVinManagement(), new TVinManagement())); |
| | | when(mapper.deleteBatchIds(anyCollection())).thenReturn(1); |
| | | |
| | | boolean result = service.deleteVins(Arrays.asList(1L, 2L, 2L)); |
| | | |
| | | assertTrue(result); |
| | | @SuppressWarnings("unchecked") |
| | | ArgumentCaptor<List<Long>> idsCaptor = ArgumentCaptor.forClass(List.class); |
| | | verify(mapper).deleteBatchIds(idsCaptor.capture()); |
| | | assertEquals(2, idsCaptor.getValue().size()); |
| | | assertEquals(Long.valueOf(1L), idsCaptor.getValue().get(0)); |
| | | assertEquals(Long.valueOf(2L), idsCaptor.getValue().get(1)); |
| | | } |
| | | |
| | | // ---------------- updateStatus ---------------- |
| | | |
| | | @Test |
| | | void updateStatusRejectsNullId() { |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.updateStatus(null, 1)); |
| | | |
| | | assertEquals("VIN码状态参数错误", ex.getMessage()); |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void updateStatusRejectsInvalidStatus() { |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.updateStatus(9L, 0)); |
| | | |
| | | assertEquals("VIN码状态参数错误", ex.getMessage()); |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void updateStatusRejectsNotExist() { |
| | | when(mapper.selectById(9L)).thenReturn(null); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, () -> service.updateStatus(9L, 2)); |
| | | |
| | | assertEquals("VIN码不存在或已删除", ex.getMessage()); |
| | | verify(mapper, never()).updateById(any()); |
| | | } |
| | | |
| | | @Test |
| | | void updateStatusSucceeds() { |
| | | when(mapper.selectById(9L)).thenReturn(new TVinManagement()); |
| | | when(mapper.updateById(any(TVinManagement.class))).thenReturn(1); |
| | | |
| | | boolean result = service.updateStatus(9L, 2); |
| | | |
| | | assertTrue(result); |
| | | verify(mapper).updateById(entityCaptor.capture()); |
| | | TVinManagement updated = entityCaptor.getValue(); |
| | | assertEquals(Long.valueOf(9L), updated.getId()); |
| | | assertEquals(Integer.valueOf(2), updated.getStatus()); |
| | | assertNotNull(updated.getUpdateTime()); |
| | | assertEquals(CURRENT_USER, updated.getUpdateBy()); |
| | | } |
| | | |
| | | // ---------------- selectExportList ---------------- |
| | | |
| | | @Test |
| | | void selectExportListReturnsMapperResult() { |
| | | VinManagementExcelDTO item = new VinManagementExcelDTO(); |
| | | item.setVin("LSVAM4187C2184842"); |
| | | when(mapper.selectExportList(any())).thenReturn(Collections.singletonList(item)); |
| | | |
| | | VinManagementQueryDTO query = new VinManagementQueryDTO(); |
| | | query.setStatus(1); |
| | | |
| | | List<VinManagementExcelDTO> result = service.selectExportList(query); |
| | | |
| | | assertEquals(1, result.size()); |
| | | assertEquals("LSVAM4187C2184842", result.get(0).getVin()); |
| | | verify(mapper).selectExportList(queryCaptor.capture()); |
| | | assertSame(query, queryCaptor.getValue()); |
| | | } |
| | | |
| | | @Test |
| | | void selectExportListWithNullQueryUsesEmptyDto() { |
| | | when(mapper.selectExportList(any())).thenReturn(Collections.emptyList()); |
| | | |
| | | List<VinManagementExcelDTO> result = service.selectExportList(null); |
| | | |
| | | assertTrue(result.isEmpty()); |
| | | verify(mapper).selectExportList(queryCaptor.capture()); |
| | | assertNotNull(queryCaptor.getValue()); |
| | | } |
| | | |
| | | // ---------------- importVins ---------------- |
| | | |
| | | @Test |
| | | void importVinsRejectsNullOrEmptyItems() { |
| | | ServiceException ex1 = assertThrows(ServiceException.class, () -> service.importVins(null)); |
| | | assertEquals("导入数据不能为空", ex1.getMessage()); |
| | | |
| | | ServiceException ex2 = assertThrows(ServiceException.class, () -> service.importVins(Collections.emptyList())); |
| | | assertEquals("导入数据不能为空", ex2.getMessage()); |
| | | |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void importVinsRejectsEmptyVinAtRow() { |
| | | VinManagementExcelDTO item = new VinManagementExcelDTO(); |
| | | item.setVin(""); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, |
| | | () -> service.importVins(Collections.singletonList(item))); |
| | | |
| | | assertEquals("第2行VIN码不能为空", ex.getMessage()); |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void importVinsRejectsTooLongVinAtRow() { |
| | | VinManagementExcelDTO item = new VinManagementExcelDTO(); |
| | | item.setVin(longVin(65)); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, |
| | | () -> service.importVins(Collections.singletonList(item))); |
| | | |
| | | assertEquals("第2行VIN码不能超过64个字符", ex.getMessage()); |
| | | verifyNoInteractions(mapper); |
| | | } |
| | | |
| | | @Test |
| | | void importVinsRejectsDuplicateVinWithinFile() { |
| | | VinManagementExcelDTO first = new VinManagementExcelDTO(); |
| | | first.setVin("LSVAM4187C2184842"); |
| | | VinManagementExcelDTO second = new VinManagementExcelDTO(); |
| | | second.setVin("LSVAM4187C2184842"); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, |
| | | () -> service.importVins(Arrays.asList(first, second))); |
| | | |
| | | assertEquals("第3行VIN码已存在或重复", ex.getMessage()); |
| | | // 第一行校验时已调用过 countByVin,仅断言不执行 insert |
| | | verify(mapper, never()).insert(any()); |
| | | } |
| | | |
| | | @Test |
| | | void importVinsRejectsVinExistingInDb() { |
| | | when(mapper.countByVin(anyString(), isNull())).thenReturn(1); |
| | | |
| | | VinManagementExcelDTO item = new VinManagementExcelDTO(); |
| | | item.setVin("LSVAM4187C2184842"); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, |
| | | () -> service.importVins(Collections.singletonList(item))); |
| | | |
| | | assertEquals("第2行VIN码已存在或重复", ex.getMessage()); |
| | | verify(mapper, never()).insert(any()); |
| | | } |
| | | |
| | | @Test |
| | | void importVinsRejectsInvalidStatusAtRow() { |
| | | VinManagementExcelDTO item = new VinManagementExcelDTO(); |
| | | item.setVin("LSVAM4187C2184842"); |
| | | item.setStatus("3"); |
| | | |
| | | ServiceException ex = assertThrows(ServiceException.class, |
| | | () -> service.importVins(Collections.singletonList(item))); |
| | | |
| | | assertEquals("第2行启用状态错误", ex.getMessage()); |
| | | verify(mapper, never()).insert(any()); |
| | | } |
| | | |
| | | @Test |
| | | void importVinsSucceedsAndParsesStatus() { |
| | | when(mapper.countByVin(anyString(), isNull())).thenReturn(0); |
| | | when(mapper.insert(any(TVinManagement.class))).thenReturn(1); |
| | | |
| | | VinManagementExcelDTO first = new VinManagementExcelDTO(); |
| | | first.setVin(" LSVAM4187C2184842 "); |
| | | first.setPlateNumber(" 川A12345 "); |
| | | first.setPhone("13800138000"); |
| | | first.setCompanyName(" 公司A "); |
| | | first.setRemark(" 备注A "); |
| | | first.setStatus("启用"); |
| | | |
| | | VinManagementExcelDTO second = new VinManagementExcelDTO(); |
| | | second.setVin("LSVAM4187C2184843"); |
| | | second.setStatus("2"); |
| | | |
| | | VinManagementExcelDTO third = new VinManagementExcelDTO(); |
| | | third.setVin("LSVAM4187C2184844"); |
| | | third.setStatus(null); |
| | | |
| | | String result = service.importVins(Arrays.asList(first, second, third)); |
| | | |
| | | assertEquals("成功导入3条VIN码数据", result); |
| | | verify(mapper, times(3)).insert(entityCaptor.capture()); |
| | | List<TVinManagement> saved = entityCaptor.getAllValues(); |
| | | assertEquals("LSVAM4187C2184842", saved.get(0).getVin()); |
| | | assertEquals("川A12345", saved.get(0).getPlateNumber()); |
| | | assertEquals("公司A", saved.get(0).getCompanyName()); |
| | | assertEquals("备注A", saved.get(0).getRemark()); |
| | | assertEquals(Integer.valueOf(1), saved.get(0).getStatus()); |
| | | assertEquals(Integer.valueOf(2), saved.get(1).getStatus()); |
| | | assertEquals(Integer.valueOf(1), saved.get(2).getStatus()); |
| | | assertNotNull(saved.get(0).getCreateTime()); |
| | | assertEquals(CURRENT_USER, saved.get(0).getCreateBy()); |
| | | } |
| | | |
| | | private String longVin(int length) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (int i = 0; i < length; i++) { |
| | | sb.append('L'); |
| | | } |
| | | return sb.toString(); |
| | | } |
| | | } |
| | |
| | | private Integer bms_battery_charging_times;// BMS 电池组充电次数 |
| | | private Integer bms_battery_property_rights;// BMS 电池组产权标识 |
| | | private Integer reserved;// 预留位 |
| | | private String vim;// BMS 车辆识别码 |
| | | private String vin;// BMS 车辆识别码 |
| | | private Integer bms_software_version;// BMS 软件版本号 |
| | | |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.RoundingMode; |
| | | import java.util.Locale; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | |
| | | ChargingHandshake chargingHandshake = new ChargingHandshake(); |
| | | BeanUtils.copyProperties(chargingHandshakeMessage,chargingHandshake); |
| | | chargingHandshakeService.create(chargingHandshake); |
| | | updateHandshakeVin(chargingHandshakeMessage); |
| | | break; |
| | | case SendTagConstant.PARAMETER_SETTING: |
| | | ParameterSettingMessage parameterSettingMessage = message.getParameterSettingMessage(); |
| | |
| | | } |
| | | } |
| | | |
| | | private void updateHandshakeVin(ChargingHandshakeMessage message) { |
| | | String orderCode = message.getTransaction_serial_number(); |
| | | String vin = message.getVin(); |
| | | if (!StringUtils.hasLength(orderCode) || !StringUtils.hasLength(vin)) { |
| | | return; |
| | | } |
| | | vin = vin.trim().toUpperCase(Locale.ROOT); |
| | | if (!vin.matches("[A-HJ-NPR-Z0-9]{17}")) { |
| | | log.warn("握手VIN不合规,订单编号:{},VIN:{}", orderCode, vin); |
| | | return; |
| | | } |
| | | try { |
| | | chargingOrderClient.updateHandshakeVin(orderCode, vin); |
| | | } catch (Exception e) { |
| | | log.error("握手VIN回写订单失败,订单编号:{}", orderCode, e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @Resource |
| | | private TChargingOrderService chargingOrderService; |
| | | @Resource |
| | | private TCardChargingOrderService cardChargingOrderService; |
| | | @Resource |
| | | private TChargingOrderRefundService chargingOrderRefundService; |
| | | |
| | | @Resource |
| | |
| | | @RequiresPermissions(value = {"/chargingPeriodStatistics/order_info", "/chargingPeriodStatistics/charging_curve"}, logical = Logical.OR) |
| | | @GetMapping(value = "/chargingInfo") |
| | | @ApiOperation(value = "充电时段统计列表-查看详情", tags = {"管理后台-财务结算"}) |
| | | public AjaxResult<ChargingOrderListInfoVO> chargingInfo(String uid) { |
| | | public AjaxResult<?> chargingInfo(String uid, String orderType) { |
| | | if ("card".equalsIgnoreCase(orderType)) { |
| | | try { |
| | | Long chargingOrderId = Long.valueOf(uid); |
| | | return AjaxResult.success(cardChargingOrderService.detail(chargingOrderId)); |
| | | } catch (NumberFormatException e) { |
| | | return AjaxResult.error("刷卡订单编号无效"); |
| | | } |
| | | } |
| | | ChargingOrderListInfoVO res = chargingOrderService.chargingInfo(uid); |
| | | return AjaxResult.success(res); |
| | | } |
| | |
| | | return R.ok(summary == null ? Collections.emptyMap() : summary); |
| | | } |
| | | |
| | | @GetMapping("/detail") |
| | | @ApiOperation("刷卡充电订单详情") |
| | | public R<Map<String, Object>> detail(@RequestParam("chargingOrderId") Long chargingOrderId) { |
| | | return R.ok(cardChargingOrderService.detail(chargingOrderId)); |
| | | } |
| | | |
| | | @GetMapping("/balance-income-detail") |
| | | @ApiOperation("刷卡充电订单余额收入明细") |
| | | public R<List<Map<String, Object>>> balanceIncomeDetail(CardChargingOrderQuery query) { |
| | |
| | | |
| | | @Resource |
| | | private TChargingOrderService chargingOrderService; |
| | | @Resource |
| | | private TCardChargingOrderService cardChargingOrderService; |
| | | @Resource |
| | | private TVinChargingOrderService vinChargingOrderService; |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | @Autowired |
| | |
| | | one.setIdStr(one.getId().toString()); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | @PostMapping("/updateHandshakeVin") |
| | | public R<Boolean> updateHandshakeVin(@RequestParam("orderCode") String orderCode, |
| | | @RequestParam("vin") String vin) { |
| | | if (StringUtils.isEmpty(orderCode) || StringUtils.isEmpty(vin)) { |
| | | return R.ok(false); |
| | | } |
| | | boolean updated; |
| | | if (orderCode.startsWith("CD")) { |
| | | updated = chargingOrderService.update(Wrappers.<TChargingOrder>lambdaUpdate() |
| | | .eq(TChargingOrder::getCode, orderCode) |
| | | .set(TChargingOrder::getVin, vin)); |
| | | } else if (orderCode.startsWith("SD")) { |
| | | updated = cardChargingOrderService.update(Wrappers.<TCardChargingOrder>lambdaUpdate() |
| | | .eq(TCardChargingOrder::getCode, orderCode) |
| | | .set(TCardChargingOrder::getVin, vin)); |
| | | } else if (orderCode.startsWith("VD")) { |
| | | updated = vinChargingOrderService.update(Wrappers.<TVinChargingOrder>lambdaUpdate() |
| | | .eq(TVinChargingOrder::getCode, orderCode) |
| | | .set(TVinChargingOrder::getVin, vin)); |
| | | } else { |
| | | log.warn("握手VIN回写失败,未知订单类型:{}", orderCode); |
| | | return R.ok(false); |
| | | } |
| | | return R.ok(updated); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.WebUtils; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | |
| | | return R.ok(Collections.singletonMap("list", vinChargingOrderService.accountingStrategyList(chargingOrderId))); |
| | | } |
| | | |
| | | @RequiresPermissions("/chargingGun/end_charging") |
| | | @PutMapping("/stopCharging") |
| | | @ApiOperation("停止 VIN 码充电") |
| | | @Log(title = "VIN码充电订单停止充电", businessType = BusinessType.OTHER) |
| | | public AjaxResult stopCharging(@RequestParam("chargingOrderId") String chargingOrderId, |
| | | @RequestParam("chargingGunId") Integer chargingGunId) { |
| | | return vinChargingOrderService.stopCharging(chargingOrderId, chargingGunId); |
| | | } |
| | | |
| | | @RequiresPermissions("/vinChargingOrder/export") |
| | | @PutMapping("/export") |
| | | @ApiOperation("VIN码充电订单导出") |
| | |
| | | |
| | | Map<String, Object> summary(CardChargingOrderQuery query); |
| | | |
| | | Map<String, Object> detail(Long chargingOrderId); |
| | | |
| | | List<Map<String, Object>> balanceIncomeDetail(CardChargingOrderQuery query); |
| | | |
| | | List<Map<String, Object>> accountingStrategyList(Long chargingOrderId); |
| | |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.order.api.model.TVinChargingOrder; |
| | | import com.ruoyi.order.api.query.VinChargingOrderQuery; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.order.api.vo.ChargingOrderVO; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | Map<String, Object> detail(Long chargingOrderId); |
| | | |
| | | AjaxResult stopCharging(String chargingOrderId, Integer chargingGunId); |
| | | |
| | | List<Map<String, Object>> accountingStrategyList(Long chargingOrderId); |
| | | } |
| | |
| | | package com.ruoyi.order.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.api.feignClient.AppUserCarClient; |
| | | import com.ruoyi.account.api.model.TAppUserCar; |
| | | import com.ruoyi.chargingPile.api.feignClient.ChargingGunClient; |
| | | import com.ruoyi.chargingPile.api.feignClient.ChargingPileClient; |
| | | import com.ruoyi.chargingPile.api.feignClient.SiteClient; |
| | |
| | | private ChargingPileClient chargingPileClient; |
| | | @Resource |
| | | private ChargingGunClient chargingGunClient; |
| | | @Resource |
| | | private AppUserCarClient appUserCarClient; |
| | | @Resource |
| | | private UploadRealTimeMonitoringDataService uploadRealTimeMonitoringDataService; |
| | | |
| | |
| | | } |
| | | fillPageExtra(result); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> detail(Long chargingOrderId) { |
| | | TCardChargingOrder order = getById(chargingOrderId); |
| | | if (order == null) { |
| | | return Collections.emptyMap(); |
| | | } |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("id", order.getId()); |
| | | result.put("uid", String.valueOf(order.getId())); |
| | | result.put("code", order.getCode()); |
| | | result.put("cardNo", order.getCardNo()); |
| | | result.put("status", order.getStatus()); |
| | | result.put("siteId", order.getSiteId()); |
| | | result.put("chargingPileId", order.getChargingPileId()); |
| | | result.put("chargingGunId", order.getChargingGunId()); |
| | | result.put("startTime", order.getStartTime()); |
| | | result.put("endTime", order.getEndTime()); |
| | | result.put("chargingCapacity", order.getChargingCapacity()); |
| | | result.put("paymentAmount", order.getPaymentAmount()); |
| | | result.put("electrovalence", order.getElectrovalence()); |
| | | result.put("serviceCharge", order.getServiceCharge()); |
| | | result.put("total", defaultDecimal(order.getElectrovalence()).add(defaultDecimal(order.getServiceCharge()))); |
| | | result.put("realTotal", order.getPaymentAmount()); |
| | | result.put("endMode", order.getEndMode()); |
| | | result.put("phone", order.getPhone()); |
| | | result.put("licensePlate", order.getPlateNum()); |
| | | result.put("startSoc", "-"); |
| | | result.put("endSoc", "-"); |
| | | if (order.getStartTime() != null && order.getEndTime() != null) { |
| | | result.put("chargingSecond", ChronoUnit.SECONDS.between(order.getStartTime(), order.getEndTime())); |
| | | } |
| | | List<UploadRealTimeMonitoringData> monitoring = uploadRealTimeMonitoringDataService.getDataByOrderCodeAsc(order.getCode()); |
| | | if (monitoring == null) { |
| | | monitoring = Collections.emptyList(); |
| | | } |
| | | for (UploadRealTimeMonitoringData data : monitoring) { |
| | | if (data.getOutput_current() != null && data.getOutput_voltage() != null) { |
| | | data.setPower(data.getOutput_voltage().multiply(data.getOutput_current()).divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | } |
| | | result.put("list", monitoring); |
| | | result.put("list1", baseMapper.accountingStrategyList(order.getId())); |
| | | List<Integer> siteIds = order.getSiteId() == null ? Collections.emptyList() : Collections.singletonList(order.getSiteId()); |
| | | if (!siteIds.isEmpty()) { |
| | | List<Site> sites = Optional.ofNullable(siteClient.getSiteByIds(siteIds).getData()).orElse(Collections.emptyList()); |
| | | if (!sites.isEmpty()) { |
| | | result.put("siteName", sites.get(0).getName()); |
| | | result.put("siteAddress", sites.get(0).getAddress()); |
| | | } |
| | | } |
| | | if (order.getChargingGunId() != null) { |
| | | TChargingGun gun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData(); |
| | | if (gun != null) { |
| | | result.put("gunCode", gun.getCode()); |
| | | result.put("terminalName", gun.getName()); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | private BigDecimal defaultDecimal(BigDecimal value) { |
| | | return value == null ? BigDecimal.ZERO : value; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | List<Integer> siteIds = list.stream().map(ChargingOrderVO::getSiteId).filter(Objects::nonNull).distinct().collect(Collectors.toList()); |
| | | List<Integer> gunIds = list.stream().map(ChargingOrderVO::getChargingGunId).filter(Objects::nonNull).distinct().collect(Collectors.toList()); |
| | | List<Long> carIds = list.stream().map(ChargingOrderVO::getAppUserCarId).filter(Objects::nonNull).distinct().collect(Collectors.toList()); |
| | | Map<Long, TAppUserCar> cars = carIds.isEmpty() ? Collections.emptyMap() |
| | | : Optional.ofNullable(appUserCarClient.getCarByIds(carIds).getData()).orElse(Collections.emptyList()).stream() |
| | | .collect(Collectors.toMap(TAppUserCar::getId, item -> item, (a, b) -> a)); |
| | | Map<Integer, Site> sites = Optional.ofNullable(siteClient.getSiteByIds(siteIds).getData()).orElse(Collections.emptyList()).stream() |
| | | .collect(Collectors.toMap(Site::getId, item -> item, (a, b) -> a)); |
| | | Map<Integer, TChargingGun> guns = gunIds.isEmpty() ? Collections.emptyMap() |
| | |
| | | item.setSiteName(site == null ? null : site.getName()); |
| | | TChargingGun gun = guns.get(item.getChargingGunId()); |
| | | item.setTerminalName(gun == null ? null : gun.getName()); |
| | | TAppUserCar car = cars.get(item.getAppUserCarId()); |
| | | item.setVin(car == null ? null : car.getVin()); |
| | | if (item.getStartTime() != null && item.getEndTime() != null) { |
| | | item.setChargingSecond(ChronoUnit.SECONDS.between(item.getStartTime(), item.getEndTime())); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.dto.GetSiteListDTO; |
| | | import com.ruoyi.chargingPile.api.feignClient.ChargingGunClient; |
| | | import com.ruoyi.chargingPile.api.feignClient.ChargingPileClient; |
| | | import com.ruoyi.chargingPile.api.feignClient.SiteClient; |
| | | import com.ruoyi.chargingPile.api.model.Site; |
| | | import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.integration.api.feignClient.SendMessageClient; |
| | | import com.ruoyi.integration.api.model.PlatformStopCharging; |
| | | import com.ruoyi.integration.api.model.UploadRealTimeMonitoringData; |
| | | import com.ruoyi.order.api.model.TVinChargingOrder; |
| | | import com.ruoyi.order.api.query.VinChargingOrderQuery; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | |
| | | private SiteClient siteClient; |
| | | @Resource |
| | | private ChargingGunClient chargingGunClient; |
| | | @Resource |
| | | private ChargingPileClient chargingPileClient; |
| | | @Resource |
| | | private SendMessageClient sendMessageClient; |
| | | @Resource |
| | | private UploadRealTimeMonitoringDataService monitoringDataService; |
| | | |
| | |
| | | return Collections.emptyMap(); |
| | | } |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("id", order.getId()); |
| | | result.put("id", order.getId() == null ? null : String.valueOf(order.getId())); |
| | | result.put("code", order.getCode()); |
| | | result.put("vin", order.getVin()); |
| | | result.put("actualVin", order.getActualVin()); |
| | |
| | | result.put("paymentAmount", order.getPaymentAmount()); |
| | | result.put("electrovalence", order.getElectrovalence()); |
| | | result.put("serviceCharge", order.getServiceCharge()); |
| | | if (order.getStartTime() != null && order.getEndTime() != null) { |
| | | result.put("chargingSecond", ChronoUnit.SECONDS.between(order.getStartTime(), order.getEndTime())); |
| | | } |
| | | List<Site> sites = order.getSiteId() == null ? Collections.emptyList() |
| | | : Optional.ofNullable(siteClient.getSiteByIds(Collections.singletonList(order.getSiteId())).getData()).orElse(Collections.emptyList()); |
| | | Site site = sites.stream().findFirst().orElse(null); |
| | | result.put("siteName", site == null ? null : site.getName()); |
| | | List<TChargingGun> guns = order.getChargingGunId() == null ? Collections.emptyList() |
| | | : Optional.ofNullable(chargingGunClient.getChargingGunByIds(Collections.singletonList(order.getChargingGunId())).getData()).orElse(Collections.emptyList()); |
| | | TChargingGun gun = guns.stream().findFirst().orElse(null); |
| | | result.put("terminalName", gun == null ? null : gun.getName()); |
| | | List<UploadRealTimeMonitoringData> monitoring = monitoringDataService.getDataByOrderCodeAsc(order.getCode()); |
| | | result.put("list", monitoring == null ? Collections.emptyList() : monitoring); |
| | | if (monitoring == null) { |
| | | monitoring = Collections.emptyList(); |
| | | } |
| | | for (UploadRealTimeMonitoringData data : monitoring) { |
| | | if (data.getOutput_current() != null && data.getOutput_voltage() != null) { |
| | | data.setPower(data.getOutput_voltage().multiply(data.getOutput_current()).divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | } |
| | | result.put("list", monitoring); |
| | | result.put("list1", baseMapper.accountingStrategyList(order.getId())); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult stopCharging(String chargingOrderId, Integer chargingGunId) { |
| | | Long orderId; |
| | | try { |
| | | orderId = Long.valueOf(chargingOrderId); |
| | | } catch (NumberFormatException e) { |
| | | return AjaxResult.error("VIN码充电订单ID无效"); |
| | | } |
| | | TVinChargingOrder order = getAuthorizedOrder(orderId); |
| | | if (order == null) { |
| | | return AjaxResult.error("VIN码充电订单不存在或无权操作"); |
| | | } |
| | | if (order.getChargingGunId() == null || !order.getChargingGunId().equals(chargingGunId)) { |
| | | return AjaxResult.error("充电枪与订单不匹配"); |
| | | } |
| | | Integer status = order.getStatus(); |
| | | if (status == null || !status.equals(3)) { |
| | | return AjaxResult.error(status != null && (status.equals(4) || status.equals(5)) ? "不能重复操作" : "还未开始充电"); |
| | | } |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(chargingGunId).getData(); |
| | | TChargingPile chargingPile = order.getChargingPileId() == null ? null |
| | | : chargingPileClient.getChargingPileById(order.getChargingPileId()).getData(); |
| | | if (chargingGun == null || chargingPile == null) { |
| | | return AjaxResult.error("未找到订单对应的充电设备"); |
| | | } |
| | | order.setStatus(4); |
| | | order.setEndMode(1); |
| | | order.setEndTime(LocalDateTime.now()); |
| | | if (!updateById(order)) { |
| | | return AjaxResult.error("更新VIN码充电订单状态失败"); |
| | | } |
| | | PlatformStopCharging command = new PlatformStopCharging(); |
| | | command.setCharging_pile_code(chargingPile.getCode()); |
| | | command.setCharging_gun_code(chargingGun.getCode()); |
| | | sendMessageClient.platformStopCharging(command); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> accountingStrategyList(Long chargingOrderId) { |
| | | TVinChargingOrder order = getAuthorizedOrder(chargingOrderId); |
| | | return order == null ? Collections.emptyList() : baseMapper.accountingStrategyList(chargingOrderId); |
| | |
| | | </sql> |
| | | |
| | | <select id="pageList" resultType="com.ruoyi.order.api.vo.ChargingOrderVO"> |
| | | SELECT o.* |
| | | SELECT o.*, |
| | | CONCAT(IFNULL(ROUND(a.capacity1 / NULLIF(a.capacity_total, 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(a.capacity2 / NULLIF(a.capacity_total, 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(a.capacity3 / NULLIF(a.capacity_total, 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(a.capacity4 / NULLIF(a.capacity_total, 0) * 100, 2), 0), '%') AS electronicProportion |
| | | FROM t_card_charging_order o |
| | | LEFT JOIN ( |
| | | SELECT charging_order_id, |
| | | SUM(charging_capacity) AS capacity_total, |
| | | SUM(CASE WHEN type = 1 THEN charging_capacity ELSE 0 END) AS capacity1, |
| | | SUM(CASE WHEN type = 2 THEN charging_capacity ELSE 0 END) AS capacity2, |
| | | SUM(CASE WHEN type = 3 THEN charging_capacity ELSE 0 END) AS capacity3, |
| | | SUM(CASE WHEN type = 4 THEN charging_capacity ELSE 0 END) AS capacity4 |
| | | FROM t_card_charging_order_accounting_strategy |
| | | GROUP BY charging_order_id |
| | | ) a ON a.charging_order_id = o.id |
| | | <include refid="queryCondition"/> |
| | | ORDER BY o.create_time DESC |
| | | LIMIT #{offset}, #{pageSize} |
| | |
| | | IFNULL(SUM(o.electrovalence), 0) AS electrovalence, |
| | | IFNULL(SUM(o.service_charge), 0) AS serviceCharge, |
| | | IFNULL(SUM(o.third_pay_amount), 0) AS thirdPayAmount, |
| | | 0 AS platformIncome, |
| | | 0 AS partnerIncome, |
| | | 0 AS platformIncomeTotal, |
| | | 0 AS partnerIncomeTotal |
| | | IFNULL(SUM(s.platform_income), 0) AS platformIncome, |
| | | IFNULL(SUM(s.partner_income), 0) AS partnerIncome, |
| | | IFNULL(SUM(s.platform_income), 0) AS platformIncomeTotal, |
| | | IFNULL(SUM(s.partner_income), 0) AS partnerIncomeTotal, |
| | | CONCAT(IFNULL(ROUND(SUM(a.capacity1) / NULLIF(SUM(a.capacity_total), 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(SUM(a.capacity2) / NULLIF(SUM(a.capacity_total), 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(SUM(a.capacity3) / NULLIF(SUM(a.capacity_total), 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(SUM(a.capacity4) / NULLIF(SUM(a.capacity_total), 0) * 100, 2), 0), '%') AS capacityProportion, |
| | | CONCAT(IFNULL(ROUND(SUM(a.service1) / NULLIF(SUM(a.service_total), 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(SUM(a.service2) / NULLIF(SUM(a.service_total), 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(SUM(a.service3) / NULLIF(SUM(a.service_total), 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(SUM(a.service4) / NULLIF(SUM(a.service_total), 0) * 100, 2), 0), '%') AS serviceProportion, |
| | | CONCAT(IFNULL(ROUND(SUM(a.electric1) / NULLIF(SUM(a.electric_total), 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(SUM(a.electric2) / NULLIF(SUM(a.electric_total), 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(SUM(a.electric3) / NULLIF(SUM(a.electric_total), 0) * 100, 2), 0), '%-', |
| | | IFNULL(ROUND(SUM(a.electric4) / NULLIF(SUM(a.electric_total), 0) * 100, 2), 0), '%') AS electronicProportion |
| | | FROM t_card_charging_order o |
| | | LEFT JOIN ( |
| | | SELECT charging_order_id, |
| | | SUM(IFNULL(channel_electricity_amount, 0) + IFNULL(channel_service_amount, 0) - IFNULL(share_amount, 0)) AS platform_income, |
| | | SUM(IFNULL(share_amount, 0)) AS partner_income |
| | | FROM t_card_charging_order_share_record |
| | | WHERE del_flag = 0 |
| | | GROUP BY charging_order_id |
| | | ) s ON s.charging_order_id = o.id |
| | | LEFT JOIN ( |
| | | SELECT charging_order_id, |
| | | SUM(charging_capacity) AS capacity_total, |
| | | SUM(CASE WHEN type = 1 THEN charging_capacity ELSE 0 END) AS capacity1, |
| | | SUM(CASE WHEN type = 2 THEN charging_capacity ELSE 0 END) AS capacity2, |
| | | SUM(CASE WHEN type = 3 THEN charging_capacity ELSE 0 END) AS capacity3, |
| | | SUM(CASE WHEN type = 4 THEN charging_capacity ELSE 0 END) AS capacity4, |
| | | SUM(period_service_price) AS service_total, |
| | | SUM(CASE WHEN type = 1 THEN period_service_price ELSE 0 END) AS service1, |
| | | SUM(CASE WHEN type = 2 THEN period_service_price ELSE 0 END) AS service2, |
| | | SUM(CASE WHEN type = 3 THEN period_service_price ELSE 0 END) AS service3, |
| | | SUM(CASE WHEN type = 4 THEN period_service_price ELSE 0 END) AS service4, |
| | | SUM(period_electric_price) AS electric_total, |
| | | SUM(CASE WHEN type = 1 THEN period_electric_price ELSE 0 END) AS electric1, |
| | | SUM(CASE WHEN type = 2 THEN period_electric_price ELSE 0 END) AS electric2, |
| | | SUM(CASE WHEN type = 3 THEN period_electric_price ELSE 0 END) AS electric3, |
| | | SUM(CASE WHEN type = 4 THEN period_electric_price ELSE 0 END) AS electric4 |
| | | FROM t_card_charging_order_accounting_strategy |
| | | GROUP BY charging_order_id |
| | | ) a ON a.charging_order_id = o.id |
| | | <include refid="queryCondition"/> |
| | | </select> |
| | | |
| | |
| | | CREATE TABLE IF NOT EXISTS `t_card_charging_order` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '握手报文VIN', |
| | | `card_id` bigint NOT NULL COMMENT '充电卡ID(分片键)', |
| | | `card_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '充电卡号快照', |
| | | `order_type` int DEFAULT '2' COMMENT '订单类型(固定为刷卡充电订单)', |
| | |
| | | `app_user_car_id` bigint DEFAULT NULL COMMENT '充电车辆id', |
| | | `plate_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '车牌号', |
| | | `reservation_time` datetime DEFAULT NULL COMMENT '预约充电时间', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '握手报文VIN', |
| | | `expected_vin` varchar(64) DEFAULT NULL COMMENT '支付车辆VIN快照', |
| | | `actual_vin` varchar(64) DEFAULT NULL COMMENT '启动时设备识别VIN', |
| | | `site_id` int DEFAULT NULL COMMENT '站点id', |
| New file |
| | |
| | | -- 刷卡充电订单与 VIN 码充电订单模拟数据 |
| | | -- 仅用于测试环境。订单号前缀:刷卡 SD_,VIN VD_。 |
| | | -- 脚本可重复执行:先按固定测试 ID 清理,再重新插入。 |
| | | |
| | | USE charging_pile_order; |
| | | |
| | | -- 清理旧测试数据(先子表后主表) |
| | | DELETE FROM t_card_charging_order_share_record WHERE charging_order_code IN ('SD_20260901_001','SD_20260901_002','SD_20260901_003','SD_20260901_004','SD_20260901_005'); |
| | | DELETE FROM t_card_charging_order_refund WHERE charging_order_id IN (2095000000000010001,2095000000000010002,2095000000000010003,2095000000000010004,2095000000000010005); |
| | | DELETE FROM t_card_charging_order_accounting_strategy WHERE charging_order_id IN (2095000000000010001,2095000000000010002,2095000000000010003,2095000000000010004,2095000000000010005); |
| | | DELETE FROM t_card_accounting_strategy_detail_order WHERE charging_order_id IN (2095000000000010001,2095000000000010002,2095000000000010003,2095000000000010004,2095000000000010005); |
| | | DELETE FROM t_card_accounting_strategy_order WHERE charging_order_id IN (2095000000000010001,2095000000000010002,2095000000000010003,2095000000000010004,2095000000000010005); |
| | | DELETE FROM t_card_charging_order WHERE card_id = 1 AND id IN (2095000000000010001,2095000000000010002,2095000000000010003,2095000000000010004,2095000000000010005); |
| | | |
| | | DELETE FROM t_vin_charging_order_share_record WHERE charging_order_code IN ('VD_20260901_001','VD_20260901_002','VD_20260901_003','VD_20260901_004','VD_20260901_005'); |
| | | DELETE FROM t_vin_charging_order_refund WHERE charging_order_id IN (2095000000000020001,2095000000000020002,2095000000000020003,2095000000000020004,2095000000000020005); |
| | | DELETE FROM t_vin_charging_order_accounting_strategy WHERE charging_order_id IN (2095000000000020001,2095000000000020002,2095000000000020003,2095000000000020004,2095000000000020005); |
| | | DELETE FROM t_vin_accounting_strategy_detail_order WHERE charging_order_id IN (2095000000000020001,2095000000000020002,2095000000000020003,2095000000000020004,2095000000000020005); |
| | | DELETE FROM t_vin_accounting_strategy_order WHERE charging_order_id IN (2095000000000020001,2095000000000020002,2095000000000020003,2095000000000020004,2095000000000020005); |
| | | DELETE FROM t_vin_charging_order WHERE vin_id = 1 AND id IN (2095000000000020001,2095000000000020002,2095000000000020003,2095000000000020004,2095000000000020005); |
| | | |
| | | -- 刷卡订单主表:使用测试充电卡 card_id=1/card_no=1234695。 |
| | | INSERT INTO t_card_charging_order |
| | | (id,code,card_id,card_no,order_type,order_classification,plate_num,site_id,charging_pile_id,charging_gun_id,charging_capacity,start_time,end_time,status,end_mode,recharge_amount,recharge_payment_status,pay_method,balance_pay_amount,third_pay_amount,balance_refund_amount,third_refund_amount,charge_amount,residual_amount,order_amount,payment_amount,refund_amount,is_whitelist,whitelist_discount_amount,whitelist_electric_refund_amount,whitelist_service_refund_amount,refund_code,refund_status,refund_time,create_time,del_flag,order_source,source_name,commission_amount,sharing_amount,service_charge,electrovalence,pay_time,phone,title,start_soc,end_soc) |
| | | VALUES |
| | | (2095000000000010001,'SD_20260901_001',1,'1234695',2,2,'川A123456',26,46,295,10.00000,'2026-09-01 08:00:00','2026-09-01 09:00:00',5,1,25.0000,2,1,25.00,0.00,0.00,0.00,25.00,0.00,25.0000,25.0000,0.0000,0,0.00,0.00,0.00,NULL,NULL,NULL,'2026-09-01 07:58:00',0,1,'TEST_CARD',0.0000,0.0000,10.0000,15.0000,'2026-09-01 09:01:00','15800000001','刷卡模拟订单-尖峰',20.00,80.00), |
| | | (2095000000000010002,'SD_20260901_002',1,'1234695',2,2,'川A123456',26,46,295,12.00000,'2026-09-01 10:00:00','2026-09-01 11:20:00',5,2,24.0000,2,1,24.00,0.00,4.00,0.00,24.00,0.00,24.0000,24.0000,4.0000,0,0.00,0.00,0.00,'SD_REFUND_002',2,'2026-09-01 11:30:00','2026-09-01 09:58:00',0,1,'TEST_CARD',0.0000,0.0000,9.6000,14.4000,'2026-09-01 11:21:00','15800000002','刷卡模拟订单-部分退款',25.00,75.00), |
| | | (2095000000000010003,'SD_20260901_003',1,'1234695',2,2,'川A123456',19,24,59,8.00000,'2026-09-01 12:00:00','2026-09-01 12:45:00',5,1,12.0000,2,1,12.00,0.00,0.00,0.00,12.00,0.00,12.0000,12.0000,0.0000,0,0.00,0.00,0.00,NULL,NULL,NULL,'2026-09-01 11:58:00',0,1,'TEST_CARD',0.0000,0.0000,4.0000,8.0000,'2026-09-01 12:46:00','15800000003','刷卡模拟订单-平段',30.00,70.00), |
| | | (2095000000000010004,'SD_20260901_004',1,'1234695',2,2,'川A123456',75,881,1375,15.00000,'2026-09-01 14:00:00','2026-09-01 15:30:00',5,2,30.0000,2,1,30.00,0.00,0.00,0.00,30.00,0.00,30.0000,30.0000,0.0000,0,0.00,0.00,0.00,NULL,NULL,NULL,'2026-09-01 13:58:00',0,1,'TEST_CARD',0.0000,0.0000,12.0000,18.0000,'2026-09-01 15:31:00','15800000004','刷卡模拟订单-峰平',15.00,90.00), |
| | | (2095000000000010005,'SD_20260901_005',1,'1234695',2,2,'川A123456',77,889,1391,6.00000,'2026-09-01 16:00:00','2026-09-01 16:40:00',5,1,9.0000,2,1,9.00,0.00,2.00,0.00,9.00,0.00,9.0000,9.0000,2.0000,0,0.00,0.00,0.00,'SD_REFUND_005',2,'2026-09-01 16:50:00','2026-09-01 15:58:00',0,1,'TEST_CARD',0.0000,0.0000,3.0000,6.0000,'2026-09-01 16:41:00','15800000005','刷卡模拟订单-退款',35.00,65.00); |
| | | |
| | | INSERT INTO t_card_accounting_strategy_order |
| | | (id,site_id,name,description,discount,create_time,del_flag,audit_status,charging_order_id) |
| | | VALUES |
| | | (1910001,26,'刷卡模拟策略001','SD_测试策略',1.00,'2026-09-01 07:58:00',0,3,2095000000000010001), |
| | | (1910002,26,'刷卡模拟策略002','SD_测试策略',1.00,'2026-09-01 09:58:00',0,3,2095000000000010002), |
| | | (1910003,19,'刷卡模拟策略003','SD_测试策略',1.00,'2026-09-01 11:58:00',0,3,2095000000000010003), |
| | | (1910004,75,'刷卡模拟策略004','SD_测试策略',1.00,'2026-09-01 13:58:00',0,3,2095000000000010004), |
| | | (1910005,77,'刷卡模拟策略005','SD_测试策略',1.00,'2026-09-01 15:58:00',0,3,2095000000000010005); |
| | | |
| | | INSERT INTO t_card_accounting_strategy_detail_order |
| | | (id,accounting_strategy_id,type,start_time,end_time,electrovalence,service_charge,cost_service_charge,charging_order_id,create_time,del_flag) |
| | | VALUES |
| | | (1910101,1910001,1,'00:00','06:00',1.0000,0.5000,0.5000,2095000000000010001,'2026-09-01 07:58:00',0),(1910102,1910001,2,'06:00','12:00',2.0000,1.0000,1.0000,2095000000000010001,'2026-09-01 07:58:00',0), |
| | | (1910201,1910002,2,'06:00','12:00',1.2000,0.8000,0.8000,2095000000000010002,'2026-09-01 09:58:00',0),(1910202,1910002,3,'12:00','18:00',1.2000,0.8000,0.8000,2095000000000010002,'2026-09-01 09:58:00',0), |
| | | (1910301,1910003,3,'12:00','18:00',1.0000,0.5000,0.5000,2095000000000010003,'2026-09-01 11:58:00',0),(1910302,1910003,4,'18:00','24:00',1.0000,0.5000,0.5000,2095000000000010003,'2026-09-01 11:58:00',0), |
| | | (1910401,1910004,2,'06:00','12:00',1.2000,0.8000,0.8000,2095000000000010004,'2026-09-01 13:58:00',0),(1910402,1910004,3,'12:00','18:00',1.2000,0.8000,0.8000,2095000000000010004,'2026-09-01 13:58:00',0), |
| | | (1910501,1910005,1,'00:00','06:00',1.0000,0.5000,0.5000,2095000000000010005,'2026-09-01 15:58:00',0),(1910502,1910005,4,'18:00','24:00',1.0000,0.5000,0.5000,2095000000000010005,'2026-09-01 15:58:00',0); |
| | | |
| | | INSERT INTO t_card_charging_order_accounting_strategy |
| | | (id,charging_order_id,accounting_strategy_detail_id,type,start_time,end_time,electrovalence,service_charge,cost_service_charge,charging_capacity,create_time,period_electric_price,period_service_price,period_original_service_price,vip_discount_amount,coupon_discount_amount) |
| | | VALUES |
| | | (2095000000000110001,2095000000000010001,1910101,1,'08:00','08:30',1.0000,0.5000,0.5000,4.0000,'2026-09-01 09:00:00',4.0000,2.0000,2.0000,0,0),(2095000000000110002,2095000000000010001,1910102,2,'08:30','09:00',1.8333,1.3333,1.3333,6.0000,'2026-09-01 09:00:00',11.0000,8.0000,8.0000,0,0), |
| | | (2095000000000110003,2095000000000010002,1910201,2,'10:00','10:40',1.2000,0.8000,0.8000,6.0000,'2026-09-01 11:20:00',7.2000,4.8000,4.8000,0,0),(2095000000000110004,2095000000000010002,1910202,3,'10:40','11:20',1.2000,0.8000,0.8000,6.0000,'2026-09-01 11:20:00',7.2000,4.8000,4.8000,0,0), |
| | | (2095000000000110005,2095000000000010003,1910301,3,'12:00','12:25',1.0000,0.5000,0.5000,4.0000,'2026-09-01 12:45:00',4.0000,2.0000,2.0000,0,0),(2095000000000110006,2095000000000010003,1910302,4,'12:25','12:45',1.0000,0.5000,0.5000,4.0000,'2026-09-01 12:45:00',4.0000,2.0000,2.0000,0,0), |
| | | (2095000000000110007,2095000000000010004,1910401,2,'14:00','14:45',1.2000,0.8000,0.8000,7.5000,'2026-09-01 15:30:00',9.0000,6.0000,6.0000,0,0),(2095000000000110008,2095000000000010004,1910402,3,'14:45','15:30',1.2000,0.8000,0.8000,7.5000,'2026-09-01 15:30:00',9.0000,6.0000,6.0000,0,0), |
| | | (2095000000000110009,2095000000000010005,1910501,1,'16:00','16:20',1.0000,0.5000,0.5000,3.0000,'2026-09-01 16:40:00',3.0000,1.5000,1.5000,0,0),(2095000000000110010,2095000000000010005,1910502,4,'16:20','16:40',1.0000,0.5000,0.5000,3.0000,'2026-09-01 16:40:00',3.0000,1.5000,1.5000,0,0); |
| | | |
| | | INSERT INTO t_card_charging_order_refund |
| | | (id,charging_order_id,refund_code,refund_amount,balance_refund_amount,third_refund_amount,refund_status,refund_serial_number,refund_time,code,refund_title,refund_content,refund_reason,refund_remark,refund_total_amount,refund_fee,pay_amount,pay_type,create_time,del_flag) |
| | | VALUES |
| | | (2095000000000120002,2095000000000010002,'SD_REFUND_002',4.00,4.00,0.00,2,'SD_REFUND_SERIAL_002','2026-09-01 11:30:00','SD_20260901_002','刷卡模拟退款','部分退款','测试数据','SD_TEST',4.00,0.00,24.00,1,'2026-09-01 11:30:00',0), |
| | | (2095000000000120005,2095000000000010005,'SD_REFUND_005',2.00,2.00,0.00,2,'SD_REFUND_SERIAL_005','2026-09-01 16:50:00','SD_20260901_005','刷卡模拟退款','部分退款','测试数据','SD_TEST',2.00,0.00,9.00,1,'2026-09-01 16:50:00',0); |
| | | |
| | | INSERT INTO t_card_charging_order_share_record |
| | | (charging_order_id,charging_order_code,site_id,partner_id,pay_channel,channel_pay_amount,channel_gift_amount,channel_pay_ratio,channel_electricity_amount,channel_service_amount,electricity_share_ratio,service_share_ratio,electricity_share_amount,service_share_amount,share_amount,need_online_share,online_share_status,request_json,response_json,retry_count,create_time,del_flag) |
| | | VALUES |
| | | (2095000000000010001,'SD_20260901_001',26,9001,'BALANCE',25.00,0,1.000000,15.00,10.00,50.00,50.00,7.50,5.00,12.50,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 07:58:00',0), |
| | | (2095000000000010002,'SD_20260901_002',26,9001,'BALANCE',24.00,0,1.000000,14.40,9.60,50.00,50.00,7.20,4.80,12.00,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 09:58:00',0), |
| | | (2095000000000010003,'SD_20260901_003',19,9001,'BALANCE',12.00,0,1.000000,8.00,4.00,50.00,50.00,4.00,2.00,6.00,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 11:58:00',0), |
| | | (2095000000000010004,'SD_20260901_004',75,9001,'BALANCE',30.00,0,1.000000,18.00,12.00,50.00,50.00,9.00,6.00,15.00,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 13:58:00',0), |
| | | (2095000000000010005,'SD_20260901_005',77,9001,'BALANCE',9.00,0,1.000000,6.00,3.00,50.00,50.00,3.00,1.50,4.50,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 15:58:00',0); |
| | | |
| | | -- VIN 订单主表:使用测试 VIN 管理记录 vin_id=1/vin=12356789。 |
| | | INSERT INTO t_vin_charging_order |
| | | (id,code,vin_id,vin,order_type,order_classification,plate_num,expected_vin,actual_vin,site_id,charging_pile_id,charging_gun_id,charging_capacity,start_time,end_time,status,end_mode,recharge_amount,recharge_payment_status,pay_method,balance_pay_amount,third_pay_amount,balance_refund_amount,third_refund_amount,charge_amount,residual_amount,order_amount,payment_amount,refund_amount,is_whitelist,whitelist_discount_amount,whitelist_electric_refund_amount,whitelist_service_refund_amount,refund_code,refund_status,refund_time,create_time,del_flag,order_source,source_name,commission_amount,sharing_amount,service_charge,electrovalence,pay_time,phone,title,start_soc,end_soc) |
| | | VALUES |
| | | (2095000000000020001,'VD_20260901_001',1,'12356789',2,2,'川A123456','12356789','12356789',26,46,295,9.00000,'2026-09-01 08:10:00','2026-09-01 09:05:00',5,1,18.0000,2,1,18.00,0.00,0.00,0.00,18.00,0.00,18.0000,18.0000,0.0000,0,0.00,0.00,0.00,NULL,NULL,NULL,'2026-09-01 08:08:00',0,1,'TEST_VIN',0.0000,0.0000,7.2000,10.8000,'2026-09-01 09:06:00','15828353127','VIN模拟订单-尖峰',20.00,78.00), |
| | | (2095000000000020002,'VD_20260901_002',1,'12356789',2,2,'川A123456','12356789','12356789',26,46,295,11.00000,'2026-09-01 10:10:00','2026-09-01 11:20:00',5,2,22.0000,2,1,22.00,0.00,3.00,0.00,22.00,0.00,22.0000,22.0000,3.0000,0,0.00,0.00,0.00,'VD_REFUND_002',2,'2026-09-01 11:30:00','2026-09-01 10:08:00',0,1,'TEST_VIN',0.0000,0.0000,8.8000,13.2000,'2026-09-01 11:21:00','15828353127','VIN模拟订单-部分退款',25.00,72.00), |
| | | (2095000000000020003,'VD_20260901_003',1,'12356789',2,2,'川A123456','12356789','12356789',19,24,59,7.00000,'2026-09-01 12:10:00','2026-09-01 12:50:00',5,1,10.5000,2,1,10.50,0.00,0.00,0.00,10.50,0.00,10.5000,10.5000,0.0000,0,0.00,0.00,0.00,NULL,NULL,NULL,'2026-09-01 12:08:00',0,1,'TEST_VIN',0.0000,0.0000,3.5000,7.0000,'2026-09-01 12:51:00','15828353127','VIN模拟订单-平段',30.00,68.00), |
| | | (2095000000000020004,'VD_20260901_004',1,'12356789',2,2,'川A123456','12356789','12356789',75,881,1375,14.00000,'2026-09-01 14:10:00','2026-09-01 15:30:00',5,2,28.0000,2,1,28.00,0.00,0.00,0.00,28.00,0.00,28.0000,28.0000,0.0000,0,0.00,0.00,0.00,NULL,NULL,NULL,'2026-09-01 14:08:00',0,1,'TEST_VIN',0.0000,0.0000,11.2000,16.8000,'2026-09-01 15:31:00','15828353127','VIN模拟订单-峰平',15.00,88.00), |
| | | (2095000000000020005,'VD_20260901_005',1,'12356789',2,2,'川A123456','12356789','12356789',77,889,1391,5.00000,'2026-09-01 16:10:00','2026-09-01 16:45:00',5,1,7.5000,2,1,7.50,0.00,1.50,0.00,7.50,0.00,7.5000,7.5000,1.5000,0,0.00,0.00,0.00,'VD_REFUND_005',2,'2026-09-01 16:55:00','2026-09-01 16:08:00',0,1,'TEST_VIN',0.0000,0.0000,2.5000,5.0000,'2026-09-01 16:46:00','15828353127','VIN模拟订单-退款',35.00,62.00); |
| | | |
| | | INSERT INTO t_vin_accounting_strategy_order |
| | | (id,site_id,name,description,discount,create_time,del_flag,audit_status,charging_order_id) |
| | | VALUES |
| | | (1920001,26,'VIN模拟策略001','VD_测试策略',1.00,'2026-09-01 08:08:00',0,3,2095000000000020001),(1920002,26,'VIN模拟策略002','VD_测试策略',1.00,'2026-09-01 10:08:00',0,3,2095000000000020002),(1920003,19,'VIN模拟策略003','VD_测试策略',1.00,'2026-09-01 12:08:00',0,3,2095000000000020003),(1920004,75,'VIN模拟策略004','VD_测试策略',1.00,'2026-09-01 14:08:00',0,3,2095000000000020004),(1920005,77,'VIN模拟策略005','VD_测试策略',1.00,'2026-09-01 16:08:00',0,3,2095000000000020005); |
| | | |
| | | INSERT INTO t_vin_accounting_strategy_detail_order |
| | | (id,accounting_strategy_id,type,start_time,end_time,electrovalence,service_charge,cost_service_charge,charging_order_id,create_time,del_flag) |
| | | VALUES |
| | | (1920101,1920001,1,'00:00','06:00',1.0000,0.5000,0.5000,2095000000000020001,'2026-09-01 08:08:00',0),(1920102,1920001,2,'06:00','12:00',1.2000,0.8000,0.8000,2095000000000020001,'2026-09-01 08:08:00',0), |
| | | (1920201,1920002,2,'06:00','12:00',1.2000,0.8000,0.8000,2095000000000020002,'2026-09-01 10:08:00',0),(1920202,1920002,3,'12:00','18:00',1.2000,0.8000,0.8000,2095000000000020002,'2026-09-01 10:08:00',0), |
| | | (1920301,1920003,3,'12:00','18:00',1.0000,0.5000,0.5000,2095000000000020003,'2026-09-01 12:08:00',0),(1920302,1920003,4,'18:00','24:00',1.0000,0.5000,0.5000,2095000000000020003,'2026-09-01 12:08:00',0), |
| | | (1920401,1920004,2,'06:00','12:00',1.2000,0.8000,0.8000,2095000000000020004,'2026-09-01 14:08:00',0),(1920402,1920004,3,'12:00','18:00',1.2000,0.8000,0.8000,2095000000000020004,'2026-09-01 14:08:00',0), |
| | | (1920501,1920005,1,'00:00','06:00',1.0000,0.5000,0.5000,2095000000000020005,'2026-09-01 16:08:00',0),(1920502,1920005,4,'18:00','24:00',1.0000,0.5000,0.5000,2095000000000020005,'2026-09-01 16:08:00',0); |
| | | |
| | | INSERT INTO t_vin_charging_order_accounting_strategy |
| | | (id,charging_order_id,accounting_strategy_detail_id,type,start_time,end_time,electrovalence,service_charge,cost_service_charge,charging_capacity,create_time,period_electric_price,period_service_price,period_original_service_price,vip_discount_amount,coupon_discount_amount) |
| | | VALUES |
| | | (2095000000000210001,2095000000000020001,1920101,1,'08:10','08:35',1.0000,0.5000,0.5000,4.0000,'2026-09-01 09:05:00',4.0000,2.0000,2.0000,0,0),(2095000000000210002,2095000000000020001,1920102,2,'08:35','09:05',1.3600,1.0400,1.0400,5.0000,'2026-09-01 09:05:00',6.8000,5.2000,5.2000,0,0), |
| | | (2095000000000210003,2095000000000020002,1920201,2,'10:10','10:45',1.2000,0.8000,0.8000,5.5000,'2026-09-01 11:20:00',6.6000,4.4000,4.4000,0,0),(2095000000000210004,2095000000000020002,1920202,3,'10:45','11:20',1.2000,0.8000,0.8000,5.5000,'2026-09-01 11:20:00',6.6000,4.4000,4.4000,0,0), |
| | | (2095000000000210005,2095000000000020003,1920301,3,'12:10','12:30',1.0000,0.5000,0.5000,3.5000,'2026-09-01 12:50:00',3.5000,1.7500,1.7500,0,0),(2095000000000210006,2095000000000020003,1920302,4,'12:30','12:50',1.0000,0.5000,0.5000,3.5000,'2026-09-01 12:50:00',3.5000,1.7500,1.7500,0,0), |
| | | (2095000000000210007,2095000000000020004,1920401,2,'14:10','14:50',1.2000,0.8000,0.8000,7.0000,'2026-09-01 15:30:00',8.4000,5.6000,5.6000,0,0),(2095000000000210008,2095000000000020004,1920402,3,'14:50','15:30',1.2000,0.8000,0.8000,7.0000,'2026-09-01 15:30:00',8.4000,5.6000,5.6000,0,0), |
| | | (2095000000000210009,2095000000000020005,1920501,1,'16:10','16:27',1.0000,0.5000,0.5000,2.5000,'2026-09-01 16:45:00',2.5000,1.2500,1.2500,0,0),(2095000000000210010,2095000000000020005,1920502,4,'16:27','16:45',1.0000,0.5000,0.5000,2.5000,'2026-09-01 16:45:00',2.5000,1.2500,1.2500,0,0); |
| | | |
| | | INSERT INTO t_vin_charging_order_refund |
| | | (id,charging_order_id,refund_code,refund_amount,balance_refund_amount,third_refund_amount,refund_status,refund_serial_number,refund_time,code,refund_title,refund_content,refund_reason,refund_remark,refund_total_amount,refund_fee,pay_amount,pay_type,create_time,del_flag) |
| | | VALUES |
| | | (2095000000000220002,2095000000000020002,'VD_REFUND_002',3.00,3.00,0.00,2,'VD_REFUND_SERIAL_002','2026-09-01 11:30:00','VD_20260901_002','VIN模拟退款','部分退款','测试数据','VD_TEST',3.00,0.00,22.00,1,'2026-09-01 11:30:00',0), |
| | | (2095000000000220005,2095000000000020005,'VD_REFUND_005',1.50,1.50,0.00,2,'VD_REFUND_SERIAL_005','2026-09-01 16:55:00','VD_20260901_005','VIN模拟退款','部分退款','测试数据','VD_TEST',1.50,0.00,7.50,1,'2026-09-01 16:55:00',0); |
| | | |
| | | INSERT INTO t_vin_charging_order_share_record |
| | | (charging_order_id,charging_order_code,site_id,partner_id,pay_channel,channel_pay_amount,channel_gift_amount,channel_pay_ratio,channel_electricity_amount,channel_service_amount,electricity_share_ratio,service_share_ratio,electricity_share_amount,service_share_amount,share_amount,need_online_share,online_share_status,request_json,response_json,retry_count,create_time,del_flag) |
| | | VALUES |
| | | (2095000000000020001,'VD_20260901_001',26,9001,'BALANCE',18.00,0,1.000000,10.80,7.20,50.00,50.00,5.40,3.60,9.00,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 08:08:00',0), |
| | | (2095000000000020002,'VD_20260901_002',26,9001,'BALANCE',22.00,0,1.000000,13.20,8.80,50.00,50.00,6.60,4.40,11.00,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 10:08:00',0), |
| | | (2095000000000020003,'VD_20260901_003',19,9001,'BALANCE',10.50,0,1.000000,7.00,3.50,50.00,50.00,3.50,1.75,5.25,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 12:08:00',0), |
| | | (2095000000000020004,'VD_20260901_004',75,9001,'BALANCE',28.00,0,1.000000,16.80,11.20,50.00,50.00,8.40,5.60,14.00,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 14:08:00',0), |
| | | (2095000000000020005,'VD_20260901_005',77,9001,'BALANCE',7.50,0,1.000000,5.00,2.50,50.00,50.00,2.50,1.25,3.75,0,'RECORDED','{"test":true}','{"test":true}',0,'2026-09-01 16:08:00',0); |
| | | |
| | | -- 验证结果 |
| | | SELECT 'card_order' AS item,COUNT(*) AS count FROM t_card_charging_order WHERE card_id=1 AND code LIKE 'SD\_%' |
| | | UNION ALL SELECT 'card_strategy',COUNT(*) FROM t_card_accounting_strategy_order WHERE charging_order_id IN (2095000000000010001,2095000000000010002,2095000000000010003,2095000000000010004,2095000000000010005) |
| | | UNION ALL SELECT 'card_strategy_detail',COUNT(*) FROM t_card_accounting_strategy_detail_order WHERE charging_order_id IN (2095000000000010001,2095000000000010002,2095000000000010003,2095000000000010004,2095000000000010005) |
| | | UNION ALL SELECT 'card_period',COUNT(*) FROM t_card_charging_order_accounting_strategy WHERE charging_order_id IN (2095000000000010001,2095000000000010002,2095000000000010003,2095000000000010004,2095000000000010005) |
| | | UNION ALL SELECT 'card_refund',COUNT(*) FROM t_card_charging_order_refund WHERE charging_order_id IN (2095000000000010001,2095000000000010002,2095000000000010003,2095000000000010004,2095000000000010005) |
| | | UNION ALL SELECT 'card_share',COUNT(*) FROM t_card_charging_order_share_record WHERE charging_order_code LIKE 'SD\_%' |
| | | UNION ALL SELECT 'vin_order',COUNT(*) FROM t_vin_charging_order WHERE vin_id=1 AND code LIKE 'VD\_%' |
| | | UNION ALL SELECT 'vin_strategy',COUNT(*) FROM t_vin_accounting_strategy_order WHERE charging_order_id IN (2095000000000020001,2095000000000020002,2095000000000020003,2095000000000020004,2095000000000020005) |
| | | UNION ALL SELECT 'vin_strategy_detail',COUNT(*) FROM t_vin_accounting_strategy_detail_order WHERE charging_order_id IN (2095000000000020001,2095000000000020002,2095000000000020003,2095000000000020004,2095000000000020005) |
| | | UNION ALL SELECT 'vin_period',COUNT(*) FROM t_vin_charging_order_accounting_strategy WHERE charging_order_id IN (2095000000000020001,2095000000000020002,2095000000000020003,2095000000000020004,2095000000000020005) |
| | | UNION ALL SELECT 'vin_refund',COUNT(*) FROM t_vin_charging_order_refund WHERE charging_order_id IN (2095000000000020001,2095000000000020002,2095000000000020003,2095000000000020004,2095000000000020005) |
| | | UNION ALL SELECT 'vin_share',COUNT(*) FROM t_vin_charging_order_share_record WHERE charging_order_code LIKE 'VD\_%'; |
| | |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '订单编号', |
| | | `vin_id` bigint NOT NULL COMMENT 'VIN管理记录ID(分片键)', |
| | | `vin` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'VIN码快照', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int DEFAULT '2' COMMENT '订单类型(VIN码充电订单)', |
| | | `order_classification` int DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_0` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_1` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_10` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_11` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_12` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_13` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_14` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_15` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_16` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_17` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_18` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_19` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_2` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_20` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_21` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_22` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_23` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_24` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_25` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_26` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_27` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_28` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_29` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_3` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_30` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_31` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_32` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_33` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_34` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_35` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_36` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_37` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_38` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_39` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_4` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_40` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_41` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_42` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_43` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_44` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_45` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_46` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_47` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_48` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_49` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_5` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_6` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_7` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_8` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_charging_order_9` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=充电订单(小程序),2=充电订单(刷卡))', |
| | | `order_classification` int NULL DEFAULT NULL COMMENT '订单分类(1=线上,2=线下)', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | |
| | | CREATE TABLE `t_exchange_order` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_0` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_1` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_10` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_11` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_12` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_13` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_14` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_15` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_16` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_17` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_18` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_19` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_2` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_3` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_4` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_5` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_6` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_7` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_8` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_exchange_order_9` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_0` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_1` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_10` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_11` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_12` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_13` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_14` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_15` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_16` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_17` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_18` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_19` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_2` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_3` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_4` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_5` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_6` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_7` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_8` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_shopping_order_9` ( |
| | | `id` bigint NOT NULL COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `order_type` int NULL DEFAULT NULL COMMENT '订单类型(1=商品,2=优惠券)', |
| | | `goods_id` int NULL DEFAULT NULL COMMENT '商品id', |
| | |
| | | CREATE TABLE `t_vip_order` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_0` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_1` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_10` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_11` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_12` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_13` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_14` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_15` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_16` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_17` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_18` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_19` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_2` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_3` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_4` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_5` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_6` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_7` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_8` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |
| | |
| | | CREATE TABLE `t_vip_order_9` ( |
| | | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', |
| | | `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '订单编号', |
| | | `vin` varchar(17) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '握手报文VIN', |
| | | `app_user_id` bigint NULL DEFAULT NULL COMMENT '用户id', |
| | | `type` int NULL DEFAULT NULL COMMENT '类型(1=购买,2=赠送)', |
| | | `vip_id` int NULL DEFAULT NULL COMMENT '购买的会员id', |