parent
e25f2021a8
commit
7d08f6592a
@ -0,0 +1,142 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.GoodsDetail; |
||||
import com.hai.entity.GoodsDetailExample; |
||||
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 GoodsDetailMapper extends GoodsDetailMapperExt { |
||||
@SelectProvider(type=GoodsDetailSqlProvider.class, method="countByExample") |
||||
long countByExample(GoodsDetailExample example); |
||||
|
||||
@DeleteProvider(type=GoodsDetailSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(GoodsDetailExample example); |
||||
|
||||
@Delete({ |
||||
"delete from goods_detail", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into goods_detail (goods_type, `name`, ", |
||||
"list_describe, goods_describe, ", |
||||
"list_img, banner_img, ", |
||||
"detail_img, `status`, ", |
||||
"create_time, update_time, ", |
||||
"op_id, op_name, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values (#{goodsType,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ", |
||||
"#{listDescribe,jdbcType=VARCHAR}, #{goodsDescribe,jdbcType=VARCHAR}, ", |
||||
"#{listImg,jdbcType=VARCHAR}, #{bannerImg,jdbcType=VARCHAR}, ", |
||||
"#{detailImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", |
||||
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(GoodsDetail record); |
||||
|
||||
@InsertProvider(type=GoodsDetailSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(GoodsDetail record); |
||||
|
||||
@SelectProvider(type=GoodsDetailSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="list_describe", property="listDescribe", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="goods_describe", property="goodsDescribe", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="list_img", property="listImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="detail_img", property="detailImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), |
||||
@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<GoodsDetail> selectByExample(GoodsDetailExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, goods_type, `name`, list_describe, goods_describe, list_img, banner_img, ", |
||||
"detail_img, `status`, create_time, update_time, op_id, op_name, ext_1, ext_2, ", |
||||
"ext_3", |
||||
"from goods_detail", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="list_describe", property="listDescribe", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="goods_describe", property="goodsDescribe", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="list_img", property="listImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="detail_img", property="detailImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), |
||||
@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) |
||||
}) |
||||
GoodsDetail selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=GoodsDetailSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") GoodsDetail record, @Param("example") GoodsDetailExample example); |
||||
|
||||
@UpdateProvider(type=GoodsDetailSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") GoodsDetail record, @Param("example") GoodsDetailExample example); |
||||
|
||||
@UpdateProvider(type=GoodsDetailSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(GoodsDetail record); |
||||
|
||||
@Update({ |
||||
"update goods_detail", |
||||
"set goods_type = #{goodsType,jdbcType=BIGINT},", |
||||
"`name` = #{name,jdbcType=VARCHAR},", |
||||
"list_describe = #{listDescribe,jdbcType=VARCHAR},", |
||||
"goods_describe = #{goodsDescribe,jdbcType=VARCHAR},", |
||||
"list_img = #{listImg,jdbcType=VARCHAR},", |
||||
"banner_img = #{bannerImg,jdbcType=VARCHAR},", |
||||
"detail_img = #{detailImg,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"op_id = #{opId,jdbcType=BIGINT},", |
||||
"op_name = #{opName,jdbcType=VARCHAR},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(GoodsDetail record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface GoodsDetailMapperExt { |
||||
} |
@ -0,0 +1,388 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.GoodsDetail; |
||||
import com.hai.entity.GoodsDetailExample.Criteria; |
||||
import com.hai.entity.GoodsDetailExample.Criterion; |
||||
import com.hai.entity.GoodsDetailExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class GoodsDetailSqlProvider { |
||||
|
||||
public String countByExample(GoodsDetailExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("goods_detail"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(GoodsDetailExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("goods_detail"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(GoodsDetail record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("goods_detail"); |
||||
|
||||
if (record.getGoodsType() != null) { |
||||
sql.VALUES("goods_type", "#{goodsType,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getName() != null) { |
||||
sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListDescribe() != null) { |
||||
sql.VALUES("list_describe", "#{listDescribe,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getGoodsDescribe() != null) { |
||||
sql.VALUES("goods_describe", "#{goodsDescribe,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListImg() != null) { |
||||
sql.VALUES("list_img", "#{listImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getBannerImg() != null) { |
||||
sql.VALUES("banner_img", "#{bannerImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDetailImg() != null) { |
||||
sql.VALUES("detail_img", "#{detailImg,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.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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(GoodsDetailExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("goods_type"); |
||||
sql.SELECT("`name`"); |
||||
sql.SELECT("list_describe"); |
||||
sql.SELECT("goods_describe"); |
||||
sql.SELECT("list_img"); |
||||
sql.SELECT("banner_img"); |
||||
sql.SELECT("detail_img"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("op_id"); |
||||
sql.SELECT("op_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("goods_detail"); |
||||
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) { |
||||
GoodsDetail record = (GoodsDetail) parameter.get("record"); |
||||
GoodsDetailExample example = (GoodsDetailExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_detail"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getGoodsType() != null) { |
||||
sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getName() != null) { |
||||
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListDescribe() != null) { |
||||
sql.SET("list_describe = #{record.listDescribe,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getGoodsDescribe() != null) { |
||||
sql.SET("goods_describe = #{record.goodsDescribe,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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.getDetailImg() != null) { |
||||
sql.SET("detail_img = #{record.detailImg,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.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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("goods_detail"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); |
||||
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); |
||||
sql.SET("list_describe = #{record.listDescribe,jdbcType=VARCHAR}"); |
||||
sql.SET("goods_describe = #{record.goodsDescribe,jdbcType=VARCHAR}"); |
||||
sql.SET("list_img = #{record.listImg,jdbcType=VARCHAR}"); |
||||
sql.SET("banner_img = #{record.bannerImg,jdbcType=VARCHAR}"); |
||||
sql.SET("detail_img = #{record.detailImg,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
GoodsDetailExample example = (GoodsDetailExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(GoodsDetail record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_detail"); |
||||
|
||||
if (record.getGoodsType() != null) { |
||||
sql.SET("goods_type = #{goodsType,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getName() != null) { |
||||
sql.SET("`name` = #{name,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListDescribe() != null) { |
||||
sql.SET("list_describe = #{listDescribe,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getGoodsDescribe() != null) { |
||||
sql.SET("goods_describe = #{goodsDescribe,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListImg() != null) { |
||||
sql.SET("list_img = #{listImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getBannerImg() != null) { |
||||
sql.SET("banner_img = #{bannerImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDetailImg() != null) { |
||||
sql.SET("detail_img = #{detailImg,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.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.SET("op_id = #{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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, GoodsDetailExample 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,92 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.GoodsLogistics; |
||||
import com.hai.entity.GoodsLogisticsExample; |
||||
import java.util.List; |
||||
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.SelectProvider; |
||||
import org.apache.ibatis.annotations.UpdateProvider; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface GoodsLogisticsMapper extends GoodsLogisticsMapperExt { |
||||
@SelectProvider(type=GoodsLogisticsSqlProvider.class, method="countByExample") |
||||
long countByExample(GoodsLogisticsExample example); |
||||
|
||||
@DeleteProvider(type=GoodsLogisticsSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(GoodsLogisticsExample example); |
||||
|
||||
@Insert({ |
||||
"insert into goods_logistics (user_id, order_id, ", |
||||
"task_no, `number`, ", |
||||
"logistics_status, logistics_status_desc, ", |
||||
"the_last_message, the_last_time, ", |
||||
"take_time, courier, ", |
||||
"courier_phone, logistics_trace_details, ", |
||||
"express_company_name, `status`, ", |
||||
"create_time, op_id, ", |
||||
"op_name, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{userId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, ", |
||||
"#{taskNo,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, ", |
||||
"#{logisticsStatus,jdbcType=VARCHAR}, #{logisticsStatusDesc,jdbcType=VARCHAR}, ", |
||||
"#{theLastMessage,jdbcType=VARCHAR}, #{theLastTime,jdbcType=TIMESTAMP}, ", |
||||
"#{takeTime,jdbcType=VARCHAR}, #{courier,jdbcType=VARCHAR}, ", |
||||
"#{courierPhone,jdbcType=VARCHAR}, #{logisticsTraceDetails,jdbcType=VARCHAR}, ", |
||||
"#{expressCompanyName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", |
||||
"#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(GoodsLogistics record); |
||||
|
||||
@InsertProvider(type=GoodsLogisticsSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(GoodsLogistics record); |
||||
|
||||
@SelectProvider(type=GoodsLogisticsSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="task_no", property="taskNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="number", property="number", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="logistics_status", property="logisticsStatus", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="logistics_status_desc", property="logisticsStatusDesc", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="the_last_message", property="theLastMessage", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="the_last_time", property="theLastTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="take_time", property="takeTime", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="courier", property="courier", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="courier_phone", property="courierPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="logistics_trace_details", property="logisticsTraceDetails", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="express_company_name", property="expressCompanyName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), |
||||
@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<GoodsLogistics> selectByExample(GoodsLogisticsExample example); |
||||
|
||||
@UpdateProvider(type=GoodsLogisticsSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") GoodsLogistics record, @Param("example") GoodsLogisticsExample example); |
||||
|
||||
@UpdateProvider(type=GoodsLogisticsSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") GoodsLogistics record, @Param("example") GoodsLogisticsExample example); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface GoodsLogisticsMapperExt { |
||||
} |
@ -0,0 +1,369 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.GoodsLogistics; |
||||
import com.hai.entity.GoodsLogisticsExample.Criteria; |
||||
import com.hai.entity.GoodsLogisticsExample.Criterion; |
||||
import com.hai.entity.GoodsLogisticsExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class GoodsLogisticsSqlProvider { |
||||
|
||||
public String countByExample(GoodsLogisticsExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("goods_logistics"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(GoodsLogisticsExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("goods_logistics"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(GoodsLogistics record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("goods_logistics"); |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getTaskNo() != null) { |
||||
sql.VALUES("task_no", "#{taskNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNumber() != null) { |
||||
sql.VALUES("`number`", "#{number,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatus() != null) { |
||||
sql.VALUES("logistics_status", "#{logisticsStatus,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatusDesc() != null) { |
||||
sql.VALUES("logistics_status_desc", "#{logisticsStatusDesc,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastMessage() != null) { |
||||
sql.VALUES("the_last_message", "#{theLastMessage,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastTime() != null) { |
||||
sql.VALUES("the_last_time", "#{theLastTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getTakeTime() != null) { |
||||
sql.VALUES("take_time", "#{takeTime,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourier() != null) { |
||||
sql.VALUES("courier", "#{courier,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourierPhone() != null) { |
||||
sql.VALUES("courier_phone", "#{courierPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsTraceDetails() != null) { |
||||
sql.VALUES("logistics_trace_details", "#{logisticsTraceDetails,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExpressCompanyName() != null) { |
||||
sql.VALUES("express_company_name", "#{expressCompanyName,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.getOpId() != null) { |
||||
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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(GoodsLogisticsExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("user_id"); |
||||
sql.SELECT("order_id"); |
||||
sql.SELECT("task_no"); |
||||
sql.SELECT("`number`"); |
||||
sql.SELECT("logistics_status"); |
||||
sql.SELECT("logistics_status_desc"); |
||||
sql.SELECT("the_last_message"); |
||||
sql.SELECT("the_last_time"); |
||||
sql.SELECT("take_time"); |
||||
sql.SELECT("courier"); |
||||
sql.SELECT("courier_phone"); |
||||
sql.SELECT("logistics_trace_details"); |
||||
sql.SELECT("express_company_name"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("op_id"); |
||||
sql.SELECT("op_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("goods_logistics"); |
||||
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) { |
||||
GoodsLogistics record = (GoodsLogistics) parameter.get("record"); |
||||
GoodsLogisticsExample example = (GoodsLogisticsExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_logistics"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getTaskNo() != null) { |
||||
sql.SET("task_no = #{record.taskNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNumber() != null) { |
||||
sql.SET("`number` = #{record.number,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatus() != null) { |
||||
sql.SET("logistics_status = #{record.logisticsStatus,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatusDesc() != null) { |
||||
sql.SET("logistics_status_desc = #{record.logisticsStatusDesc,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastMessage() != null) { |
||||
sql.SET("the_last_message = #{record.theLastMessage,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastTime() != null) { |
||||
sql.SET("the_last_time = #{record.theLastTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getTakeTime() != null) { |
||||
sql.SET("take_time = #{record.takeTime,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourier() != null) { |
||||
sql.SET("courier = #{record.courier,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourierPhone() != null) { |
||||
sql.SET("courier_phone = #{record.courierPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsTraceDetails() != null) { |
||||
sql.SET("logistics_trace_details = #{record.logisticsTraceDetails,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExpressCompanyName() != null) { |
||||
sql.SET("express_company_name = #{record.expressCompanyName,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.getOpId() != null) { |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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("goods_logistics"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); |
||||
sql.SET("task_no = #{record.taskNo,jdbcType=VARCHAR}"); |
||||
sql.SET("`number` = #{record.number,jdbcType=VARCHAR}"); |
||||
sql.SET("logistics_status = #{record.logisticsStatus,jdbcType=VARCHAR}"); |
||||
sql.SET("logistics_status_desc = #{record.logisticsStatusDesc,jdbcType=VARCHAR}"); |
||||
sql.SET("the_last_message = #{record.theLastMessage,jdbcType=VARCHAR}"); |
||||
sql.SET("the_last_time = #{record.theLastTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("take_time = #{record.takeTime,jdbcType=VARCHAR}"); |
||||
sql.SET("courier = #{record.courier,jdbcType=VARCHAR}"); |
||||
sql.SET("courier_phone = #{record.courierPhone,jdbcType=VARCHAR}"); |
||||
sql.SET("logistics_trace_details = #{record.logisticsTraceDetails,jdbcType=VARCHAR}"); |
||||
sql.SET("express_company_name = #{record.expressCompanyName,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
GoodsLogisticsExample example = (GoodsLogisticsExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, GoodsLogisticsExample 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,76 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.GoodsReview; |
||||
import com.hai.entity.GoodsReviewExample; |
||||
import java.util.List; |
||||
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.SelectProvider; |
||||
import org.apache.ibatis.annotations.UpdateProvider; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface GoodsReviewMapper extends GoodsReviewMapperExt { |
||||
@SelectProvider(type=GoodsReviewSqlProvider.class, method="countByExample") |
||||
long countByExample(GoodsReviewExample example); |
||||
|
||||
@DeleteProvider(type=GoodsReviewSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(GoodsReviewExample example); |
||||
|
||||
@Insert({ |
||||
"insert into goods_review (user_id, goods_id, ", |
||||
"sku_id, review_describe, ", |
||||
"show_img, `status`, ", |
||||
"create_time, op_id, ", |
||||
"op_name, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{userId,jdbcType=BIGINT}, #{goodsId,jdbcType=BIGINT}, ", |
||||
"#{skuId,jdbcType=BIGINT}, #{reviewDescribe,jdbcType=VARCHAR}, ", |
||||
"#{showImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", |
||||
"#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(GoodsReview record); |
||||
|
||||
@InsertProvider(type=GoodsReviewSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(GoodsReview record); |
||||
|
||||
@SelectProvider(type=GoodsReviewSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="sku_id", property="skuId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="review_describe", property="reviewDescribe", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="show_img", property="showImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), |
||||
@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<GoodsReview> selectByExample(GoodsReviewExample example); |
||||
|
||||
@UpdateProvider(type=GoodsReviewSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") GoodsReview record, @Param("example") GoodsReviewExample example); |
||||
|
||||
@UpdateProvider(type=GoodsReviewSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") GoodsReview record, @Param("example") GoodsReviewExample example); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface GoodsReviewMapperExt { |
||||
} |
@ -0,0 +1,289 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.GoodsReview; |
||||
import com.hai.entity.GoodsReviewExample.Criteria; |
||||
import com.hai.entity.GoodsReviewExample.Criterion; |
||||
import com.hai.entity.GoodsReviewExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class GoodsReviewSqlProvider { |
||||
|
||||
public String countByExample(GoodsReviewExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("goods_review"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(GoodsReviewExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("goods_review"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(GoodsReview record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("goods_review"); |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSkuId() != null) { |
||||
sql.VALUES("sku_id", "#{skuId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getReviewDescribe() != null) { |
||||
sql.VALUES("review_describe", "#{reviewDescribe,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getShowImg() != null) { |
||||
sql.VALUES("show_img", "#{showImg,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.getOpId() != null) { |
||||
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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(GoodsReviewExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("user_id"); |
||||
sql.SELECT("goods_id"); |
||||
sql.SELECT("sku_id"); |
||||
sql.SELECT("review_describe"); |
||||
sql.SELECT("show_img"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("op_id"); |
||||
sql.SELECT("op_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("goods_review"); |
||||
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) { |
||||
GoodsReview record = (GoodsReview) parameter.get("record"); |
||||
GoodsReviewExample example = (GoodsReviewExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_review"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSkuId() != null) { |
||||
sql.SET("sku_id = #{record.skuId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getReviewDescribe() != null) { |
||||
sql.SET("review_describe = #{record.reviewDescribe,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getShowImg() != null) { |
||||
sql.SET("show_img = #{record.showImg,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.getOpId() != null) { |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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("goods_review"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); |
||||
sql.SET("sku_id = #{record.skuId,jdbcType=BIGINT}"); |
||||
sql.SET("review_describe = #{record.reviewDescribe,jdbcType=VARCHAR}"); |
||||
sql.SET("show_img = #{record.showImg,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
GoodsReviewExample example = (GoodsReviewExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, GoodsReviewExample 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,141 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.GoodsSku; |
||||
import com.hai.entity.GoodsSkuExample; |
||||
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 GoodsSkuMapper extends GoodsSkuMapperExt { |
||||
@SelectProvider(type=GoodsSkuSqlProvider.class, method="countByExample") |
||||
long countByExample(GoodsSkuExample example); |
||||
|
||||
@DeleteProvider(type=GoodsSkuSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(GoodsSkuExample example); |
||||
|
||||
@Delete({ |
||||
"delete from goods_sku", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into goods_sku (goods_id, `name`, ", |
||||
"price, original_price, ", |
||||
"stock, show_img, ", |
||||
"banner_img, `status`, ", |
||||
"create_time, update_time, ", |
||||
"op_id, op_name, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values (#{goodsId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ", |
||||
"#{price,jdbcType=DECIMAL}, #{originalPrice,jdbcType=DECIMAL}, ", |
||||
"#{stock,jdbcType=INTEGER}, #{showImg,jdbcType=VARCHAR}, ", |
||||
"#{bannerImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", |
||||
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(GoodsSku record); |
||||
|
||||
@InsertProvider(type=GoodsSkuSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(GoodsSku record); |
||||
|
||||
@SelectProvider(type=GoodsSkuSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="original_price", property="originalPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="stock", property="stock", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="show_img", property="showImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), |
||||
@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<GoodsSku> selectByExample(GoodsSkuExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, goods_id, `name`, price, original_price, stock, show_img, banner_img, `status`, ", |
||||
"create_time, update_time, op_id, op_name, ext_1, ext_2, ext_3", |
||||
"from goods_sku", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="original_price", property="originalPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="stock", property="stock", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="show_img", property="showImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), |
||||
@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) |
||||
}) |
||||
GoodsSku selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=GoodsSkuSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") GoodsSku record, @Param("example") GoodsSkuExample example); |
||||
|
||||
@UpdateProvider(type=GoodsSkuSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") GoodsSku record, @Param("example") GoodsSkuExample example); |
||||
|
||||
@UpdateProvider(type=GoodsSkuSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(GoodsSku record); |
||||
|
||||
@Update({ |
||||
"update goods_sku", |
||||
"set goods_id = #{goodsId,jdbcType=BIGINT},", |
||||
"`name` = #{name,jdbcType=VARCHAR},", |
||||
"price = #{price,jdbcType=DECIMAL},", |
||||
"original_price = #{originalPrice,jdbcType=DECIMAL},", |
||||
"stock = #{stock,jdbcType=INTEGER},", |
||||
"show_img = #{showImg,jdbcType=VARCHAR},", |
||||
"banner_img = #{bannerImg,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"op_id = #{opId,jdbcType=BIGINT},", |
||||
"op_name = #{opName,jdbcType=VARCHAR},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(GoodsSku record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface GoodsSkuMapperExt { |
||||
} |
@ -0,0 +1,388 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.GoodsSku; |
||||
import com.hai.entity.GoodsSkuExample.Criteria; |
||||
import com.hai.entity.GoodsSkuExample.Criterion; |
||||
import com.hai.entity.GoodsSkuExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class GoodsSkuSqlProvider { |
||||
|
||||
public String countByExample(GoodsSkuExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("goods_sku"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(GoodsSkuExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("goods_sku"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(GoodsSku record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("goods_sku"); |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getName() != null) { |
||||
sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.VALUES("price", "#{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getOriginalPrice() != null) { |
||||
sql.VALUES("original_price", "#{originalPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStock() != null) { |
||||
sql.VALUES("stock", "#{stock,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getShowImg() != null) { |
||||
sql.VALUES("show_img", "#{showImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getBannerImg() != null) { |
||||
sql.VALUES("banner_img", "#{bannerImg,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.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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(GoodsSkuExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("goods_id"); |
||||
sql.SELECT("`name`"); |
||||
sql.SELECT("price"); |
||||
sql.SELECT("original_price"); |
||||
sql.SELECT("stock"); |
||||
sql.SELECT("show_img"); |
||||
sql.SELECT("banner_img"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("op_id"); |
||||
sql.SELECT("op_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("goods_sku"); |
||||
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) { |
||||
GoodsSku record = (GoodsSku) parameter.get("record"); |
||||
GoodsSkuExample example = (GoodsSkuExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_sku"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getName() != null) { |
||||
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getOriginalPrice() != null) { |
||||
sql.SET("original_price = #{record.originalPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStock() != null) { |
||||
sql.SET("stock = #{record.stock,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getShowImg() != null) { |
||||
sql.SET("show_img = #{record.showImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getBannerImg() != null) { |
||||
sql.SET("banner_img = #{record.bannerImg,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.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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("goods_sku"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); |
||||
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
sql.SET("original_price = #{record.originalPrice,jdbcType=DECIMAL}"); |
||||
sql.SET("stock = #{record.stock,jdbcType=INTEGER}"); |
||||
sql.SET("show_img = #{record.showImg,jdbcType=VARCHAR}"); |
||||
sql.SET("banner_img = #{record.bannerImg,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
GoodsSkuExample example = (GoodsSkuExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(GoodsSku record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_sku"); |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getName() != null) { |
||||
sql.SET("`name` = #{name,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getOriginalPrice() != null) { |
||||
sql.SET("original_price = #{originalPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStock() != null) { |
||||
sql.SET("stock = #{stock,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getShowImg() != null) { |
||||
sql.SET("show_img = #{showImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getBannerImg() != null) { |
||||
sql.SET("banner_img = #{bannerImg,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.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.SET("op_id = #{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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, GoodsSkuExample 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,305 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* goods_detail |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class GoodsDetail implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 商品类型 |
||||
*/ |
||||
private Long goodsType; |
||||
|
||||
/** |
||||
* 商品名称 |
||||
*/ |
||||
private String name; |
||||
|
||||
/** |
||||
* 列表描述 |
||||
*/ |
||||
private String listDescribe; |
||||
|
||||
/** |
||||
* 描述 |
||||
*/ |
||||
private String goodsDescribe; |
||||
|
||||
/** |
||||
* 列表图 |
||||
*/ |
||||
private String listImg; |
||||
|
||||
/** |
||||
* 轮播图 |
||||
*/ |
||||
private String bannerImg; |
||||
|
||||
/** |
||||
* 详情图 |
||||
*/ |
||||
private String detailImg; |
||||
|
||||
/** |
||||
* 商品状态:0:删除 1:上线 2:编辑中 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 操作人员id |
||||
*/ |
||||
private Long opId; |
||||
|
||||
/** |
||||
* 操作人员名称 |
||||
*/ |
||||
private String opName; |
||||
|
||||
/** |
||||
* ext_1 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* ext_2 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* ext_3 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getGoodsType() { |
||||
return goodsType; |
||||
} |
||||
|
||||
public void setGoodsType(Long goodsType) { |
||||
this.goodsType = goodsType; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getListDescribe() { |
||||
return listDescribe; |
||||
} |
||||
|
||||
public void setListDescribe(String listDescribe) { |
||||
this.listDescribe = listDescribe; |
||||
} |
||||
|
||||
public String getGoodsDescribe() { |
||||
return goodsDescribe; |
||||
} |
||||
|
||||
public void setGoodsDescribe(String goodsDescribe) { |
||||
this.goodsDescribe = goodsDescribe; |
||||
} |
||||
|
||||
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 getDetailImg() { |
||||
return detailImg; |
||||
} |
||||
|
||||
public void setDetailImg(String detailImg) { |
||||
this.detailImg = detailImg; |
||||
} |
||||
|
||||
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 Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
public Long getOpId() { |
||||
return opId; |
||||
} |
||||
|
||||
public void setOpId(Long opId) { |
||||
this.opId = opId; |
||||
} |
||||
|
||||
public String getOpName() { |
||||
return opName; |
||||
} |
||||
|
||||
public void setOpName(String opName) { |
||||
this.opName = opName; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
GoodsDetail other = (GoodsDetail) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType())) |
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) |
||||
&& (this.getListDescribe() == null ? other.getListDescribe() == null : this.getListDescribe().equals(other.getListDescribe())) |
||||
&& (this.getGoodsDescribe() == null ? other.getGoodsDescribe() == null : this.getGoodsDescribe().equals(other.getGoodsDescribe())) |
||||
&& (this.getListImg() == null ? other.getListImg() == null : this.getListImg().equals(other.getListImg())) |
||||
&& (this.getBannerImg() == null ? other.getBannerImg() == null : this.getBannerImg().equals(other.getBannerImg())) |
||||
&& (this.getDetailImg() == null ? other.getDetailImg() == null : this.getDetailImg().equals(other.getDetailImg())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) |
||||
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName())) |
||||
&& (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 + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode()); |
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); |
||||
result = prime * result + ((getListDescribe() == null) ? 0 : getListDescribe().hashCode()); |
||||
result = prime * result + ((getGoodsDescribe() == null) ? 0 : getGoodsDescribe().hashCode()); |
||||
result = prime * result + ((getListImg() == null) ? 0 : getListImg().hashCode()); |
||||
result = prime * result + ((getBannerImg() == null) ? 0 : getBannerImg().hashCode()); |
||||
result = prime * result + ((getDetailImg() == null) ? 0 : getDetailImg().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode()); |
||||
result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", goodsType=").append(goodsType); |
||||
sb.append(", name=").append(name); |
||||
sb.append(", listDescribe=").append(listDescribe); |
||||
sb.append(", goodsDescribe=").append(goodsDescribe); |
||||
sb.append(", listImg=").append(listImg); |
||||
sb.append(", bannerImg=").append(bannerImg); |
||||
sb.append(", detailImg=").append(detailImg); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", opId=").append(opId); |
||||
sb.append(", opName=").append(opName); |
||||
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
@ -0,0 +1,385 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* goods_logistics |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class GoodsLogistics implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 用户id |
||||
*/ |
||||
private Long userId; |
||||
|
||||
/** |
||||
* 订单ID |
||||
*/ |
||||
private Long orderId; |
||||
|
||||
/** |
||||
* 唯一业务号 |
||||
*/ |
||||
private String taskNo; |
||||
|
||||
/** |
||||
* 快递单号 |
||||
*/ |
||||
private String number; |
||||
|
||||
/** |
||||
* 物流状态描述 |
||||
*/ |
||||
private String logisticsStatus; |
||||
|
||||
/** |
||||
* 物流状态描述 |
||||
*/ |
||||
private String logisticsStatusDesc; |
||||
|
||||
/** |
||||
* 运单号物流流转当前最新描述 |
||||
*/ |
||||
private String theLastMessage; |
||||
|
||||
/** |
||||
* 运单号物流流转当前最新变更时间 |
||||
*/ |
||||
private Date theLastTime; |
||||
|
||||
/** |
||||
* 从揽收到送达所耗时间 |
||||
*/ |
||||
private String takeTime; |
||||
|
||||
/** |
||||
* 快递员 |
||||
*/ |
||||
private String courier; |
||||
|
||||
/** |
||||
* 快递员联系方式 |
||||
*/ |
||||
private String courierPhone; |
||||
|
||||
/** |
||||
* 物流明细 |
||||
*/ |
||||
private String logisticsTraceDetails; |
||||
|
||||
/** |
||||
* 快递公司名称 |
||||
*/ |
||||
private String expressCompanyName; |
||||
|
||||
/** |
||||
* 状态:0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 操作人员id |
||||
*/ |
||||
private Long opId; |
||||
|
||||
/** |
||||
* 操作人员名称 |
||||
*/ |
||||
private String opName; |
||||
|
||||
/** |
||||
* ext_1 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* ext_2 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* ext_3 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Long userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public Long getOrderId() { |
||||
return orderId; |
||||
} |
||||
|
||||
public void setOrderId(Long orderId) { |
||||
this.orderId = orderId; |
||||
} |
||||
|
||||
public String getTaskNo() { |
||||
return taskNo; |
||||
} |
||||
|
||||
public void setTaskNo(String taskNo) { |
||||
this.taskNo = taskNo; |
||||
} |
||||
|
||||
public String getNumber() { |
||||
return number; |
||||
} |
||||
|
||||
public void setNumber(String number) { |
||||
this.number = number; |
||||
} |
||||
|
||||
public String getLogisticsStatus() { |
||||
return logisticsStatus; |
||||
} |
||||
|
||||
public void setLogisticsStatus(String logisticsStatus) { |
||||
this.logisticsStatus = logisticsStatus; |
||||
} |
||||
|
||||
public String getLogisticsStatusDesc() { |
||||
return logisticsStatusDesc; |
||||
} |
||||
|
||||
public void setLogisticsStatusDesc(String logisticsStatusDesc) { |
||||
this.logisticsStatusDesc = logisticsStatusDesc; |
||||
} |
||||
|
||||
public String getTheLastMessage() { |
||||
return theLastMessage; |
||||
} |
||||
|
||||
public void setTheLastMessage(String theLastMessage) { |
||||
this.theLastMessage = theLastMessage; |
||||
} |
||||
|
||||
public Date getTheLastTime() { |
||||
return theLastTime; |
||||
} |
||||
|
||||
public void setTheLastTime(Date theLastTime) { |
||||
this.theLastTime = theLastTime; |
||||
} |
||||
|
||||
public String getTakeTime() { |
||||
return takeTime; |
||||
} |
||||
|
||||
public void setTakeTime(String takeTime) { |
||||
this.takeTime = takeTime; |
||||
} |
||||
|
||||
public String getCourier() { |
||||
return courier; |
||||
} |
||||
|
||||
public void setCourier(String courier) { |
||||
this.courier = courier; |
||||
} |
||||
|
||||
public String getCourierPhone() { |
||||
return courierPhone; |
||||
} |
||||
|
||||
public void setCourierPhone(String courierPhone) { |
||||
this.courierPhone = courierPhone; |
||||
} |
||||
|
||||
public String getLogisticsTraceDetails() { |
||||
return logisticsTraceDetails; |
||||
} |
||||
|
||||
public void setLogisticsTraceDetails(String logisticsTraceDetails) { |
||||
this.logisticsTraceDetails = logisticsTraceDetails; |
||||
} |
||||
|
||||
public String getExpressCompanyName() { |
||||
return expressCompanyName; |
||||
} |
||||
|
||||
public void setExpressCompanyName(String expressCompanyName) { |
||||
this.expressCompanyName = expressCompanyName; |
||||
} |
||||
|
||||
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 Long getOpId() { |
||||
return opId; |
||||
} |
||||
|
||||
public void setOpId(Long opId) { |
||||
this.opId = opId; |
||||
} |
||||
|
||||
public String getOpName() { |
||||
return opName; |
||||
} |
||||
|
||||
public void setOpName(String opName) { |
||||
this.opName = opName; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
GoodsLogistics other = (GoodsLogistics) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) |
||||
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) |
||||
&& (this.getTaskNo() == null ? other.getTaskNo() == null : this.getTaskNo().equals(other.getTaskNo())) |
||||
&& (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber())) |
||||
&& (this.getLogisticsStatus() == null ? other.getLogisticsStatus() == null : this.getLogisticsStatus().equals(other.getLogisticsStatus())) |
||||
&& (this.getLogisticsStatusDesc() == null ? other.getLogisticsStatusDesc() == null : this.getLogisticsStatusDesc().equals(other.getLogisticsStatusDesc())) |
||||
&& (this.getTheLastMessage() == null ? other.getTheLastMessage() == null : this.getTheLastMessage().equals(other.getTheLastMessage())) |
||||
&& (this.getTheLastTime() == null ? other.getTheLastTime() == null : this.getTheLastTime().equals(other.getTheLastTime())) |
||||
&& (this.getTakeTime() == null ? other.getTakeTime() == null : this.getTakeTime().equals(other.getTakeTime())) |
||||
&& (this.getCourier() == null ? other.getCourier() == null : this.getCourier().equals(other.getCourier())) |
||||
&& (this.getCourierPhone() == null ? other.getCourierPhone() == null : this.getCourierPhone().equals(other.getCourierPhone())) |
||||
&& (this.getLogisticsTraceDetails() == null ? other.getLogisticsTraceDetails() == null : this.getLogisticsTraceDetails().equals(other.getLogisticsTraceDetails())) |
||||
&& (this.getExpressCompanyName() == null ? other.getExpressCompanyName() == null : this.getExpressCompanyName().equals(other.getExpressCompanyName())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) |
||||
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName())) |
||||
&& (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 + ((getUserId() == null) ? 0 : getUserId().hashCode()); |
||||
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); |
||||
result = prime * result + ((getTaskNo() == null) ? 0 : getTaskNo().hashCode()); |
||||
result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode()); |
||||
result = prime * result + ((getLogisticsStatus() == null) ? 0 : getLogisticsStatus().hashCode()); |
||||
result = prime * result + ((getLogisticsStatusDesc() == null) ? 0 : getLogisticsStatusDesc().hashCode()); |
||||
result = prime * result + ((getTheLastMessage() == null) ? 0 : getTheLastMessage().hashCode()); |
||||
result = prime * result + ((getTheLastTime() == null) ? 0 : getTheLastTime().hashCode()); |
||||
result = prime * result + ((getTakeTime() == null) ? 0 : getTakeTime().hashCode()); |
||||
result = prime * result + ((getCourier() == null) ? 0 : getCourier().hashCode()); |
||||
result = prime * result + ((getCourierPhone() == null) ? 0 : getCourierPhone().hashCode()); |
||||
result = prime * result + ((getLogisticsTraceDetails() == null) ? 0 : getLogisticsTraceDetails().hashCode()); |
||||
result = prime * result + ((getExpressCompanyName() == null) ? 0 : getExpressCompanyName().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode()); |
||||
result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", userId=").append(userId); |
||||
sb.append(", orderId=").append(orderId); |
||||
sb.append(", taskNo=").append(taskNo); |
||||
sb.append(", number=").append(number); |
||||
sb.append(", logisticsStatus=").append(logisticsStatus); |
||||
sb.append(", logisticsStatusDesc=").append(logisticsStatusDesc); |
||||
sb.append(", theLastMessage=").append(theLastMessage); |
||||
sb.append(", theLastTime=").append(theLastTime); |
||||
sb.append(", takeTime=").append(takeTime); |
||||
sb.append(", courier=").append(courier); |
||||
sb.append(", courierPhone=").append(courierPhone); |
||||
sb.append(", logisticsTraceDetails=").append(logisticsTraceDetails); |
||||
sb.append(", expressCompanyName=").append(expressCompanyName); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", opId=").append(opId); |
||||
sb.append(", opName=").append(opName); |
||||
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
@ -0,0 +1,257 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* goods_review |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class GoodsReview implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 用户id |
||||
*/ |
||||
private Long userId; |
||||
|
||||
/** |
||||
* 商品id |
||||
*/ |
||||
private Long goodsId; |
||||
|
||||
/** |
||||
* sku_id |
||||
*/ |
||||
private Long skuId; |
||||
|
||||
/** |
||||
* 描述 |
||||
*/ |
||||
private String reviewDescribe; |
||||
|
||||
/** |
||||
* 图片 |
||||
*/ |
||||
private String showImg; |
||||
|
||||
/** |
||||
* 状态:0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 操作人员id |
||||
*/ |
||||
private Long opId; |
||||
|
||||
/** |
||||
* 操作人员名称 |
||||
*/ |
||||
private String opName; |
||||
|
||||
/** |
||||
* ext_1 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* ext_2 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* ext_3 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Long userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public Long getGoodsId() { |
||||
return goodsId; |
||||
} |
||||
|
||||
public void setGoodsId(Long goodsId) { |
||||
this.goodsId = goodsId; |
||||
} |
||||
|
||||
public Long getSkuId() { |
||||
return skuId; |
||||
} |
||||
|
||||
public void setSkuId(Long skuId) { |
||||
this.skuId = skuId; |
||||
} |
||||
|
||||
public String getReviewDescribe() { |
||||
return reviewDescribe; |
||||
} |
||||
|
||||
public void setReviewDescribe(String reviewDescribe) { |
||||
this.reviewDescribe = reviewDescribe; |
||||
} |
||||
|
||||
public String getShowImg() { |
||||
return showImg; |
||||
} |
||||
|
||||
public void setShowImg(String showImg) { |
||||
this.showImg = showImg; |
||||
} |
||||
|
||||
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 Long getOpId() { |
||||
return opId; |
||||
} |
||||
|
||||
public void setOpId(Long opId) { |
||||
this.opId = opId; |
||||
} |
||||
|
||||
public String getOpName() { |
||||
return opName; |
||||
} |
||||
|
||||
public void setOpName(String opName) { |
||||
this.opName = opName; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
GoodsReview other = (GoodsReview) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) |
||||
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) |
||||
&& (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId())) |
||||
&& (this.getReviewDescribe() == null ? other.getReviewDescribe() == null : this.getReviewDescribe().equals(other.getReviewDescribe())) |
||||
&& (this.getShowImg() == null ? other.getShowImg() == null : this.getShowImg().equals(other.getShowImg())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) |
||||
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName())) |
||||
&& (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 + ((getUserId() == null) ? 0 : getUserId().hashCode()); |
||||
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); |
||||
result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode()); |
||||
result = prime * result + ((getReviewDescribe() == null) ? 0 : getReviewDescribe().hashCode()); |
||||
result = prime * result + ((getShowImg() == null) ? 0 : getShowImg().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode()); |
||||
result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", userId=").append(userId); |
||||
sb.append(", goodsId=").append(goodsId); |
||||
sb.append(", skuId=").append(skuId); |
||||
sb.append(", reviewDescribe=").append(reviewDescribe); |
||||
sb.append(", showImg=").append(showImg); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", opId=").append(opId); |
||||
sb.append(", opName=").append(opName); |
||||
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
@ -0,0 +1,306 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* goods_sku |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class GoodsSku implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 商品ID |
||||
*/ |
||||
private Long goodsId; |
||||
|
||||
/** |
||||
* sku名称 |
||||
*/ |
||||
private String name; |
||||
|
||||
/** |
||||
* 价格 |
||||
*/ |
||||
private BigDecimal price; |
||||
|
||||
/** |
||||
* 原价 |
||||
*/ |
||||
private BigDecimal originalPrice; |
||||
|
||||
/** |
||||
* 库存 |
||||
*/ |
||||
private Integer stock; |
||||
|
||||
/** |
||||
* 图片 |
||||
*/ |
||||
private String showImg; |
||||
|
||||
/** |
||||
* 轮播图 |
||||
*/ |
||||
private String bannerImg; |
||||
|
||||
/** |
||||
* 状态:0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 操作人员id |
||||
*/ |
||||
private Long opId; |
||||
|
||||
/** |
||||
* 操作人员名称 |
||||
*/ |
||||
private String opName; |
||||
|
||||
/** |
||||
* ext_1 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* ext_2 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* ext_3 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getGoodsId() { |
||||
return goodsId; |
||||
} |
||||
|
||||
public void setGoodsId(Long goodsId) { |
||||
this.goodsId = goodsId; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public BigDecimal getPrice() { |
||||
return price; |
||||
} |
||||
|
||||
public void setPrice(BigDecimal price) { |
||||
this.price = price; |
||||
} |
||||
|
||||
public BigDecimal getOriginalPrice() { |
||||
return originalPrice; |
||||
} |
||||
|
||||
public void setOriginalPrice(BigDecimal originalPrice) { |
||||
this.originalPrice = originalPrice; |
||||
} |
||||
|
||||
public Integer getStock() { |
||||
return stock; |
||||
} |
||||
|
||||
public void setStock(Integer stock) { |
||||
this.stock = stock; |
||||
} |
||||
|
||||
public String getShowImg() { |
||||
return showImg; |
||||
} |
||||
|
||||
public void setShowImg(String showImg) { |
||||
this.showImg = showImg; |
||||
} |
||||
|
||||
public String getBannerImg() { |
||||
return bannerImg; |
||||
} |
||||
|
||||
public void setBannerImg(String bannerImg) { |
||||
this.bannerImg = bannerImg; |
||||
} |
||||
|
||||
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 Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
public Long getOpId() { |
||||
return opId; |
||||
} |
||||
|
||||
public void setOpId(Long opId) { |
||||
this.opId = opId; |
||||
} |
||||
|
||||
public String getOpName() { |
||||
return opName; |
||||
} |
||||
|
||||
public void setOpName(String opName) { |
||||
this.opName = opName; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
GoodsSku other = (GoodsSku) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) |
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) |
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) |
||||
&& (this.getOriginalPrice() == null ? other.getOriginalPrice() == null : this.getOriginalPrice().equals(other.getOriginalPrice())) |
||||
&& (this.getStock() == null ? other.getStock() == null : this.getStock().equals(other.getStock())) |
||||
&& (this.getShowImg() == null ? other.getShowImg() == null : this.getShowImg().equals(other.getShowImg())) |
||||
&& (this.getBannerImg() == null ? other.getBannerImg() == null : this.getBannerImg().equals(other.getBannerImg())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) |
||||
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName())) |
||||
&& (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 + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); |
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); |
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); |
||||
result = prime * result + ((getOriginalPrice() == null) ? 0 : getOriginalPrice().hashCode()); |
||||
result = prime * result + ((getStock() == null) ? 0 : getStock().hashCode()); |
||||
result = prime * result + ((getShowImg() == null) ? 0 : getShowImg().hashCode()); |
||||
result = prime * result + ((getBannerImg() == null) ? 0 : getBannerImg().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode()); |
||||
result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", goodsId=").append(goodsId); |
||||
sb.append(", name=").append(name); |
||||
sb.append(", price=").append(price); |
||||
sb.append(", originalPrice=").append(originalPrice); |
||||
sb.append(", stock=").append(stock); |
||||
sb.append(", showImg=").append(showImg); |
||||
sb.append(", bannerImg=").append(bannerImg); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", opId=").append(opId); |
||||
sb.append(", opName=").append(opName); |
||||
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