mirror of
https://gitee.com/san-bing/JChargePointProtocol
synced 2026-05-06 10:59:57 +08:00
云快充1.5.0 初始化
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@Configuration
|
||||
@EnableAutoConfiguration(exclude = {RedisAutoConfiguration.class})
|
||||
@MapperScan({"sanbing.jcpp.app.dal.mapper"})
|
||||
public class DalConfig {
|
||||
|
||||
@Bean
|
||||
@ConfigurationProperties("spring.datasource")
|
||||
public DataSourceProperties dataSourceProperties() {
|
||||
return new DataSourceProperties();
|
||||
}
|
||||
|
||||
@Primary
|
||||
@ConfigurationProperties(prefix = "spring.datasource.hikari")
|
||||
@Bean
|
||||
public DataSource dataSource(@Qualifier("dataSourceProperties") DataSourceProperties dataSourceProperties) {
|
||||
return dataSourceProperties.initializeDataSourceBuilder().type(HikariDataSource.class).build();
|
||||
}
|
||||
|
||||
@Primary
|
||||
@Bean
|
||||
public JdbcTemplate jdbcTemplate(@Qualifier("dataSource") DataSource dataSource) {
|
||||
return new JdbcTemplate(dataSource);
|
||||
}
|
||||
|
||||
@Primary
|
||||
@Bean
|
||||
public NamedParameterJdbcTemplate namedParameterJdbcTemplate(@Qualifier("dataSource") DataSource dataSource) {
|
||||
return new NamedParameterJdbcTemplate(dataSource);
|
||||
}
|
||||
|
||||
@Primary
|
||||
@Bean
|
||||
public TransactionTemplate transactionTemplate(DataSourceTransactionManager transactionManager) {
|
||||
TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);
|
||||
transactionTemplate.setIsolationLevel(TransactionTemplate.ISOLATION_READ_COMMITTED);
|
||||
transactionTemplate.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRED);
|
||||
return transactionTemplate;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
|
||||
PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
|
||||
paginationInnerInterceptor.setDbType(DbType.POSTGRE_SQL);
|
||||
mybatisPlusInterceptor.addInnerInterceptor(paginationInnerInterceptor);
|
||||
return mybatisPlusInterceptor;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public enum GunOptStatusEnum implements IEnum<String> {
|
||||
AVAILABLE, // 可用状态
|
||||
IN_MAINTENANCE, // 维护中状态
|
||||
OUT_OF_SERVICE, // 停用状态
|
||||
RESERVED; // 已预约状态
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return name();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public enum GunRunStatusEnum implements IEnum<String> {
|
||||
IDLE, // 空闲
|
||||
INSERTED, // 已插枪
|
||||
CHARGING, // 充电中
|
||||
CHARGE_COMPLETE, // 充电完成
|
||||
DISCHARGE_READY, // 放电准备
|
||||
DISCHARGING, // 放电中
|
||||
DISCHARGE_COMPLETE, // 放电完成
|
||||
RESERVED, // 预约
|
||||
FAULT; // 故障
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return name();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
public enum OrderStatusEnum implements IEnum<String> {
|
||||
PENDING,
|
||||
IN_CHARGING,
|
||||
COMPLETED,
|
||||
CANCELLED,
|
||||
TERMINATED,
|
||||
FAILED,
|
||||
REFUNDED;
|
||||
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return name();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public enum OrderTypeEnum implements IEnum<String> {
|
||||
CHARGE,
|
||||
|
||||
DISCHARGE;
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return name();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public enum OwnerTypeEnum implements IEnum<String> {
|
||||
C,
|
||||
B,
|
||||
G;
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return name();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public enum PileStatusEnum implements IEnum<String> {
|
||||
IDLE, // 空闲
|
||||
WORKING, // 工作中
|
||||
FAULT, // 故障
|
||||
MAINTENANCE, // 维护中
|
||||
OFFLINE, // 离线
|
||||
;
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return name();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public enum PileTypeEnum implements IEnum<String> {
|
||||
AC, // 交流充电桩
|
||||
DC, // 直流充电桩
|
||||
;
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return name();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public enum StationStatusEnum implements IEnum<String> {
|
||||
OPERATIONAL, // 正常运营
|
||||
PARTIAL_FAILURE, // 部分故障
|
||||
FULLY_LOADED, // 满载
|
||||
MAINTENANCE, // 维护中
|
||||
CLOSED, // 关闭
|
||||
WAITING_FOR_OPEN; // 待开放
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return name();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public enum UserStatusEnum implements IEnum<String> {
|
||||
ENABLE,
|
||||
DISABLE;
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return name();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.typehandlers;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.apache.ibatis.type.MappedTypes;
|
||||
import org.postgresql.util.PGobject;
|
||||
import sanbing.jcpp.infrastructure.util.jackson.JacksonUtil;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
@Slf4j
|
||||
@MappedTypes({JsonNode.class})
|
||||
public class JsonbTypeHandler extends JacksonTypeHandler {
|
||||
|
||||
public JsonbTypeHandler(Class<?> type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
public JsonbTypeHandler(Class<?> type, Field field) {
|
||||
super(type, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNonNullParameter(PreparedStatement ps, int i, Object parameter, JdbcType jdbcType) throws SQLException {
|
||||
if (ps != null) {
|
||||
PGobject jsonObject = new PGobject();
|
||||
jsonObject.setType("jsonb");
|
||||
jsonObject.setValue(JacksonUtil.toString(parameter));
|
||||
ps.setObject(i, jsonObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.config.ibatis.typehandlers;
|
||||
|
||||
import org.apache.ibatis.type.BaseTypeHandler;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* mysql UUID 类型转 varchar
|
||||
*/
|
||||
public class UUIDTypeHandler extends BaseTypeHandler<UUID> {
|
||||
|
||||
@Override
|
||||
public void setNonNullParameter(PreparedStatement ps, int i, UUID parameter, JdbcType jdbcType) throws SQLException {
|
||||
ps.setObject(i, parameter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
||||
return rs.getObject(columnName, UUID.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
||||
return rs.getObject(columnIndex, UUID.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
||||
return cs.getObject(columnIndex, UUID.class);
|
||||
}
|
||||
}
|
||||
61
jcpp-app/src/main/java/sanbing/jcpp/app/dal/entity/Gun.java
Normal file
61
jcpp-app/src/main/java/sanbing/jcpp/app/dal/entity/Gun.java
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.GunOptStatusEnum;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.GunRunStatusEnum;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.OwnerTypeEnum;
|
||||
import sanbing.jcpp.infrastructure.cache.HasVersion;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Data
|
||||
@TableName("jcpp_gun")
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Gun implements Serializable, HasVersion {
|
||||
|
||||
@TableId(type = IdType.INPUT)
|
||||
private UUID id;
|
||||
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
private JsonNode additionalInfo;
|
||||
|
||||
private String gunNo;
|
||||
|
||||
private String gunName;
|
||||
|
||||
private String gunCode;
|
||||
|
||||
private UUID stationId;
|
||||
|
||||
private UUID pileId;
|
||||
|
||||
private UUID ownerId;
|
||||
|
||||
private OwnerTypeEnum ownerType;
|
||||
|
||||
private GunRunStatusEnum runStatus;
|
||||
|
||||
private LocalDateTime runStatusUpdatedTime;
|
||||
|
||||
private GunOptStatusEnum optStatus;
|
||||
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.OrderStatusEnum;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.OrderTypeEnum;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Data
|
||||
@TableName("jcpp_order")
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Order implements Serializable {
|
||||
|
||||
@TableId(type = IdType.INPUT)
|
||||
private UUID id;
|
||||
|
||||
private String internalOrderNo;
|
||||
|
||||
private String externalOrderNo;
|
||||
|
||||
private String pileOrderNo;
|
||||
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
private JsonNode additionalInfo;
|
||||
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
private LocalDateTime cancelledTime;
|
||||
|
||||
private OrderStatusEnum status;
|
||||
|
||||
private OrderTypeEnum type;
|
||||
|
||||
private UUID creatorId;
|
||||
|
||||
private UUID stationId;
|
||||
|
||||
private UUID pileId;
|
||||
|
||||
private UUID gunId;
|
||||
|
||||
private String plateNo;
|
||||
|
||||
private Long settlementAmount;
|
||||
|
||||
private JsonNode settlementDetails;
|
||||
|
||||
private BigDecimal electricityQuantity;
|
||||
|
||||
|
||||
}
|
||||
61
jcpp-app/src/main/java/sanbing/jcpp/app/dal/entity/Pile.java
Normal file
61
jcpp-app/src/main/java/sanbing/jcpp/app/dal/entity/Pile.java
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.OwnerTypeEnum;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.PileStatusEnum;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.PileTypeEnum;
|
||||
import sanbing.jcpp.infrastructure.cache.HasVersion;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
@Data
|
||||
@TableName(value = "jcpp_pile", autoResultMap = true)
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Pile implements Serializable, HasVersion {
|
||||
|
||||
@TableId(type = IdType.INPUT)
|
||||
private UUID id;
|
||||
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
private JsonNode additionalInfo;
|
||||
|
||||
private String pileName;
|
||||
|
||||
private String pileCode;
|
||||
|
||||
private String protocol;
|
||||
|
||||
private UUID stationId;
|
||||
|
||||
private UUID ownerId;
|
||||
|
||||
private OwnerTypeEnum ownerType;
|
||||
|
||||
private String brand;
|
||||
|
||||
private String model;
|
||||
|
||||
private String manufacturer;
|
||||
|
||||
private PileStatusEnum status;
|
||||
|
||||
private PileTypeEnum type;
|
||||
|
||||
private Integer version;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.OwnerTypeEnum;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.StationStatusEnum;
|
||||
import sanbing.jcpp.infrastructure.cache.HasVersion;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Data
|
||||
@TableName("jcpp_station")
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Station implements Serializable, HasVersion {
|
||||
|
||||
@TableId(type = IdType.INPUT)
|
||||
private UUID id;
|
||||
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
private JsonNode additionalInfo;
|
||||
|
||||
private String stationName;
|
||||
|
||||
private String stationCode;
|
||||
|
||||
private UUID ownerId;
|
||||
|
||||
private Float longitude;
|
||||
|
||||
private Float latitude;
|
||||
|
||||
private OwnerTypeEnum ownerType;
|
||||
|
||||
private String province;
|
||||
|
||||
private String city;
|
||||
|
||||
private String county;
|
||||
|
||||
private String address;
|
||||
|
||||
private StationStatusEnum status;
|
||||
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
45
jcpp-app/src/main/java/sanbing/jcpp/app/dal/entity/User.java
Normal file
45
jcpp-app/src/main/java/sanbing/jcpp/app/dal/entity/User.java
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import sanbing.jcpp.app.dal.config.ibatis.enums.UserStatusEnum;
|
||||
import sanbing.jcpp.infrastructure.cache.HasVersion;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Data
|
||||
@TableName("jcpp_user")
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class User implements Serializable, HasVersion {
|
||||
|
||||
@TableId(type = IdType.INPUT)
|
||||
private UUID id;
|
||||
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
private JsonNode additionalInfo;
|
||||
|
||||
private UserStatusEnum status;
|
||||
|
||||
private String userName;
|
||||
|
||||
private JsonNode userCredentials;
|
||||
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import sanbing.jcpp.app.dal.entity.Gun;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public interface GunMapper extends BaseMapper<Gun> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import sanbing.jcpp.app.dal.entity.Order;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public interface OrderMapper extends BaseMapper<Order> {
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import sanbing.jcpp.app.dal.entity.Pile;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public interface PileMapper extends BaseMapper<Pile> {
|
||||
|
||||
@Select("SELECT " +
|
||||
" * " +
|
||||
"FROM " +
|
||||
" jcpp_pile " +
|
||||
"WHERE " +
|
||||
" pile_code = #{pileCode}")
|
||||
Pile selectByCode(String pileCode);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import sanbing.jcpp.app.dal.entity.Station;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public interface StationMapper extends BaseMapper<Station> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* 抖音关注:程序员三丙
|
||||
* 知识星球:https://t.zsxq.com/j9b21
|
||||
*/
|
||||
package sanbing.jcpp.app.dal.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import sanbing.jcpp.app.dal.entity.User;
|
||||
|
||||
/**
|
||||
* @author baigod
|
||||
*/
|
||||
public interface UserMapper extends BaseMapper<User> {
|
||||
}
|
||||
Reference in New Issue
Block a user