mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-13 06:20:07 +08:00
清分账单详情表 相关实体类
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 清分账单详情表
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ClearingBillDetail {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 清分账单编号
|
||||
*/
|
||||
private String clearingBillCode;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除标识(0-正常;1-删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.ClearingBillDetail;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ClearingBillDetailMapper {
|
||||
/**
|
||||
* 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(ClearingBillDetail record);
|
||||
|
||||
int insertOrUpdate(ClearingBillDetail record);
|
||||
|
||||
int insertOrUpdateSelective(ClearingBillDetail record);
|
||||
|
||||
/**
|
||||
* insert record to table selective
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insertSelective(ClearingBillDetail record);
|
||||
|
||||
/**
|
||||
* select by primary key
|
||||
* @param id primary key
|
||||
* @return object by primary key
|
||||
*/
|
||||
ClearingBillDetail selectByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* update record selective
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKeySelective(ClearingBillDetail record);
|
||||
|
||||
/**
|
||||
* update record
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKey(ClearingBillDetail record);
|
||||
|
||||
int updateBatch(List<ClearingBillDetail> list);
|
||||
|
||||
int batchInsert(@Param("list") List<ClearingBillDetail> list);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.jsowell.pile.domain.ClearingBillDetail;
|
||||
import java.util.List;
|
||||
public interface ClearingBillDetailService{
|
||||
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ClearingBillDetail record);
|
||||
|
||||
int insertOrUpdate(ClearingBillDetail record);
|
||||
|
||||
int insertOrUpdateSelective(ClearingBillDetail record);
|
||||
|
||||
int insertSelective(ClearingBillDetail record);
|
||||
|
||||
ClearingBillDetail selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ClearingBillDetail record);
|
||||
|
||||
int updateByPrimaryKey(ClearingBillDetail record);
|
||||
|
||||
int updateBatch(List<ClearingBillDetail> list);
|
||||
|
||||
int batchInsert(List<ClearingBillDetail> list);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import com.jsowell.pile.domain.ClearingBillDetail;
|
||||
import java.util.List;
|
||||
import com.jsowell.pile.mapper.ClearingBillDetailMapper;
|
||||
import com.jsowell.pile.service.ClearingBillDetailService;
|
||||
@Service
|
||||
public class ClearingBillDetailServiceImpl implements ClearingBillDetailService{
|
||||
|
||||
@Resource
|
||||
private ClearingBillDetailMapper clearingBillDetailMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return clearingBillDetailMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(ClearingBillDetail record) {
|
||||
return clearingBillDetailMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdate(ClearingBillDetail record) {
|
||||
return clearingBillDetailMapper.insertOrUpdate(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdateSelective(ClearingBillDetail record) {
|
||||
return clearingBillDetailMapper.insertOrUpdateSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(ClearingBillDetail record) {
|
||||
return clearingBillDetailMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClearingBillDetail selectByPrimaryKey(Integer id) {
|
||||
return clearingBillDetailMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(ClearingBillDetail record) {
|
||||
return clearingBillDetailMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(ClearingBillDetail record) {
|
||||
return clearingBillDetailMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBatch(List<ClearingBillDetail> list) {
|
||||
return clearingBillDetailMapper.updateBatch(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchInsert(List<ClearingBillDetail> list) {
|
||||
return clearingBillDetailMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,298 @@
|
||||
<?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.ClearingBillDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.ClearingBillDetail">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table clearing_bill_detail-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="clearing_bill_code" jdbcType="VARCHAR" property="clearingBillCode" />
|
||||
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, clearing_bill_code, order_code, create_by, create_time, update_by, update_time,
|
||||
del_flag
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from clearing_bill_detail
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--@mbg.generated-->
|
||||
delete from clearing_bill_detail
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.jsowell.pile.domain.ClearingBillDetail">
|
||||
<!--@mbg.generated-->
|
||||
insert into clearing_bill_detail (id, clearing_bill_code, order_code,
|
||||
create_by, create_time, update_by,
|
||||
update_time, del_flag)
|
||||
values (#{id,jdbcType=INTEGER}, #{clearingBillCode,jdbcType=VARCHAR}, #{orderCode,jdbcType=VARCHAR},
|
||||
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
||||
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.ClearingBillDetail">
|
||||
<!--@mbg.generated-->
|
||||
insert into clearing_bill_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="clearingBillCode != null">
|
||||
clearing_bill_code,
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code,
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="clearingBillCode != null">
|
||||
#{clearingBillCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
#{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
#{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
#{delFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.ClearingBillDetail">
|
||||
<!--@mbg.generated-->
|
||||
update clearing_bill_detail
|
||||
<set>
|
||||
<if test="clearingBillCode != null">
|
||||
clearing_bill_code = #{clearingBillCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag = #{delFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.ClearingBillDetail">
|
||||
<!--@mbg.generated-->
|
||||
update clearing_bill_detail
|
||||
set clearing_bill_code = #{clearingBillCode,jdbcType=VARCHAR},
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
del_flag = #{delFlag,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update clearing_bill_detail
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="clearing_bill_code = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.clearingBillCode,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="order_code = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_by = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_by = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="del_flag = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into clearing_bill_detail
|
||||
(id, clearing_bill_code, order_code, create_by, create_time, update_by, update_time,
|
||||
del_flag)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=INTEGER}, #{item.clearingBillCode,jdbcType=VARCHAR}, #{item.orderCode,jdbcType=VARCHAR},
|
||||
#{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
|
||||
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertOrUpdate" parameterType="com.jsowell.pile.domain.ClearingBillDetail">
|
||||
<!--@mbg.generated-->
|
||||
insert into clearing_bill_detail
|
||||
(id, clearing_bill_code, order_code, create_by, create_time, update_by, update_time,
|
||||
del_flag)
|
||||
values
|
||||
(#{id,jdbcType=INTEGER}, #{clearingBillCode,jdbcType=VARCHAR}, #{orderCode,jdbcType=VARCHAR},
|
||||
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
||||
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR})
|
||||
on duplicate key update
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
clearing_bill_code = #{clearingBillCode,jdbcType=VARCHAR},
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
del_flag = #{delFlag,jdbcType=VARCHAR}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.jsowell.pile.domain.ClearingBillDetail">
|
||||
<!--@mbg.generated-->
|
||||
insert into clearing_bill_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="clearingBillCode != null">
|
||||
clearing_bill_code,
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code,
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="clearingBillCode != null">
|
||||
#{clearingBillCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
#{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
#{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
#{delFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="clearingBillCode != null">
|
||||
clearing_bill_code = #{clearingBillCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag = #{delFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user