mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-04 01:50:17 +08:00
订单实时记录
This commit is contained in:
@@ -0,0 +1,38 @@
|
|||||||
|
package com.jsowell.pile.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class OrderMonitorData {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实时监控数据
|
||||||
|
*/
|
||||||
|
private String monitorData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime cerateTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.OrderMonitorData;
|
||||||
|
|
||||||
|
public interface OrderMonitorDataMapper {
|
||||||
|
/**
|
||||||
|
* delete by primary key
|
||||||
|
* @param id primaryKey
|
||||||
|
* @return deleteCount
|
||||||
|
*/
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert record to table
|
||||||
|
* @param record the record
|
||||||
|
* @return insert count
|
||||||
|
*/
|
||||||
|
int insert(OrderMonitorData record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert record to table selective
|
||||||
|
* @param record the record
|
||||||
|
* @return insert count
|
||||||
|
*/
|
||||||
|
int insertSelective(OrderMonitorData record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* select by primary key
|
||||||
|
* @param id primary key
|
||||||
|
* @return object by primary key
|
||||||
|
*/
|
||||||
|
OrderMonitorData selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update record selective
|
||||||
|
* @param record the updated record
|
||||||
|
* @return update count
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKeySelective(OrderMonitorData record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update record
|
||||||
|
* @param record the updated record
|
||||||
|
* @return update count
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKey(OrderMonitorData record);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.jsowell.pile.service;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.OrderMonitorData;
|
||||||
|
|
||||||
|
public interface OrderMonitorDataService{
|
||||||
|
|
||||||
|
public int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
public int insert(OrderMonitorData record);
|
||||||
|
|
||||||
|
public int insertSelective(OrderMonitorData record);
|
||||||
|
|
||||||
|
public OrderMonitorData selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
public int updateByPrimaryKeySelective(OrderMonitorData record);
|
||||||
|
|
||||||
|
public int updateByPrimaryKey(OrderMonitorData record);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.jsowell.pile.service.impl;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.OrderMonitorData;
|
||||||
|
import com.jsowell.pile.mapper.OrderMonitorDataMapper;
|
||||||
|
import com.jsowell.pile.service.OrderMonitorDataService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
@Service
|
||||||
|
public class OrderMonitorDataServiceImpl implements OrderMonitorDataService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OrderMonitorDataMapper orderMonitorDataMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public int deleteByPrimaryKey(Integer id) {
|
||||||
|
return orderMonitorDataMapper.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int insert(OrderMonitorData record) {
|
||||||
|
return orderMonitorDataMapper.insert(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int insertSelective(OrderMonitorData record) {
|
||||||
|
return orderMonitorDataMapper.insertSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public OrderMonitorData selectByPrimaryKey(Integer id) {
|
||||||
|
return orderMonitorDataMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int updateByPrimaryKeySelective(OrderMonitorData record) {
|
||||||
|
return orderMonitorDataMapper.updateByPrimaryKeySelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int updateByPrimaryKey(OrderMonitorData record) {
|
||||||
|
return orderMonitorDataMapper.updateByPrimaryKey(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jsowell.pile.mapper.OrderMonitorDataMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.OrderMonitorData">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table order_monitor_data-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
||||||
|
<result column="monitor_data" jdbcType="VARCHAR" property="monitorData" />
|
||||||
|
<result column="cerate_time" jdbcType="TIMESTAMP" property="cerateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, order_code, monitor_data, cerate_time
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from order_monitor_data
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
delete from order_monitor_data
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.jsowell.pile.domain.OrderMonitorData">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into order_monitor_data (id, order_code, monitor_data,
|
||||||
|
cerate_time)
|
||||||
|
values (#{id,jdbcType=INTEGER}, #{orderCode,jdbcType=VARCHAR}, #{monitorData,jdbcType=VARCHAR},
|
||||||
|
#{cerateTime,jdbcType=TIMESTAMP})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.OrderMonitorData">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into order_monitor_data
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="orderCode != null and orderCode != ''">
|
||||||
|
order_code,
|
||||||
|
</if>
|
||||||
|
<if test="monitorData != null and monitorData != ''">
|
||||||
|
monitor_data,
|
||||||
|
</if>
|
||||||
|
<if test="cerateTime != null">
|
||||||
|
cerate_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="orderCode != null and orderCode != ''">
|
||||||
|
#{orderCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="monitorData != null and monitorData != ''">
|
||||||
|
#{monitorData,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cerateTime != null">
|
||||||
|
#{cerateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.OrderMonitorData">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update order_monitor_data
|
||||||
|
<set>
|
||||||
|
<if test="orderCode != null and orderCode != ''">
|
||||||
|
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="monitorData != null and monitorData != ''">
|
||||||
|
monitor_data = #{monitorData,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cerateTime != null">
|
||||||
|
cerate_time = #{cerateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.OrderMonitorData">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update order_monitor_data
|
||||||
|
set order_code = #{orderCode,jdbcType=VARCHAR},
|
||||||
|
monitor_data = #{monitorData,jdbcType=VARCHAR},
|
||||||
|
cerate_time = #{cerateTime,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user