袁野 3 months ago
parent 37338983de
commit 1c637deefd
  1. 110
      service/src/main/java/com/hfkj/dao/BsOrderCinemaMapper.java
  2. 157
      service/src/main/java/com/hfkj/dao/BsOrderCinemaSqlProvider.java

@ -3,6 +3,7 @@ package com.hfkj.dao;
import com.hfkj.entity.BsOrderCinema;
import com.hfkj.entity.BsOrderCinemaExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
@ -10,7 +11,9 @@ import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
@ -29,6 +32,12 @@ public interface BsOrderCinemaMapper extends BsOrderCinemaMapperExt {
@DeleteProvider(type=BsOrderCinemaSqlProvider.class, method="deleteByExample")
int deleteByExample(BsOrderCinemaExample example);
@Delete({
"delete from bs_order_cinema",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_order_cinema (draw_mode, accept_adjust, ",
"cinema_id, show_id, ",
@ -76,7 +85,7 @@ public interface BsOrderCinemaMapper extends BsOrderCinemaMapperExt {
@SelectProvider(type=BsOrderCinemaSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT),
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="draw_mode", property="drawMode", jdbcType=JdbcType.INTEGER),
@Result(column="accept_adjust", property="acceptAdjust", jdbcType=JdbcType.BIT),
@Result(column="cinema_id", property="cinemaId", jdbcType=JdbcType.INTEGER),
@ -117,9 +126,108 @@ public interface BsOrderCinemaMapper extends BsOrderCinemaMapperExt {
})
List<BsOrderCinema> selectByExample(BsOrderCinemaExample example);
@Select({
"select",
"id, draw_mode, accept_adjust, cinema_id, show_id, film_id, seats_count, seats, ",
"img, goods_name, goods_specs_name, platform_code, order_no, child_order_no, ",
"channel_order_no, mer_id, user_id, user_phone, total_price, total_deduction_price, ",
"coupon_discount_price, integral_discount_price, pay_real_price, pay_channel, ",
"pay_serial_no, pay_type, `status`, create_time, pay_time, cancel_time, refund_time, ",
"finish_time, update_time, exception_status, exception_msg, ext_1, ext_2, ext_3",
"from bs_order_cinema",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="draw_mode", property="drawMode", jdbcType=JdbcType.INTEGER),
@Result(column="accept_adjust", property="acceptAdjust", jdbcType=JdbcType.BIT),
@Result(column="cinema_id", property="cinemaId", jdbcType=JdbcType.INTEGER),
@Result(column="show_id", property="showId", jdbcType=JdbcType.BIGINT),
@Result(column="film_id", property="filmId", jdbcType=JdbcType.INTEGER),
@Result(column="seats_count", property="seatsCount", jdbcType=JdbcType.INTEGER),
@Result(column="seats", property="seats", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_specs_name", property="goodsSpecsName", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_code", property="platformCode", jdbcType=JdbcType.VARCHAR),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="coupon_discount_price", property="couponDiscountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="integral_discount_price", property="integralDiscountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_channel", property="payChannel", jdbcType=JdbcType.INTEGER),
@Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT),
@Result(column="exception_msg", property="exceptionMsg", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
BsOrderCinema selectByPrimaryKey(Long id);
@UpdateProvider(type=BsOrderCinemaSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsOrderCinema record, @Param("example") BsOrderCinemaExample example);
@UpdateProvider(type=BsOrderCinemaSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsOrderCinema record, @Param("example") BsOrderCinemaExample example);
@UpdateProvider(type=BsOrderCinemaSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsOrderCinema record);
@Update({
"update bs_order_cinema",
"set draw_mode = #{drawMode,jdbcType=INTEGER},",
"accept_adjust = #{acceptAdjust,jdbcType=BIT},",
"cinema_id = #{cinemaId,jdbcType=INTEGER},",
"show_id = #{showId,jdbcType=BIGINT},",
"film_id = #{filmId,jdbcType=INTEGER},",
"seats_count = #{seatsCount,jdbcType=INTEGER},",
"seats = #{seats,jdbcType=VARCHAR},",
"img = #{img,jdbcType=VARCHAR},",
"goods_name = #{goodsName,jdbcType=VARCHAR},",
"goods_specs_name = #{goodsSpecsName,jdbcType=VARCHAR},",
"platform_code = #{platformCode,jdbcType=VARCHAR},",
"order_no = #{orderNo,jdbcType=VARCHAR},",
"child_order_no = #{childOrderNo,jdbcType=VARCHAR},",
"channel_order_no = #{channelOrderNo,jdbcType=VARCHAR},",
"mer_id = #{merId,jdbcType=BIGINT},",
"user_id = #{userId,jdbcType=BIGINT},",
"user_phone = #{userPhone,jdbcType=VARCHAR},",
"total_price = #{totalPrice,jdbcType=DECIMAL},",
"total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL},",
"coupon_discount_price = #{couponDiscountPrice,jdbcType=DECIMAL},",
"integral_discount_price = #{integralDiscountPrice,jdbcType=DECIMAL},",
"pay_real_price = #{payRealPrice,jdbcType=DECIMAL},",
"pay_channel = #{payChannel,jdbcType=INTEGER},",
"pay_serial_no = #{paySerialNo,jdbcType=VARCHAR},",
"pay_type = #{payType,jdbcType=INTEGER},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"pay_time = #{payTime,jdbcType=TIMESTAMP},",
"cancel_time = #{cancelTime,jdbcType=TIMESTAMP},",
"refund_time = #{refundTime,jdbcType=TIMESTAMP},",
"finish_time = #{finishTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"exception_status = #{exceptionStatus,jdbcType=BIT},",
"exception_msg = #{exceptionMsg,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsOrderCinema record);
}

@ -444,6 +444,163 @@ public class BsOrderCinemaSqlProvider {
return sql.toString();
}
public String updateByPrimaryKeySelective(BsOrderCinema record) {
SQL sql = new SQL();
sql.UPDATE("bs_order_cinema");
if (record.getDrawMode() != null) {
sql.SET("draw_mode = #{drawMode,jdbcType=INTEGER}");
}
if (record.getAcceptAdjust() != null) {
sql.SET("accept_adjust = #{acceptAdjust,jdbcType=BIT}");
}
if (record.getCinemaId() != null) {
sql.SET("cinema_id = #{cinemaId,jdbcType=INTEGER}");
}
if (record.getShowId() != null) {
sql.SET("show_id = #{showId,jdbcType=BIGINT}");
}
if (record.getFilmId() != null) {
sql.SET("film_id = #{filmId,jdbcType=INTEGER}");
}
if (record.getSeatsCount() != null) {
sql.SET("seats_count = #{seatsCount,jdbcType=INTEGER}");
}
if (record.getSeats() != null) {
sql.SET("seats = #{seats,jdbcType=VARCHAR}");
}
if (record.getImg() != null) {
sql.SET("img = #{img,jdbcType=VARCHAR}");
}
if (record.getGoodsName() != null) {
sql.SET("goods_name = #{goodsName,jdbcType=VARCHAR}");
}
if (record.getGoodsSpecsName() != null) {
sql.SET("goods_specs_name = #{goodsSpecsName,jdbcType=VARCHAR}");
}
if (record.getPlatformCode() != null) {
sql.SET("platform_code = #{platformCode,jdbcType=VARCHAR}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.SET("child_order_no = #{childOrderNo,jdbcType=VARCHAR}");
}
if (record.getChannelOrderNo() != null) {
sql.SET("channel_order_no = #{channelOrderNo,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}");
}
if (record.getTotalPrice() != null) {
sql.SET("total_price = #{totalPrice,jdbcType=DECIMAL}");
}
if (record.getTotalDeductionPrice() != null) {
sql.SET("total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL}");
}
if (record.getCouponDiscountPrice() != null) {
sql.SET("coupon_discount_price = #{couponDiscountPrice,jdbcType=DECIMAL}");
}
if (record.getIntegralDiscountPrice() != null) {
sql.SET("integral_discount_price = #{integralDiscountPrice,jdbcType=DECIMAL}");
}
if (record.getPayRealPrice() != null) {
sql.SET("pay_real_price = #{payRealPrice,jdbcType=DECIMAL}");
}
if (record.getPayChannel() != null) {
sql.SET("pay_channel = #{payChannel,jdbcType=INTEGER}");
}
if (record.getPaySerialNo() != null) {
sql.SET("pay_serial_no = #{paySerialNo,jdbcType=VARCHAR}");
}
if (record.getPayType() != null) {
sql.SET("pay_type = #{payType,jdbcType=INTEGER}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getPayTime() != null) {
sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}");
}
if (record.getCancelTime() != null) {
sql.SET("cancel_time = #{cancelTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.SET("refund_time = #{refundTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{finishTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExceptionStatus() != null) {
sql.SET("exception_status = #{exceptionStatus,jdbcType=BIT}");
}
if (record.getExceptionMsg() != null) {
sql.SET("exception_msg = #{exceptionMsg,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, BsOrderCinemaExample example, boolean includeExamplePhrase) {
if (example == null) {
return;

Loading…
Cancel
Save