parent
1e501c9d42
commit
2d80423225
@ -1,138 +0,0 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsResource; |
||||
import com.hai.entity.BsResourceExample; |
||||
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 BsResourceMapper extends BsResourceMapperExt { |
||||
@SelectProvider(type=BsResourceSqlProvider.class, method="countByExample") |
||||
long countByExample(BsResourceExample example); |
||||
|
||||
@DeleteProvider(type=BsResourceSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(BsResourceExample example); |
||||
|
||||
@Delete({ |
||||
"delete from bs_resource", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into bs_resource (folder_id, res_type, ", |
||||
"cover_picture, `name`, ", |
||||
"res_size, res_duration, ", |
||||
"res_url, `status`, ", |
||||
"create_time, quote_status, ", |
||||
"op_id, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{folderId,jdbcType=BIGINT}, #{resType,jdbcType=INTEGER}, ", |
||||
"#{coverPicture,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ", |
||||
"#{resSize,jdbcType=REAL}, #{resDuration,jdbcType=INTEGER}, ", |
||||
"#{resUrl,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{quoteStatus,jdbcType=INTEGER}, ", |
||||
"#{opId,jdbcType=BIGINT}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(BsResource record); |
||||
|
||||
@InsertProvider(type=BsResourceSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(BsResource record); |
||||
|
||||
@SelectProvider(type=BsResourceSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="folder_id", property="folderId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="res_type", property="resType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="cover_picture", property="coverPicture", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="res_size", property="resSize", jdbcType=JdbcType.REAL), |
||||
@Result(column="res_duration", property="resDuration", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="res_url", property="resUrl", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="quote_status", property="quoteStatus", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@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<BsResource> selectByExample(BsResourceExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, folder_id, res_type, cover_picture, `name`, res_size, res_duration, res_url, ", |
||||
"`status`, create_time, quote_status, op_id, ext_1, ext_2, ext_3", |
||||
"from bs_resource", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="folder_id", property="folderId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="res_type", property="resType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="cover_picture", property="coverPicture", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="res_size", property="resSize", jdbcType=JdbcType.REAL), |
||||
@Result(column="res_duration", property="resDuration", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="res_url", property="resUrl", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="quote_status", property="quoteStatus", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@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) |
||||
}) |
||||
BsResource selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=BsResourceSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") BsResource record, @Param("example") BsResourceExample example); |
||||
|
||||
@UpdateProvider(type=BsResourceSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") BsResource record, @Param("example") BsResourceExample example); |
||||
|
||||
@UpdateProvider(type=BsResourceSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(BsResource record); |
||||
|
||||
@Update({ |
||||
"update bs_resource", |
||||
"set folder_id = #{folderId,jdbcType=BIGINT},", |
||||
"res_type = #{resType,jdbcType=INTEGER},", |
||||
"cover_picture = #{coverPicture,jdbcType=VARCHAR},", |
||||
"`name` = #{name,jdbcType=VARCHAR},", |
||||
"res_size = #{resSize,jdbcType=REAL},", |
||||
"res_duration = #{resDuration,jdbcType=INTEGER},", |
||||
"res_url = #{resUrl,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"quote_status = #{quoteStatus,jdbcType=INTEGER},", |
||||
"op_id = #{opId,jdbcType=BIGINT},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(BsResource record); |
||||
} |
@ -1,374 +0,0 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsResource; |
||||
import com.hai.entity.BsResourceExample.Criteria; |
||||
import com.hai.entity.BsResourceExample.Criterion; |
||||
import com.hai.entity.BsResourceExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class BsResourceSqlProvider { |
||||
|
||||
public String countByExample(BsResourceExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("bs_resource"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(BsResourceExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("bs_resource"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(BsResource record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("bs_resource"); |
||||
|
||||
if (record.getFolderId() != null) { |
||||
sql.VALUES("folder_id", "#{folderId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getResType() != null) { |
||||
sql.VALUES("res_type", "#{resType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCoverPicture() != null) { |
||||
sql.VALUES("cover_picture", "#{coverPicture,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getName() != null) { |
||||
sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getResSize() != null) { |
||||
sql.VALUES("res_size", "#{resSize,jdbcType=REAL}"); |
||||
} |
||||
|
||||
if (record.getResDuration() != null) { |
||||
sql.VALUES("res_duration", "#{resDuration,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getResUrl() != null) { |
||||
sql.VALUES("res_url", "#{resUrl,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getQuoteStatus() != null) { |
||||
sql.VALUES("quote_status", "#{quoteStatus,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
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(BsResourceExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("folder_id"); |
||||
sql.SELECT("res_type"); |
||||
sql.SELECT("cover_picture"); |
||||
sql.SELECT("`name`"); |
||||
sql.SELECT("res_size"); |
||||
sql.SELECT("res_duration"); |
||||
sql.SELECT("res_url"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("quote_status"); |
||||
sql.SELECT("op_id"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("bs_resource"); |
||||
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) { |
||||
BsResource record = (BsResource) parameter.get("record"); |
||||
BsResourceExample example = (BsResourceExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_resource"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getFolderId() != null) { |
||||
sql.SET("folder_id = #{record.folderId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getResType() != null) { |
||||
sql.SET("res_type = #{record.resType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCoverPicture() != null) { |
||||
sql.SET("cover_picture = #{record.coverPicture,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getName() != null) { |
||||
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getResSize() != null) { |
||||
sql.SET("res_size = #{record.resSize,jdbcType=REAL}"); |
||||
} |
||||
|
||||
if (record.getResDuration() != null) { |
||||
sql.SET("res_duration = #{record.resDuration,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getResUrl() != null) { |
||||
sql.SET("res_url = #{record.resUrl,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getQuoteStatus() != null) { |
||||
sql.SET("quote_status = #{record.quoteStatus,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
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("bs_resource"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("folder_id = #{record.folderId,jdbcType=BIGINT}"); |
||||
sql.SET("res_type = #{record.resType,jdbcType=INTEGER}"); |
||||
sql.SET("cover_picture = #{record.coverPicture,jdbcType=VARCHAR}"); |
||||
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); |
||||
sql.SET("res_size = #{record.resSize,jdbcType=REAL}"); |
||||
sql.SET("res_duration = #{record.resDuration,jdbcType=INTEGER}"); |
||||
sql.SET("res_url = #{record.resUrl,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("quote_status = #{record.quoteStatus,jdbcType=INTEGER}"); |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
BsResourceExample example = (BsResourceExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(BsResource record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_resource"); |
||||
|
||||
if (record.getFolderId() != null) { |
||||
sql.SET("folder_id = #{folderId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getResType() != null) { |
||||
sql.SET("res_type = #{resType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCoverPicture() != null) { |
||||
sql.SET("cover_picture = #{coverPicture,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getName() != null) { |
||||
sql.SET("`name` = #{name,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getResSize() != null) { |
||||
sql.SET("res_size = #{resSize,jdbcType=REAL}"); |
||||
} |
||||
|
||||
if (record.getResDuration() != null) { |
||||
sql.SET("res_duration = #{resDuration,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getResUrl() != null) { |
||||
sql.SET("res_url = #{resUrl,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getQuoteStatus() != null) { |
||||
sql.SET("quote_status = #{quoteStatus,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.SET("op_id = #{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, BsResourceExample 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()); |
||||
} |
||||
} |
||||
} |
@ -1,283 +0,0 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* bs_resource |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class BsResource implements Serializable { |
||||
/** |
||||
* 主键ID |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 分组id |
||||
*/ |
||||
private Long folderId; |
||||
|
||||
/** |
||||
* 素材类型 1:图片 2:视频 3:电子书 4:音频 |
||||
*/ |
||||
private Integer resType; |
||||
|
||||
/** |
||||
* 封面图 |
||||
*/ |
||||
private String coverPicture; |
||||
|
||||
/** |
||||
* 素材名称 |
||||
*/ |
||||
private String name; |
||||
|
||||
/** |
||||
* 素材大小 |
||||
*/ |
||||
private Float resSize; |
||||
|
||||
/** |
||||
* 视频时长 |
||||
*/ |
||||
private Integer resDuration; |
||||
|
||||
/** |
||||
* 素材地址 |
||||
*/ |
||||
private String resUrl; |
||||
|
||||
/** |
||||
* 状态 0:删除 1:可用 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 上传时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 是否引用 0:未引用 1:已引用 |
||||
*/ |
||||
private Integer quoteStatus; |
||||
|
||||
/** |
||||
* 操作人 |
||||
*/ |
||||
private Long opId; |
||||
|
||||
/** |
||||
* ext_1 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getFolderId() { |
||||
return folderId; |
||||
} |
||||
|
||||
public void setFolderId(Long folderId) { |
||||
this.folderId = folderId; |
||||
} |
||||
|
||||
public Integer getResType() { |
||||
return resType; |
||||
} |
||||
|
||||
public void setResType(Integer resType) { |
||||
this.resType = resType; |
||||
} |
||||
|
||||
public String getCoverPicture() { |
||||
return coverPicture; |
||||
} |
||||
|
||||
public void setCoverPicture(String coverPicture) { |
||||
this.coverPicture = coverPicture; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public Float getResSize() { |
||||
return resSize; |
||||
} |
||||
|
||||
public void setResSize(Float resSize) { |
||||
this.resSize = resSize; |
||||
} |
||||
|
||||
public Integer getResDuration() { |
||||
return resDuration; |
||||
} |
||||
|
||||
public void setResDuration(Integer resDuration) { |
||||
this.resDuration = resDuration; |
||||
} |
||||
|
||||
public String getResUrl() { |
||||
return resUrl; |
||||
} |
||||
|
||||
public void setResUrl(String resUrl) { |
||||
this.resUrl = resUrl; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Integer getQuoteStatus() { |
||||
return quoteStatus; |
||||
} |
||||
|
||||
public void setQuoteStatus(Integer quoteStatus) { |
||||
this.quoteStatus = quoteStatus; |
||||
} |
||||
|
||||
public Long getOpId() { |
||||
return opId; |
||||
} |
||||
|
||||
public void setOpId(Long opId) { |
||||
this.opId = opId; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
BsResource other = (BsResource) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getFolderId() == null ? other.getFolderId() == null : this.getFolderId().equals(other.getFolderId())) |
||||
&& (this.getResType() == null ? other.getResType() == null : this.getResType().equals(other.getResType())) |
||||
&& (this.getCoverPicture() == null ? other.getCoverPicture() == null : this.getCoverPicture().equals(other.getCoverPicture())) |
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) |
||||
&& (this.getResSize() == null ? other.getResSize() == null : this.getResSize().equals(other.getResSize())) |
||||
&& (this.getResDuration() == null ? other.getResDuration() == null : this.getResDuration().equals(other.getResDuration())) |
||||
&& (this.getResUrl() == null ? other.getResUrl() == null : this.getResUrl().equals(other.getResUrl())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getQuoteStatus() == null ? other.getQuoteStatus() == null : this.getQuoteStatus().equals(other.getQuoteStatus())) |
||||
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) |
||||
&& (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 + ((getFolderId() == null) ? 0 : getFolderId().hashCode()); |
||||
result = prime * result + ((getResType() == null) ? 0 : getResType().hashCode()); |
||||
result = prime * result + ((getCoverPicture() == null) ? 0 : getCoverPicture().hashCode()); |
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); |
||||
result = prime * result + ((getResSize() == null) ? 0 : getResSize().hashCode()); |
||||
result = prime * result + ((getResDuration() == null) ? 0 : getResDuration().hashCode()); |
||||
result = prime * result + ((getResUrl() == null) ? 0 : getResUrl().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getQuoteStatus() == null) ? 0 : getQuoteStatus().hashCode()); |
||||
result = prime * result + ((getOpId() == null) ? 0 : getOpId().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(", folderId=").append(folderId); |
||||
sb.append(", resType=").append(resType); |
||||
sb.append(", coverPicture=").append(coverPicture); |
||||
sb.append(", name=").append(name); |
||||
sb.append(", resSize=").append(resSize); |
||||
sb.append(", resDuration=").append(resDuration); |
||||
sb.append(", resUrl=").append(resUrl); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", quoteStatus=").append(quoteStatus); |
||||
sb.append(", opId=").append(opId); |
||||
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