new-dev
胡锐 1 year ago
parent 3a55528375
commit e318408a84
  1. 169
      hai-service/src/main/java/com/hai/dao/ApiBlxOrderMapper.java
  2. 7
      hai-service/src/main/java/com/hai/dao/ApiBlxOrderMapperExt.java
  3. 486
      hai-service/src/main/java/com/hai/dao/ApiBlxOrderSqlProvider.java
  4. 418
      hai-service/src/main/java/com/hai/entity/ApiBlxOrder.java
  5. 1704
      hai-service/src/main/java/com/hai/entity/ApiBlxOrderExample.java

@ -0,0 +1,169 @@
package com.hai.dao;
import com.hai.entity.ApiBlxOrder;
import com.hai.entity.ApiBlxOrderExample;
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;
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;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@SelectProvider(type=ApiBlxOrderSqlProvider.class, method="countByExample")
long countByExample(ApiBlxOrderExample example);
@DeleteProvider(type=ApiBlxOrderSqlProvider.class, method="deleteByExample")
int deleteByExample(ApiBlxOrderExample example);
@Delete({
"delete from api_blx_order",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into api_blx_order (mer_id, order_id, ",
"mer_order_id, park_order_id, ",
"in_time, out_time, ",
"park_time, park_name, ",
"park_id, car_seat_id, ",
"prak_price, coupon_price, ",
"order_type, order_status, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3, ",
"ext_4, ext_5, ext_6)",
"values (#{merId,jdbcType=VARCHAR}, #{orderId,jdbcType=BIGINT}, ",
"#{merOrderId,jdbcType=VARCHAR}, #{parkOrderId,jdbcType=VARCHAR}, ",
"#{inTime,jdbcType=TIMESTAMP}, #{outTime,jdbcType=TIMESTAMP}, ",
"#{parkTime,jdbcType=INTEGER}, #{parkName,jdbcType=VARCHAR}, ",
"#{parkId,jdbcType=BIGINT}, #{carSeatId,jdbcType=BIGINT}, ",
"#{prakPrice,jdbcType=DECIMAL}, #{couponPrice,jdbcType=DECIMAL}, ",
"#{orderType,jdbcType=INTEGER}, #{orderStatus,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(ApiBlxOrder record);
@InsertProvider(type=ApiBlxOrderSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(ApiBlxOrder record);
@SelectProvider(type=ApiBlxOrderSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.VARCHAR),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_order_id", property="merOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="out_time", property="outTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="park_time", property="parkTime", jdbcType=JdbcType.INTEGER),
@Result(column="park_name", property="parkName", jdbcType=JdbcType.VARCHAR),
@Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT),
@Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.BIGINT),
@Result(column="prak_price", property="prakPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER),
@Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@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),
@Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_5", property="ext5", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_6", property="ext6", jdbcType=JdbcType.VARCHAR)
})
List<ApiBlxOrder> selectByExample(ApiBlxOrderExample example);
@Select({
"select",
"id, mer_id, order_id, mer_order_id, park_order_id, in_time, out_time, park_time, ",
"park_name, park_id, car_seat_id, prak_price, coupon_price, order_type, order_status, ",
"create_time, update_time, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"from api_blx_order",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.VARCHAR),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_order_id", property="merOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="out_time", property="outTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="park_time", property="parkTime", jdbcType=JdbcType.INTEGER),
@Result(column="park_name", property="parkName", jdbcType=JdbcType.VARCHAR),
@Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT),
@Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.BIGINT),
@Result(column="prak_price", property="prakPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER),
@Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@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),
@Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_5", property="ext5", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_6", property="ext6", jdbcType=JdbcType.VARCHAR)
})
ApiBlxOrder selectByPrimaryKey(Long id);
@UpdateProvider(type=ApiBlxOrderSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") ApiBlxOrder record, @Param("example") ApiBlxOrderExample example);
@UpdateProvider(type=ApiBlxOrderSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") ApiBlxOrder record, @Param("example") ApiBlxOrderExample example);
@UpdateProvider(type=ApiBlxOrderSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(ApiBlxOrder record);
@Update({
"update api_blx_order",
"set mer_id = #{merId,jdbcType=VARCHAR},",
"order_id = #{orderId,jdbcType=BIGINT},",
"mer_order_id = #{merOrderId,jdbcType=VARCHAR},",
"park_order_id = #{parkOrderId,jdbcType=VARCHAR},",
"in_time = #{inTime,jdbcType=TIMESTAMP},",
"out_time = #{outTime,jdbcType=TIMESTAMP},",
"park_time = #{parkTime,jdbcType=INTEGER},",
"park_name = #{parkName,jdbcType=VARCHAR},",
"park_id = #{parkId,jdbcType=BIGINT},",
"car_seat_id = #{carSeatId,jdbcType=BIGINT},",
"prak_price = #{prakPrice,jdbcType=DECIMAL},",
"coupon_price = #{couponPrice,jdbcType=DECIMAL},",
"order_type = #{orderType,jdbcType=INTEGER},",
"order_status = #{orderStatus,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR},",
"ext_4 = #{ext4,jdbcType=VARCHAR},",
"ext_5 = #{ext5,jdbcType=VARCHAR},",
"ext_6 = #{ext6,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(ApiBlxOrder record);
}

@ -0,0 +1,7 @@
package com.hai.dao;
/**
* mapper扩展类
*/
public interface ApiBlxOrderMapperExt {
}

@ -0,0 +1,486 @@
package com.hai.dao;
import com.hai.entity.ApiBlxOrder;
import com.hai.entity.ApiBlxOrderExample.Criteria;
import com.hai.entity.ApiBlxOrderExample.Criterion;
import com.hai.entity.ApiBlxOrderExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class ApiBlxOrderSqlProvider {
public String countByExample(ApiBlxOrderExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("api_blx_order");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(ApiBlxOrderExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("api_blx_order");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(ApiBlxOrder record) {
SQL sql = new SQL();
sql.INSERT_INTO("api_blx_order");
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) {
sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}");
}
if (record.getMerOrderId() != null) {
sql.VALUES("mer_order_id", "#{merOrderId,jdbcType=VARCHAR}");
}
if (record.getParkOrderId() != null) {
sql.VALUES("park_order_id", "#{parkOrderId,jdbcType=VARCHAR}");
}
if (record.getInTime() != null) {
sql.VALUES("in_time", "#{inTime,jdbcType=TIMESTAMP}");
}
if (record.getOutTime() != null) {
sql.VALUES("out_time", "#{outTime,jdbcType=TIMESTAMP}");
}
if (record.getParkTime() != null) {
sql.VALUES("park_time", "#{parkTime,jdbcType=INTEGER}");
}
if (record.getParkName() != null) {
sql.VALUES("park_name", "#{parkName,jdbcType=VARCHAR}");
}
if (record.getParkId() != null) {
sql.VALUES("park_id", "#{parkId,jdbcType=BIGINT}");
}
if (record.getCarSeatId() != null) {
sql.VALUES("car_seat_id", "#{carSeatId,jdbcType=BIGINT}");
}
if (record.getPrakPrice() != null) {
sql.VALUES("prak_price", "#{prakPrice,jdbcType=DECIMAL}");
}
if (record.getCouponPrice() != null) {
sql.VALUES("coupon_price", "#{couponPrice,jdbcType=DECIMAL}");
}
if (record.getOrderType() != null) {
sql.VALUES("order_type", "#{orderType,jdbcType=INTEGER}");
}
if (record.getOrderStatus() != null) {
sql.VALUES("order_status", "#{orderStatus,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
if (record.getExt4() != null) {
sql.VALUES("ext_4", "#{ext4,jdbcType=VARCHAR}");
}
if (record.getExt5() != null) {
sql.VALUES("ext_5", "#{ext5,jdbcType=VARCHAR}");
}
if (record.getExt6() != null) {
sql.VALUES("ext_6", "#{ext6,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(ApiBlxOrderExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("mer_id");
sql.SELECT("order_id");
sql.SELECT("mer_order_id");
sql.SELECT("park_order_id");
sql.SELECT("in_time");
sql.SELECT("out_time");
sql.SELECT("park_time");
sql.SELECT("park_name");
sql.SELECT("park_id");
sql.SELECT("car_seat_id");
sql.SELECT("prak_price");
sql.SELECT("coupon_price");
sql.SELECT("order_type");
sql.SELECT("order_status");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.SELECT("ext_4");
sql.SELECT("ext_5");
sql.SELECT("ext_6");
sql.FROM("api_blx_order");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
ApiBlxOrder record = (ApiBlxOrder) parameter.get("record");
ApiBlxOrderExample example = (ApiBlxOrderExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("api_blx_order");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) {
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
}
if (record.getMerOrderId() != null) {
sql.SET("mer_order_id = #{record.merOrderId,jdbcType=VARCHAR}");
}
if (record.getParkOrderId() != null) {
sql.SET("park_order_id = #{record.parkOrderId,jdbcType=VARCHAR}");
}
if (record.getInTime() != null) {
sql.SET("in_time = #{record.inTime,jdbcType=TIMESTAMP}");
}
if (record.getOutTime() != null) {
sql.SET("out_time = #{record.outTime,jdbcType=TIMESTAMP}");
}
if (record.getParkTime() != null) {
sql.SET("park_time = #{record.parkTime,jdbcType=INTEGER}");
}
if (record.getParkName() != null) {
sql.SET("park_name = #{record.parkName,jdbcType=VARCHAR}");
}
if (record.getParkId() != null) {
sql.SET("park_id = #{record.parkId,jdbcType=BIGINT}");
}
if (record.getCarSeatId() != null) {
sql.SET("car_seat_id = #{record.carSeatId,jdbcType=BIGINT}");
}
if (record.getPrakPrice() != null) {
sql.SET("prak_price = #{record.prakPrice,jdbcType=DECIMAL}");
}
if (record.getCouponPrice() != null) {
sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}");
}
if (record.getOrderType() != null) {
sql.SET("order_type = #{record.orderType,jdbcType=INTEGER}");
}
if (record.getOrderStatus() != null) {
sql.SET("order_status = #{record.orderStatus,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
if (record.getExt4() != null) {
sql.SET("ext_4 = #{record.ext4,jdbcType=VARCHAR}");
}
if (record.getExt5() != null) {
sql.SET("ext_5 = #{record.ext5,jdbcType=VARCHAR}");
}
if (record.getExt6() != null) {
sql.SET("ext_6 = #{record.ext6,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("api_blx_order");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("mer_id = #{record.merId,jdbcType=VARCHAR}");
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
sql.SET("mer_order_id = #{record.merOrderId,jdbcType=VARCHAR}");
sql.SET("park_order_id = #{record.parkOrderId,jdbcType=VARCHAR}");
sql.SET("in_time = #{record.inTime,jdbcType=TIMESTAMP}");
sql.SET("out_time = #{record.outTime,jdbcType=TIMESTAMP}");
sql.SET("park_time = #{record.parkTime,jdbcType=INTEGER}");
sql.SET("park_name = #{record.parkName,jdbcType=VARCHAR}");
sql.SET("park_id = #{record.parkId,jdbcType=BIGINT}");
sql.SET("car_seat_id = #{record.carSeatId,jdbcType=BIGINT}");
sql.SET("prak_price = #{record.prakPrice,jdbcType=DECIMAL}");
sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}");
sql.SET("order_type = #{record.orderType,jdbcType=INTEGER}");
sql.SET("order_status = #{record.orderStatus,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
sql.SET("ext_4 = #{record.ext4,jdbcType=VARCHAR}");
sql.SET("ext_5 = #{record.ext5,jdbcType=VARCHAR}");
sql.SET("ext_6 = #{record.ext6,jdbcType=VARCHAR}");
ApiBlxOrderExample example = (ApiBlxOrderExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(ApiBlxOrder record) {
SQL sql = new SQL();
sql.UPDATE("api_blx_order");
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) {
sql.SET("order_id = #{orderId,jdbcType=BIGINT}");
}
if (record.getMerOrderId() != null) {
sql.SET("mer_order_id = #{merOrderId,jdbcType=VARCHAR}");
}
if (record.getParkOrderId() != null) {
sql.SET("park_order_id = #{parkOrderId,jdbcType=VARCHAR}");
}
if (record.getInTime() != null) {
sql.SET("in_time = #{inTime,jdbcType=TIMESTAMP}");
}
if (record.getOutTime() != null) {
sql.SET("out_time = #{outTime,jdbcType=TIMESTAMP}");
}
if (record.getParkTime() != null) {
sql.SET("park_time = #{parkTime,jdbcType=INTEGER}");
}
if (record.getParkName() != null) {
sql.SET("park_name = #{parkName,jdbcType=VARCHAR}");
}
if (record.getParkId() != null) {
sql.SET("park_id = #{parkId,jdbcType=BIGINT}");
}
if (record.getCarSeatId() != null) {
sql.SET("car_seat_id = #{carSeatId,jdbcType=BIGINT}");
}
if (record.getPrakPrice() != null) {
sql.SET("prak_price = #{prakPrice,jdbcType=DECIMAL}");
}
if (record.getCouponPrice() != null) {
sql.SET("coupon_price = #{couponPrice,jdbcType=DECIMAL}");
}
if (record.getOrderType() != null) {
sql.SET("order_type = #{orderType,jdbcType=INTEGER}");
}
if (record.getOrderStatus() != null) {
sql.SET("order_status = #{orderStatus,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
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}");
}
if (record.getExt4() != null) {
sql.SET("ext_4 = #{ext4,jdbcType=VARCHAR}");
}
if (record.getExt5() != null) {
sql.SET("ext_5 = #{ext5,jdbcType=VARCHAR}");
}
if (record.getExt6() != null) {
sql.SET("ext_6 = #{ext6,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, ApiBlxOrderExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -0,0 +1,418 @@
package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* api_blx_order
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class ApiBlxOrder implements Serializable {
/**
* ID
*/
private Long id;
/**
* 商户Id
*/
private String merId;
/**
* 订单ID
*/
private Long orderId;
/**
* 商户订单ID
*/
private String merOrderId;
/**
* 停车订单ID
*/
private String parkOrderId;
/**
* 入场时间
*/
private Date inTime;
/**
* 出场时间
*/
private Date outTime;
/**
* 停车时长
*/
private Integer parkTime;
/**
* 停车场名称
*/
private String parkName;
/**
* 停车场Id
*/
private Long parkId;
/**
* 车位ID
*/
private Long carSeatId;
/**
* 停车金额
*/
private BigDecimal prakPrice;
/**
* 停车券金额
*/
private BigDecimal couponPrice;
/**
* 订单类型10-路边订单20-室内订单
*/
private Integer orderType;
/**
* 订单状态01-已下单02-已取消03-停车中04-待支付05-已完成
*/
private Integer orderStatus;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* ext_1
*/
private String ext1;
/**
* ext_2
*/
private String ext2;
/**
* ext_3
*/
private String ext3;
/**
* ext_4
*/
private String ext4;
/**
* ext_5
*/
private String ext5;
/**
* ext_6
*/
private String ext6;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getMerId() {
return merId;
}
public void setMerId(String merId) {
this.merId = merId;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public String getMerOrderId() {
return merOrderId;
}
public void setMerOrderId(String merOrderId) {
this.merOrderId = merOrderId;
}
public String getParkOrderId() {
return parkOrderId;
}
public void setParkOrderId(String parkOrderId) {
this.parkOrderId = parkOrderId;
}
public Date getInTime() {
return inTime;
}
public void setInTime(Date inTime) {
this.inTime = inTime;
}
public Date getOutTime() {
return outTime;
}
public void setOutTime(Date outTime) {
this.outTime = outTime;
}
public Integer getParkTime() {
return parkTime;
}
public void setParkTime(Integer parkTime) {
this.parkTime = parkTime;
}
public String getParkName() {
return parkName;
}
public void setParkName(String parkName) {
this.parkName = parkName;
}
public Long getParkId() {
return parkId;
}
public void setParkId(Long parkId) {
this.parkId = parkId;
}
public Long getCarSeatId() {
return carSeatId;
}
public void setCarSeatId(Long carSeatId) {
this.carSeatId = carSeatId;
}
public BigDecimal getPrakPrice() {
return prakPrice;
}
public void setPrakPrice(BigDecimal prakPrice) {
this.prakPrice = prakPrice;
}
public BigDecimal getCouponPrice() {
return couponPrice;
}
public void setCouponPrice(BigDecimal couponPrice) {
this.couponPrice = couponPrice;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
public Integer getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(Integer orderStatus) {
this.orderStatus = orderStatus;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
public String getExt4() {
return ext4;
}
public void setExt4(String ext4) {
this.ext4 = ext4;
}
public String getExt5() {
return ext5;
}
public void setExt5(String ext5) {
this.ext5 = ext5;
}
public String getExt6() {
return ext6;
}
public void setExt6(String ext6) {
this.ext6 = ext6;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
ApiBlxOrder other = (ApiBlxOrder) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getMerOrderId() == null ? other.getMerOrderId() == null : this.getMerOrderId().equals(other.getMerOrderId()))
&& (this.getParkOrderId() == null ? other.getParkOrderId() == null : this.getParkOrderId().equals(other.getParkOrderId()))
&& (this.getInTime() == null ? other.getInTime() == null : this.getInTime().equals(other.getInTime()))
&& (this.getOutTime() == null ? other.getOutTime() == null : this.getOutTime().equals(other.getOutTime()))
&& (this.getParkTime() == null ? other.getParkTime() == null : this.getParkTime().equals(other.getParkTime()))
&& (this.getParkName() == null ? other.getParkName() == null : this.getParkName().equals(other.getParkName()))
&& (this.getParkId() == null ? other.getParkId() == null : this.getParkId().equals(other.getParkId()))
&& (this.getCarSeatId() == null ? other.getCarSeatId() == null : this.getCarSeatId().equals(other.getCarSeatId()))
&& (this.getPrakPrice() == null ? other.getPrakPrice() == null : this.getPrakPrice().equals(other.getPrakPrice()))
&& (this.getCouponPrice() == null ? other.getCouponPrice() == null : this.getCouponPrice().equals(other.getCouponPrice()))
&& (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
&& (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()))
&& (this.getExt4() == null ? other.getExt4() == null : this.getExt4().equals(other.getExt4()))
&& (this.getExt5() == null ? other.getExt5() == null : this.getExt5().equals(other.getExt5()))
&& (this.getExt6() == null ? other.getExt6() == null : this.getExt6().equals(other.getExt6()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getMerOrderId() == null) ? 0 : getMerOrderId().hashCode());
result = prime * result + ((getParkOrderId() == null) ? 0 : getParkOrderId().hashCode());
result = prime * result + ((getInTime() == null) ? 0 : getInTime().hashCode());
result = prime * result + ((getOutTime() == null) ? 0 : getOutTime().hashCode());
result = prime * result + ((getParkTime() == null) ? 0 : getParkTime().hashCode());
result = prime * result + ((getParkName() == null) ? 0 : getParkName().hashCode());
result = prime * result + ((getParkId() == null) ? 0 : getParkId().hashCode());
result = prime * result + ((getCarSeatId() == null) ? 0 : getCarSeatId().hashCode());
result = prime * result + ((getPrakPrice() == null) ? 0 : getPrakPrice().hashCode());
result = prime * result + ((getCouponPrice() == null) ? 0 : getCouponPrice().hashCode());
result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
result = prime * result + ((getExt4() == null) ? 0 : getExt4().hashCode());
result = prime * result + ((getExt5() == null) ? 0 : getExt5().hashCode());
result = prime * result + ((getExt6() == null) ? 0 : getExt6().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", merId=").append(merId);
sb.append(", orderId=").append(orderId);
sb.append(", merOrderId=").append(merOrderId);
sb.append(", parkOrderId=").append(parkOrderId);
sb.append(", inTime=").append(inTime);
sb.append(", outTime=").append(outTime);
sb.append(", parkTime=").append(parkTime);
sb.append(", parkName=").append(parkName);
sb.append(", parkId=").append(parkId);
sb.append(", carSeatId=").append(carSeatId);
sb.append(", prakPrice=").append(prakPrice);
sb.append(", couponPrice=").append(couponPrice);
sb.append(", orderType=").append(orderType);
sb.append(", orderStatus=").append(orderStatus);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", ext4=").append(ext4);
sb.append(", ext5=").append(ext5);
sb.append(", ext6=").append(ext6);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
Loading…
Cancel
Save