parent
5a73a669bf
commit
090ab4c79d
@ -0,0 +1,130 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighDiscountPackageDetails; |
||||
import com.hai.entity.HighDiscountPackageDetailsExample; |
||||
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 HighDiscountPackageDetailsMapper extends HighDiscountPackageDetailsMapperExt { |
||||
@SelectProvider(type=HighDiscountPackageDetailsSqlProvider.class, method="countByExample") |
||||
long countByExample(HighDiscountPackageDetailsExample example); |
||||
|
||||
@DeleteProvider(type=HighDiscountPackageDetailsSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighDiscountPackageDetailsExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_discount_package_details", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int deleteByPrimaryKey(Integer id); |
||||
|
||||
@Insert({ |
||||
"insert into high_discount_package_details (discount_package_id, discount_id, ", |
||||
"discount_name, num, ", |
||||
"created_user_id, created_time, ", |
||||
"updated_user_id, updated_time, ", |
||||
"`status`, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{discountPackageId,jdbcType=INTEGER}, #{discountId,jdbcType=INTEGER}, ", |
||||
"#{discountName,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, ", |
||||
"#{createdUserId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, ", |
||||
"#{updatedUserId,jdbcType=INTEGER}, #{updatedTime,jdbcType=TIMESTAMP}, ", |
||||
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighDiscountPackageDetails record); |
||||
|
||||
@InsertProvider(type=HighDiscountPackageDetailsSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighDiscountPackageDetails record); |
||||
|
||||
@SelectProvider(type=HighDiscountPackageDetailsSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="num", property="num", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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) |
||||
}) |
||||
List<HighDiscountPackageDetails> selectByExample(HighDiscountPackageDetailsExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, discount_package_id, discount_id, discount_name, num, created_user_id, created_time, ", |
||||
"updated_user_id, updated_time, `status`, ext_1, ext_2, ext_3", |
||||
"from high_discount_package_details", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="num", property="num", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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) |
||||
}) |
||||
HighDiscountPackageDetails selectByPrimaryKey(Integer id); |
||||
|
||||
@UpdateProvider(type=HighDiscountPackageDetailsSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighDiscountPackageDetails record, @Param("example") HighDiscountPackageDetailsExample example); |
||||
|
||||
@UpdateProvider(type=HighDiscountPackageDetailsSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighDiscountPackageDetails record, @Param("example") HighDiscountPackageDetailsExample example); |
||||
|
||||
@UpdateProvider(type=HighDiscountPackageDetailsSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighDiscountPackageDetails record); |
||||
|
||||
@Update({ |
||||
"update high_discount_package_details", |
||||
"set discount_package_id = #{discountPackageId,jdbcType=INTEGER},", |
||||
"discount_id = #{discountId,jdbcType=INTEGER},", |
||||
"discount_name = #{discountName,jdbcType=VARCHAR},", |
||||
"num = #{num,jdbcType=INTEGER},", |
||||
"created_user_id = #{createdUserId,jdbcType=INTEGER},", |
||||
"created_time = #{createdTime,jdbcType=TIMESTAMP},", |
||||
"updated_user_id = #{updatedUserId,jdbcType=INTEGER},", |
||||
"updated_time = #{updatedTime,jdbcType=TIMESTAMP},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int updateByPrimaryKey(HighDiscountPackageDetails record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighDiscountPackageDetailsMapperExt { |
||||
} |
@ -0,0 +1,346 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighDiscountPackageDetails; |
||||
import com.hai.entity.HighDiscountPackageDetailsExample.Criteria; |
||||
import com.hai.entity.HighDiscountPackageDetailsExample.Criterion; |
||||
import com.hai.entity.HighDiscountPackageDetailsExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighDiscountPackageDetailsSqlProvider { |
||||
|
||||
public String countByExample(HighDiscountPackageDetailsExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_discount_package_details"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighDiscountPackageDetailsExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_discount_package_details"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighDiscountPackageDetails record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_discount_package_details"); |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.VALUES("discount_package_id", "#{discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountId() != null) { |
||||
sql.VALUES("discount_id", "#{discountId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountName() != null) { |
||||
sql.VALUES("discount_name", "#{discountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNum() != null) { |
||||
sql.VALUES("num", "#{num,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedUserId() != null) { |
||||
sql.VALUES("created_user_id", "#{createdUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedUserId() != null) { |
||||
sql.VALUES("updated_user_id", "#{updatedUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.VALUES("updated_time", "#{updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(HighDiscountPackageDetailsExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("discount_package_id"); |
||||
sql.SELECT("discount_id"); |
||||
sql.SELECT("discount_name"); |
||||
sql.SELECT("num"); |
||||
sql.SELECT("created_user_id"); |
||||
sql.SELECT("created_time"); |
||||
sql.SELECT("updated_user_id"); |
||||
sql.SELECT("updated_time"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_discount_package_details"); |
||||
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) { |
||||
HighDiscountPackageDetails record = (HighDiscountPackageDetails) parameter.get("record"); |
||||
HighDiscountPackageDetailsExample example = (HighDiscountPackageDetailsExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_package_details"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountId() != null) { |
||||
sql.SET("discount_id = #{record.discountId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountName() != null) { |
||||
sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNum() != null) { |
||||
sql.SET("num = #{record.num,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedUserId() != null) { |
||||
sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedUserId() != null) { |
||||
sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_package_details"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); |
||||
sql.SET("discount_id = #{record.discountId,jdbcType=INTEGER}"); |
||||
sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); |
||||
sql.SET("num = #{record.num,jdbcType=INTEGER}"); |
||||
sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}"); |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=INTEGER}"); |
||||
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
HighDiscountPackageDetailsExample example = (HighDiscountPackageDetailsExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighDiscountPackageDetails record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_package_details"); |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.SET("discount_package_id = #{discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountId() != null) { |
||||
sql.SET("discount_id = #{discountId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountName() != null) { |
||||
sql.SET("discount_name = #{discountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNum() != null) { |
||||
sql.SET("num = #{num,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedUserId() != null) { |
||||
sql.SET("created_user_id = #{createdUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedUserId() != null) { |
||||
sql.SET("updated_user_id = #{updatedUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.SET("updated_time = #{updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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=INTEGER}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, HighDiscountPackageDetailsExample 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,155 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighDiscountPackage; |
||||
import com.hai.entity.HighDiscountPackageExample; |
||||
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 HighDiscountPackageMapper extends HighDiscountPackageMapperExt { |
||||
@SelectProvider(type=HighDiscountPackageSqlProvider.class, method="countByExample") |
||||
long countByExample(HighDiscountPackageExample example); |
||||
|
||||
@DeleteProvider(type=HighDiscountPackageSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighDiscountPackageExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_discount_package", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int deleteByPrimaryKey(Integer id); |
||||
|
||||
@Insert({ |
||||
"insert into high_discount_package (company_id, using_attribution, ", |
||||
"title, sales_type, ", |
||||
"effective_tiem, price, ", |
||||
"purchase_num, list_img, ", |
||||
"banner_img, details_img, ", |
||||
"created_user_id, created_time, ", |
||||
"updated_user_id, updated_time, ", |
||||
"`status`, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{companyId,jdbcType=INTEGER}, #{usingAttribution,jdbcType=INTEGER}, ", |
||||
"#{title,jdbcType=VARCHAR}, #{salesType,jdbcType=INTEGER}, ", |
||||
"#{effectiveTiem,jdbcType=TIMESTAMP}, #{price,jdbcType=DECIMAL}, ", |
||||
"#{purchaseNum,jdbcType=INTEGER}, #{listImg,jdbcType=VARCHAR}, ", |
||||
"#{bannerImg,jdbcType=VARCHAR}, #{detailsImg,jdbcType=VARCHAR}, ", |
||||
"#{createdUserId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, ", |
||||
"#{updatedUserId,jdbcType=INTEGER}, #{updatedTime,jdbcType=TIMESTAMP}, ", |
||||
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighDiscountPackage record); |
||||
|
||||
@InsertProvider(type=HighDiscountPackageSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighDiscountPackage record); |
||||
|
||||
@SelectProvider(type=HighDiscountPackageSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="using_attribution", property="usingAttribution", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="sales_type", property="salesType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="effective_tiem", property="effectiveTiem", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="purchase_num", property="purchaseNum", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="list_img", property="listImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="details_img", property="detailsImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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) |
||||
}) |
||||
List<HighDiscountPackage> selectByExample(HighDiscountPackageExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, company_id, using_attribution, title, sales_type, effective_tiem, price, ", |
||||
"purchase_num, list_img, banner_img, details_img, created_user_id, created_time, ", |
||||
"updated_user_id, updated_time, `status`, ext_1, ext_2, ext_3", |
||||
"from high_discount_package", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="using_attribution", property="usingAttribution", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="sales_type", property="salesType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="effective_tiem", property="effectiveTiem", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="purchase_num", property="purchaseNum", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="list_img", property="listImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="details_img", property="detailsImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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) |
||||
}) |
||||
HighDiscountPackage selectByPrimaryKey(Integer id); |
||||
|
||||
@UpdateProvider(type=HighDiscountPackageSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighDiscountPackage record, @Param("example") HighDiscountPackageExample example); |
||||
|
||||
@UpdateProvider(type=HighDiscountPackageSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighDiscountPackage record, @Param("example") HighDiscountPackageExample example); |
||||
|
||||
@UpdateProvider(type=HighDiscountPackageSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighDiscountPackage record); |
||||
|
||||
@Update({ |
||||
"update high_discount_package", |
||||
"set company_id = #{companyId,jdbcType=INTEGER},", |
||||
"using_attribution = #{usingAttribution,jdbcType=INTEGER},", |
||||
"title = #{title,jdbcType=VARCHAR},", |
||||
"sales_type = #{salesType,jdbcType=INTEGER},", |
||||
"effective_tiem = #{effectiveTiem,jdbcType=TIMESTAMP},", |
||||
"price = #{price,jdbcType=DECIMAL},", |
||||
"purchase_num = #{purchaseNum,jdbcType=INTEGER},", |
||||
"list_img = #{listImg,jdbcType=VARCHAR},", |
||||
"banner_img = #{bannerImg,jdbcType=VARCHAR},", |
||||
"details_img = #{detailsImg,jdbcType=VARCHAR},", |
||||
"created_user_id = #{createdUserId,jdbcType=INTEGER},", |
||||
"created_time = #{createdTime,jdbcType=TIMESTAMP},", |
||||
"updated_user_id = #{updatedUserId,jdbcType=INTEGER},", |
||||
"updated_time = #{updatedTime,jdbcType=TIMESTAMP},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int updateByPrimaryKey(HighDiscountPackage record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighDiscountPackageMapperExt { |
||||
} |
@ -0,0 +1,142 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighDiscountPackageRecord; |
||||
import com.hai.entity.HighDiscountPackageRecordExample; |
||||
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 HighDiscountPackageRecordMapper extends HighDiscountPackageRecordMapperExt { |
||||
@SelectProvider(type=HighDiscountPackageRecordSqlProvider.class, method="countByExample") |
||||
long countByExample(HighDiscountPackageRecordExample example); |
||||
|
||||
@DeleteProvider(type=HighDiscountPackageRecordSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighDiscountPackageRecordExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_discount_package_record", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int deleteByPrimaryKey(Integer id); |
||||
|
||||
@Insert({ |
||||
"insert into high_discount_package_record (discount_package_title, discount_package_id, ", |
||||
"using_attribution, company_id, ", |
||||
"order_id, child_order_id, ", |
||||
"price, record_no, ", |
||||
"sales_type, user_id, ", |
||||
"created_time, `status`, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{discountPackageTitle,jdbcType=VARCHAR}, #{discountPackageId,jdbcType=INTEGER}, ", |
||||
"#{usingAttribution,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, ", |
||||
"#{orderId,jdbcType=INTEGER}, #{childOrderId,jdbcType=INTEGER}, ", |
||||
"#{price,jdbcType=DECIMAL}, #{recordNo,jdbcType=VARCHAR}, ", |
||||
"#{salesType,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, ", |
||||
"#{createdTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighDiscountPackageRecord record); |
||||
|
||||
@InsertProvider(type=HighDiscountPackageRecordSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighDiscountPackageRecord record); |
||||
|
||||
@SelectProvider(type=HighDiscountPackageRecordSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="using_attribution", property="usingAttribution", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="record_no", property="recordNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="sales_type", property="salesType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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) |
||||
}) |
||||
List<HighDiscountPackageRecord> selectByExample(HighDiscountPackageRecordExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, discount_package_title, discount_package_id, using_attribution, company_id, ", |
||||
"order_id, child_order_id, price, record_no, sales_type, user_id, created_time, ", |
||||
"`status`, ext_1, ext_2, ext_3", |
||||
"from high_discount_package_record", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="using_attribution", property="usingAttribution", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="record_no", property="recordNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="sales_type", property="salesType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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) |
||||
}) |
||||
HighDiscountPackageRecord selectByPrimaryKey(Integer id); |
||||
|
||||
@UpdateProvider(type=HighDiscountPackageRecordSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighDiscountPackageRecord record, @Param("example") HighDiscountPackageRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighDiscountPackageRecordSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighDiscountPackageRecord record, @Param("example") HighDiscountPackageRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighDiscountPackageRecordSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighDiscountPackageRecord record); |
||||
|
||||
@Update({ |
||||
"update high_discount_package_record", |
||||
"set discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR},", |
||||
"discount_package_id = #{discountPackageId,jdbcType=INTEGER},", |
||||
"using_attribution = #{usingAttribution,jdbcType=INTEGER},", |
||||
"company_id = #{companyId,jdbcType=INTEGER},", |
||||
"order_id = #{orderId,jdbcType=INTEGER},", |
||||
"child_order_id = #{childOrderId,jdbcType=INTEGER},", |
||||
"price = #{price,jdbcType=DECIMAL},", |
||||
"record_no = #{recordNo,jdbcType=VARCHAR},", |
||||
"sales_type = #{salesType,jdbcType=INTEGER},", |
||||
"user_id = #{userId,jdbcType=INTEGER},", |
||||
"created_time = #{createdTime,jdbcType=TIMESTAMP},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int updateByPrimaryKey(HighDiscountPackageRecord record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighDiscountPackageRecordMapperExt { |
||||
} |
@ -0,0 +1,388 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighDiscountPackageRecord; |
||||
import com.hai.entity.HighDiscountPackageRecordExample.Criteria; |
||||
import com.hai.entity.HighDiscountPackageRecordExample.Criterion; |
||||
import com.hai.entity.HighDiscountPackageRecordExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighDiscountPackageRecordSqlProvider { |
||||
|
||||
public String countByExample(HighDiscountPackageRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_discount_package_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighDiscountPackageRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_discount_package_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighDiscountPackageRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_discount_package_record"); |
||||
|
||||
if (record.getDiscountPackageTitle() != null) { |
||||
sql.VALUES("discount_package_title", "#{discountPackageTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.VALUES("discount_package_id", "#{discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUsingAttribution() != null) { |
||||
sql.VALUES("using_attribution", "#{usingAttribution,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.VALUES("company_id", "#{companyId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.VALUES("order_id", "#{orderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getChildOrderId() != null) { |
||||
sql.VALUES("child_order_id", "#{childOrderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.VALUES("price", "#{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getRecordNo() != null) { |
||||
sql.VALUES("record_no", "#{recordNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSalesType() != null) { |
||||
sql.VALUES("sales_type", "#{salesType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.VALUES("user_id", "#{userId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(HighDiscountPackageRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("discount_package_title"); |
||||
sql.SELECT("discount_package_id"); |
||||
sql.SELECT("using_attribution"); |
||||
sql.SELECT("company_id"); |
||||
sql.SELECT("order_id"); |
||||
sql.SELECT("child_order_id"); |
||||
sql.SELECT("price"); |
||||
sql.SELECT("record_no"); |
||||
sql.SELECT("sales_type"); |
||||
sql.SELECT("user_id"); |
||||
sql.SELECT("created_time"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_discount_package_record"); |
||||
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) { |
||||
HighDiscountPackageRecord record = (HighDiscountPackageRecord) parameter.get("record"); |
||||
HighDiscountPackageRecordExample example = (HighDiscountPackageRecordExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_package_record"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountPackageTitle() != null) { |
||||
sql.SET("discount_package_title = #{record.discountPackageTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUsingAttribution() != null) { |
||||
sql.SET("using_attribution = #{record.usingAttribution,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{record.companyId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.SET("order_id = #{record.orderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getChildOrderId() != null) { |
||||
sql.SET("child_order_id = #{record.childOrderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getRecordNo() != null) { |
||||
sql.SET("record_no = #{record.recordNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSalesType() != null) { |
||||
sql.SET("sales_type = #{record.salesType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_package_record"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
sql.SET("discount_package_title = #{record.discountPackageTitle,jdbcType=VARCHAR}"); |
||||
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); |
||||
sql.SET("using_attribution = #{record.usingAttribution,jdbcType=INTEGER}"); |
||||
sql.SET("company_id = #{record.companyId,jdbcType=INTEGER}"); |
||||
sql.SET("order_id = #{record.orderId,jdbcType=INTEGER}"); |
||||
sql.SET("child_order_id = #{record.childOrderId,jdbcType=INTEGER}"); |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
sql.SET("record_no = #{record.recordNo,jdbcType=VARCHAR}"); |
||||
sql.SET("sales_type = #{record.salesType,jdbcType=INTEGER}"); |
||||
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
HighDiscountPackageRecordExample example = (HighDiscountPackageRecordExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighDiscountPackageRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_package_record"); |
||||
|
||||
if (record.getDiscountPackageTitle() != null) { |
||||
sql.SET("discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.SET("discount_package_id = #{discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUsingAttribution() != null) { |
||||
sql.SET("using_attribution = #{usingAttribution,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{companyId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.SET("order_id = #{orderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getChildOrderId() != null) { |
||||
sql.SET("child_order_id = #{childOrderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getRecordNo() != null) { |
||||
sql.SET("record_no = #{recordNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSalesType() != null) { |
||||
sql.SET("sales_type = #{salesType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{userId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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=INTEGER}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, HighDiscountPackageRecordExample 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,430 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighDiscountPackage; |
||||
import com.hai.entity.HighDiscountPackageExample.Criteria; |
||||
import com.hai.entity.HighDiscountPackageExample.Criterion; |
||||
import com.hai.entity.HighDiscountPackageExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighDiscountPackageSqlProvider { |
||||
|
||||
public String countByExample(HighDiscountPackageExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_discount_package"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighDiscountPackageExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_discount_package"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighDiscountPackage record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_discount_package"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.VALUES("company_id", "#{companyId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUsingAttribution() != null) { |
||||
sql.VALUES("using_attribution", "#{usingAttribution,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getTitle() != null) { |
||||
sql.VALUES("title", "#{title,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSalesType() != null) { |
||||
sql.VALUES("sales_type", "#{salesType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getEffectiveTiem() != null) { |
||||
sql.VALUES("effective_tiem", "#{effectiveTiem,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.VALUES("price", "#{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getPurchaseNum() != null) { |
||||
sql.VALUES("purchase_num", "#{purchaseNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getListImg() != null) { |
||||
sql.VALUES("list_img", "#{listImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getBannerImg() != null) { |
||||
sql.VALUES("banner_img", "#{bannerImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDetailsImg() != null) { |
||||
sql.VALUES("details_img", "#{detailsImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreatedUserId() != null) { |
||||
sql.VALUES("created_user_id", "#{createdUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedUserId() != null) { |
||||
sql.VALUES("updated_user_id", "#{updatedUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.VALUES("updated_time", "#{updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(HighDiscountPackageExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("company_id"); |
||||
sql.SELECT("using_attribution"); |
||||
sql.SELECT("title"); |
||||
sql.SELECT("sales_type"); |
||||
sql.SELECT("effective_tiem"); |
||||
sql.SELECT("price"); |
||||
sql.SELECT("purchase_num"); |
||||
sql.SELECT("list_img"); |
||||
sql.SELECT("banner_img"); |
||||
sql.SELECT("details_img"); |
||||
sql.SELECT("created_user_id"); |
||||
sql.SELECT("created_time"); |
||||
sql.SELECT("updated_user_id"); |
||||
sql.SELECT("updated_time"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_discount_package"); |
||||
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) { |
||||
HighDiscountPackage record = (HighDiscountPackage) parameter.get("record"); |
||||
HighDiscountPackageExample example = (HighDiscountPackageExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_package"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{record.companyId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUsingAttribution() != null) { |
||||
sql.SET("using_attribution = #{record.usingAttribution,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getTitle() != null) { |
||||
sql.SET("title = #{record.title,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSalesType() != null) { |
||||
sql.SET("sales_type = #{record.salesType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getEffectiveTiem() != null) { |
||||
sql.SET("effective_tiem = #{record.effectiveTiem,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getPurchaseNum() != null) { |
||||
sql.SET("purchase_num = #{record.purchaseNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getListImg() != null) { |
||||
sql.SET("list_img = #{record.listImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getBannerImg() != null) { |
||||
sql.SET("banner_img = #{record.bannerImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDetailsImg() != null) { |
||||
sql.SET("details_img = #{record.detailsImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreatedUserId() != null) { |
||||
sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedUserId() != null) { |
||||
sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_package"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
sql.SET("company_id = #{record.companyId,jdbcType=INTEGER}"); |
||||
sql.SET("using_attribution = #{record.usingAttribution,jdbcType=INTEGER}"); |
||||
sql.SET("title = #{record.title,jdbcType=VARCHAR}"); |
||||
sql.SET("sales_type = #{record.salesType,jdbcType=INTEGER}"); |
||||
sql.SET("effective_tiem = #{record.effectiveTiem,jdbcType=TIMESTAMP}"); |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
sql.SET("purchase_num = #{record.purchaseNum,jdbcType=INTEGER}"); |
||||
sql.SET("list_img = #{record.listImg,jdbcType=VARCHAR}"); |
||||
sql.SET("banner_img = #{record.bannerImg,jdbcType=VARCHAR}"); |
||||
sql.SET("details_img = #{record.detailsImg,jdbcType=VARCHAR}"); |
||||
sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}"); |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=INTEGER}"); |
||||
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
HighDiscountPackageExample example = (HighDiscountPackageExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighDiscountPackage record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_package"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{companyId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUsingAttribution() != null) { |
||||
sql.SET("using_attribution = #{usingAttribution,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getTitle() != null) { |
||||
sql.SET("title = #{title,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSalesType() != null) { |
||||
sql.SET("sales_type = #{salesType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getEffectiveTiem() != null) { |
||||
sql.SET("effective_tiem = #{effectiveTiem,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getPurchaseNum() != null) { |
||||
sql.SET("purchase_num = #{purchaseNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getListImg() != null) { |
||||
sql.SET("list_img = #{listImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getBannerImg() != null) { |
||||
sql.SET("banner_img = #{bannerImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDetailsImg() != null) { |
||||
sql.SET("details_img = #{detailsImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreatedUserId() != null) { |
||||
sql.SET("created_user_id = #{createdUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedUserId() != null) { |
||||
sql.SET("updated_user_id = #{updatedUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.SET("updated_time = #{updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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=INTEGER}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, HighDiscountPackageExample 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,354 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_discount_package |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighDiscountPackage implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Integer id; |
||||
|
||||
/** |
||||
* 公司id |
||||
*/ |
||||
private Integer companyId; |
||||
|
||||
/** |
||||
* 使用归属 |
||||
*/ |
||||
private Integer usingAttribution; |
||||
|
||||
/** |
||||
* 标题 |
||||
*/ |
||||
private String title; |
||||
|
||||
/** |
||||
* 优惠券包销售类型 1:售卖 : 2 赠送 |
||||
*/ |
||||
private Integer salesType; |
||||
|
||||
/** |
||||
* 有效期 |
||||
*/ |
||||
private Date effectiveTiem; |
||||
|
||||
/** |
||||
* 售卖价格 |
||||
*/ |
||||
private BigDecimal price; |
||||
|
||||
/** |
||||
* 购买数量 |
||||
*/ |
||||
private Integer purchaseNum; |
||||
|
||||
/** |
||||
* 列表展示图 |
||||
*/ |
||||
private String listImg; |
||||
|
||||
/** |
||||
* 轮播展示图 |
||||
*/ |
||||
private String bannerImg; |
||||
|
||||
/** |
||||
* 详情暂时图 |
||||
*/ |
||||
private String detailsImg; |
||||
|
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
private Integer createdUserId; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createdTime; |
||||
|
||||
/** |
||||
* 更新人 |
||||
*/ |
||||
private Integer updatedUserId; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updatedTime; |
||||
|
||||
/** |
||||
* 状态 1: 上架 2: 下架 3: 编辑中 4:删除 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Integer getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Integer id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Integer getCompanyId() { |
||||
return companyId; |
||||
} |
||||
|
||||
public void setCompanyId(Integer companyId) { |
||||
this.companyId = companyId; |
||||
} |
||||
|
||||
public Integer getUsingAttribution() { |
||||
return usingAttribution; |
||||
} |
||||
|
||||
public void setUsingAttribution(Integer usingAttribution) { |
||||
this.usingAttribution = usingAttribution; |
||||
} |
||||
|
||||
public String getTitle() { |
||||
return title; |
||||
} |
||||
|
||||
public void setTitle(String title) { |
||||
this.title = title; |
||||
} |
||||
|
||||
public Integer getSalesType() { |
||||
return salesType; |
||||
} |
||||
|
||||
public void setSalesType(Integer salesType) { |
||||
this.salesType = salesType; |
||||
} |
||||
|
||||
public Date getEffectiveTiem() { |
||||
return effectiveTiem; |
||||
} |
||||
|
||||
public void setEffectiveTiem(Date effectiveTiem) { |
||||
this.effectiveTiem = effectiveTiem; |
||||
} |
||||
|
||||
public BigDecimal getPrice() { |
||||
return price; |
||||
} |
||||
|
||||
public void setPrice(BigDecimal price) { |
||||
this.price = price; |
||||
} |
||||
|
||||
public Integer getPurchaseNum() { |
||||
return purchaseNum; |
||||
} |
||||
|
||||
public void setPurchaseNum(Integer purchaseNum) { |
||||
this.purchaseNum = purchaseNum; |
||||
} |
||||
|
||||
public String getListImg() { |
||||
return listImg; |
||||
} |
||||
|
||||
public void setListImg(String listImg) { |
||||
this.listImg = listImg; |
||||
} |
||||
|
||||
public String getBannerImg() { |
||||
return bannerImg; |
||||
} |
||||
|
||||
public void setBannerImg(String bannerImg) { |
||||
this.bannerImg = bannerImg; |
||||
} |
||||
|
||||
public String getDetailsImg() { |
||||
return detailsImg; |
||||
} |
||||
|
||||
public void setDetailsImg(String detailsImg) { |
||||
this.detailsImg = detailsImg; |
||||
} |
||||
|
||||
public Integer getCreatedUserId() { |
||||
return createdUserId; |
||||
} |
||||
|
||||
public void setCreatedUserId(Integer createdUserId) { |
||||
this.createdUserId = createdUserId; |
||||
} |
||||
|
||||
public Date getCreatedTime() { |
||||
return createdTime; |
||||
} |
||||
|
||||
public void setCreatedTime(Date createdTime) { |
||||
this.createdTime = createdTime; |
||||
} |
||||
|
||||
public Integer getUpdatedUserId() { |
||||
return updatedUserId; |
||||
} |
||||
|
||||
public void setUpdatedUserId(Integer updatedUserId) { |
||||
this.updatedUserId = updatedUserId; |
||||
} |
||||
|
||||
public Date getUpdatedTime() { |
||||
return updatedTime; |
||||
} |
||||
|
||||
public void setUpdatedTime(Date updatedTime) { |
||||
this.updatedTime = updatedTime; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
HighDiscountPackage other = (HighDiscountPackage) 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.getUsingAttribution() == null ? other.getUsingAttribution() == null : this.getUsingAttribution().equals(other.getUsingAttribution())) |
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) |
||||
&& (this.getSalesType() == null ? other.getSalesType() == null : this.getSalesType().equals(other.getSalesType())) |
||||
&& (this.getEffectiveTiem() == null ? other.getEffectiveTiem() == null : this.getEffectiveTiem().equals(other.getEffectiveTiem())) |
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) |
||||
&& (this.getPurchaseNum() == null ? other.getPurchaseNum() == null : this.getPurchaseNum().equals(other.getPurchaseNum())) |
||||
&& (this.getListImg() == null ? other.getListImg() == null : this.getListImg().equals(other.getListImg())) |
||||
&& (this.getBannerImg() == null ? other.getBannerImg() == null : this.getBannerImg().equals(other.getBannerImg())) |
||||
&& (this.getDetailsImg() == null ? other.getDetailsImg() == null : this.getDetailsImg().equals(other.getDetailsImg())) |
||||
&& (this.getCreatedUserId() == null ? other.getCreatedUserId() == null : this.getCreatedUserId().equals(other.getCreatedUserId())) |
||||
&& (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) |
||||
&& (this.getUpdatedUserId() == null ? other.getUpdatedUserId() == null : this.getUpdatedUserId().equals(other.getUpdatedUserId())) |
||||
&& (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (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())); |
||||
} |
||||
|
||||
@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 + ((getUsingAttribution() == null) ? 0 : getUsingAttribution().hashCode()); |
||||
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); |
||||
result = prime * result + ((getSalesType() == null) ? 0 : getSalesType().hashCode()); |
||||
result = prime * result + ((getEffectiveTiem() == null) ? 0 : getEffectiveTiem().hashCode()); |
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); |
||||
result = prime * result + ((getPurchaseNum() == null) ? 0 : getPurchaseNum().hashCode()); |
||||
result = prime * result + ((getListImg() == null) ? 0 : getListImg().hashCode()); |
||||
result = prime * result + ((getBannerImg() == null) ? 0 : getBannerImg().hashCode()); |
||||
result = prime * result + ((getDetailsImg() == null) ? 0 : getDetailsImg().hashCode()); |
||||
result = prime * result + ((getCreatedUserId() == null) ? 0 : getCreatedUserId().hashCode()); |
||||
result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); |
||||
result = prime * result + ((getUpdatedUserId() == null) ? 0 : getUpdatedUserId().hashCode()); |
||||
result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().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()); |
||||
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(", usingAttribution=").append(usingAttribution); |
||||
sb.append(", title=").append(title); |
||||
sb.append(", salesType=").append(salesType); |
||||
sb.append(", effectiveTiem=").append(effectiveTiem); |
||||
sb.append(", price=").append(price); |
||||
sb.append(", purchaseNum=").append(purchaseNum); |
||||
sb.append(", listImg=").append(listImg); |
||||
sb.append(", bannerImg=").append(bannerImg); |
||||
sb.append(", detailsImg=").append(detailsImg); |
||||
sb.append(", createdUserId=").append(createdUserId); |
||||
sb.append(", createdTime=").append(createdTime); |
||||
sb.append(", updatedUserId=").append(updatedUserId); |
||||
sb.append(", updatedTime=").append(updatedTime); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,257 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_discount_package_details |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighDiscountPackageDetails implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Integer id; |
||||
|
||||
/** |
||||
* 优惠券包id |
||||
*/ |
||||
private Integer discountPackageId; |
||||
|
||||
/** |
||||
* 优惠券id |
||||
*/ |
||||
private Integer discountId; |
||||
|
||||
/** |
||||
* 优惠券名称 |
||||
*/ |
||||
private String discountName; |
||||
|
||||
/** |
||||
* 数量 |
||||
*/ |
||||
private Integer num; |
||||
|
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
private Integer createdUserId; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createdTime; |
||||
|
||||
/** |
||||
* 更新人 |
||||
*/ |
||||
private Integer updatedUserId; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updatedTime; |
||||
|
||||
/** |
||||
* 状态 1: 正常 2: 删除 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Integer getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Integer id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Integer getDiscountPackageId() { |
||||
return discountPackageId; |
||||
} |
||||
|
||||
public void setDiscountPackageId(Integer discountPackageId) { |
||||
this.discountPackageId = discountPackageId; |
||||
} |
||||
|
||||
public Integer getDiscountId() { |
||||
return discountId; |
||||
} |
||||
|
||||
public void setDiscountId(Integer discountId) { |
||||
this.discountId = discountId; |
||||
} |
||||
|
||||
public String getDiscountName() { |
||||
return discountName; |
||||
} |
||||
|
||||
public void setDiscountName(String discountName) { |
||||
this.discountName = discountName; |
||||
} |
||||
|
||||
public Integer getNum() { |
||||
return num; |
||||
} |
||||
|
||||
public void setNum(Integer num) { |
||||
this.num = num; |
||||
} |
||||
|
||||
public Integer getCreatedUserId() { |
||||
return createdUserId; |
||||
} |
||||
|
||||
public void setCreatedUserId(Integer createdUserId) { |
||||
this.createdUserId = createdUserId; |
||||
} |
||||
|
||||
public Date getCreatedTime() { |
||||
return createdTime; |
||||
} |
||||
|
||||
public void setCreatedTime(Date createdTime) { |
||||
this.createdTime = createdTime; |
||||
} |
||||
|
||||
public Integer getUpdatedUserId() { |
||||
return updatedUserId; |
||||
} |
||||
|
||||
public void setUpdatedUserId(Integer updatedUserId) { |
||||
this.updatedUserId = updatedUserId; |
||||
} |
||||
|
||||
public Date getUpdatedTime() { |
||||
return updatedTime; |
||||
} |
||||
|
||||
public void setUpdatedTime(Date updatedTime) { |
||||
this.updatedTime = updatedTime; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
HighDiscountPackageDetails other = (HighDiscountPackageDetails) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getDiscountPackageId() == null ? other.getDiscountPackageId() == null : this.getDiscountPackageId().equals(other.getDiscountPackageId())) |
||||
&& (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId())) |
||||
&& (this.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName())) |
||||
&& (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) |
||||
&& (this.getCreatedUserId() == null ? other.getCreatedUserId() == null : this.getCreatedUserId().equals(other.getCreatedUserId())) |
||||
&& (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) |
||||
&& (this.getUpdatedUserId() == null ? other.getUpdatedUserId() == null : this.getUpdatedUserId().equals(other.getUpdatedUserId())) |
||||
&& (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (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())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getDiscountPackageId() == null) ? 0 : getDiscountPackageId().hashCode()); |
||||
result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode()); |
||||
result = prime * result + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode()); |
||||
result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); |
||||
result = prime * result + ((getCreatedUserId() == null) ? 0 : getCreatedUserId().hashCode()); |
||||
result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); |
||||
result = prime * result + ((getUpdatedUserId() == null) ? 0 : getUpdatedUserId().hashCode()); |
||||
result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().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()); |
||||
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(", discountPackageId=").append(discountPackageId); |
||||
sb.append(", discountId=").append(discountId); |
||||
sb.append(", discountName=").append(discountName); |
||||
sb.append(", num=").append(num); |
||||
sb.append(", createdUserId=").append(createdUserId); |
||||
sb.append(", createdTime=").append(createdTime); |
||||
sb.append(", updatedUserId=").append(updatedUserId); |
||||
sb.append(", updatedTime=").append(updatedTime); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,306 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_discount_package_record |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighDiscountPackageRecord implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Integer id; |
||||
|
||||
/** |
||||
* 优惠券包名称 |
||||
*/ |
||||
private String discountPackageTitle; |
||||
|
||||
/** |
||||
* 优惠券包id |
||||
*/ |
||||
private Integer discountPackageId; |
||||
|
||||
/** |
||||
* 使用归属 |
||||
*/ |
||||
private Integer usingAttribution; |
||||
|
||||
/** |
||||
* 公司id |
||||
*/ |
||||
private Integer companyId; |
||||
|
||||
/** |
||||
* 支付订单id |
||||
*/ |
||||
private Integer orderId; |
||||
|
||||
/** |
||||
* 子订单id |
||||
*/ |
||||
private Integer childOrderId; |
||||
|
||||
/** |
||||
* 价格 |
||||
*/ |
||||
private BigDecimal price; |
||||
|
||||
/** |
||||
* 赠送记录号 |
||||
*/ |
||||
private String recordNo; |
||||
|
||||
/** |
||||
* 销售类型 :1 售卖 2: 赠送 |
||||
*/ |
||||
private Integer salesType; |
||||
|
||||
/** |
||||
* 用户id |
||||
*/ |
||||
private Integer userId; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createdTime; |
||||
|
||||
/** |
||||
* 状态 1:正常 0 : 删除 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Integer getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Integer id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getDiscountPackageTitle() { |
||||
return discountPackageTitle; |
||||
} |
||||
|
||||
public void setDiscountPackageTitle(String discountPackageTitle) { |
||||
this.discountPackageTitle = discountPackageTitle; |
||||
} |
||||
|
||||
public Integer getDiscountPackageId() { |
||||
return discountPackageId; |
||||
} |
||||
|
||||
public void setDiscountPackageId(Integer discountPackageId) { |
||||
this.discountPackageId = discountPackageId; |
||||
} |
||||
|
||||
public Integer getUsingAttribution() { |
||||
return usingAttribution; |
||||
} |
||||
|
||||
public void setUsingAttribution(Integer usingAttribution) { |
||||
this.usingAttribution = usingAttribution; |
||||
} |
||||
|
||||
public Integer getCompanyId() { |
||||
return companyId; |
||||
} |
||||
|
||||
public void setCompanyId(Integer companyId) { |
||||
this.companyId = companyId; |
||||
} |
||||
|
||||
public Integer getOrderId() { |
||||
return orderId; |
||||
} |
||||
|
||||
public void setOrderId(Integer orderId) { |
||||
this.orderId = orderId; |
||||
} |
||||
|
||||
public Integer getChildOrderId() { |
||||
return childOrderId; |
||||
} |
||||
|
||||
public void setChildOrderId(Integer childOrderId) { |
||||
this.childOrderId = childOrderId; |
||||
} |
||||
|
||||
public BigDecimal getPrice() { |
||||
return price; |
||||
} |
||||
|
||||
public void setPrice(BigDecimal price) { |
||||
this.price = price; |
||||
} |
||||
|
||||
public String getRecordNo() { |
||||
return recordNo; |
||||
} |
||||
|
||||
public void setRecordNo(String recordNo) { |
||||
this.recordNo = recordNo; |
||||
} |
||||
|
||||
public Integer getSalesType() { |
||||
return salesType; |
||||
} |
||||
|
||||
public void setSalesType(Integer salesType) { |
||||
this.salesType = salesType; |
||||
} |
||||
|
||||
public Integer getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Integer userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public Date getCreatedTime() { |
||||
return createdTime; |
||||
} |
||||
|
||||
public void setCreatedTime(Date createdTime) { |
||||
this.createdTime = createdTime; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
HighDiscountPackageRecord other = (HighDiscountPackageRecord) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getDiscountPackageTitle() == null ? other.getDiscountPackageTitle() == null : this.getDiscountPackageTitle().equals(other.getDiscountPackageTitle())) |
||||
&& (this.getDiscountPackageId() == null ? other.getDiscountPackageId() == null : this.getDiscountPackageId().equals(other.getDiscountPackageId())) |
||||
&& (this.getUsingAttribution() == null ? other.getUsingAttribution() == null : this.getUsingAttribution().equals(other.getUsingAttribution())) |
||||
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) |
||||
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) |
||||
&& (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId())) |
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) |
||||
&& (this.getRecordNo() == null ? other.getRecordNo() == null : this.getRecordNo().equals(other.getRecordNo())) |
||||
&& (this.getSalesType() == null ? other.getSalesType() == null : this.getSalesType().equals(other.getSalesType())) |
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) |
||||
&& (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (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())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getDiscountPackageTitle() == null) ? 0 : getDiscountPackageTitle().hashCode()); |
||||
result = prime * result + ((getDiscountPackageId() == null) ? 0 : getDiscountPackageId().hashCode()); |
||||
result = prime * result + ((getUsingAttribution() == null) ? 0 : getUsingAttribution().hashCode()); |
||||
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); |
||||
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); |
||||
result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode()); |
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); |
||||
result = prime * result + ((getRecordNo() == null) ? 0 : getRecordNo().hashCode()); |
||||
result = prime * result + ((getSalesType() == null) ? 0 : getSalesType().hashCode()); |
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); |
||||
result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().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()); |
||||
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(", discountPackageTitle=").append(discountPackageTitle); |
||||
sb.append(", discountPackageId=").append(discountPackageId); |
||||
sb.append(", usingAttribution=").append(usingAttribution); |
||||
sb.append(", companyId=").append(companyId); |
||||
sb.append(", orderId=").append(orderId); |
||||
sb.append(", childOrderId=").append(childOrderId); |
||||
sb.append(", price=").append(price); |
||||
sb.append(", recordNo=").append(recordNo); |
||||
sb.append(", salesType=").append(salesType); |
||||
sb.append(", userId=").append(userId); |
||||
sb.append(", createdTime=").append(createdTime); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue