提交代码

dev-discount
胡锐 3 years ago
parent 0874be55bc
commit b19527edf2
  1. 183
      hai-service/src/main/java/com/hai/dao/HighOrderPreMapper.java
  2. 7
      hai-service/src/main/java/com/hai/dao/HighOrderPreMapperExt.java
  3. 528
      hai-service/src/main/java/com/hai/dao/HighOrderPreSqlProvider.java
  4. 451
      hai-service/src/main/java/com/hai/entity/HighOrderPre.java
  5. 1914
      hai-service/src/main/java/com/hai/entity/HighOrderPreExample.java

@ -0,0 +1,183 @@
package com.hai.dao;
import com.hai.entity.HighOrderPre;
import com.hai.entity.HighOrderPreExample;
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 HighOrderPreMapper extends HighOrderPreMapperExt {
@SelectProvider(type=HighOrderPreSqlProvider.class, method="countByExample")
long countByExample(HighOrderPreExample example);
@DeleteProvider(type=HighOrderPreSqlProvider.class, method="deleteByExample")
int deleteByExample(HighOrderPreExample example);
@Delete({
"delete from high_order_pre",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_order_pre (company_id, merchant_id, ",
"agent_id, pre_order_no, ",
"order_id, order_no, ",
"child_order_id, pay_real_price, ",
"goods_type, goods_id, ",
"goods_name, pre_user_id, ",
"pre_user_name, pre_user_phone, ",
"pre_user_remark, stauts, ",
"status_fail_desc, status_cancel_desc, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3, ",
"ext_4, ext_5)",
"values (#{companyId,jdbcType=BIGINT}, #{merchantId,jdbcType=BIGINT}, ",
"#{agentId,jdbcType=BIGINT}, #{preOrderNo,jdbcType=VARCHAR}, ",
"#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{childOrderId,jdbcType=BIGINT}, #{payRealPrice,jdbcType=DECIMAL}, ",
"#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ",
"#{goodsName,jdbcType=VARCHAR}, #{preUserId,jdbcType=BIGINT}, ",
"#{preUserName,jdbcType=VARCHAR}, #{preUserPhone,jdbcType=VARCHAR}, ",
"#{preUserRemark,jdbcType=VARCHAR}, #{stauts,jdbcType=INTEGER}, ",
"#{statusFailDesc,jdbcType=VARCHAR}, #{statusCancelDesc,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighOrderPre record);
@InsertProvider(type=HighOrderPreSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighOrderPre record);
@SelectProvider(type=HighOrderPreSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="pre_order_no", property="preOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
@Result(column="pre_user_id", property="preUserId", jdbcType=JdbcType.BIGINT),
@Result(column="pre_user_name", property="preUserName", jdbcType=JdbcType.VARCHAR),
@Result(column="pre_user_phone", property="preUserPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="pre_user_remark", property="preUserRemark", jdbcType=JdbcType.VARCHAR),
@Result(column="stauts", property="stauts", jdbcType=JdbcType.INTEGER),
@Result(column="status_fail_desc", property="statusFailDesc", jdbcType=JdbcType.VARCHAR),
@Result(column="status_cancel_desc", property="statusCancelDesc", jdbcType=JdbcType.VARCHAR),
@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)
})
List<HighOrderPre> selectByExample(HighOrderPreExample example);
@Select({
"select",
"id, company_id, merchant_id, agent_id, pre_order_no, order_id, order_no, child_order_id, ",
"pay_real_price, goods_type, goods_id, goods_name, pre_user_id, pre_user_name, ",
"pre_user_phone, pre_user_remark, stauts, status_fail_desc, status_cancel_desc, ",
"create_time, update_time, ext_1, ext_2, ext_3, ext_4, ext_5",
"from high_order_pre",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="pre_order_no", property="preOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
@Result(column="pre_user_id", property="preUserId", jdbcType=JdbcType.BIGINT),
@Result(column="pre_user_name", property="preUserName", jdbcType=JdbcType.VARCHAR),
@Result(column="pre_user_phone", property="preUserPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="pre_user_remark", property="preUserRemark", jdbcType=JdbcType.VARCHAR),
@Result(column="stauts", property="stauts", jdbcType=JdbcType.INTEGER),
@Result(column="status_fail_desc", property="statusFailDesc", jdbcType=JdbcType.VARCHAR),
@Result(column="status_cancel_desc", property="statusCancelDesc", jdbcType=JdbcType.VARCHAR),
@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)
})
HighOrderPre selectByPrimaryKey(Long id);
@UpdateProvider(type=HighOrderPreSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighOrderPre record, @Param("example") HighOrderPreExample example);
@UpdateProvider(type=HighOrderPreSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighOrderPre record, @Param("example") HighOrderPreExample example);
@UpdateProvider(type=HighOrderPreSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighOrderPre record);
@Update({
"update high_order_pre",
"set company_id = #{companyId,jdbcType=BIGINT},",
"merchant_id = #{merchantId,jdbcType=BIGINT},",
"agent_id = #{agentId,jdbcType=BIGINT},",
"pre_order_no = #{preOrderNo,jdbcType=VARCHAR},",
"order_id = #{orderId,jdbcType=BIGINT},",
"order_no = #{orderNo,jdbcType=VARCHAR},",
"child_order_id = #{childOrderId,jdbcType=BIGINT},",
"pay_real_price = #{payRealPrice,jdbcType=DECIMAL},",
"goods_type = #{goodsType,jdbcType=INTEGER},",
"goods_id = #{goodsId,jdbcType=BIGINT},",
"goods_name = #{goodsName,jdbcType=VARCHAR},",
"pre_user_id = #{preUserId,jdbcType=BIGINT},",
"pre_user_name = #{preUserName,jdbcType=VARCHAR},",
"pre_user_phone = #{preUserPhone,jdbcType=VARCHAR},",
"pre_user_remark = #{preUserRemark,jdbcType=VARCHAR},",
"stauts = #{stauts,jdbcType=INTEGER},",
"status_fail_desc = #{statusFailDesc,jdbcType=VARCHAR},",
"status_cancel_desc = #{statusCancelDesc,jdbcType=VARCHAR},",
"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}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighOrderPre record);
}

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

@ -0,0 +1,528 @@
package com.hai.dao;
import com.hai.entity.HighOrderPre;
import com.hai.entity.HighOrderPreExample.Criteria;
import com.hai.entity.HighOrderPreExample.Criterion;
import com.hai.entity.HighOrderPreExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighOrderPreSqlProvider {
public String countByExample(HighOrderPreExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_order_pre");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighOrderPreExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_order_pre");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighOrderPre record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_order_pre");
if (record.getCompanyId() != null) {
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}");
}
if (record.getMerchantId() != null) {
sql.VALUES("merchant_id", "#{merchantId,jdbcType=BIGINT}");
}
if (record.getAgentId() != null) {
sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}");
}
if (record.getPreOrderNo() != null) {
sql.VALUES("pre_order_no", "#{preOrderNo,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) {
sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderId() != null) {
sql.VALUES("child_order_id", "#{childOrderId,jdbcType=BIGINT}");
}
if (record.getPayRealPrice() != null) {
sql.VALUES("pay_real_price", "#{payRealPrice,jdbcType=DECIMAL}");
}
if (record.getGoodsType() != null) {
sql.VALUES("goods_type", "#{goodsType,jdbcType=INTEGER}");
}
if (record.getGoodsId() != null) {
sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}");
}
if (record.getGoodsName() != null) {
sql.VALUES("goods_name", "#{goodsName,jdbcType=VARCHAR}");
}
if (record.getPreUserId() != null) {
sql.VALUES("pre_user_id", "#{preUserId,jdbcType=BIGINT}");
}
if (record.getPreUserName() != null) {
sql.VALUES("pre_user_name", "#{preUserName,jdbcType=VARCHAR}");
}
if (record.getPreUserPhone() != null) {
sql.VALUES("pre_user_phone", "#{preUserPhone,jdbcType=VARCHAR}");
}
if (record.getPreUserRemark() != null) {
sql.VALUES("pre_user_remark", "#{preUserRemark,jdbcType=VARCHAR}");
}
if (record.getStauts() != null) {
sql.VALUES("stauts", "#{stauts,jdbcType=INTEGER}");
}
if (record.getStatusFailDesc() != null) {
sql.VALUES("status_fail_desc", "#{statusFailDesc,jdbcType=VARCHAR}");
}
if (record.getStatusCancelDesc() != null) {
sql.VALUES("status_cancel_desc", "#{statusCancelDesc,jdbcType=VARCHAR}");
}
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}");
}
return sql.toString();
}
public String selectByExample(HighOrderPreExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("company_id");
sql.SELECT("merchant_id");
sql.SELECT("agent_id");
sql.SELECT("pre_order_no");
sql.SELECT("order_id");
sql.SELECT("order_no");
sql.SELECT("child_order_id");
sql.SELECT("pay_real_price");
sql.SELECT("goods_type");
sql.SELECT("goods_id");
sql.SELECT("goods_name");
sql.SELECT("pre_user_id");
sql.SELECT("pre_user_name");
sql.SELECT("pre_user_phone");
sql.SELECT("pre_user_remark");
sql.SELECT("stauts");
sql.SELECT("status_fail_desc");
sql.SELECT("status_cancel_desc");
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.FROM("high_order_pre");
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) {
HighOrderPre record = (HighOrderPre) parameter.get("record");
HighOrderPreExample example = (HighOrderPreExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_order_pre");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getCompanyId() != null) {
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
}
if (record.getMerchantId() != null) {
sql.SET("merchant_id = #{record.merchantId,jdbcType=BIGINT}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
}
if (record.getPreOrderNo() != null) {
sql.SET("pre_order_no = #{record.preOrderNo,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) {
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderId() != null) {
sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}");
}
if (record.getPayRealPrice() != null) {
sql.SET("pay_real_price = #{record.payRealPrice,jdbcType=DECIMAL}");
}
if (record.getGoodsType() != null) {
sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}");
}
if (record.getGoodsId() != null) {
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
}
if (record.getGoodsName() != null) {
sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}");
}
if (record.getPreUserId() != null) {
sql.SET("pre_user_id = #{record.preUserId,jdbcType=BIGINT}");
}
if (record.getPreUserName() != null) {
sql.SET("pre_user_name = #{record.preUserName,jdbcType=VARCHAR}");
}
if (record.getPreUserPhone() != null) {
sql.SET("pre_user_phone = #{record.preUserPhone,jdbcType=VARCHAR}");
}
if (record.getPreUserRemark() != null) {
sql.SET("pre_user_remark = #{record.preUserRemark,jdbcType=VARCHAR}");
}
if (record.getStauts() != null) {
sql.SET("stauts = #{record.stauts,jdbcType=INTEGER}");
}
if (record.getStatusFailDesc() != null) {
sql.SET("status_fail_desc = #{record.statusFailDesc,jdbcType=VARCHAR}");
}
if (record.getStatusCancelDesc() != null) {
sql.SET("status_cancel_desc = #{record.statusCancelDesc,jdbcType=VARCHAR}");
}
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}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("high_order_pre");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("merchant_id = #{record.merchantId,jdbcType=BIGINT}");
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
sql.SET("pre_order_no = #{record.preOrderNo,jdbcType=VARCHAR}");
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}");
sql.SET("pay_real_price = #{record.payRealPrice,jdbcType=DECIMAL}");
sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}");
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}");
sql.SET("pre_user_id = #{record.preUserId,jdbcType=BIGINT}");
sql.SET("pre_user_name = #{record.preUserName,jdbcType=VARCHAR}");
sql.SET("pre_user_phone = #{record.preUserPhone,jdbcType=VARCHAR}");
sql.SET("pre_user_remark = #{record.preUserRemark,jdbcType=VARCHAR}");
sql.SET("stauts = #{record.stauts,jdbcType=INTEGER}");
sql.SET("status_fail_desc = #{record.statusFailDesc,jdbcType=VARCHAR}");
sql.SET("status_cancel_desc = #{record.statusCancelDesc,jdbcType=VARCHAR}");
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}");
HighOrderPreExample example = (HighOrderPreExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighOrderPre record) {
SQL sql = new SQL();
sql.UPDATE("high_order_pre");
if (record.getCompanyId() != null) {
sql.SET("company_id = #{companyId,jdbcType=BIGINT}");
}
if (record.getMerchantId() != null) {
sql.SET("merchant_id = #{merchantId,jdbcType=BIGINT}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{agentId,jdbcType=BIGINT}");
}
if (record.getPreOrderNo() != null) {
sql.SET("pre_order_no = #{preOrderNo,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) {
sql.SET("order_id = #{orderId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderId() != null) {
sql.SET("child_order_id = #{childOrderId,jdbcType=BIGINT}");
}
if (record.getPayRealPrice() != null) {
sql.SET("pay_real_price = #{payRealPrice,jdbcType=DECIMAL}");
}
if (record.getGoodsType() != null) {
sql.SET("goods_type = #{goodsType,jdbcType=INTEGER}");
}
if (record.getGoodsId() != null) {
sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}");
}
if (record.getGoodsName() != null) {
sql.SET("goods_name = #{goodsName,jdbcType=VARCHAR}");
}
if (record.getPreUserId() != null) {
sql.SET("pre_user_id = #{preUserId,jdbcType=BIGINT}");
}
if (record.getPreUserName() != null) {
sql.SET("pre_user_name = #{preUserName,jdbcType=VARCHAR}");
}
if (record.getPreUserPhone() != null) {
sql.SET("pre_user_phone = #{preUserPhone,jdbcType=VARCHAR}");
}
if (record.getPreUserRemark() != null) {
sql.SET("pre_user_remark = #{preUserRemark,jdbcType=VARCHAR}");
}
if (record.getStauts() != null) {
sql.SET("stauts = #{stauts,jdbcType=INTEGER}");
}
if (record.getStatusFailDesc() != null) {
sql.SET("status_fail_desc = #{statusFailDesc,jdbcType=VARCHAR}");
}
if (record.getStatusCancelDesc() != null) {
sql.SET("status_cancel_desc = #{statusCancelDesc,jdbcType=VARCHAR}");
}
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}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighOrderPreExample 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,451 @@
package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* high_order_pre
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighOrderPre implements Serializable {
/**
* 主键ID
*/
private Long id;
/**
* 公司id
*/
private Long companyId;
/**
* 商户id
*/
private Long merchantId;
/**
* 代理商id
*/
private Long agentId;
/**
* 预约订单号
*/
private String preOrderNo;
/**
* 支付订单id
*/
private Long orderId;
/**
* 支付订单号
*/
private String orderNo;
/**
* 支付子订单id
*/
private Long childOrderId;
/**
* 实付金额
*/
private BigDecimal payRealPrice;
/**
* 商品类型
*/
private Integer goodsType;
/**
* 商品id
*/
private Long goodsId;
/**
* 商品名称
*/
private String goodsName;
/**
* 预约用户id
*/
private Long preUserId;
/**
* 预约用户姓名
*/
private String preUserName;
/**
* 预约用户手机号
*/
private String preUserPhone;
/**
* 预约用户备注
*/
private String preUserRemark;
/**
* 状态 1.预约中 2. 预约成功 3.预约完成 4.预约失败 5.预约取消
*/
private Integer stauts;
/**
* 预约失败说明
*/
private String statusFailDesc;
/**
* 预约取消说明
*/
private String statusCancelDesc;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改时间
*/
private Date updateTime;
private String ext1;
private String ext2;
private String ext3;
private String ext4;
private String ext5;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public Long getMerchantId() {
return merchantId;
}
public void setMerchantId(Long merchantId) {
this.merchantId = merchantId;
}
public Long getAgentId() {
return agentId;
}
public void setAgentId(Long agentId) {
this.agentId = agentId;
}
public String getPreOrderNo() {
return preOrderNo;
}
public void setPreOrderNo(String preOrderNo) {
this.preOrderNo = preOrderNo;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public Long getChildOrderId() {
return childOrderId;
}
public void setChildOrderId(Long childOrderId) {
this.childOrderId = childOrderId;
}
public BigDecimal getPayRealPrice() {
return payRealPrice;
}
public void setPayRealPrice(BigDecimal payRealPrice) {
this.payRealPrice = payRealPrice;
}
public Integer getGoodsType() {
return goodsType;
}
public void setGoodsType(Integer goodsType) {
this.goodsType = goodsType;
}
public Long getGoodsId() {
return goodsId;
}
public void setGoodsId(Long goodsId) {
this.goodsId = goodsId;
}
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
public Long getPreUserId() {
return preUserId;
}
public void setPreUserId(Long preUserId) {
this.preUserId = preUserId;
}
public String getPreUserName() {
return preUserName;
}
public void setPreUserName(String preUserName) {
this.preUserName = preUserName;
}
public String getPreUserPhone() {
return preUserPhone;
}
public void setPreUserPhone(String preUserPhone) {
this.preUserPhone = preUserPhone;
}
public String getPreUserRemark() {
return preUserRemark;
}
public void setPreUserRemark(String preUserRemark) {
this.preUserRemark = preUserRemark;
}
public Integer getStauts() {
return stauts;
}
public void setStauts(Integer stauts) {
this.stauts = stauts;
}
public String getStatusFailDesc() {
return statusFailDesc;
}
public void setStatusFailDesc(String statusFailDesc) {
this.statusFailDesc = statusFailDesc;
}
public String getStatusCancelDesc() {
return statusCancelDesc;
}
public void setStatusCancelDesc(String statusCancelDesc) {
this.statusCancelDesc = statusCancelDesc;
}
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;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
HighOrderPre other = (HighOrderPre) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
&& (this.getPreOrderNo() == null ? other.getPreOrderNo() == null : this.getPreOrderNo().equals(other.getPreOrderNo()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
&& (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId()))
&& (this.getPayRealPrice() == null ? other.getPayRealPrice() == null : this.getPayRealPrice().equals(other.getPayRealPrice()))
&& (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType()))
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
&& (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
&& (this.getPreUserId() == null ? other.getPreUserId() == null : this.getPreUserId().equals(other.getPreUserId()))
&& (this.getPreUserName() == null ? other.getPreUserName() == null : this.getPreUserName().equals(other.getPreUserName()))
&& (this.getPreUserPhone() == null ? other.getPreUserPhone() == null : this.getPreUserPhone().equals(other.getPreUserPhone()))
&& (this.getPreUserRemark() == null ? other.getPreUserRemark() == null : this.getPreUserRemark().equals(other.getPreUserRemark()))
&& (this.getStauts() == null ? other.getStauts() == null : this.getStauts().equals(other.getStauts()))
&& (this.getStatusFailDesc() == null ? other.getStatusFailDesc() == null : this.getStatusFailDesc().equals(other.getStatusFailDesc()))
&& (this.getStatusCancelDesc() == null ? other.getStatusCancelDesc() == null : this.getStatusCancelDesc().equals(other.getStatusCancelDesc()))
&& (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()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode());
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
result = prime * result + ((getPreOrderNo() == null) ? 0 : getPreOrderNo().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode());
result = prime * result + ((getPayRealPrice() == null) ? 0 : getPayRealPrice().hashCode());
result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode());
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
result = prime * result + ((getPreUserId() == null) ? 0 : getPreUserId().hashCode());
result = prime * result + ((getPreUserName() == null) ? 0 : getPreUserName().hashCode());
result = prime * result + ((getPreUserPhone() == null) ? 0 : getPreUserPhone().hashCode());
result = prime * result + ((getPreUserRemark() == null) ? 0 : getPreUserRemark().hashCode());
result = prime * result + ((getStauts() == null) ? 0 : getStauts().hashCode());
result = prime * result + ((getStatusFailDesc() == null) ? 0 : getStatusFailDesc().hashCode());
result = prime * result + ((getStatusCancelDesc() == null) ? 0 : getStatusCancelDesc().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());
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(", companyId=").append(companyId);
sb.append(", merchantId=").append(merchantId);
sb.append(", agentId=").append(agentId);
sb.append(", preOrderNo=").append(preOrderNo);
sb.append(", orderId=").append(orderId);
sb.append(", orderNo=").append(orderNo);
sb.append(", childOrderId=").append(childOrderId);
sb.append(", payRealPrice=").append(payRealPrice);
sb.append(", goodsType=").append(goodsType);
sb.append(", goodsId=").append(goodsId);
sb.append(", goodsName=").append(goodsName);
sb.append(", preUserId=").append(preUserId);
sb.append(", preUserName=").append(preUserName);
sb.append(", preUserPhone=").append(preUserPhone);
sb.append(", preUserRemark=").append(preUserRemark);
sb.append(", stauts=").append(stauts);
sb.append(", statusFailDesc=").append(statusFailDesc);
sb.append(", statusCancelDesc=").append(statusCancelDesc);
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(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
Loading…
Cancel
Save