parent
39efee6f44
commit
95c81728b3
@ -0,0 +1,131 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighDiscountInventoryRecord; |
||||
import com.hai.entity.HighDiscountInventoryRecordExample; |
||||
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 HighDiscountInventoryRecordMapper extends HighDiscountInventoryRecordMapperExt { |
||||
@SelectProvider(type=HighDiscountInventoryRecordSqlProvider.class, method="countByExample") |
||||
long countByExample(HighDiscountInventoryRecordExample example); |
||||
|
||||
@DeleteProvider(type=HighDiscountInventoryRecordSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighDiscountInventoryRecordExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_discount_inventory_record", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int deleteByPrimaryKey(Integer id); |
||||
|
||||
@Insert({ |
||||
"insert into high_discount_inventory_record (discount_package_title, discount_package_id, ", |
||||
"now_stock_num, front_stock_num, ", |
||||
"stock_num, company_id, ", |
||||
"created_user_id, created_time, ", |
||||
"`status`, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{discountPackageTitle,jdbcType=VARCHAR}, #{discountPackageId,jdbcType=INTEGER}, ", |
||||
"#{nowStockNum,jdbcType=INTEGER}, #{frontStockNum,jdbcType=INTEGER}, ", |
||||
"#{stockNum,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, ", |
||||
"#{createdUserId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, ", |
||||
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighDiscountInventoryRecord record); |
||||
|
||||
@InsertProvider(type=HighDiscountInventoryRecordSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighDiscountInventoryRecord record); |
||||
|
||||
@SelectProvider(type=HighDiscountInventoryRecordSqlProvider.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="now_stock_num", property="nowStockNum", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="front_stock_num", property="frontStockNum", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="stock_num", property="stockNum", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_user_id", property="createdUserId", 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<HighDiscountInventoryRecord> selectByExample(HighDiscountInventoryRecordExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, discount_package_title, discount_package_id, now_stock_num, front_stock_num, ", |
||||
"stock_num, company_id, created_user_id, created_time, `status`, ext_1, ext_2, ", |
||||
"ext_3", |
||||
"from high_discount_inventory_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="now_stock_num", property="nowStockNum", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="front_stock_num", property="frontStockNum", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="stock_num", property="stockNum", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_user_id", property="createdUserId", 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) |
||||
}) |
||||
HighDiscountInventoryRecord selectByPrimaryKey(Integer id); |
||||
|
||||
@UpdateProvider(type=HighDiscountInventoryRecordSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighDiscountInventoryRecord record, @Param("example") HighDiscountInventoryRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighDiscountInventoryRecordSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighDiscountInventoryRecord record, @Param("example") HighDiscountInventoryRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighDiscountInventoryRecordSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighDiscountInventoryRecord record); |
||||
|
||||
@Update({ |
||||
"update high_discount_inventory_record", |
||||
"set discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR},", |
||||
"discount_package_id = #{discountPackageId,jdbcType=INTEGER},", |
||||
"now_stock_num = #{nowStockNum,jdbcType=INTEGER},", |
||||
"front_stock_num = #{frontStockNum,jdbcType=INTEGER},", |
||||
"stock_num = #{stockNum,jdbcType=INTEGER},", |
||||
"company_id = #{companyId,jdbcType=INTEGER},", |
||||
"created_user_id = #{createdUserId,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(HighDiscountInventoryRecord record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighDiscountInventoryRecordMapperExt { |
||||
} |
@ -0,0 +1,346 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighDiscountInventoryRecord; |
||||
import com.hai.entity.HighDiscountInventoryRecordExample.Criteria; |
||||
import com.hai.entity.HighDiscountInventoryRecordExample.Criterion; |
||||
import com.hai.entity.HighDiscountInventoryRecordExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighDiscountInventoryRecordSqlProvider { |
||||
|
||||
public String countByExample(HighDiscountInventoryRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_discount_inventory_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighDiscountInventoryRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_discount_inventory_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighDiscountInventoryRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_discount_inventory_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.getNowStockNum() != null) { |
||||
sql.VALUES("now_stock_num", "#{nowStockNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getFrontStockNum() != null) { |
||||
sql.VALUES("front_stock_num", "#{frontStockNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStockNum() != null) { |
||||
sql.VALUES("stock_num", "#{stockNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.VALUES("company_id", "#{companyId,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.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(HighDiscountInventoryRecordExample 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("now_stock_num"); |
||||
sql.SELECT("front_stock_num"); |
||||
sql.SELECT("stock_num"); |
||||
sql.SELECT("company_id"); |
||||
sql.SELECT("created_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_inventory_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) { |
||||
HighDiscountInventoryRecord record = (HighDiscountInventoryRecord) parameter.get("record"); |
||||
HighDiscountInventoryRecordExample example = (HighDiscountInventoryRecordExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_inventory_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.getNowStockNum() != null) { |
||||
sql.SET("now_stock_num = #{record.nowStockNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getFrontStockNum() != null) { |
||||
sql.SET("front_stock_num = #{record.frontStockNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStockNum() != null) { |
||||
sql.SET("stock_num = #{record.stockNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{record.companyId,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.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_inventory_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("now_stock_num = #{record.nowStockNum,jdbcType=INTEGER}"); |
||||
sql.SET("front_stock_num = #{record.frontStockNum,jdbcType=INTEGER}"); |
||||
sql.SET("stock_num = #{record.stockNum,jdbcType=INTEGER}"); |
||||
sql.SET("company_id = #{record.companyId,jdbcType=INTEGER}"); |
||||
sql.SET("created_user_id = #{record.createdUserId,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}"); |
||||
|
||||
HighDiscountInventoryRecordExample example = (HighDiscountInventoryRecordExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighDiscountInventoryRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_discount_inventory_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.getNowStockNum() != null) { |
||||
sql.SET("now_stock_num = #{nowStockNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getFrontStockNum() != null) { |
||||
sql.SET("front_stock_num = #{frontStockNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStockNum() != null) { |
||||
sql.SET("stock_num = #{stockNum,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{companyId,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.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, HighDiscountInventoryRecordExample 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,257 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_discount_inventory_record |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighDiscountInventoryRecord implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Integer id; |
||||
|
||||
/** |
||||
* 标题 |
||||
*/ |
||||
private String discountPackageTitle; |
||||
|
||||
/** |
||||
* 优惠券包id |
||||
*/ |
||||
private Integer discountPackageId; |
||||
|
||||
/** |
||||
* 当前库存数量 |
||||
*/ |
||||
private Integer nowStockNum; |
||||
|
||||
/** |
||||
* 原库存数量 |
||||
*/ |
||||
private Integer frontStockNum; |
||||
|
||||
/** |
||||
* 补库数量 |
||||
*/ |
||||
private Integer stockNum; |
||||
|
||||
/** |
||||
* 公司id |
||||
*/ |
||||
private Integer companyId; |
||||
|
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
private Integer createdUserId; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createdTime; |
||||
|
||||
/** |
||||
* 状态 |
||||
*/ |
||||
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 getNowStockNum() { |
||||
return nowStockNum; |
||||
} |
||||
|
||||
public void setNowStockNum(Integer nowStockNum) { |
||||
this.nowStockNum = nowStockNum; |
||||
} |
||||
|
||||
public Integer getFrontStockNum() { |
||||
return frontStockNum; |
||||
} |
||||
|
||||
public void setFrontStockNum(Integer frontStockNum) { |
||||
this.frontStockNum = frontStockNum; |
||||
} |
||||
|
||||
public Integer getStockNum() { |
||||
return stockNum; |
||||
} |
||||
|
||||
public void setStockNum(Integer stockNum) { |
||||
this.stockNum = stockNum; |
||||
} |
||||
|
||||
public Integer getCompanyId() { |
||||
return companyId; |
||||
} |
||||
|
||||
public void setCompanyId(Integer companyId) { |
||||
this.companyId = companyId; |
||||
} |
||||
|
||||
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 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; |
||||
} |
||||
HighDiscountInventoryRecord other = (HighDiscountInventoryRecord) 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.getNowStockNum() == null ? other.getNowStockNum() == null : this.getNowStockNum().equals(other.getNowStockNum())) |
||||
&& (this.getFrontStockNum() == null ? other.getFrontStockNum() == null : this.getFrontStockNum().equals(other.getFrontStockNum())) |
||||
&& (this.getStockNum() == null ? other.getStockNum() == null : this.getStockNum().equals(other.getStockNum())) |
||||
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) |
||||
&& (this.getCreatedUserId() == null ? other.getCreatedUserId() == null : this.getCreatedUserId().equals(other.getCreatedUserId())) |
||||
&& (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 + ((getNowStockNum() == null) ? 0 : getNowStockNum().hashCode()); |
||||
result = prime * result + ((getFrontStockNum() == null) ? 0 : getFrontStockNum().hashCode()); |
||||
result = prime * result + ((getStockNum() == null) ? 0 : getStockNum().hashCode()); |
||||
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); |
||||
result = prime * result + ((getCreatedUserId() == null) ? 0 : getCreatedUserId().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(", nowStockNum=").append(nowStockNum); |
||||
sb.append(", frontStockNum=").append(frontStockNum); |
||||
sb.append(", stockNum=").append(stockNum); |
||||
sb.append(", companyId=").append(companyId); |
||||
sb.append(", createdUserId=").append(createdUserId); |
||||
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