mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-09 20:40:03 +08:00
充电桩预约功能
This commit is contained in:
@@ -1000,18 +1000,18 @@ public class SpringBootTestController {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void createPaymentReverseRequestTest() {
|
public void createPaymentReverseRequestTest() {
|
||||||
String paymentId = "002212023082409392010540599165461884928";
|
String paymentId = "002212024061717243610648707836701741056";
|
||||||
BigDecimal refundAmount = new BigDecimal("0.09");
|
BigDecimal refundAmount = new BigDecimal("46.49");
|
||||||
String memberId = null;
|
String memberId = null;
|
||||||
|
|
||||||
// 延迟分账未确认调撤销调撤销接口退款
|
// 延迟分账未确认调撤销调撤销接口退款
|
||||||
PaymentReverseOperation operation = new PaymentReverseOperation();
|
PaymentReverseOperation operation = new PaymentReverseOperation();
|
||||||
operation.setPaymentId(paymentId);
|
operation.setPaymentId(paymentId);
|
||||||
operation.setReverseAmt(refundAmount);
|
operation.setReverseAmt(refundAmount);
|
||||||
operation.setMerchantKey(wechatAppId2);
|
operation.setMerchantKey(wechatAppId1);
|
||||||
operation.setMemberId(memberId);
|
operation.setMemberId(memberId);
|
||||||
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
|
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
|
||||||
operation.setOrderCode(null);
|
operation.setOrderCode("C82929272783");
|
||||||
PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
|
PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
|
||||||
System.out.println(JSON.toJSONString(response));
|
System.out.println(JSON.toJSONString(response));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.springframework.stereotype.Component;
|
|||||||
*
|
*
|
||||||
* 远程设置充电桩是否停用;设置充电桩允许输出功率,以实现电网功率的调节
|
* 远程设置充电桩是否停用;设置充电桩允许输出功率,以实现电网功率的调节
|
||||||
*
|
*
|
||||||
|
* @deprecated 桩不会发送这个指令,由平台主动发送
|
||||||
* @author JS-ZZA
|
* @author JS-ZZA
|
||||||
* @date 2022/9/19 15:06
|
* @date 2022/9/19 15:06
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.jsowell.pile.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电桩预约信息表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@SuperBuilder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class PileReservedInfo {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员id
|
||||||
|
*/
|
||||||
|
private String memberId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电桩编号
|
||||||
|
*/
|
||||||
|
private String pileSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0-未生效;1-生效)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约类型,单次 (single) 或周期性 (recurring)
|
||||||
|
*/
|
||||||
|
private String reservedType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约结束时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 周期性预约的频率,对于单次预约,该字段可以为 NULL。可能的值包括 daily, weekly, monthly
|
||||||
|
*/
|
||||||
|
private String freq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标识(0正常;1-删除)
|
||||||
|
*/
|
||||||
|
private String delFlag;
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.PileReservedInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
public interface PileReservedInfoMapper {
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int insert(PileReservedInfo record);
|
||||||
|
|
||||||
|
int insertOrUpdate(PileReservedInfo record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(PileReservedInfo record);
|
||||||
|
|
||||||
|
int insertSelective(PileReservedInfo record);
|
||||||
|
|
||||||
|
PileReservedInfo selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(PileReservedInfo record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(PileReservedInfo record);
|
||||||
|
|
||||||
|
int updateBatch(List<PileReservedInfo> list);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<PileReservedInfo> list);
|
||||||
|
|
||||||
|
int updateBatchSelective(List<PileReservedInfo> list);
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.jsowell.pile.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.PileReservedInfo;
|
||||||
|
|
||||||
|
public interface PileReservedInfoService {
|
||||||
|
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int insert(PileReservedInfo record);
|
||||||
|
|
||||||
|
int insertOrUpdate(PileReservedInfo record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(PileReservedInfo record);
|
||||||
|
|
||||||
|
int insertSelective(PileReservedInfo record);
|
||||||
|
|
||||||
|
PileReservedInfo selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(PileReservedInfo record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(PileReservedInfo record);
|
||||||
|
|
||||||
|
int updateBatch(List<PileReservedInfo> list);
|
||||||
|
|
||||||
|
int batchInsert(List<PileReservedInfo> list);
|
||||||
|
|
||||||
|
int updateBatchSelective(List<PileReservedInfo> list);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.jsowell.pile.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.jsowell.pile.mapper.PileReservedInfoMapper;
|
||||||
|
import com.jsowell.pile.domain.PileReservedInfo;
|
||||||
|
import com.jsowell.pile.service.PileReservedInfoService;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class PileReservedInfoServiceImpl implements PileReservedInfoService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PileReservedInfoMapper pileReservedInfoMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteByPrimaryKey(Integer id) {
|
||||||
|
return pileReservedInfoMapper.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insert(PileReservedInfo record) {
|
||||||
|
return pileReservedInfoMapper.insert(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertOrUpdate(PileReservedInfo record) {
|
||||||
|
return pileReservedInfoMapper.insertOrUpdate(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertOrUpdateSelective(PileReservedInfo record) {
|
||||||
|
return pileReservedInfoMapper.insertOrUpdateSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertSelective(PileReservedInfo record) {
|
||||||
|
return pileReservedInfoMapper.insertSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PileReservedInfo selectByPrimaryKey(Integer id) {
|
||||||
|
return pileReservedInfoMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateByPrimaryKeySelective(PileReservedInfo record) {
|
||||||
|
return pileReservedInfoMapper.updateByPrimaryKeySelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateByPrimaryKey(PileReservedInfo record) {
|
||||||
|
return pileReservedInfoMapper.updateByPrimaryKey(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateBatch(List<PileReservedInfo> list) {
|
||||||
|
return pileReservedInfoMapper.updateBatch(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int batchInsert(List<PileReservedInfo> list) {
|
||||||
|
return pileReservedInfoMapper.batchInsert(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateBatchSelective(List<PileReservedInfo> list) {
|
||||||
|
return pileReservedInfoMapper.updateBatchSelective(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,461 @@
|
|||||||
|
<?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.PileReservedInfoMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.PileReservedInfo">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table pile_reserved_info-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
|
||||||
|
<result column="pile_sn" jdbcType="VARCHAR" property="pileSn" />
|
||||||
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
|
<result column="reserved_type" jdbcType="VARCHAR" property="reservedType" />
|
||||||
|
<result column="start_time" jdbcType="TIME" property="startTime" />
|
||||||
|
<result column="end_time" jdbcType="TIME" property="endTime" />
|
||||||
|
<result column="freq" jdbcType="VARCHAR" property="freq" />
|
||||||
|
<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="CHAR" property="delFlag" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, member_id, pile_sn, `status`, reserved_type, start_time, end_time, freq, 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 pile_reserved_info
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
delete from pile_reserved_info
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileReservedInfo" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into pile_reserved_info (member_id, pile_sn, `status`,
|
||||||
|
reserved_type, start_time, end_time,
|
||||||
|
freq, create_by, create_time,
|
||||||
|
update_by, update_time, del_flag
|
||||||
|
)
|
||||||
|
values (#{memberId,jdbcType=VARCHAR}, #{pileSn,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||||
|
#{reservedType,jdbcType=VARCHAR}, #{startTime,jdbcType=TIME}, #{endTime,jdbcType=TIME},
|
||||||
|
#{freq,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=CHAR}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileReservedInfo" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into pile_reserved_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id,
|
||||||
|
</if>
|
||||||
|
<if test="pileSn != null">
|
||||||
|
pile_sn,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status`,
|
||||||
|
</if>
|
||||||
|
<if test="reservedType != null">
|
||||||
|
reserved_type,
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
start_time,
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
end_time,
|
||||||
|
</if>
|
||||||
|
<if test="freq != null">
|
||||||
|
freq,
|
||||||
|
</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="memberId != null">
|
||||||
|
#{memberId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="pileSn != null">
|
||||||
|
#{pileSn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="reservedType != null">
|
||||||
|
#{reservedType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
#{startTime,jdbcType=TIME},
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
#{endTime,jdbcType=TIME},
|
||||||
|
</if>
|
||||||
|
<if test="freq != null">
|
||||||
|
#{freq,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=CHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.PileReservedInfo">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update pile_reserved_info
|
||||||
|
<set>
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id = #{memberId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="pileSn != null">
|
||||||
|
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="reservedType != null">
|
||||||
|
reserved_type = #{reservedType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
start_time = #{startTime,jdbcType=TIME},
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
end_time = #{endTime,jdbcType=TIME},
|
||||||
|
</if>
|
||||||
|
<if test="freq != null">
|
||||||
|
freq = #{freq,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=CHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.PileReservedInfo">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update pile_reserved_info
|
||||||
|
set member_id = #{memberId,jdbcType=VARCHAR},
|
||||||
|
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
||||||
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
reserved_type = #{reservedType,jdbcType=VARCHAR},
|
||||||
|
start_time = #{startTime,jdbcType=TIME},
|
||||||
|
end_time = #{endTime,jdbcType=TIME},
|
||||||
|
freq = #{freq,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=CHAR}
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateBatch" parameterType="java.util.List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update pile_reserved_info
|
||||||
|
<trim prefix="set" suffixOverrides=",">
|
||||||
|
<trim prefix="member_id = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="pile_sn = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.pileSn,jdbcType=VARCHAR}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="`status` = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="reserved_type = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.reservedType,jdbcType=VARCHAR}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="start_time = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.startTime,jdbcType=TIME}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="end_time = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.endTime,jdbcType=TIME}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="freq = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.freq,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=CHAR}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</trim>
|
||||||
|
where id in
|
||||||
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||||
|
#{item.id,jdbcType=INTEGER}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into pile_reserved_info
|
||||||
|
(member_id, pile_sn, `status`, reserved_type, start_time, end_time, freq, create_by,
|
||||||
|
create_time, update_by, update_time, del_flag)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.memberId,jdbcType=VARCHAR}, #{item.pileSn,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR},
|
||||||
|
#{item.reservedType,jdbcType=VARCHAR}, #{item.startTime,jdbcType=TIME}, #{item.endTime,jdbcType=TIME},
|
||||||
|
#{item.freq,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=CHAR}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileReservedInfo" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into pile_reserved_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
member_id,
|
||||||
|
pile_sn,
|
||||||
|
`status`,
|
||||||
|
reserved_type,
|
||||||
|
start_time,
|
||||||
|
end_time,
|
||||||
|
freq,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time,
|
||||||
|
del_flag,
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
#{memberId,jdbcType=VARCHAR},
|
||||||
|
#{pileSn,jdbcType=VARCHAR},
|
||||||
|
#{status,jdbcType=VARCHAR},
|
||||||
|
#{reservedType,jdbcType=VARCHAR},
|
||||||
|
#{startTime,jdbcType=TIME},
|
||||||
|
#{endTime,jdbcType=TIME},
|
||||||
|
#{freq,jdbcType=VARCHAR},
|
||||||
|
#{createBy,jdbcType=VARCHAR},
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{updateBy,jdbcType=VARCHAR},
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
#{delFlag,jdbcType=CHAR},
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
member_id = #{memberId,jdbcType=VARCHAR},
|
||||||
|
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
||||||
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
reserved_type = #{reservedType,jdbcType=VARCHAR},
|
||||||
|
start_time = #{startTime,jdbcType=TIME},
|
||||||
|
end_time = #{endTime,jdbcType=TIME},
|
||||||
|
freq = #{freq,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=CHAR},
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileReservedInfo" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into pile_reserved_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id,
|
||||||
|
</if>
|
||||||
|
<if test="pileSn != null">
|
||||||
|
pile_sn,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status`,
|
||||||
|
</if>
|
||||||
|
<if test="reservedType != null">
|
||||||
|
reserved_type,
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
start_time,
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
end_time,
|
||||||
|
</if>
|
||||||
|
<if test="freq != null">
|
||||||
|
freq,
|
||||||
|
</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="memberId != null">
|
||||||
|
#{memberId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="pileSn != null">
|
||||||
|
#{pileSn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="reservedType != null">
|
||||||
|
#{reservedType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
#{startTime,jdbcType=TIME},
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
#{endTime,jdbcType=TIME},
|
||||||
|
</if>
|
||||||
|
<if test="freq != null">
|
||||||
|
#{freq,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=CHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id = #{memberId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="pileSn != null">
|
||||||
|
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="reservedType != null">
|
||||||
|
reserved_type = #{reservedType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
start_time = #{startTime,jdbcType=TIME},
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
end_time = #{endTime,jdbcType=TIME},
|
||||||
|
</if>
|
||||||
|
<if test="freq != null">
|
||||||
|
freq = #{freq,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=CHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user