袁野 2 years ago
parent acb01b829c
commit 1c029b978d
  1. 183
      hai-service/src/main/java/com/hai/dao/ApiStarbucksProductsMapper.java
  2. 7
      hai-service/src/main/java/com/hai/dao/ApiStarbucksProductsMapperExt.java
  3. 528
      hai-service/src/main/java/com/hai/dao/ApiStarbucksProductsSqlProvider.java
  4. 466
      hai-service/src/main/java/com/hai/entity/ApiStarbucksProducts.java
  5. 1924
      hai-service/src/main/java/com/hai/entity/ApiStarbucksProductsExample.java

@ -0,0 +1,183 @@
package com.hai.dao;
import com.hai.entity.ApiStarbucksProducts;
import com.hai.entity.ApiStarbucksProductsExample;
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 ApiStarbucksProductsMapper extends ApiStarbucksProductsMapperExt {
@SelectProvider(type=ApiStarbucksProductsSqlProvider.class, method="countByExample")
long countByExample(ApiStarbucksProductsExample example);
@DeleteProvider(type=ApiStarbucksProductsSqlProvider.class, method="deleteByExample")
int deleteByExample(ApiStarbucksProductsExample example);
@Delete({
"delete from api_starbucks_products",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into api_starbucks_products (goods_id, `name`, ",
"des, default_image, ",
"cup_size, temperature, ",
"cream, espresso, ",
"milk, milk_bubble, ",
"category_name, market_tall_price, ",
"market_grande_price, market_venti_price, ",
"sales_tall_price, sales_grande_price, ",
"sales_venti_price, operator_id, ",
"operator_name, create_time, ",
"update_time, `status`, ",
"ext_1, ext_2, ext_3)",
"values (#{goodsId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ",
"#{des,jdbcType=VARCHAR}, #{defaultImage,jdbcType=VARCHAR}, ",
"#{cupSize,jdbcType=VARCHAR}, #{temperature,jdbcType=VARCHAR}, ",
"#{cream,jdbcType=VARCHAR}, #{espresso,jdbcType=VARCHAR}, ",
"#{milk,jdbcType=VARCHAR}, #{milkBubble,jdbcType=VARCHAR}, ",
"#{categoryName,jdbcType=VARCHAR}, #{marketTallPrice,jdbcType=DECIMAL}, ",
"#{marketGrandePrice,jdbcType=DECIMAL}, #{marketVentiPrice,jdbcType=DECIMAL}, ",
"#{salesTallPrice,jdbcType=DECIMAL}, #{salesGrandePrice,jdbcType=DECIMAL}, ",
"#{salesVentiPrice,jdbcType=DECIMAL}, #{operatorId,jdbcType=BIGINT}, ",
"#{operatorName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(ApiStarbucksProducts record);
@InsertProvider(type=ApiStarbucksProductsSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(ApiStarbucksProducts record);
@SelectProvider(type=ApiStarbucksProductsSqlProvider.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="des", property="des", jdbcType=JdbcType.VARCHAR),
@Result(column="default_image", property="defaultImage", jdbcType=JdbcType.VARCHAR),
@Result(column="cup_size", property="cupSize", jdbcType=JdbcType.VARCHAR),
@Result(column="temperature", property="temperature", jdbcType=JdbcType.VARCHAR),
@Result(column="cream", property="cream", jdbcType=JdbcType.VARCHAR),
@Result(column="espresso", property="espresso", jdbcType=JdbcType.VARCHAR),
@Result(column="milk", property="milk", jdbcType=JdbcType.VARCHAR),
@Result(column="milk_bubble", property="milkBubble", jdbcType=JdbcType.VARCHAR),
@Result(column="category_name", property="categoryName", jdbcType=JdbcType.VARCHAR),
@Result(column="market_tall_price", property="marketTallPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="market_grande_price", property="marketGrandePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="market_venti_price", property="marketVentiPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sales_tall_price", property="salesTallPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sales_grande_price", property="salesGrandePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sales_venti_price", property="salesVentiPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<ApiStarbucksProducts> selectByExample(ApiStarbucksProductsExample example);
@Select({
"select",
"id, goods_id, `name`, des, default_image, cup_size, temperature, cream, espresso, ",
"milk, milk_bubble, category_name, market_tall_price, market_grande_price, market_venti_price, ",
"sales_tall_price, sales_grande_price, sales_venti_price, operator_id, operator_name, ",
"create_time, update_time, `status`, ext_1, ext_2, ext_3",
"from api_starbucks_products",
"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="des", property="des", jdbcType=JdbcType.VARCHAR),
@Result(column="default_image", property="defaultImage", jdbcType=JdbcType.VARCHAR),
@Result(column="cup_size", property="cupSize", jdbcType=JdbcType.VARCHAR),
@Result(column="temperature", property="temperature", jdbcType=JdbcType.VARCHAR),
@Result(column="cream", property="cream", jdbcType=JdbcType.VARCHAR),
@Result(column="espresso", property="espresso", jdbcType=JdbcType.VARCHAR),
@Result(column="milk", property="milk", jdbcType=JdbcType.VARCHAR),
@Result(column="milk_bubble", property="milkBubble", jdbcType=JdbcType.VARCHAR),
@Result(column="category_name", property="categoryName", jdbcType=JdbcType.VARCHAR),
@Result(column="market_tall_price", property="marketTallPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="market_grande_price", property="marketGrandePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="market_venti_price", property="marketVentiPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sales_tall_price", property="salesTallPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sales_grande_price", property="salesGrandePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sales_venti_price", property="salesVentiPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
ApiStarbucksProducts selectByPrimaryKey(Long id);
@UpdateProvider(type=ApiStarbucksProductsSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") ApiStarbucksProducts record, @Param("example") ApiStarbucksProductsExample example);
@UpdateProvider(type=ApiStarbucksProductsSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") ApiStarbucksProducts record, @Param("example") ApiStarbucksProductsExample example);
@UpdateProvider(type=ApiStarbucksProductsSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(ApiStarbucksProducts record);
@Update({
"update api_starbucks_products",
"set goods_id = #{goodsId,jdbcType=BIGINT},",
"`name` = #{name,jdbcType=VARCHAR},",
"des = #{des,jdbcType=VARCHAR},",
"default_image = #{defaultImage,jdbcType=VARCHAR},",
"cup_size = #{cupSize,jdbcType=VARCHAR},",
"temperature = #{temperature,jdbcType=VARCHAR},",
"cream = #{cream,jdbcType=VARCHAR},",
"espresso = #{espresso,jdbcType=VARCHAR},",
"milk = #{milk,jdbcType=VARCHAR},",
"milk_bubble = #{milkBubble,jdbcType=VARCHAR},",
"category_name = #{categoryName,jdbcType=VARCHAR},",
"market_tall_price = #{marketTallPrice,jdbcType=DECIMAL},",
"market_grande_price = #{marketGrandePrice,jdbcType=DECIMAL},",
"market_venti_price = #{marketVentiPrice,jdbcType=DECIMAL},",
"sales_tall_price = #{salesTallPrice,jdbcType=DECIMAL},",
"sales_grande_price = #{salesGrandePrice,jdbcType=DECIMAL},",
"sales_venti_price = #{salesVentiPrice,jdbcType=DECIMAL},",
"operator_id = #{operatorId,jdbcType=BIGINT},",
"operator_name = #{operatorName,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(ApiStarbucksProducts record);
}

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

@ -0,0 +1,528 @@
package com.hai.dao;
import com.hai.entity.ApiStarbucksProducts;
import com.hai.entity.ApiStarbucksProductsExample.Criteria;
import com.hai.entity.ApiStarbucksProductsExample.Criterion;
import com.hai.entity.ApiStarbucksProductsExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class ApiStarbucksProductsSqlProvider {
public String countByExample(ApiStarbucksProductsExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("api_starbucks_products");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(ApiStarbucksProductsExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("api_starbucks_products");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(ApiStarbucksProducts record) {
SQL sql = new SQL();
sql.INSERT_INTO("api_starbucks_products");
if (record.getGoodsId() != null) {
sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}");
}
if (record.getName() != null) {
sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}");
}
if (record.getDes() != null) {
sql.VALUES("des", "#{des,jdbcType=VARCHAR}");
}
if (record.getDefaultImage() != null) {
sql.VALUES("default_image", "#{defaultImage,jdbcType=VARCHAR}");
}
if (record.getCupSize() != null) {
sql.VALUES("cup_size", "#{cupSize,jdbcType=VARCHAR}");
}
if (record.getTemperature() != null) {
sql.VALUES("temperature", "#{temperature,jdbcType=VARCHAR}");
}
if (record.getCream() != null) {
sql.VALUES("cream", "#{cream,jdbcType=VARCHAR}");
}
if (record.getEspresso() != null) {
sql.VALUES("espresso", "#{espresso,jdbcType=VARCHAR}");
}
if (record.getMilk() != null) {
sql.VALUES("milk", "#{milk,jdbcType=VARCHAR}");
}
if (record.getMilkBubble() != null) {
sql.VALUES("milk_bubble", "#{milkBubble,jdbcType=VARCHAR}");
}
if (record.getCategoryName() != null) {
sql.VALUES("category_name", "#{categoryName,jdbcType=VARCHAR}");
}
if (record.getMarketTallPrice() != null) {
sql.VALUES("market_tall_price", "#{marketTallPrice,jdbcType=DECIMAL}");
}
if (record.getMarketGrandePrice() != null) {
sql.VALUES("market_grande_price", "#{marketGrandePrice,jdbcType=DECIMAL}");
}
if (record.getMarketVentiPrice() != null) {
sql.VALUES("market_venti_price", "#{marketVentiPrice,jdbcType=DECIMAL}");
}
if (record.getSalesTallPrice() != null) {
sql.VALUES("sales_tall_price", "#{salesTallPrice,jdbcType=DECIMAL}");
}
if (record.getSalesGrandePrice() != null) {
sql.VALUES("sales_grande_price", "#{salesGrandePrice,jdbcType=DECIMAL}");
}
if (record.getSalesVentiPrice() != null) {
sql.VALUES("sales_venti_price", "#{salesVentiPrice,jdbcType=DECIMAL}");
}
if (record.getOperatorId() != null) {
sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}");
}
if (record.getOperatorName() != null) {
sql.VALUES("operator_name", "#{operatorName,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(ApiStarbucksProductsExample 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("des");
sql.SELECT("default_image");
sql.SELECT("cup_size");
sql.SELECT("temperature");
sql.SELECT("cream");
sql.SELECT("espresso");
sql.SELECT("milk");
sql.SELECT("milk_bubble");
sql.SELECT("category_name");
sql.SELECT("market_tall_price");
sql.SELECT("market_grande_price");
sql.SELECT("market_venti_price");
sql.SELECT("sales_tall_price");
sql.SELECT("sales_grande_price");
sql.SELECT("sales_venti_price");
sql.SELECT("operator_id");
sql.SELECT("operator_name");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("`status`");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("api_starbucks_products");
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) {
ApiStarbucksProducts record = (ApiStarbucksProducts) parameter.get("record");
ApiStarbucksProductsExample example = (ApiStarbucksProductsExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("api_starbucks_products");
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.getDes() != null) {
sql.SET("des = #{record.des,jdbcType=VARCHAR}");
}
if (record.getDefaultImage() != null) {
sql.SET("default_image = #{record.defaultImage,jdbcType=VARCHAR}");
}
if (record.getCupSize() != null) {
sql.SET("cup_size = #{record.cupSize,jdbcType=VARCHAR}");
}
if (record.getTemperature() != null) {
sql.SET("temperature = #{record.temperature,jdbcType=VARCHAR}");
}
if (record.getCream() != null) {
sql.SET("cream = #{record.cream,jdbcType=VARCHAR}");
}
if (record.getEspresso() != null) {
sql.SET("espresso = #{record.espresso,jdbcType=VARCHAR}");
}
if (record.getMilk() != null) {
sql.SET("milk = #{record.milk,jdbcType=VARCHAR}");
}
if (record.getMilkBubble() != null) {
sql.SET("milk_bubble = #{record.milkBubble,jdbcType=VARCHAR}");
}
if (record.getCategoryName() != null) {
sql.SET("category_name = #{record.categoryName,jdbcType=VARCHAR}");
}
if (record.getMarketTallPrice() != null) {
sql.SET("market_tall_price = #{record.marketTallPrice,jdbcType=DECIMAL}");
}
if (record.getMarketGrandePrice() != null) {
sql.SET("market_grande_price = #{record.marketGrandePrice,jdbcType=DECIMAL}");
}
if (record.getMarketVentiPrice() != null) {
sql.SET("market_venti_price = #{record.marketVentiPrice,jdbcType=DECIMAL}");
}
if (record.getSalesTallPrice() != null) {
sql.SET("sales_tall_price = #{record.salesTallPrice,jdbcType=DECIMAL}");
}
if (record.getSalesGrandePrice() != null) {
sql.SET("sales_grande_price = #{record.salesGrandePrice,jdbcType=DECIMAL}");
}
if (record.getSalesVentiPrice() != null) {
sql.SET("sales_venti_price = #{record.salesVentiPrice,jdbcType=DECIMAL}");
}
if (record.getOperatorId() != null) {
sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}");
}
if (record.getOperatorName() != null) {
sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("api_starbucks_products");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
sql.SET("des = #{record.des,jdbcType=VARCHAR}");
sql.SET("default_image = #{record.defaultImage,jdbcType=VARCHAR}");
sql.SET("cup_size = #{record.cupSize,jdbcType=VARCHAR}");
sql.SET("temperature = #{record.temperature,jdbcType=VARCHAR}");
sql.SET("cream = #{record.cream,jdbcType=VARCHAR}");
sql.SET("espresso = #{record.espresso,jdbcType=VARCHAR}");
sql.SET("milk = #{record.milk,jdbcType=VARCHAR}");
sql.SET("milk_bubble = #{record.milkBubble,jdbcType=VARCHAR}");
sql.SET("category_name = #{record.categoryName,jdbcType=VARCHAR}");
sql.SET("market_tall_price = #{record.marketTallPrice,jdbcType=DECIMAL}");
sql.SET("market_grande_price = #{record.marketGrandePrice,jdbcType=DECIMAL}");
sql.SET("market_venti_price = #{record.marketVentiPrice,jdbcType=DECIMAL}");
sql.SET("sales_tall_price = #{record.salesTallPrice,jdbcType=DECIMAL}");
sql.SET("sales_grande_price = #{record.salesGrandePrice,jdbcType=DECIMAL}");
sql.SET("sales_venti_price = #{record.salesVentiPrice,jdbcType=DECIMAL}");
sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}");
sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
ApiStarbucksProductsExample example = (ApiStarbucksProductsExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(ApiStarbucksProducts record) {
SQL sql = new SQL();
sql.UPDATE("api_starbucks_products");
if (record.getGoodsId() != null) {
sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}");
}
if (record.getName() != null) {
sql.SET("`name` = #{name,jdbcType=VARCHAR}");
}
if (record.getDes() != null) {
sql.SET("des = #{des,jdbcType=VARCHAR}");
}
if (record.getDefaultImage() != null) {
sql.SET("default_image = #{defaultImage,jdbcType=VARCHAR}");
}
if (record.getCupSize() != null) {
sql.SET("cup_size = #{cupSize,jdbcType=VARCHAR}");
}
if (record.getTemperature() != null) {
sql.SET("temperature = #{temperature,jdbcType=VARCHAR}");
}
if (record.getCream() != null) {
sql.SET("cream = #{cream,jdbcType=VARCHAR}");
}
if (record.getEspresso() != null) {
sql.SET("espresso = #{espresso,jdbcType=VARCHAR}");
}
if (record.getMilk() != null) {
sql.SET("milk = #{milk,jdbcType=VARCHAR}");
}
if (record.getMilkBubble() != null) {
sql.SET("milk_bubble = #{milkBubble,jdbcType=VARCHAR}");
}
if (record.getCategoryName() != null) {
sql.SET("category_name = #{categoryName,jdbcType=VARCHAR}");
}
if (record.getMarketTallPrice() != null) {
sql.SET("market_tall_price = #{marketTallPrice,jdbcType=DECIMAL}");
}
if (record.getMarketGrandePrice() != null) {
sql.SET("market_grande_price = #{marketGrandePrice,jdbcType=DECIMAL}");
}
if (record.getMarketVentiPrice() != null) {
sql.SET("market_venti_price = #{marketVentiPrice,jdbcType=DECIMAL}");
}
if (record.getSalesTallPrice() != null) {
sql.SET("sales_tall_price = #{salesTallPrice,jdbcType=DECIMAL}");
}
if (record.getSalesGrandePrice() != null) {
sql.SET("sales_grande_price = #{salesGrandePrice,jdbcType=DECIMAL}");
}
if (record.getSalesVentiPrice() != null) {
sql.SET("sales_venti_price = #{salesVentiPrice,jdbcType=DECIMAL}");
}
if (record.getOperatorId() != null) {
sql.SET("operator_id = #{operatorId,jdbcType=BIGINT}");
}
if (record.getOperatorName() != null) {
sql.SET("operator_name = #{operatorName,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, ApiStarbucksProductsExample 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,466 @@
package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* api_starbucks_products
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class ApiStarbucksProducts implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 商品id
*/
private Long goodsId;
/**
* 商品名称
*/
private String name;
/**
* 商品描述
*/
private String des;
/**
* 商品图片
*/
private String defaultImage;
/**
* 杯型中杯,大杯,超大杯有指定的杯型表示可售
*/
private String cupSize;
/**
* 温度
*/
private String temperature;
/**
* 奶油
*/
private String cream;
/**
* 浓缩咖啡
*/
private String espresso;
/**
* 牛奶
*/
private String milk;
/**
* 奶泡
*/
private String milkBubble;
/**
* 分类
*/
private String categoryName;
/**
* 中杯市场价
*/
private BigDecimal marketTallPrice;
/**
* 大杯市场价
*/
private BigDecimal marketGrandePrice;
/**
* 超大杯市场价
*/
private BigDecimal marketVentiPrice;
/**
* 中杯销售价
*/
private BigDecimal salesTallPrice;
/**
* 大杯销售价
*/
private BigDecimal salesGrandePrice;
/**
* 超大杯销售价
*/
private BigDecimal salesVentiPrice;
/**
* 操作人员id
*/
private Long operatorId;
/**
* 操作人员名称
*/
private String operatorName;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 状态 100 正常 101 禁用
*/
private Integer status;
/**
* 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 String getDes() {
return des;
}
public void setDes(String des) {
this.des = des;
}
public String getDefaultImage() {
return defaultImage;
}
public void setDefaultImage(String defaultImage) {
this.defaultImage = defaultImage;
}
public String getCupSize() {
return cupSize;
}
public void setCupSize(String cupSize) {
this.cupSize = cupSize;
}
public String getTemperature() {
return temperature;
}
public void setTemperature(String temperature) {
this.temperature = temperature;
}
public String getCream() {
return cream;
}
public void setCream(String cream) {
this.cream = cream;
}
public String getEspresso() {
return espresso;
}
public void setEspresso(String espresso) {
this.espresso = espresso;
}
public String getMilk() {
return milk;
}
public void setMilk(String milk) {
this.milk = milk;
}
public String getMilkBubble() {
return milkBubble;
}
public void setMilkBubble(String milkBubble) {
this.milkBubble = milkBubble;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public BigDecimal getMarketTallPrice() {
return marketTallPrice;
}
public void setMarketTallPrice(BigDecimal marketTallPrice) {
this.marketTallPrice = marketTallPrice;
}
public BigDecimal getMarketGrandePrice() {
return marketGrandePrice;
}
public void setMarketGrandePrice(BigDecimal marketGrandePrice) {
this.marketGrandePrice = marketGrandePrice;
}
public BigDecimal getMarketVentiPrice() {
return marketVentiPrice;
}
public void setMarketVentiPrice(BigDecimal marketVentiPrice) {
this.marketVentiPrice = marketVentiPrice;
}
public BigDecimal getSalesTallPrice() {
return salesTallPrice;
}
public void setSalesTallPrice(BigDecimal salesTallPrice) {
this.salesTallPrice = salesTallPrice;
}
public BigDecimal getSalesGrandePrice() {
return salesGrandePrice;
}
public void setSalesGrandePrice(BigDecimal salesGrandePrice) {
this.salesGrandePrice = salesGrandePrice;
}
public BigDecimal getSalesVentiPrice() {
return salesVentiPrice;
}
public void setSalesVentiPrice(BigDecimal salesVentiPrice) {
this.salesVentiPrice = salesVentiPrice;
}
public Long getOperatorId() {
return operatorId;
}
public void setOperatorId(Long operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
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 Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
ApiStarbucksProducts other = (ApiStarbucksProducts) 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.getDes() == null ? other.getDes() == null : this.getDes().equals(other.getDes()))
&& (this.getDefaultImage() == null ? other.getDefaultImage() == null : this.getDefaultImage().equals(other.getDefaultImage()))
&& (this.getCupSize() == null ? other.getCupSize() == null : this.getCupSize().equals(other.getCupSize()))
&& (this.getTemperature() == null ? other.getTemperature() == null : this.getTemperature().equals(other.getTemperature()))
&& (this.getCream() == null ? other.getCream() == null : this.getCream().equals(other.getCream()))
&& (this.getEspresso() == null ? other.getEspresso() == null : this.getEspresso().equals(other.getEspresso()))
&& (this.getMilk() == null ? other.getMilk() == null : this.getMilk().equals(other.getMilk()))
&& (this.getMilkBubble() == null ? other.getMilkBubble() == null : this.getMilkBubble().equals(other.getMilkBubble()))
&& (this.getCategoryName() == null ? other.getCategoryName() == null : this.getCategoryName().equals(other.getCategoryName()))
&& (this.getMarketTallPrice() == null ? other.getMarketTallPrice() == null : this.getMarketTallPrice().equals(other.getMarketTallPrice()))
&& (this.getMarketGrandePrice() == null ? other.getMarketGrandePrice() == null : this.getMarketGrandePrice().equals(other.getMarketGrandePrice()))
&& (this.getMarketVentiPrice() == null ? other.getMarketVentiPrice() == null : this.getMarketVentiPrice().equals(other.getMarketVentiPrice()))
&& (this.getSalesTallPrice() == null ? other.getSalesTallPrice() == null : this.getSalesTallPrice().equals(other.getSalesTallPrice()))
&& (this.getSalesGrandePrice() == null ? other.getSalesGrandePrice() == null : this.getSalesGrandePrice().equals(other.getSalesGrandePrice()))
&& (this.getSalesVentiPrice() == null ? other.getSalesVentiPrice() == null : this.getSalesVentiPrice().equals(other.getSalesVentiPrice()))
&& (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
&& (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getDes() == null) ? 0 : getDes().hashCode());
result = prime * result + ((getDefaultImage() == null) ? 0 : getDefaultImage().hashCode());
result = prime * result + ((getCupSize() == null) ? 0 : getCupSize().hashCode());
result = prime * result + ((getTemperature() == null) ? 0 : getTemperature().hashCode());
result = prime * result + ((getCream() == null) ? 0 : getCream().hashCode());
result = prime * result + ((getEspresso() == null) ? 0 : getEspresso().hashCode());
result = prime * result + ((getMilk() == null) ? 0 : getMilk().hashCode());
result = prime * result + ((getMilkBubble() == null) ? 0 : getMilkBubble().hashCode());
result = prime * result + ((getCategoryName() == null) ? 0 : getCategoryName().hashCode());
result = prime * result + ((getMarketTallPrice() == null) ? 0 : getMarketTallPrice().hashCode());
result = prime * result + ((getMarketGrandePrice() == null) ? 0 : getMarketGrandePrice().hashCode());
result = prime * result + ((getMarketVentiPrice() == null) ? 0 : getMarketVentiPrice().hashCode());
result = prime * result + ((getSalesTallPrice() == null) ? 0 : getSalesTallPrice().hashCode());
result = prime * result + ((getSalesGrandePrice() == null) ? 0 : getSalesGrandePrice().hashCode());
result = prime * result + ((getSalesVentiPrice() == null) ? 0 : getSalesVentiPrice().hashCode());
result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", goodsId=").append(goodsId);
sb.append(", name=").append(name);
sb.append(", des=").append(des);
sb.append(", defaultImage=").append(defaultImage);
sb.append(", cupSize=").append(cupSize);
sb.append(", temperature=").append(temperature);
sb.append(", cream=").append(cream);
sb.append(", espresso=").append(espresso);
sb.append(", milk=").append(milk);
sb.append(", milkBubble=").append(milkBubble);
sb.append(", categoryName=").append(categoryName);
sb.append(", marketTallPrice=").append(marketTallPrice);
sb.append(", marketGrandePrice=").append(marketGrandePrice);
sb.append(", marketVentiPrice=").append(marketVentiPrice);
sb.append(", salesTallPrice=").append(salesTallPrice);
sb.append(", salesGrandePrice=").append(salesGrandePrice);
sb.append(", salesVentiPrice=").append(salesVentiPrice);
sb.append(", operatorId=").append(operatorId);
sb.append(", operatorName=").append(operatorName);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", status=").append(status);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
Loading…
Cancel
Save