diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/OrderPileOccupy.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/OrderPileOccupy.java new file mode 100644 index 000000000..12c2edae7 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/OrderPileOccupy.java @@ -0,0 +1,78 @@ +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 OrderPileOccupy { + /** + * 主键 + */ + private Integer id; + + /** + * 状态(0-占桩中;1-待支付;2-无需支付;3;订单完成) + */ + private String status; + + /** + * 订单号 + */ + private String orderCode; + + /** + * 交易流水号 + */ + private String transactionCode; + + /** + * 会员id + */ + private String memberId; + + /** + * 开始时间 + */ + private Date startTime; + + /** + * 结束时间 + */ + private Date endTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 创建人 + */ + private String createBy; + + /** + * 修改时间 + */ + private Date updateTime; + + /** + * 修改人 + */ + private String updateBy; + + /** + * 删除标识(0-否;1-是) + */ + private String delFlag; +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/OrderPileOccupyMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/OrderPileOccupyMapper.java new file mode 100644 index 000000000..d0021558f --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/OrderPileOccupyMapper.java @@ -0,0 +1,59 @@ +package com.jsowell.pile.mapper; + +import com.jsowell.pile.domain.OrderPileOccupy; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface OrderPileOccupyMapper { + /** + * 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(OrderPileOccupy record); + + int insertOrUpdate(OrderPileOccupy record); + + int insertOrUpdateSelective(OrderPileOccupy record); + + /** + * insert record to table selective + * @param record the record + * @return insert count + */ + int insertSelective(OrderPileOccupy record); + + /** + * select by primary key + * @param id primary key + * @return object by primary key + */ + OrderPileOccupy selectByPrimaryKey(Integer id); + + /** + * update record selective + * @param record the updated record + * @return update count + */ + int updateByPrimaryKeySelective(OrderPileOccupy record); + + /** + * update record + * @param record the updated record + * @return update count + */ + int updateByPrimaryKey(OrderPileOccupy record); + + int updateBatch(List list); + + int updateBatchSelective(List list); + + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/OrderPileOccupyService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/OrderPileOccupyService.java new file mode 100644 index 000000000..49ac32385 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/OrderPileOccupyService.java @@ -0,0 +1,30 @@ +package com.jsowell.pile.service; + +import java.util.List; +import com.jsowell.pile.domain.OrderPileOccupy; +public interface OrderPileOccupyService{ + + + int deleteByPrimaryKey(Integer id); + + int insert(OrderPileOccupy record); + + int insertOrUpdate(OrderPileOccupy record); + + int insertOrUpdateSelective(OrderPileOccupy record); + + int insertSelective(OrderPileOccupy record); + + OrderPileOccupy selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(OrderPileOccupy record); + + int updateByPrimaryKey(OrderPileOccupy record); + + int updateBatch(List list); + + int updateBatchSelective(List list); + + int batchInsert(List list); + +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderPileOccupyServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderPileOccupyServiceImpl.java new file mode 100644 index 000000000..76325e846 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderPileOccupyServiceImpl.java @@ -0,0 +1,70 @@ +package com.jsowell.pile.service.impl; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.jsowell.pile.mapper.OrderPileOccupyMapper; +import com.jsowell.pile.domain.OrderPileOccupy; +import com.jsowell.pile.service.OrderPileOccupyService; +@Service +public class OrderPileOccupyServiceImpl implements OrderPileOccupyService{ + + @Resource + private OrderPileOccupyMapper orderPileOccupyMapper; + + @Override + public int deleteByPrimaryKey(Integer id) { + return orderPileOccupyMapper.deleteByPrimaryKey(id); + } + + @Override + public int insert(OrderPileOccupy record) { + return orderPileOccupyMapper.insert(record); + } + + @Override + public int insertOrUpdate(OrderPileOccupy record) { + return orderPileOccupyMapper.insertOrUpdate(record); + } + + @Override + public int insertOrUpdateSelective(OrderPileOccupy record) { + return orderPileOccupyMapper.insertOrUpdateSelective(record); + } + + @Override + public int insertSelective(OrderPileOccupy record) { + return orderPileOccupyMapper.insertSelective(record); + } + + @Override + public OrderPileOccupy selectByPrimaryKey(Integer id) { + return orderPileOccupyMapper.selectByPrimaryKey(id); + } + + @Override + public int updateByPrimaryKeySelective(OrderPileOccupy record) { + return orderPileOccupyMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int updateByPrimaryKey(OrderPileOccupy record) { + return orderPileOccupyMapper.updateByPrimaryKey(record); + } + + @Override + public int updateBatch(List list) { + return orderPileOccupyMapper.updateBatch(list); + } + + @Override + public int updateBatchSelective(List list) { + return orderPileOccupyMapper.updateBatchSelective(list); + } + + @Override + public int batchInsert(List list) { + return orderPileOccupyMapper.batchInsert(list); + } + +} diff --git a/jsowell-pile/src/main/resources/mapper/pile/OrderPileOccupyMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/OrderPileOccupyMapper.xml new file mode 100644 index 000000000..e11f77066 --- /dev/null +++ b/jsowell-pile/src/main/resources/mapper/pile/OrderPileOccupyMapper.xml @@ -0,0 +1,517 @@ + + + + + + + + + + + + + + + + + + + + + + id, `status`, order_code, transaction_code, member_id, start_time, end_time, create_time, + create_by, update_time, update_by, del_flag + + + + + delete from order_pile_occupy + where id = #{id,jdbcType=INTEGER} + + + + insert into order_pile_occupy (`status`, order_code, transaction_code, + member_id, start_time, end_time, + create_time, create_by, update_time, + update_by, del_flag) + values (#{status,jdbcType=CHAR}, #{orderCode,jdbcType=VARCHAR}, #{transactionCode,jdbcType=VARCHAR}, + #{memberId,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, + #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR}) + + + + insert into order_pile_occupy + + + `status`, + + + order_code, + + + transaction_code, + + + member_id, + + + start_time, + + + end_time, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + del_flag, + + + + + #{status,jdbcType=CHAR}, + + + #{orderCode,jdbcType=VARCHAR}, + + + #{transactionCode,jdbcType=VARCHAR}, + + + #{memberId,jdbcType=VARCHAR}, + + + #{startTime,jdbcType=TIMESTAMP}, + + + #{endTime,jdbcType=TIMESTAMP}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{delFlag,jdbcType=CHAR}, + + + + + + update order_pile_occupy + + + `status` = #{status,jdbcType=CHAR}, + + + order_code = #{orderCode,jdbcType=VARCHAR}, + + + transaction_code = #{transactionCode,jdbcType=VARCHAR}, + + + member_id = #{memberId,jdbcType=VARCHAR}, + + + start_time = #{startTime,jdbcType=TIMESTAMP}, + + + end_time = #{endTime,jdbcType=TIMESTAMP}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=CHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + update order_pile_occupy + set `status` = #{status,jdbcType=CHAR}, + order_code = #{orderCode,jdbcType=VARCHAR}, + transaction_code = #{transactionCode,jdbcType=VARCHAR}, + member_id = #{memberId,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=TIMESTAMP}, + end_time = #{endTime,jdbcType=TIMESTAMP}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=CHAR} + where id = #{id,jdbcType=INTEGER} + + + + update order_pile_occupy + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=CHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.transactionCode,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.startTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.endTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=CHAR} + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + update order_pile_occupy + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=CHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.transactionCode,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.startTime,jdbcType=TIMESTAMP} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.endTime,jdbcType=TIMESTAMP} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=CHAR} + + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + insert into order_pile_occupy + (`status`, order_code, transaction_code, member_id, start_time, end_time, create_time, + create_by, update_time, update_by, del_flag) + values + + (#{item.status,jdbcType=CHAR}, #{item.orderCode,jdbcType=VARCHAR}, #{item.transactionCode,jdbcType=VARCHAR}, + #{item.memberId,jdbcType=VARCHAR}, #{item.startTime,jdbcType=TIMESTAMP}, #{item.endTime,jdbcType=TIMESTAMP}, + #{item.createTime,jdbcType=TIMESTAMP}, #{item.createBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, + #{item.updateBy,jdbcType=VARCHAR}, #{item.delFlag,jdbcType=CHAR}) + + + + + insert into order_pile_occupy + + + id, + + `status`, + order_code, + transaction_code, + member_id, + start_time, + end_time, + create_time, + create_by, + update_time, + update_by, + del_flag, + + values + + + #{id,jdbcType=INTEGER}, + + #{status,jdbcType=CHAR}, + #{orderCode,jdbcType=VARCHAR}, + #{transactionCode,jdbcType=VARCHAR}, + #{memberId,jdbcType=VARCHAR}, + #{startTime,jdbcType=TIMESTAMP}, + #{endTime,jdbcType=TIMESTAMP}, + #{createTime,jdbcType=TIMESTAMP}, + #{createBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, + #{delFlag,jdbcType=CHAR}, + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + `status` = #{status,jdbcType=CHAR}, + order_code = #{orderCode,jdbcType=VARCHAR}, + transaction_code = #{transactionCode,jdbcType=VARCHAR}, + member_id = #{memberId,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=TIMESTAMP}, + end_time = #{endTime,jdbcType=TIMESTAMP}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=CHAR}, + + + + + insert into order_pile_occupy + + + id, + + + `status`, + + + order_code, + + + transaction_code, + + + member_id, + + + start_time, + + + end_time, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + del_flag, + + + values + + + #{id,jdbcType=INTEGER}, + + + #{status,jdbcType=CHAR}, + + + #{orderCode,jdbcType=VARCHAR}, + + + #{transactionCode,jdbcType=VARCHAR}, + + + #{memberId,jdbcType=VARCHAR}, + + + #{startTime,jdbcType=TIMESTAMP}, + + + #{endTime,jdbcType=TIMESTAMP}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{delFlag,jdbcType=CHAR}, + + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + + `status` = #{status,jdbcType=CHAR}, + + + order_code = #{orderCode,jdbcType=VARCHAR}, + + + transaction_code = #{transactionCode,jdbcType=VARCHAR}, + + + member_id = #{memberId,jdbcType=VARCHAR}, + + + start_time = #{startTime,jdbcType=TIMESTAMP}, + + + end_time = #{endTime,jdbcType=TIMESTAMP}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=CHAR}, + + + + \ No newline at end of file