diff --git a/cweb/src/main/java/com/cweb/config/AuthConfig.java b/cweb/src/main/java/com/cweb/config/AuthConfig.java index a26962d..791fef0 100644 --- a/cweb/src/main/java/com/cweb/config/AuthConfig.java +++ b/cweb/src/main/java/com/cweb/config/AuthConfig.java @@ -117,6 +117,9 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/login/*") .excludePathPatterns("/test/*") .excludePathPatterns("/sms/*") + .excludePathPatterns("/mealTable/startTable") + .excludePathPatterns("/mealTable/endTable") + .excludePathPatterns("/mealShopCart/*") .excludePathPatterns("/ocr/*") .excludePathPatterns("/openGroup/*") ; diff --git a/cweb/src/main/java/com/cweb/controller/TestController.java b/cweb/src/main/java/com/cweb/controller/TestController.java index a64241a..e90a254 100644 --- a/cweb/src/main/java/com/cweb/controller/TestController.java +++ b/cweb/src/main/java/com/cweb/controller/TestController.java @@ -19,7 +19,6 @@ import com.hfkj.common.Base64Util; import com.hfkj.common.utils.DateUtil; import com.hfkj.common.utils.HttpsUtils; import com.hfkj.common.utils.ResponseMsgUtil; -import com.hfkj.common.utils.UnionUtils; import com.hfkj.config.CommonSysConst; import com.hfkj.config.device.SoundService; import com.hfkj.config.mqtt.MqttProviderService; @@ -30,7 +29,6 @@ import com.hfkj.service.*; import com.hfkj.service.rebate.BsRebateMerAccountService; import com.hfkj.service.rebate.BsRebatePartMerService; import com.hfkj.service.rebate.BsRebateRewardService; -import com.hfkj.service.rebate.model.RebateMerAccountTradeObject; import com.hfkj.sysenum.*; import com.hfkj.tts.HWYunSisService; import com.hfkj.unipush.UniPushService; @@ -38,6 +36,8 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; +import org.eclipse.paho.client.mqttv3.MqttClient; +import org.eclipse.paho.client.mqttv3.MqttMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; @@ -216,14 +216,20 @@ public class TestController { public ResponseData lklWithdraw(@RequestParam(value = "cupNo", required = true) String cupNo) { try { + +/* MqttClient connect = mqttProviderService.connect("provider-" + System.currentTimeMillis()); + connect.subscribe("MEAL_TABLE_" + cupNo);*/ + + + return ResponseMsgUtil.success(null); // return ResponseMsgUtil.success(laKaLaWalletService.ewalletBalanceQuery("8226900581219V0", null,"01")); // return ResponseMsgUtil.success(laKaLaWalletService.ewalletWithdrawD1("8226900581219V0", new BigDecimal("30193.35"),"提现")); - return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleProfile( +/* return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleProfile( 1, cupNo, "02", "06", - CommonSysConst.getSysConfig().getDomainName()+"/crest/merWithdrawal/notify?cupNo="+cupNo)); + CommonSysConst.getSysConfig().getDomainName()+"/crest/merWithdrawal/notify?cupNo="+cupNo));*/ // return ResponseMsgUtil.success(laKaLaWalletService.ewalletWithdrawQuery("8226900581219V0", "230602150213408367448221")); // return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleQuery("8226900591200TC")); // return ResponseMsgUtil.success(laKaLaWalletService.activeSettleApply("8226900581219V0")); diff --git a/cweb/src/main/java/com/cweb/controller/meal/BsMealShopCartController.java b/cweb/src/main/java/com/cweb/controller/meal/BsMealShopCartController.java new file mode 100644 index 0000000..6866733 --- /dev/null +++ b/cweb/src/main/java/com/cweb/controller/meal/BsMealShopCartController.java @@ -0,0 +1,96 @@ +package com.cweb.controller.meal; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.model.ResponseData; +import com.hfkj.service.meal.BsMealShopCartService; +import com.hfkj.service.meal.BsMealTableService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.Map; + +/** + * @className: BsMealShopCartController + * @author: HuRui + * @date: 2023/11/30 + **/ +@Controller +@Api(value = "桌台管理") +@RequestMapping(value = "/mealShopCart") +public class BsMealShopCartController { + + Logger log = LoggerFactory.getLogger(BsMealTableController.class); + + @Resource + private BsMealShopCartService mealShopCartService; + + @RequestMapping(value="/addProduct",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "增加产品") + public ResponseData addProduct(@RequestBody JSONObject body) { + try { + if (body == null + || StringUtils.isBlank(body.getString("serialNumber")) + || body.getLong("productId") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + mealShopCartService.addProduct(body.getString("serialNumber"),body.getLong("productId")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/reduceProduct",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "减少产品") + public ResponseData reduceProduct(@RequestBody JSONObject body) { + try { + if (body == null + || StringUtils.isBlank(body.getString("serialNumber")) + || body.getLong("productId") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + mealShopCartService.reduceProduct(body.getString("serialNumber"),body.getLong("productId")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/getShopCartProductList",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询购物车产品") + public ResponseData getShopCartProductList(@RequestParam(value = "serialNumber" , required = true) String serialNumber) { + try { + + Map param = new HashMap<>(); + param.put("serialNumber", serialNumber); + return ResponseMsgUtil.success(mealShopCartService.getShopCartProductList(param)); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/cweb/src/main/java/com/cweb/controller/Meal/BsMealTableController.java b/cweb/src/main/java/com/cweb/controller/meal/BsMealTableController.java similarity index 77% rename from cweb/src/main/java/com/cweb/controller/Meal/BsMealTableController.java rename to cweb/src/main/java/com/cweb/controller/meal/BsMealTableController.java index 294b8e4..99e17a6 100644 --- a/cweb/src/main/java/com/cweb/controller/Meal/BsMealTableController.java +++ b/cweb/src/main/java/com/cweb/controller/meal/BsMealTableController.java @@ -1,4 +1,4 @@ -package com.cweb.controller.Meal; +package com.cweb.controller.meal; import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; @@ -140,4 +140,48 @@ public class BsMealTableController { return ResponseMsgUtil.exception(e); } } + + + + @RequestMapping(value="/startTable",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "开台") + public ResponseData startTable(@RequestBody JSONObject body) { + try { + if (body == null + || StringUtils.isBlank(body.getString("serialNumber")) + || body.getInteger("peopleNum") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + mealTableService.startTable(body.getString("serialNumber"),body.getInteger("peopleNum")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + + + @RequestMapping(value="/endTable",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "关台") + public ResponseData endTable(@RequestBody JSONObject body) { + try { + if (body == null + || StringUtils.isBlank(body.getString("serialNumber"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + mealTableService.endTable(body.getString("serialNumber")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } } diff --git a/service/src/main/java/com/hfkj/config/mqtt/MqttProviderService.java b/service/src/main/java/com/hfkj/config/mqtt/MqttProviderService.java index ce28c42..bc2af2e 100644 --- a/service/src/main/java/com/hfkj/config/mqtt/MqttProviderService.java +++ b/service/src/main/java/com/hfkj/config/mqtt/MqttProviderService.java @@ -45,7 +45,7 @@ public class MqttProviderService { /** * 客户端连接服务端 */ - public void connect(String clientId) { + public MqttClient connect(String clientId) { try { //创建MQTT客户端对象 client = new MqttClient(hostUrl, clientId, new MemoryPersistence()); @@ -67,9 +67,11 @@ public class MqttProviderService { //设置回调 client.setCallback(new MqttProviderCallBack()); client.connect(options); + return client; } catch (MqttException e) { e.printStackTrace(); } + return null; } public void publish(int qos, boolean retained, String topic, String message) { diff --git a/service/src/main/java/com/hfkj/dao/BsMealShopCartMapper.java b/service/src/main/java/com/hfkj/dao/BsMealShopCartMapper.java new file mode 100644 index 0000000..393a89d --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMealShopCartMapper.java @@ -0,0 +1,167 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMealShopCart; +import com.hfkj.entity.BsMealShopCartExample; +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 BsMealShopCartMapper extends BsMealShopCartMapperExt { + @SelectProvider(type=BsMealShopCartSqlProvider.class, method="countByExample") + long countByExample(BsMealShopCartExample example); + + @DeleteProvider(type=BsMealShopCartSqlProvider.class, method="deleteByExample") + int deleteByExample(BsMealShopCartExample example); + + @Delete({ + "delete from bs_meal_shop_cart", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_meal_shop_cart (store_id, store_name, ", + "serial_number, table_number, ", + "`table_name`, order_no, ", + "product_category_id, product_category_name, ", + "product_id, product_img, ", + "product_name, product_spec, ", + "product_price, product_num, ", + "product_total_price, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ", + "#{serialNumber,jdbcType=VARCHAR}, #{tableNumber,jdbcType=INTEGER}, ", + "#{tableName,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, ", + "#{productCategoryId,jdbcType=BIGINT}, #{productCategoryName,jdbcType=VARCHAR}, ", + "#{productId,jdbcType=BIGINT}, #{productImg,jdbcType=VARCHAR}, ", + "#{productName,jdbcType=VARCHAR}, #{productSpec,jdbcType=VARCHAR}, ", + "#{productPrice,jdbcType=DECIMAL}, #{productNum,jdbcType=INTEGER}, ", + "#{productTotalPrice,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsMealShopCart record); + + @InsertProvider(type=BsMealShopCartSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsMealShopCart record); + + @SelectProvider(type=BsMealShopCartSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="table_number", property="tableNumber", jdbcType=JdbcType.INTEGER), + @Result(column="table_name", property="tableName", jdbcType=JdbcType.VARCHAR), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="product_category_id", property="productCategoryId", jdbcType=JdbcType.BIGINT), + @Result(column="product_category_name", property="productCategoryName", jdbcType=JdbcType.VARCHAR), + @Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT), + @Result(column="product_img", property="productImg", jdbcType=JdbcType.VARCHAR), + @Result(column="product_name", property="productName", jdbcType=JdbcType.VARCHAR), + @Result(column="product_spec", property="productSpec", jdbcType=JdbcType.VARCHAR), + @Result(column="product_price", property="productPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="product_num", property="productNum", jdbcType=JdbcType.INTEGER), + @Result(column="product_total_price", property="productTotalPrice", jdbcType=JdbcType.DECIMAL), + @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="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 selectByExample(BsMealShopCartExample example); + + @Select({ + "select", + "id, store_id, store_name, serial_number, table_number, `table_name`, order_no, ", + "product_category_id, product_category_name, product_id, product_img, product_name, ", + "product_spec, product_price, product_num, product_total_price, `status`, create_time, ", + "update_time, ext_1, ext_2, ext_3", + "from bs_meal_shop_cart", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="table_number", property="tableNumber", jdbcType=JdbcType.INTEGER), + @Result(column="table_name", property="tableName", jdbcType=JdbcType.VARCHAR), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="product_category_id", property="productCategoryId", jdbcType=JdbcType.BIGINT), + @Result(column="product_category_name", property="productCategoryName", jdbcType=JdbcType.VARCHAR), + @Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT), + @Result(column="product_img", property="productImg", jdbcType=JdbcType.VARCHAR), + @Result(column="product_name", property="productName", jdbcType=JdbcType.VARCHAR), + @Result(column="product_spec", property="productSpec", jdbcType=JdbcType.VARCHAR), + @Result(column="product_price", property="productPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="product_num", property="productNum", jdbcType=JdbcType.INTEGER), + @Result(column="product_total_price", property="productTotalPrice", jdbcType=JdbcType.DECIMAL), + @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="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) + }) + BsMealShopCart selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsMealShopCartSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsMealShopCart record, @Param("example") BsMealShopCartExample example); + + @UpdateProvider(type=BsMealShopCartSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsMealShopCart record, @Param("example") BsMealShopCartExample example); + + @UpdateProvider(type=BsMealShopCartSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsMealShopCart record); + + @Update({ + "update bs_meal_shop_cart", + "set store_id = #{storeId,jdbcType=BIGINT},", + "store_name = #{storeName,jdbcType=VARCHAR},", + "serial_number = #{serialNumber,jdbcType=VARCHAR},", + "table_number = #{tableNumber,jdbcType=INTEGER},", + "`table_name` = #{tableName,jdbcType=VARCHAR},", + "order_no = #{orderNo,jdbcType=VARCHAR},", + "product_category_id = #{productCategoryId,jdbcType=BIGINT},", + "product_category_name = #{productCategoryName,jdbcType=VARCHAR},", + "product_id = #{productId,jdbcType=BIGINT},", + "product_img = #{productImg,jdbcType=VARCHAR},", + "product_name = #{productName,jdbcType=VARCHAR},", + "product_spec = #{productSpec,jdbcType=VARCHAR},", + "product_price = #{productPrice,jdbcType=DECIMAL},", + "product_num = #{productNum,jdbcType=INTEGER},", + "product_total_price = #{productTotalPrice,jdbcType=DECIMAL},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsMealShopCart record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMealShopCartMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMealShopCartMapperExt.java new file mode 100644 index 0000000..e441602 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMealShopCartMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsMealShopCartMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMealShopCartSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMealShopCartSqlProvider.java new file mode 100644 index 0000000..e30183a --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMealShopCartSqlProvider.java @@ -0,0 +1,472 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMealShopCart; +import com.hfkj.entity.BsMealShopCartExample.Criteria; +import com.hfkj.entity.BsMealShopCartExample.Criterion; +import com.hfkj.entity.BsMealShopCartExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsMealShopCartSqlProvider { + + public String countByExample(BsMealShopCartExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_meal_shop_cart"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsMealShopCartExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_meal_shop_cart"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsMealShopCart record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_meal_shop_cart"); + + if (record.getStoreId() != null) { + sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}"); + } + + if (record.getSerialNumber() != null) { + sql.VALUES("serial_number", "#{serialNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableNumber() != null) { + sql.VALUES("table_number", "#{tableNumber,jdbcType=INTEGER}"); + } + + if (record.getTableName() != null) { + sql.VALUES("`table_name`", "#{tableName,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getProductCategoryId() != null) { + sql.VALUES("product_category_id", "#{productCategoryId,jdbcType=BIGINT}"); + } + + if (record.getProductCategoryName() != null) { + sql.VALUES("product_category_name", "#{productCategoryName,jdbcType=VARCHAR}"); + } + + if (record.getProductId() != null) { + sql.VALUES("product_id", "#{productId,jdbcType=BIGINT}"); + } + + if (record.getProductImg() != null) { + sql.VALUES("product_img", "#{productImg,jdbcType=VARCHAR}"); + } + + if (record.getProductName() != null) { + sql.VALUES("product_name", "#{productName,jdbcType=VARCHAR}"); + } + + if (record.getProductSpec() != null) { + sql.VALUES("product_spec", "#{productSpec,jdbcType=VARCHAR}"); + } + + if (record.getProductPrice() != null) { + sql.VALUES("product_price", "#{productPrice,jdbcType=DECIMAL}"); + } + + if (record.getProductNum() != null) { + sql.VALUES("product_num", "#{productNum,jdbcType=INTEGER}"); + } + + if (record.getProductTotalPrice() != null) { + sql.VALUES("product_total_price", "#{productTotalPrice,jdbcType=DECIMAL}"); + } + + 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.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(BsMealShopCartExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("store_id"); + sql.SELECT("store_name"); + sql.SELECT("serial_number"); + sql.SELECT("table_number"); + sql.SELECT("`table_name`"); + sql.SELECT("order_no"); + sql.SELECT("product_category_id"); + sql.SELECT("product_category_name"); + sql.SELECT("product_id"); + sql.SELECT("product_img"); + sql.SELECT("product_name"); + sql.SELECT("product_spec"); + sql.SELECT("product_price"); + sql.SELECT("product_num"); + sql.SELECT("product_total_price"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_meal_shop_cart"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsMealShopCart record = (BsMealShopCart) parameter.get("record"); + BsMealShopCartExample example = (BsMealShopCartExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_meal_shop_cart"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + } + + if (record.getSerialNumber() != null) { + sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableNumber() != null) { + sql.SET("table_number = #{record.tableNumber,jdbcType=INTEGER}"); + } + + if (record.getTableName() != null) { + sql.SET("`table_name` = #{record.tableName,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + } + + if (record.getProductCategoryId() != null) { + sql.SET("product_category_id = #{record.productCategoryId,jdbcType=BIGINT}"); + } + + if (record.getProductCategoryName() != null) { + sql.SET("product_category_name = #{record.productCategoryName,jdbcType=VARCHAR}"); + } + + if (record.getProductId() != null) { + sql.SET("product_id = #{record.productId,jdbcType=BIGINT}"); + } + + if (record.getProductImg() != null) { + sql.SET("product_img = #{record.productImg,jdbcType=VARCHAR}"); + } + + if (record.getProductName() != null) { + sql.SET("product_name = #{record.productName,jdbcType=VARCHAR}"); + } + + if (record.getProductSpec() != null) { + sql.SET("product_spec = #{record.productSpec,jdbcType=VARCHAR}"); + } + + if (record.getProductPrice() != null) { + sql.SET("product_price = #{record.productPrice,jdbcType=DECIMAL}"); + } + + if (record.getProductNum() != null) { + sql.SET("product_num = #{record.productNum,jdbcType=INTEGER}"); + } + + if (record.getProductTotalPrice() != null) { + sql.SET("product_total_price = #{record.productTotalPrice,jdbcType=DECIMAL}"); + } + + 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.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 parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_meal_shop_cart"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); + sql.SET("table_number = #{record.tableNumber,jdbcType=INTEGER}"); + sql.SET("`table_name` = #{record.tableName,jdbcType=VARCHAR}"); + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + sql.SET("product_category_id = #{record.productCategoryId,jdbcType=BIGINT}"); + sql.SET("product_category_name = #{record.productCategoryName,jdbcType=VARCHAR}"); + sql.SET("product_id = #{record.productId,jdbcType=BIGINT}"); + sql.SET("product_img = #{record.productImg,jdbcType=VARCHAR}"); + sql.SET("product_name = #{record.productName,jdbcType=VARCHAR}"); + sql.SET("product_spec = #{record.productSpec,jdbcType=VARCHAR}"); + sql.SET("product_price = #{record.productPrice,jdbcType=DECIMAL}"); + sql.SET("product_num = #{record.productNum,jdbcType=INTEGER}"); + sql.SET("product_total_price = #{record.productTotalPrice,jdbcType=DECIMAL}"); + 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("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsMealShopCartExample example = (BsMealShopCartExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsMealShopCart record) { + SQL sql = new SQL(); + sql.UPDATE("bs_meal_shop_cart"); + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{storeName,jdbcType=VARCHAR}"); + } + + if (record.getSerialNumber() != null) { + sql.SET("serial_number = #{serialNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableNumber() != null) { + sql.SET("table_number = #{tableNumber,jdbcType=INTEGER}"); + } + + if (record.getTableName() != null) { + sql.SET("`table_name` = #{tableName,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getProductCategoryId() != null) { + sql.SET("product_category_id = #{productCategoryId,jdbcType=BIGINT}"); + } + + if (record.getProductCategoryName() != null) { + sql.SET("product_category_name = #{productCategoryName,jdbcType=VARCHAR}"); + } + + if (record.getProductId() != null) { + sql.SET("product_id = #{productId,jdbcType=BIGINT}"); + } + + if (record.getProductImg() != null) { + sql.SET("product_img = #{productImg,jdbcType=VARCHAR}"); + } + + if (record.getProductName() != null) { + sql.SET("product_name = #{productName,jdbcType=VARCHAR}"); + } + + if (record.getProductSpec() != null) { + sql.SET("product_spec = #{productSpec,jdbcType=VARCHAR}"); + } + + if (record.getProductPrice() != null) { + sql.SET("product_price = #{productPrice,jdbcType=DECIMAL}"); + } + + if (record.getProductNum() != null) { + sql.SET("product_num = #{productNum,jdbcType=INTEGER}"); + } + + if (record.getProductTotalPrice() != null) { + sql.SET("product_total_price = #{productTotalPrice,jdbcType=DECIMAL}"); + } + + 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.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, BsMealShopCartExample 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 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 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()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMealTableOrderChildMapper.java b/service/src/main/java/com/hfkj/dao/BsMealTableOrderChildMapper.java new file mode 100644 index 0000000..1640c77 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMealTableOrderChildMapper.java @@ -0,0 +1,155 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMealTableOrderChild; +import com.hfkj.entity.BsMealTableOrderChildExample; +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 BsMealTableOrderChildMapper extends BsMealTableOrderChildMapperExt { + @SelectProvider(type=BsMealTableOrderChildSqlProvider.class, method="countByExample") + long countByExample(BsMealTableOrderChildExample example); + + @DeleteProvider(type=BsMealTableOrderChildSqlProvider.class, method="deleteByExample") + int deleteByExample(BsMealTableOrderChildExample example); + + @Delete({ + "delete from bs_meal_table_order_child", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_meal_table_order_child (mer_id, mer_no, ", + "mer_name, mer_abbreviate, ", + "store_id, store_name, ", + "serial_number, table_number, ", + "`table_name`, order_no, ", + "order_amount, `status`, ", + "pay_time, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", + "values (#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, ", + "#{merName,jdbcType=VARCHAR}, #{merAbbreviate,jdbcType=VARCHAR}, ", + "#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ", + "#{serialNumber,jdbcType=VARCHAR}, #{tableNumber,jdbcType=VARCHAR}, ", + "#{tableName,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, ", + "#{orderAmount,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", + "#{payTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsMealTableOrderChild record); + + @InsertProvider(type=BsMealTableOrderChildSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsMealTableOrderChild record); + + @SelectProvider(type=BsMealTableOrderChildSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="table_number", property="tableNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="table_name", property="tableName", jdbcType=JdbcType.VARCHAR), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="order_amount", property="orderAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @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 selectByExample(BsMealTableOrderChildExample example); + + @Select({ + "select", + "id, mer_id, mer_no, mer_name, mer_abbreviate, store_id, store_name, serial_number, ", + "table_number, `table_name`, order_no, order_amount, `status`, pay_time, create_time, ", + "update_time, ext_1, ext_2, ext_3", + "from bs_meal_table_order_child", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="table_number", property="tableNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="table_name", property="tableName", jdbcType=JdbcType.VARCHAR), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="order_amount", property="orderAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @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) + }) + BsMealTableOrderChild selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsMealTableOrderChildSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsMealTableOrderChild record, @Param("example") BsMealTableOrderChildExample example); + + @UpdateProvider(type=BsMealTableOrderChildSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsMealTableOrderChild record, @Param("example") BsMealTableOrderChildExample example); + + @UpdateProvider(type=BsMealTableOrderChildSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsMealTableOrderChild record); + + @Update({ + "update bs_meal_table_order_child", + "set mer_id = #{merId,jdbcType=BIGINT},", + "mer_no = #{merNo,jdbcType=VARCHAR},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR},", + "store_id = #{storeId,jdbcType=BIGINT},", + "store_name = #{storeName,jdbcType=VARCHAR},", + "serial_number = #{serialNumber,jdbcType=VARCHAR},", + "table_number = #{tableNumber,jdbcType=VARCHAR},", + "`table_name` = #{tableName,jdbcType=VARCHAR},", + "order_no = #{orderNo,jdbcType=VARCHAR},", + "order_amount = #{orderAmount,jdbcType=DECIMAL},", + "`status` = #{status,jdbcType=INTEGER},", + "pay_time = #{payTime,jdbcType=TIMESTAMP},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsMealTableOrderChild record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMealTableOrderChildMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMealTableOrderChildMapperExt.java new file mode 100644 index 0000000..acc7a37 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMealTableOrderChildMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsMealTableOrderChildMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMealTableOrderChildSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMealTableOrderChildSqlProvider.java new file mode 100644 index 0000000..b8c8fb7 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMealTableOrderChildSqlProvider.java @@ -0,0 +1,430 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMealTableOrderChild; +import com.hfkj.entity.BsMealTableOrderChildExample.Criteria; +import com.hfkj.entity.BsMealTableOrderChildExample.Criterion; +import com.hfkj.entity.BsMealTableOrderChildExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsMealTableOrderChildSqlProvider { + + public String countByExample(BsMealTableOrderChildExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_meal_table_order_child"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsMealTableOrderChildExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_meal_table_order_child"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsMealTableOrderChild record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_meal_table_order_child"); + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerAbbreviate() != null) { + sql.VALUES("mer_abbreviate", "#{merAbbreviate,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}"); + } + + if (record.getSerialNumber() != null) { + sql.VALUES("serial_number", "#{serialNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableNumber() != null) { + sql.VALUES("table_number", "#{tableNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableName() != null) { + sql.VALUES("`table_name`", "#{tableName,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getOrderAmount() != null) { + sql.VALUES("order_amount", "#{orderAmount,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.VALUES("pay_time", "#{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + 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(BsMealTableOrderChildExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_id"); + sql.SELECT("mer_no"); + sql.SELECT("mer_name"); + sql.SELECT("mer_abbreviate"); + sql.SELECT("store_id"); + sql.SELECT("store_name"); + sql.SELECT("serial_number"); + sql.SELECT("table_number"); + sql.SELECT("`table_name`"); + sql.SELECT("order_no"); + sql.SELECT("order_amount"); + sql.SELECT("`status`"); + sql.SELECT("pay_time"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_meal_table_order_child"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsMealTableOrderChild record = (BsMealTableOrderChild) parameter.get("record"); + BsMealTableOrderChildExample example = (BsMealTableOrderChildExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_meal_table_order_child"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getMerAbbreviate() != null) { + sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + } + + if (record.getSerialNumber() != null) { + sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableNumber() != null) { + sql.SET("table_number = #{record.tableNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableName() != null) { + sql.SET("`table_name` = #{record.tableName,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + } + + if (record.getOrderAmount() != null) { + sql.SET("order_amount = #{record.orderAmount,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + } + + 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.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 parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_meal_table_order_child"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}"); + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); + sql.SET("table_number = #{record.tableNumber,jdbcType=VARCHAR}"); + sql.SET("`table_name` = #{record.tableName,jdbcType=VARCHAR}"); + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + sql.SET("order_amount = #{record.orderAmount,jdbcType=DECIMAL}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsMealTableOrderChildExample example = (BsMealTableOrderChildExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsMealTableOrderChild record) { + SQL sql = new SQL(); + sql.UPDATE("bs_meal_table_order_child"); + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerAbbreviate() != null) { + sql.SET("mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{storeName,jdbcType=VARCHAR}"); + } + + if (record.getSerialNumber() != null) { + sql.SET("serial_number = #{serialNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableNumber() != null) { + sql.SET("table_number = #{tableNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableName() != null) { + sql.SET("`table_name` = #{tableName,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getOrderAmount() != null) { + sql.SET("order_amount = #{orderAmount,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + 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, BsMealTableOrderChildExample 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 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 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()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMealTableOrderMapper.java b/service/src/main/java/com/hfkj/dao/BsMealTableOrderMapper.java new file mode 100644 index 0000000..c008001 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMealTableOrderMapper.java @@ -0,0 +1,158 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMealTableOrder; +import com.hfkj.entity.BsMealTableOrderExample; +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 BsMealTableOrderMapper extends BsMealTableOrderMapperExt { + @SelectProvider(type=BsMealTableOrderSqlProvider.class, method="countByExample") + long countByExample(BsMealTableOrderExample example); + + @DeleteProvider(type=BsMealTableOrderSqlProvider.class, method="deleteByExample") + int deleteByExample(BsMealTableOrderExample example); + + @Delete({ + "delete from bs_meal_table_order", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_meal_table_order (mer_id, mer_no, ", + "mer_name, mer_abbreviate, ", + "store_id, store_name, ", + "serial_number, table_number, ", + "`table_name`, people_num, ", + "order_no, order_amount, ", + "`status`, pay_time, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, ", + "#{merName,jdbcType=VARCHAR}, #{merAbbreviate,jdbcType=VARCHAR}, ", + "#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ", + "#{serialNumber,jdbcType=VARCHAR}, #{tableNumber,jdbcType=INTEGER}, ", + "#{tableName,jdbcType=VARCHAR}, #{peopleNum,jdbcType=INTEGER}, ", + "#{orderNo,jdbcType=VARCHAR}, #{orderAmount,jdbcType=DECIMAL}, ", + "#{status,jdbcType=INTEGER}, #{payTime,jdbcType=TIMESTAMP}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsMealTableOrder record); + + @InsertProvider(type=BsMealTableOrderSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsMealTableOrder record); + + @SelectProvider(type=BsMealTableOrderSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="table_number", property="tableNumber", jdbcType=JdbcType.INTEGER), + @Result(column="table_name", property="tableName", jdbcType=JdbcType.VARCHAR), + @Result(column="people_num", property="peopleNum", jdbcType=JdbcType.INTEGER), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="order_amount", property="orderAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @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 selectByExample(BsMealTableOrderExample example); + + @Select({ + "select", + "id, mer_id, mer_no, mer_name, mer_abbreviate, store_id, store_name, serial_number, ", + "table_number, `table_name`, people_num, order_no, order_amount, `status`, pay_time, ", + "create_time, update_time, ext_1, ext_2, ext_3", + "from bs_meal_table_order", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="table_number", property="tableNumber", jdbcType=JdbcType.INTEGER), + @Result(column="table_name", property="tableName", jdbcType=JdbcType.VARCHAR), + @Result(column="people_num", property="peopleNum", jdbcType=JdbcType.INTEGER), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="order_amount", property="orderAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @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) + }) + BsMealTableOrder selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsMealTableOrderSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsMealTableOrder record, @Param("example") BsMealTableOrderExample example); + + @UpdateProvider(type=BsMealTableOrderSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsMealTableOrder record, @Param("example") BsMealTableOrderExample example); + + @UpdateProvider(type=BsMealTableOrderSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsMealTableOrder record); + + @Update({ + "update bs_meal_table_order", + "set mer_id = #{merId,jdbcType=BIGINT},", + "mer_no = #{merNo,jdbcType=VARCHAR},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR},", + "store_id = #{storeId,jdbcType=BIGINT},", + "store_name = #{storeName,jdbcType=VARCHAR},", + "serial_number = #{serialNumber,jdbcType=VARCHAR},", + "table_number = #{tableNumber,jdbcType=INTEGER},", + "`table_name` = #{tableName,jdbcType=VARCHAR},", + "people_num = #{peopleNum,jdbcType=INTEGER},", + "order_no = #{orderNo,jdbcType=VARCHAR},", + "order_amount = #{orderAmount,jdbcType=DECIMAL},", + "`status` = #{status,jdbcType=INTEGER},", + "pay_time = #{payTime,jdbcType=TIMESTAMP},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsMealTableOrder record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMealTableOrderMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMealTableOrderMapperExt.java new file mode 100644 index 0000000..d99273c --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMealTableOrderMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsMealTableOrderMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMealTableOrderSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMealTableOrderSqlProvider.java new file mode 100644 index 0000000..7de9369 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMealTableOrderSqlProvider.java @@ -0,0 +1,444 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMealTableOrder; +import com.hfkj.entity.BsMealTableOrderExample.Criteria; +import com.hfkj.entity.BsMealTableOrderExample.Criterion; +import com.hfkj.entity.BsMealTableOrderExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsMealTableOrderSqlProvider { + + public String countByExample(BsMealTableOrderExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_meal_table_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsMealTableOrderExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_meal_table_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsMealTableOrder record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_meal_table_order"); + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerAbbreviate() != null) { + sql.VALUES("mer_abbreviate", "#{merAbbreviate,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}"); + } + + if (record.getSerialNumber() != null) { + sql.VALUES("serial_number", "#{serialNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableNumber() != null) { + sql.VALUES("table_number", "#{tableNumber,jdbcType=INTEGER}"); + } + + if (record.getTableName() != null) { + sql.VALUES("`table_name`", "#{tableName,jdbcType=VARCHAR}"); + } + + if (record.getPeopleNum() != null) { + sql.VALUES("people_num", "#{peopleNum,jdbcType=INTEGER}"); + } + + if (record.getOrderNo() != null) { + sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getOrderAmount() != null) { + sql.VALUES("order_amount", "#{orderAmount,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.VALUES("pay_time", "#{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + 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(BsMealTableOrderExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_id"); + sql.SELECT("mer_no"); + sql.SELECT("mer_name"); + sql.SELECT("mer_abbreviate"); + sql.SELECT("store_id"); + sql.SELECT("store_name"); + sql.SELECT("serial_number"); + sql.SELECT("table_number"); + sql.SELECT("`table_name`"); + sql.SELECT("people_num"); + sql.SELECT("order_no"); + sql.SELECT("order_amount"); + sql.SELECT("`status`"); + sql.SELECT("pay_time"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_meal_table_order"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsMealTableOrder record = (BsMealTableOrder) parameter.get("record"); + BsMealTableOrderExample example = (BsMealTableOrderExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_meal_table_order"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getMerAbbreviate() != null) { + sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + } + + if (record.getSerialNumber() != null) { + sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableNumber() != null) { + sql.SET("table_number = #{record.tableNumber,jdbcType=INTEGER}"); + } + + if (record.getTableName() != null) { + sql.SET("`table_name` = #{record.tableName,jdbcType=VARCHAR}"); + } + + if (record.getPeopleNum() != null) { + sql.SET("people_num = #{record.peopleNum,jdbcType=INTEGER}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + } + + if (record.getOrderAmount() != null) { + sql.SET("order_amount = #{record.orderAmount,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + } + + 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.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 parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_meal_table_order"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}"); + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); + sql.SET("table_number = #{record.tableNumber,jdbcType=INTEGER}"); + sql.SET("`table_name` = #{record.tableName,jdbcType=VARCHAR}"); + sql.SET("people_num = #{record.peopleNum,jdbcType=INTEGER}"); + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + sql.SET("order_amount = #{record.orderAmount,jdbcType=DECIMAL}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsMealTableOrderExample example = (BsMealTableOrderExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsMealTableOrder record) { + SQL sql = new SQL(); + sql.UPDATE("bs_meal_table_order"); + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerAbbreviate() != null) { + sql.SET("mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{storeName,jdbcType=VARCHAR}"); + } + + if (record.getSerialNumber() != null) { + sql.SET("serial_number = #{serialNumber,jdbcType=VARCHAR}"); + } + + if (record.getTableNumber() != null) { + sql.SET("table_number = #{tableNumber,jdbcType=INTEGER}"); + } + + if (record.getTableName() != null) { + sql.SET("`table_name` = #{tableName,jdbcType=VARCHAR}"); + } + + if (record.getPeopleNum() != null) { + sql.SET("people_num = #{peopleNum,jdbcType=INTEGER}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getOrderAmount() != null) { + sql.SET("order_amount = #{orderAmount,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + 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, BsMealTableOrderExample 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 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 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()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMealShopCart.java b/service/src/main/java/com/hfkj/entity/BsMealShopCart.java new file mode 100644 index 0000000..60e75ad --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMealShopCart.java @@ -0,0 +1,390 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_meal_shop_cart + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsMealShopCart implements Serializable { + private Long id; + + /** + * 门店id + */ + private Long storeId; + + /** + * 门店名称 + */ + private String storeName; + + /** + * 序列号(系统唯一) + */ + private String serialNumber; + + /** + * 桌子编号 + */ + private Integer tableNumber; + + /** + * 桌子名称 + */ + private String tableName; + + /** + * 订单号 + */ + private String orderNo; + + /** + * 产品分类id + */ + private Long productCategoryId; + + /** + * 产品分类名称 + */ + private String productCategoryName; + + /** + * 产品id + */ + private Long productId; + + /** + * 产品图片 + */ + private String productImg; + + /** + * 产品名称 + */ + private String productName; + + /** + * 产品规格 + */ + private String productSpec; + + /** + * 产品单价 + */ + private BigDecimal productPrice; + + /** + * 产品数量 + */ + private Integer productNum; + + /** + * 产品总价 + */ + private BigDecimal productTotalPrice; + + /** + * 状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + public Integer getTableNumber() { + return tableNumber; + } + + public void setTableNumber(Integer tableNumber) { + this.tableNumber = tableNumber; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public Long getProductCategoryId() { + return productCategoryId; + } + + public void setProductCategoryId(Long productCategoryId) { + this.productCategoryId = productCategoryId; + } + + public String getProductCategoryName() { + return productCategoryName; + } + + public void setProductCategoryName(String productCategoryName) { + this.productCategoryName = productCategoryName; + } + + public Long getProductId() { + return productId; + } + + public void setProductId(Long productId) { + this.productId = productId; + } + + public String getProductImg() { + return productImg; + } + + public void setProductImg(String productImg) { + this.productImg = productImg; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductSpec() { + return productSpec; + } + + public void setProductSpec(String productSpec) { + this.productSpec = productSpec; + } + + public BigDecimal getProductPrice() { + return productPrice; + } + + public void setProductPrice(BigDecimal productPrice) { + this.productPrice = productPrice; + } + + public Integer getProductNum() { + return productNum; + } + + public void setProductNum(Integer productNum) { + this.productNum = productNum; + } + + public BigDecimal getProductTotalPrice() { + return productTotalPrice; + } + + public void setProductTotalPrice(BigDecimal productTotalPrice) { + this.productTotalPrice = productTotalPrice; + } + + 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 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; + } + BsMealShopCart other = (BsMealShopCart) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) + && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) + && (this.getSerialNumber() == null ? other.getSerialNumber() == null : this.getSerialNumber().equals(other.getSerialNumber())) + && (this.getTableNumber() == null ? other.getTableNumber() == null : this.getTableNumber().equals(other.getTableNumber())) + && (this.getTableName() == null ? other.getTableName() == null : this.getTableName().equals(other.getTableName())) + && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) + && (this.getProductCategoryId() == null ? other.getProductCategoryId() == null : this.getProductCategoryId().equals(other.getProductCategoryId())) + && (this.getProductCategoryName() == null ? other.getProductCategoryName() == null : this.getProductCategoryName().equals(other.getProductCategoryName())) + && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId())) + && (this.getProductImg() == null ? other.getProductImg() == null : this.getProductImg().equals(other.getProductImg())) + && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName())) + && (this.getProductSpec() == null ? other.getProductSpec() == null : this.getProductSpec().equals(other.getProductSpec())) + && (this.getProductPrice() == null ? other.getProductPrice() == null : this.getProductPrice().equals(other.getProductPrice())) + && (this.getProductNum() == null ? other.getProductNum() == null : this.getProductNum().equals(other.getProductNum())) + && (this.getProductTotalPrice() == null ? other.getProductTotalPrice() == null : this.getProductTotalPrice().equals(other.getProductTotalPrice())) + && (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.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 + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); + result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); + result = prime * result + ((getSerialNumber() == null) ? 0 : getSerialNumber().hashCode()); + result = prime * result + ((getTableNumber() == null) ? 0 : getTableNumber().hashCode()); + result = prime * result + ((getTableName() == null) ? 0 : getTableName().hashCode()); + result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); + result = prime * result + ((getProductCategoryId() == null) ? 0 : getProductCategoryId().hashCode()); + result = prime * result + ((getProductCategoryName() == null) ? 0 : getProductCategoryName().hashCode()); + result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode()); + result = prime * result + ((getProductImg() == null) ? 0 : getProductImg().hashCode()); + result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode()); + result = prime * result + ((getProductSpec() == null) ? 0 : getProductSpec().hashCode()); + result = prime * result + ((getProductPrice() == null) ? 0 : getProductPrice().hashCode()); + result = prime * result + ((getProductNum() == null) ? 0 : getProductNum().hashCode()); + result = prime * result + ((getProductTotalPrice() == null) ? 0 : getProductTotalPrice().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 + ((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(", storeId=").append(storeId); + sb.append(", storeName=").append(storeName); + sb.append(", serialNumber=").append(serialNumber); + sb.append(", tableNumber=").append(tableNumber); + sb.append(", tableName=").append(tableName); + sb.append(", orderNo=").append(orderNo); + sb.append(", productCategoryId=").append(productCategoryId); + sb.append(", productCategoryName=").append(productCategoryName); + sb.append(", productId=").append(productId); + sb.append(", productImg=").append(productImg); + sb.append(", productName=").append(productName); + sb.append(", productSpec=").append(productSpec); + sb.append(", productPrice=").append(productPrice); + sb.append(", productNum=").append(productNum); + sb.append(", productTotalPrice=").append(productTotalPrice); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + 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(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMealShopCartExample.java b/service/src/main/java/com/hfkj/entity/BsMealShopCartExample.java new file mode 100644 index 0000000..9f9ab93 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMealShopCartExample.java @@ -0,0 +1,1654 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsMealShopCartExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsMealShopCartExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNull() { + addCriterion("store_id is null"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNotNull() { + addCriterion("store_id is not null"); + return (Criteria) this; + } + + public Criteria andStoreIdEqualTo(Long value) { + addCriterion("store_id =", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotEqualTo(Long value) { + addCriterion("store_id <>", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThan(Long value) { + addCriterion("store_id >", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThanOrEqualTo(Long value) { + addCriterion("store_id >=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThan(Long value) { + addCriterion("store_id <", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThanOrEqualTo(Long value) { + addCriterion("store_id <=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdIn(List values) { + addCriterion("store_id in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotIn(List values) { + addCriterion("store_id not in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdBetween(Long value1, Long value2) { + addCriterion("store_id between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotBetween(Long value1, Long value2) { + addCriterion("store_id not between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNull() { + addCriterion("store_name is null"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNotNull() { + addCriterion("store_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreNameEqualTo(String value) { + addCriterion("store_name =", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotEqualTo(String value) { + addCriterion("store_name <>", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThan(String value) { + addCriterion("store_name >", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThanOrEqualTo(String value) { + addCriterion("store_name >=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThan(String value) { + addCriterion("store_name <", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThanOrEqualTo(String value) { + addCriterion("store_name <=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLike(String value) { + addCriterion("store_name like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotLike(String value) { + addCriterion("store_name not like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameIn(List values) { + addCriterion("store_name in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotIn(List values) { + addCriterion("store_name not in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameBetween(String value1, String value2) { + addCriterion("store_name between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotBetween(String value1, String value2) { + addCriterion("store_name not between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andSerialNumberIsNull() { + addCriterion("serial_number is null"); + return (Criteria) this; + } + + public Criteria andSerialNumberIsNotNull() { + addCriterion("serial_number is not null"); + return (Criteria) this; + } + + public Criteria andSerialNumberEqualTo(String value) { + addCriterion("serial_number =", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotEqualTo(String value) { + addCriterion("serial_number <>", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberGreaterThan(String value) { + addCriterion("serial_number >", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberGreaterThanOrEqualTo(String value) { + addCriterion("serial_number >=", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLessThan(String value) { + addCriterion("serial_number <", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLessThanOrEqualTo(String value) { + addCriterion("serial_number <=", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLike(String value) { + addCriterion("serial_number like", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotLike(String value) { + addCriterion("serial_number not like", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberIn(List values) { + addCriterion("serial_number in", values, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotIn(List values) { + addCriterion("serial_number not in", values, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberBetween(String value1, String value2) { + addCriterion("serial_number between", value1, value2, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotBetween(String value1, String value2) { + addCriterion("serial_number not between", value1, value2, "serialNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberIsNull() { + addCriterion("table_number is null"); + return (Criteria) this; + } + + public Criteria andTableNumberIsNotNull() { + addCriterion("table_number is not null"); + return (Criteria) this; + } + + public Criteria andTableNumberEqualTo(Integer value) { + addCriterion("table_number =", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotEqualTo(Integer value) { + addCriterion("table_number <>", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberGreaterThan(Integer value) { + addCriterion("table_number >", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("table_number >=", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberLessThan(Integer value) { + addCriterion("table_number <", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberLessThanOrEqualTo(Integer value) { + addCriterion("table_number <=", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberIn(List values) { + addCriterion("table_number in", values, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotIn(List values) { + addCriterion("table_number not in", values, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberBetween(Integer value1, Integer value2) { + addCriterion("table_number between", value1, value2, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotBetween(Integer value1, Integer value2) { + addCriterion("table_number not between", value1, value2, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNameIsNull() { + addCriterion("`table_name` is null"); + return (Criteria) this; + } + + public Criteria andTableNameIsNotNull() { + addCriterion("`table_name` is not null"); + return (Criteria) this; + } + + public Criteria andTableNameEqualTo(String value) { + addCriterion("`table_name` =", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotEqualTo(String value) { + addCriterion("`table_name` <>", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameGreaterThan(String value) { + addCriterion("`table_name` >", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameGreaterThanOrEqualTo(String value) { + addCriterion("`table_name` >=", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameLessThan(String value) { + addCriterion("`table_name` <", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameLessThanOrEqualTo(String value) { + addCriterion("`table_name` <=", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameLike(String value) { + addCriterion("`table_name` like", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotLike(String value) { + addCriterion("`table_name` not like", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameIn(List values) { + addCriterion("`table_name` in", values, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotIn(List values) { + addCriterion("`table_name` not in", values, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameBetween(String value1, String value2) { + addCriterion("`table_name` between", value1, value2, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotBetween(String value1, String value2) { + addCriterion("`table_name` not between", value1, value2, "tableName"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNull() { + addCriterion("order_no is null"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNotNull() { + addCriterion("order_no is not null"); + return (Criteria) this; + } + + public Criteria andOrderNoEqualTo(String value) { + addCriterion("order_no =", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotEqualTo(String value) { + addCriterion("order_no <>", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThan(String value) { + addCriterion("order_no >", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("order_no >=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThan(String value) { + addCriterion("order_no <", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThanOrEqualTo(String value) { + addCriterion("order_no <=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLike(String value) { + addCriterion("order_no like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotLike(String value) { + addCriterion("order_no not like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoIn(List values) { + addCriterion("order_no in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotIn(List values) { + addCriterion("order_no not in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoBetween(String value1, String value2) { + addCriterion("order_no between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotBetween(String value1, String value2) { + addCriterion("order_no not between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdIsNull() { + addCriterion("product_category_id is null"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdIsNotNull() { + addCriterion("product_category_id is not null"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdEqualTo(Long value) { + addCriterion("product_category_id =", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdNotEqualTo(Long value) { + addCriterion("product_category_id <>", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdGreaterThan(Long value) { + addCriterion("product_category_id >", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdGreaterThanOrEqualTo(Long value) { + addCriterion("product_category_id >=", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdLessThan(Long value) { + addCriterion("product_category_id <", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdLessThanOrEqualTo(Long value) { + addCriterion("product_category_id <=", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdIn(List values) { + addCriterion("product_category_id in", values, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdNotIn(List values) { + addCriterion("product_category_id not in", values, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdBetween(Long value1, Long value2) { + addCriterion("product_category_id between", value1, value2, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdNotBetween(Long value1, Long value2) { + addCriterion("product_category_id not between", value1, value2, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameIsNull() { + addCriterion("product_category_name is null"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameIsNotNull() { + addCriterion("product_category_name is not null"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameEqualTo(String value) { + addCriterion("product_category_name =", value, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameNotEqualTo(String value) { + addCriterion("product_category_name <>", value, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameGreaterThan(String value) { + addCriterion("product_category_name >", value, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameGreaterThanOrEqualTo(String value) { + addCriterion("product_category_name >=", value, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameLessThan(String value) { + addCriterion("product_category_name <", value, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameLessThanOrEqualTo(String value) { + addCriterion("product_category_name <=", value, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameLike(String value) { + addCriterion("product_category_name like", value, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameNotLike(String value) { + addCriterion("product_category_name not like", value, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameIn(List values) { + addCriterion("product_category_name in", values, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameNotIn(List values) { + addCriterion("product_category_name not in", values, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameBetween(String value1, String value2) { + addCriterion("product_category_name between", value1, value2, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductCategoryNameNotBetween(String value1, String value2) { + addCriterion("product_category_name not between", value1, value2, "productCategoryName"); + return (Criteria) this; + } + + public Criteria andProductIdIsNull() { + addCriterion("product_id is null"); + return (Criteria) this; + } + + public Criteria andProductIdIsNotNull() { + addCriterion("product_id is not null"); + return (Criteria) this; + } + + public Criteria andProductIdEqualTo(Long value) { + addCriterion("product_id =", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotEqualTo(Long value) { + addCriterion("product_id <>", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThan(Long value) { + addCriterion("product_id >", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThanOrEqualTo(Long value) { + addCriterion("product_id >=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThan(Long value) { + addCriterion("product_id <", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThanOrEqualTo(Long value) { + addCriterion("product_id <=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdIn(List values) { + addCriterion("product_id in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotIn(List values) { + addCriterion("product_id not in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdBetween(Long value1, Long value2) { + addCriterion("product_id between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotBetween(Long value1, Long value2) { + addCriterion("product_id not between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andProductImgIsNull() { + addCriterion("product_img is null"); + return (Criteria) this; + } + + public Criteria andProductImgIsNotNull() { + addCriterion("product_img is not null"); + return (Criteria) this; + } + + public Criteria andProductImgEqualTo(String value) { + addCriterion("product_img =", value, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgNotEqualTo(String value) { + addCriterion("product_img <>", value, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgGreaterThan(String value) { + addCriterion("product_img >", value, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgGreaterThanOrEqualTo(String value) { + addCriterion("product_img >=", value, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgLessThan(String value) { + addCriterion("product_img <", value, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgLessThanOrEqualTo(String value) { + addCriterion("product_img <=", value, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgLike(String value) { + addCriterion("product_img like", value, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgNotLike(String value) { + addCriterion("product_img not like", value, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgIn(List values) { + addCriterion("product_img in", values, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgNotIn(List values) { + addCriterion("product_img not in", values, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgBetween(String value1, String value2) { + addCriterion("product_img between", value1, value2, "productImg"); + return (Criteria) this; + } + + public Criteria andProductImgNotBetween(String value1, String value2) { + addCriterion("product_img not between", value1, value2, "productImg"); + return (Criteria) this; + } + + public Criteria andProductNameIsNull() { + addCriterion("product_name is null"); + return (Criteria) this; + } + + public Criteria andProductNameIsNotNull() { + addCriterion("product_name is not null"); + return (Criteria) this; + } + + public Criteria andProductNameEqualTo(String value) { + addCriterion("product_name =", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotEqualTo(String value) { + addCriterion("product_name <>", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameGreaterThan(String value) { + addCriterion("product_name >", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameGreaterThanOrEqualTo(String value) { + addCriterion("product_name >=", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLessThan(String value) { + addCriterion("product_name <", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLessThanOrEqualTo(String value) { + addCriterion("product_name <=", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLike(String value) { + addCriterion("product_name like", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotLike(String value) { + addCriterion("product_name not like", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameIn(List values) { + addCriterion("product_name in", values, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotIn(List values) { + addCriterion("product_name not in", values, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameBetween(String value1, String value2) { + addCriterion("product_name between", value1, value2, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotBetween(String value1, String value2) { + addCriterion("product_name not between", value1, value2, "productName"); + return (Criteria) this; + } + + public Criteria andProductSpecIsNull() { + addCriterion("product_spec is null"); + return (Criteria) this; + } + + public Criteria andProductSpecIsNotNull() { + addCriterion("product_spec is not null"); + return (Criteria) this; + } + + public Criteria andProductSpecEqualTo(String value) { + addCriterion("product_spec =", value, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecNotEqualTo(String value) { + addCriterion("product_spec <>", value, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecGreaterThan(String value) { + addCriterion("product_spec >", value, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecGreaterThanOrEqualTo(String value) { + addCriterion("product_spec >=", value, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecLessThan(String value) { + addCriterion("product_spec <", value, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecLessThanOrEqualTo(String value) { + addCriterion("product_spec <=", value, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecLike(String value) { + addCriterion("product_spec like", value, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecNotLike(String value) { + addCriterion("product_spec not like", value, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecIn(List values) { + addCriterion("product_spec in", values, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecNotIn(List values) { + addCriterion("product_spec not in", values, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecBetween(String value1, String value2) { + addCriterion("product_spec between", value1, value2, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductSpecNotBetween(String value1, String value2) { + addCriterion("product_spec not between", value1, value2, "productSpec"); + return (Criteria) this; + } + + public Criteria andProductPriceIsNull() { + addCriterion("product_price is null"); + return (Criteria) this; + } + + public Criteria andProductPriceIsNotNull() { + addCriterion("product_price is not null"); + return (Criteria) this; + } + + public Criteria andProductPriceEqualTo(BigDecimal value) { + addCriterion("product_price =", value, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductPriceNotEqualTo(BigDecimal value) { + addCriterion("product_price <>", value, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductPriceGreaterThan(BigDecimal value) { + addCriterion("product_price >", value, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("product_price >=", value, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductPriceLessThan(BigDecimal value) { + addCriterion("product_price <", value, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("product_price <=", value, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductPriceIn(List values) { + addCriterion("product_price in", values, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductPriceNotIn(List values) { + addCriterion("product_price not in", values, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("product_price between", value1, value2, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("product_price not between", value1, value2, "productPrice"); + return (Criteria) this; + } + + public Criteria andProductNumIsNull() { + addCriterion("product_num is null"); + return (Criteria) this; + } + + public Criteria andProductNumIsNotNull() { + addCriterion("product_num is not null"); + return (Criteria) this; + } + + public Criteria andProductNumEqualTo(Integer value) { + addCriterion("product_num =", value, "productNum"); + return (Criteria) this; + } + + public Criteria andProductNumNotEqualTo(Integer value) { + addCriterion("product_num <>", value, "productNum"); + return (Criteria) this; + } + + public Criteria andProductNumGreaterThan(Integer value) { + addCriterion("product_num >", value, "productNum"); + return (Criteria) this; + } + + public Criteria andProductNumGreaterThanOrEqualTo(Integer value) { + addCriterion("product_num >=", value, "productNum"); + return (Criteria) this; + } + + public Criteria andProductNumLessThan(Integer value) { + addCriterion("product_num <", value, "productNum"); + return (Criteria) this; + } + + public Criteria andProductNumLessThanOrEqualTo(Integer value) { + addCriterion("product_num <=", value, "productNum"); + return (Criteria) this; + } + + public Criteria andProductNumIn(List values) { + addCriterion("product_num in", values, "productNum"); + return (Criteria) this; + } + + public Criteria andProductNumNotIn(List values) { + addCriterion("product_num not in", values, "productNum"); + return (Criteria) this; + } + + public Criteria andProductNumBetween(Integer value1, Integer value2) { + addCriterion("product_num between", value1, value2, "productNum"); + return (Criteria) this; + } + + public Criteria andProductNumNotBetween(Integer value1, Integer value2) { + addCriterion("product_num not between", value1, value2, "productNum"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceIsNull() { + addCriterion("product_total_price is null"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceIsNotNull() { + addCriterion("product_total_price is not null"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceEqualTo(BigDecimal value) { + addCriterion("product_total_price =", value, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceNotEqualTo(BigDecimal value) { + addCriterion("product_total_price <>", value, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceGreaterThan(BigDecimal value) { + addCriterion("product_total_price >", value, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("product_total_price >=", value, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceLessThan(BigDecimal value) { + addCriterion("product_total_price <", value, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("product_total_price <=", value, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceIn(List values) { + addCriterion("product_total_price in", values, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceNotIn(List values) { + addCriterion("product_total_price not in", values, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("product_total_price between", value1, value2, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andProductTotalPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("product_total_price not between", value1, value2, "productTotalPrice"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMealTableOrder.java b/service/src/main/java/com/hfkj/entity/BsMealTableOrder.java new file mode 100644 index 0000000..afbb8c9 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMealTableOrder.java @@ -0,0 +1,358 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_meal_table_order + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsMealTableOrder implements Serializable { + private Long id; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户号 + */ + private String merNo; + + /** + * 商户名称 + */ + private String merName; + + /** + * 商户简称 + */ + private String merAbbreviate; + + /** + * 门店id + */ + private Long storeId; + + /** + * 门店名称 + */ + private String storeName; + + /** + * 序列号(系统唯一) + */ + private String serialNumber; + + /** + * 桌子编号 + */ + private Integer tableNumber; + + /** + * 桌子名称 + */ + private String tableName; + + /** + * 人数 + */ + private Integer peopleNum; + + /** + * 订单号 + */ + private String orderNo; + + /** + * 订单金额 + */ + private BigDecimal orderAmount; + + /** + * 状态 0:不可用 1:未结账 2:已结账 + */ + private Integer status; + + /** + * 支付时间 + */ + private Date payTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerNo() { + return merNo; + } + + public void setMerNo(String merNo) { + this.merNo = merNo; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public String getMerAbbreviate() { + return merAbbreviate; + } + + public void setMerAbbreviate(String merAbbreviate) { + this.merAbbreviate = merAbbreviate; + } + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + public Integer getTableNumber() { + return tableNumber; + } + + public void setTableNumber(Integer tableNumber) { + this.tableNumber = tableNumber; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public Integer getPeopleNum() { + return peopleNum; + } + + public void setPeopleNum(Integer peopleNum) { + this.peopleNum = peopleNum; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public BigDecimal getOrderAmount() { + return orderAmount; + } + + public void setOrderAmount(BigDecimal orderAmount) { + this.orderAmount = orderAmount; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getPayTime() { + return payTime; + } + + public void setPayTime(Date payTime) { + this.payTime = payTime; + } + + 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 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; + } + BsMealTableOrder other = (BsMealTableOrder) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getMerAbbreviate() == null ? other.getMerAbbreviate() == null : this.getMerAbbreviate().equals(other.getMerAbbreviate())) + && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) + && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) + && (this.getSerialNumber() == null ? other.getSerialNumber() == null : this.getSerialNumber().equals(other.getSerialNumber())) + && (this.getTableNumber() == null ? other.getTableNumber() == null : this.getTableNumber().equals(other.getTableNumber())) + && (this.getTableName() == null ? other.getTableName() == null : this.getTableName().equals(other.getTableName())) + && (this.getPeopleNum() == null ? other.getPeopleNum() == null : this.getPeopleNum().equals(other.getPeopleNum())) + && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) + && (this.getOrderAmount() == null ? other.getOrderAmount() == null : this.getOrderAmount().equals(other.getOrderAmount())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (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 + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getMerAbbreviate() == null) ? 0 : getMerAbbreviate().hashCode()); + result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); + result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); + result = prime * result + ((getSerialNumber() == null) ? 0 : getSerialNumber().hashCode()); + result = prime * result + ((getTableNumber() == null) ? 0 : getTableNumber().hashCode()); + result = prime * result + ((getTableName() == null) ? 0 : getTableName().hashCode()); + result = prime * result + ((getPeopleNum() == null) ? 0 : getPeopleNum().hashCode()); + result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); + result = prime * result + ((getOrderAmount() == null) ? 0 : getOrderAmount().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", merId=").append(merId); + sb.append(", merNo=").append(merNo); + sb.append(", merName=").append(merName); + sb.append(", merAbbreviate=").append(merAbbreviate); + sb.append(", storeId=").append(storeId); + sb.append(", storeName=").append(storeName); + sb.append(", serialNumber=").append(serialNumber); + sb.append(", tableNumber=").append(tableNumber); + sb.append(", tableName=").append(tableName); + sb.append(", peopleNum=").append(peopleNum); + sb.append(", orderNo=").append(orderNo); + sb.append(", orderAmount=").append(orderAmount); + sb.append(", status=").append(status); + sb.append(", payTime=").append(payTime); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + 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(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMealTableOrderChild.java b/service/src/main/java/com/hfkj/entity/BsMealTableOrderChild.java new file mode 100644 index 0000000..4bd4dc9 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMealTableOrderChild.java @@ -0,0 +1,342 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_meal_table_order_child + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsMealTableOrderChild implements Serializable { + private Long id; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户号 + */ + private String merNo; + + /** + * 商户名称 + */ + private String merName; + + /** + * 商户简称 + */ + private String merAbbreviate; + + /** + * 门店id + */ + private Long storeId; + + /** + * 门店名称 + */ + private String storeName; + + /** + * 序列号(系统唯一) + */ + private String serialNumber; + + /** + * 桌子编号 + */ + private String tableNumber; + + /** + * 桌子名称 + */ + private String tableName; + + /** + * 订单号 + */ + private String orderNo; + + /** + * 订单金额 + */ + private BigDecimal orderAmount; + + /** + * 状态 0:不可用 1:未结账 2:已结账 + */ + private Integer status; + + /** + * 支付时间 + */ + private Date payTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerNo() { + return merNo; + } + + public void setMerNo(String merNo) { + this.merNo = merNo; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public String getMerAbbreviate() { + return merAbbreviate; + } + + public void setMerAbbreviate(String merAbbreviate) { + this.merAbbreviate = merAbbreviate; + } + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + public String getTableNumber() { + return tableNumber; + } + + public void setTableNumber(String tableNumber) { + this.tableNumber = tableNumber; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public BigDecimal getOrderAmount() { + return orderAmount; + } + + public void setOrderAmount(BigDecimal orderAmount) { + this.orderAmount = orderAmount; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getPayTime() { + return payTime; + } + + public void setPayTime(Date payTime) { + this.payTime = payTime; + } + + 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 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; + } + BsMealTableOrderChild other = (BsMealTableOrderChild) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getMerAbbreviate() == null ? other.getMerAbbreviate() == null : this.getMerAbbreviate().equals(other.getMerAbbreviate())) + && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) + && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) + && (this.getSerialNumber() == null ? other.getSerialNumber() == null : this.getSerialNumber().equals(other.getSerialNumber())) + && (this.getTableNumber() == null ? other.getTableNumber() == null : this.getTableNumber().equals(other.getTableNumber())) + && (this.getTableName() == null ? other.getTableName() == null : this.getTableName().equals(other.getTableName())) + && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) + && (this.getOrderAmount() == null ? other.getOrderAmount() == null : this.getOrderAmount().equals(other.getOrderAmount())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (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 + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getMerAbbreviate() == null) ? 0 : getMerAbbreviate().hashCode()); + result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); + result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); + result = prime * result + ((getSerialNumber() == null) ? 0 : getSerialNumber().hashCode()); + result = prime * result + ((getTableNumber() == null) ? 0 : getTableNumber().hashCode()); + result = prime * result + ((getTableName() == null) ? 0 : getTableName().hashCode()); + result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); + result = prime * result + ((getOrderAmount() == null) ? 0 : getOrderAmount().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", merId=").append(merId); + sb.append(", merNo=").append(merNo); + sb.append(", merName=").append(merName); + sb.append(", merAbbreviate=").append(merAbbreviate); + sb.append(", storeId=").append(storeId); + sb.append(", storeName=").append(storeName); + sb.append(", serialNumber=").append(serialNumber); + sb.append(", tableNumber=").append(tableNumber); + sb.append(", tableName=").append(tableName); + sb.append(", orderNo=").append(orderNo); + sb.append(", orderAmount=").append(orderAmount); + sb.append(", status=").append(status); + sb.append(", payTime=").append(payTime); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + 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(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMealTableOrderChildExample.java b/service/src/main/java/com/hfkj/entity/BsMealTableOrderChildExample.java new file mode 100644 index 0000000..9c28a34 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMealTableOrderChildExample.java @@ -0,0 +1,1474 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsMealTableOrderChildExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsMealTableOrderChildExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNoIsNull() { + addCriterion("mer_no is null"); + return (Criteria) this; + } + + public Criteria andMerNoIsNotNull() { + addCriterion("mer_no is not null"); + return (Criteria) this; + } + + public Criteria andMerNoEqualTo(String value) { + addCriterion("mer_no =", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotEqualTo(String value) { + addCriterion("mer_no <>", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThan(String value) { + addCriterion("mer_no >", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThanOrEqualTo(String value) { + addCriterion("mer_no >=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThan(String value) { + addCriterion("mer_no <", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThanOrEqualTo(String value) { + addCriterion("mer_no <=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLike(String value) { + addCriterion("mer_no like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotLike(String value) { + addCriterion("mer_no not like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoIn(List values) { + addCriterion("mer_no in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotIn(List values) { + addCriterion("mer_no not in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoBetween(String value1, String value2) { + addCriterion("mer_no between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotBetween(String value1, String value2) { + addCriterion("mer_no not between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateIsNull() { + addCriterion("mer_abbreviate is null"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateIsNotNull() { + addCriterion("mer_abbreviate is not null"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateEqualTo(String value) { + addCriterion("mer_abbreviate =", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotEqualTo(String value) { + addCriterion("mer_abbreviate <>", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateGreaterThan(String value) { + addCriterion("mer_abbreviate >", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateGreaterThanOrEqualTo(String value) { + addCriterion("mer_abbreviate >=", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateLessThan(String value) { + addCriterion("mer_abbreviate <", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateLessThanOrEqualTo(String value) { + addCriterion("mer_abbreviate <=", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateLike(String value) { + addCriterion("mer_abbreviate like", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotLike(String value) { + addCriterion("mer_abbreviate not like", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateIn(List values) { + addCriterion("mer_abbreviate in", values, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotIn(List values) { + addCriterion("mer_abbreviate not in", values, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateBetween(String value1, String value2) { + addCriterion("mer_abbreviate between", value1, value2, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotBetween(String value1, String value2) { + addCriterion("mer_abbreviate not between", value1, value2, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNull() { + addCriterion("store_id is null"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNotNull() { + addCriterion("store_id is not null"); + return (Criteria) this; + } + + public Criteria andStoreIdEqualTo(Long value) { + addCriterion("store_id =", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotEqualTo(Long value) { + addCriterion("store_id <>", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThan(Long value) { + addCriterion("store_id >", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThanOrEqualTo(Long value) { + addCriterion("store_id >=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThan(Long value) { + addCriterion("store_id <", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThanOrEqualTo(Long value) { + addCriterion("store_id <=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdIn(List values) { + addCriterion("store_id in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotIn(List values) { + addCriterion("store_id not in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdBetween(Long value1, Long value2) { + addCriterion("store_id between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotBetween(Long value1, Long value2) { + addCriterion("store_id not between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNull() { + addCriterion("store_name is null"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNotNull() { + addCriterion("store_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreNameEqualTo(String value) { + addCriterion("store_name =", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotEqualTo(String value) { + addCriterion("store_name <>", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThan(String value) { + addCriterion("store_name >", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThanOrEqualTo(String value) { + addCriterion("store_name >=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThan(String value) { + addCriterion("store_name <", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThanOrEqualTo(String value) { + addCriterion("store_name <=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLike(String value) { + addCriterion("store_name like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotLike(String value) { + addCriterion("store_name not like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameIn(List values) { + addCriterion("store_name in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotIn(List values) { + addCriterion("store_name not in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameBetween(String value1, String value2) { + addCriterion("store_name between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotBetween(String value1, String value2) { + addCriterion("store_name not between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andSerialNumberIsNull() { + addCriterion("serial_number is null"); + return (Criteria) this; + } + + public Criteria andSerialNumberIsNotNull() { + addCriterion("serial_number is not null"); + return (Criteria) this; + } + + public Criteria andSerialNumberEqualTo(String value) { + addCriterion("serial_number =", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotEqualTo(String value) { + addCriterion("serial_number <>", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberGreaterThan(String value) { + addCriterion("serial_number >", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberGreaterThanOrEqualTo(String value) { + addCriterion("serial_number >=", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLessThan(String value) { + addCriterion("serial_number <", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLessThanOrEqualTo(String value) { + addCriterion("serial_number <=", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLike(String value) { + addCriterion("serial_number like", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotLike(String value) { + addCriterion("serial_number not like", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberIn(List values) { + addCriterion("serial_number in", values, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotIn(List values) { + addCriterion("serial_number not in", values, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberBetween(String value1, String value2) { + addCriterion("serial_number between", value1, value2, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotBetween(String value1, String value2) { + addCriterion("serial_number not between", value1, value2, "serialNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberIsNull() { + addCriterion("table_number is null"); + return (Criteria) this; + } + + public Criteria andTableNumberIsNotNull() { + addCriterion("table_number is not null"); + return (Criteria) this; + } + + public Criteria andTableNumberEqualTo(String value) { + addCriterion("table_number =", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotEqualTo(String value) { + addCriterion("table_number <>", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberGreaterThan(String value) { + addCriterion("table_number >", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberGreaterThanOrEqualTo(String value) { + addCriterion("table_number >=", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberLessThan(String value) { + addCriterion("table_number <", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberLessThanOrEqualTo(String value) { + addCriterion("table_number <=", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberLike(String value) { + addCriterion("table_number like", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotLike(String value) { + addCriterion("table_number not like", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberIn(List values) { + addCriterion("table_number in", values, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotIn(List values) { + addCriterion("table_number not in", values, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberBetween(String value1, String value2) { + addCriterion("table_number between", value1, value2, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotBetween(String value1, String value2) { + addCriterion("table_number not between", value1, value2, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNameIsNull() { + addCriterion("`table_name` is null"); + return (Criteria) this; + } + + public Criteria andTableNameIsNotNull() { + addCriterion("`table_name` is not null"); + return (Criteria) this; + } + + public Criteria andTableNameEqualTo(String value) { + addCriterion("`table_name` =", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotEqualTo(String value) { + addCriterion("`table_name` <>", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameGreaterThan(String value) { + addCriterion("`table_name` >", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameGreaterThanOrEqualTo(String value) { + addCriterion("`table_name` >=", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameLessThan(String value) { + addCriterion("`table_name` <", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameLessThanOrEqualTo(String value) { + addCriterion("`table_name` <=", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameLike(String value) { + addCriterion("`table_name` like", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotLike(String value) { + addCriterion("`table_name` not like", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameIn(List values) { + addCriterion("`table_name` in", values, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotIn(List values) { + addCriterion("`table_name` not in", values, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameBetween(String value1, String value2) { + addCriterion("`table_name` between", value1, value2, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotBetween(String value1, String value2) { + addCriterion("`table_name` not between", value1, value2, "tableName"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNull() { + addCriterion("order_no is null"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNotNull() { + addCriterion("order_no is not null"); + return (Criteria) this; + } + + public Criteria andOrderNoEqualTo(String value) { + addCriterion("order_no =", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotEqualTo(String value) { + addCriterion("order_no <>", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThan(String value) { + addCriterion("order_no >", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("order_no >=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThan(String value) { + addCriterion("order_no <", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThanOrEqualTo(String value) { + addCriterion("order_no <=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLike(String value) { + addCriterion("order_no like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotLike(String value) { + addCriterion("order_no not like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoIn(List values) { + addCriterion("order_no in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotIn(List values) { + addCriterion("order_no not in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoBetween(String value1, String value2) { + addCriterion("order_no between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotBetween(String value1, String value2) { + addCriterion("order_no not between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderAmountIsNull() { + addCriterion("order_amount is null"); + return (Criteria) this; + } + + public Criteria andOrderAmountIsNotNull() { + addCriterion("order_amount is not null"); + return (Criteria) this; + } + + public Criteria andOrderAmountEqualTo(BigDecimal value) { + addCriterion("order_amount =", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountNotEqualTo(BigDecimal value) { + addCriterion("order_amount <>", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountGreaterThan(BigDecimal value) { + addCriterion("order_amount >", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("order_amount >=", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountLessThan(BigDecimal value) { + addCriterion("order_amount <", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("order_amount <=", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountIn(List values) { + addCriterion("order_amount in", values, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountNotIn(List values) { + addCriterion("order_amount not in", values, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("order_amount between", value1, value2, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("order_amount not between", value1, value2, "orderAmount"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andPayTimeIsNull() { + addCriterion("pay_time is null"); + return (Criteria) this; + } + + public Criteria andPayTimeIsNotNull() { + addCriterion("pay_time is not null"); + return (Criteria) this; + } + + public Criteria andPayTimeEqualTo(Date value) { + addCriterion("pay_time =", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotEqualTo(Date value) { + addCriterion("pay_time <>", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThan(Date value) { + addCriterion("pay_time >", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThanOrEqualTo(Date value) { + addCriterion("pay_time >=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThan(Date value) { + addCriterion("pay_time <", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThanOrEqualTo(Date value) { + addCriterion("pay_time <=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeIn(List values) { + addCriterion("pay_time in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotIn(List values) { + addCriterion("pay_time not in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeBetween(Date value1, Date value2) { + addCriterion("pay_time between", value1, value2, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotBetween(Date value1, Date value2) { + addCriterion("pay_time not between", value1, value2, "payTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMealTableOrderExample.java b/service/src/main/java/com/hfkj/entity/BsMealTableOrderExample.java new file mode 100644 index 0000000..72eb0a8 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMealTableOrderExample.java @@ -0,0 +1,1524 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsMealTableOrderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsMealTableOrderExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNoIsNull() { + addCriterion("mer_no is null"); + return (Criteria) this; + } + + public Criteria andMerNoIsNotNull() { + addCriterion("mer_no is not null"); + return (Criteria) this; + } + + public Criteria andMerNoEqualTo(String value) { + addCriterion("mer_no =", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotEqualTo(String value) { + addCriterion("mer_no <>", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThan(String value) { + addCriterion("mer_no >", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThanOrEqualTo(String value) { + addCriterion("mer_no >=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThan(String value) { + addCriterion("mer_no <", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThanOrEqualTo(String value) { + addCriterion("mer_no <=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLike(String value) { + addCriterion("mer_no like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotLike(String value) { + addCriterion("mer_no not like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoIn(List values) { + addCriterion("mer_no in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotIn(List values) { + addCriterion("mer_no not in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoBetween(String value1, String value2) { + addCriterion("mer_no between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotBetween(String value1, String value2) { + addCriterion("mer_no not between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateIsNull() { + addCriterion("mer_abbreviate is null"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateIsNotNull() { + addCriterion("mer_abbreviate is not null"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateEqualTo(String value) { + addCriterion("mer_abbreviate =", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotEqualTo(String value) { + addCriterion("mer_abbreviate <>", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateGreaterThan(String value) { + addCriterion("mer_abbreviate >", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateGreaterThanOrEqualTo(String value) { + addCriterion("mer_abbreviate >=", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateLessThan(String value) { + addCriterion("mer_abbreviate <", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateLessThanOrEqualTo(String value) { + addCriterion("mer_abbreviate <=", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateLike(String value) { + addCriterion("mer_abbreviate like", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotLike(String value) { + addCriterion("mer_abbreviate not like", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateIn(List values) { + addCriterion("mer_abbreviate in", values, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotIn(List values) { + addCriterion("mer_abbreviate not in", values, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateBetween(String value1, String value2) { + addCriterion("mer_abbreviate between", value1, value2, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotBetween(String value1, String value2) { + addCriterion("mer_abbreviate not between", value1, value2, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNull() { + addCriterion("store_id is null"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNotNull() { + addCriterion("store_id is not null"); + return (Criteria) this; + } + + public Criteria andStoreIdEqualTo(Long value) { + addCriterion("store_id =", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotEqualTo(Long value) { + addCriterion("store_id <>", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThan(Long value) { + addCriterion("store_id >", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThanOrEqualTo(Long value) { + addCriterion("store_id >=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThan(Long value) { + addCriterion("store_id <", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThanOrEqualTo(Long value) { + addCriterion("store_id <=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdIn(List values) { + addCriterion("store_id in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotIn(List values) { + addCriterion("store_id not in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdBetween(Long value1, Long value2) { + addCriterion("store_id between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotBetween(Long value1, Long value2) { + addCriterion("store_id not between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNull() { + addCriterion("store_name is null"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNotNull() { + addCriterion("store_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreNameEqualTo(String value) { + addCriterion("store_name =", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotEqualTo(String value) { + addCriterion("store_name <>", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThan(String value) { + addCriterion("store_name >", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThanOrEqualTo(String value) { + addCriterion("store_name >=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThan(String value) { + addCriterion("store_name <", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThanOrEqualTo(String value) { + addCriterion("store_name <=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLike(String value) { + addCriterion("store_name like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotLike(String value) { + addCriterion("store_name not like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameIn(List values) { + addCriterion("store_name in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotIn(List values) { + addCriterion("store_name not in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameBetween(String value1, String value2) { + addCriterion("store_name between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotBetween(String value1, String value2) { + addCriterion("store_name not between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andSerialNumberIsNull() { + addCriterion("serial_number is null"); + return (Criteria) this; + } + + public Criteria andSerialNumberIsNotNull() { + addCriterion("serial_number is not null"); + return (Criteria) this; + } + + public Criteria andSerialNumberEqualTo(String value) { + addCriterion("serial_number =", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotEqualTo(String value) { + addCriterion("serial_number <>", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberGreaterThan(String value) { + addCriterion("serial_number >", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberGreaterThanOrEqualTo(String value) { + addCriterion("serial_number >=", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLessThan(String value) { + addCriterion("serial_number <", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLessThanOrEqualTo(String value) { + addCriterion("serial_number <=", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLike(String value) { + addCriterion("serial_number like", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotLike(String value) { + addCriterion("serial_number not like", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberIn(List values) { + addCriterion("serial_number in", values, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotIn(List values) { + addCriterion("serial_number not in", values, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberBetween(String value1, String value2) { + addCriterion("serial_number between", value1, value2, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotBetween(String value1, String value2) { + addCriterion("serial_number not between", value1, value2, "serialNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberIsNull() { + addCriterion("table_number is null"); + return (Criteria) this; + } + + public Criteria andTableNumberIsNotNull() { + addCriterion("table_number is not null"); + return (Criteria) this; + } + + public Criteria andTableNumberEqualTo(Integer value) { + addCriterion("table_number =", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotEqualTo(Integer value) { + addCriterion("table_number <>", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberGreaterThan(Integer value) { + addCriterion("table_number >", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("table_number >=", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberLessThan(Integer value) { + addCriterion("table_number <", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberLessThanOrEqualTo(Integer value) { + addCriterion("table_number <=", value, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberIn(List values) { + addCriterion("table_number in", values, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotIn(List values) { + addCriterion("table_number not in", values, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberBetween(Integer value1, Integer value2) { + addCriterion("table_number between", value1, value2, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNumberNotBetween(Integer value1, Integer value2) { + addCriterion("table_number not between", value1, value2, "tableNumber"); + return (Criteria) this; + } + + public Criteria andTableNameIsNull() { + addCriterion("`table_name` is null"); + return (Criteria) this; + } + + public Criteria andTableNameIsNotNull() { + addCriterion("`table_name` is not null"); + return (Criteria) this; + } + + public Criteria andTableNameEqualTo(String value) { + addCriterion("`table_name` =", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotEqualTo(String value) { + addCriterion("`table_name` <>", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameGreaterThan(String value) { + addCriterion("`table_name` >", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameGreaterThanOrEqualTo(String value) { + addCriterion("`table_name` >=", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameLessThan(String value) { + addCriterion("`table_name` <", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameLessThanOrEqualTo(String value) { + addCriterion("`table_name` <=", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameLike(String value) { + addCriterion("`table_name` like", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotLike(String value) { + addCriterion("`table_name` not like", value, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameIn(List values) { + addCriterion("`table_name` in", values, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotIn(List values) { + addCriterion("`table_name` not in", values, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameBetween(String value1, String value2) { + addCriterion("`table_name` between", value1, value2, "tableName"); + return (Criteria) this; + } + + public Criteria andTableNameNotBetween(String value1, String value2) { + addCriterion("`table_name` not between", value1, value2, "tableName"); + return (Criteria) this; + } + + public Criteria andPeopleNumIsNull() { + addCriterion("people_num is null"); + return (Criteria) this; + } + + public Criteria andPeopleNumIsNotNull() { + addCriterion("people_num is not null"); + return (Criteria) this; + } + + public Criteria andPeopleNumEqualTo(Integer value) { + addCriterion("people_num =", value, "peopleNum"); + return (Criteria) this; + } + + public Criteria andPeopleNumNotEqualTo(Integer value) { + addCriterion("people_num <>", value, "peopleNum"); + return (Criteria) this; + } + + public Criteria andPeopleNumGreaterThan(Integer value) { + addCriterion("people_num >", value, "peopleNum"); + return (Criteria) this; + } + + public Criteria andPeopleNumGreaterThanOrEqualTo(Integer value) { + addCriterion("people_num >=", value, "peopleNum"); + return (Criteria) this; + } + + public Criteria andPeopleNumLessThan(Integer value) { + addCriterion("people_num <", value, "peopleNum"); + return (Criteria) this; + } + + public Criteria andPeopleNumLessThanOrEqualTo(Integer value) { + addCriterion("people_num <=", value, "peopleNum"); + return (Criteria) this; + } + + public Criteria andPeopleNumIn(List values) { + addCriterion("people_num in", values, "peopleNum"); + return (Criteria) this; + } + + public Criteria andPeopleNumNotIn(List values) { + addCriterion("people_num not in", values, "peopleNum"); + return (Criteria) this; + } + + public Criteria andPeopleNumBetween(Integer value1, Integer value2) { + addCriterion("people_num between", value1, value2, "peopleNum"); + return (Criteria) this; + } + + public Criteria andPeopleNumNotBetween(Integer value1, Integer value2) { + addCriterion("people_num not between", value1, value2, "peopleNum"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNull() { + addCriterion("order_no is null"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNotNull() { + addCriterion("order_no is not null"); + return (Criteria) this; + } + + public Criteria andOrderNoEqualTo(String value) { + addCriterion("order_no =", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotEqualTo(String value) { + addCriterion("order_no <>", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThan(String value) { + addCriterion("order_no >", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("order_no >=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThan(String value) { + addCriterion("order_no <", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThanOrEqualTo(String value) { + addCriterion("order_no <=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLike(String value) { + addCriterion("order_no like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotLike(String value) { + addCriterion("order_no not like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoIn(List values) { + addCriterion("order_no in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotIn(List values) { + addCriterion("order_no not in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoBetween(String value1, String value2) { + addCriterion("order_no between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotBetween(String value1, String value2) { + addCriterion("order_no not between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderAmountIsNull() { + addCriterion("order_amount is null"); + return (Criteria) this; + } + + public Criteria andOrderAmountIsNotNull() { + addCriterion("order_amount is not null"); + return (Criteria) this; + } + + public Criteria andOrderAmountEqualTo(BigDecimal value) { + addCriterion("order_amount =", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountNotEqualTo(BigDecimal value) { + addCriterion("order_amount <>", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountGreaterThan(BigDecimal value) { + addCriterion("order_amount >", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("order_amount >=", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountLessThan(BigDecimal value) { + addCriterion("order_amount <", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("order_amount <=", value, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountIn(List values) { + addCriterion("order_amount in", values, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountNotIn(List values) { + addCriterion("order_amount not in", values, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("order_amount between", value1, value2, "orderAmount"); + return (Criteria) this; + } + + public Criteria andOrderAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("order_amount not between", value1, value2, "orderAmount"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andPayTimeIsNull() { + addCriterion("pay_time is null"); + return (Criteria) this; + } + + public Criteria andPayTimeIsNotNull() { + addCriterion("pay_time is not null"); + return (Criteria) this; + } + + public Criteria andPayTimeEqualTo(Date value) { + addCriterion("pay_time =", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotEqualTo(Date value) { + addCriterion("pay_time <>", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThan(Date value) { + addCriterion("pay_time >", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThanOrEqualTo(Date value) { + addCriterion("pay_time >=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThan(Date value) { + addCriterion("pay_time <", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThanOrEqualTo(Date value) { + addCriterion("pay_time <=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeIn(List values) { + addCriterion("pay_time in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotIn(List values) { + addCriterion("pay_time not in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeBetween(Date value1, Date value2) { + addCriterion("pay_time between", value1, value2, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotBetween(Date value1, Date value2) { + addCriterion("pay_time not between", value1, value2, "payTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/service/meal/BsMealShopCartService.java b/service/src/main/java/com/hfkj/service/meal/BsMealShopCartService.java new file mode 100644 index 0000000..9bcff10 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/meal/BsMealShopCartService.java @@ -0,0 +1,49 @@ +package com.hfkj.service.meal; + +import com.hfkj.entity.BsMealShopCart; + +import java.util.List; +import java.util.Map; + +/** + * @className: BsMealShopCartService + * @author: HuRui + * @date: 2023/11/30 + **/ +public interface BsMealShopCartService { + + /** + * 编辑数据 + * @param shopCart + */ + void editData(BsMealShopCart shopCart); + + /** + * 增加产品 + * @param serialNumber + * @param productId + */ + void addProduct(String serialNumber,Long productId); + + /** + * 减少产品 + * @param serialNumber + * @param productId + */ + void reduceProduct(String serialNumber,Long productId); + + /** + * 查询购物车产品 + * @param orderNo 订单号 + * @param productId 产品id + */ + BsMealShopCart getShopCartProduct(String orderNo,Long productId); + + /** + * 查询购物车产品列表 + * @param param + * @return + */ + List getShopCartProductList(Map param); + +} diff --git a/service/src/main/java/com/hfkj/service/meal/BsMealTableOrderService.java b/service/src/main/java/com/hfkj/service/meal/BsMealTableOrderService.java new file mode 100644 index 0000000..a59a8aa --- /dev/null +++ b/service/src/main/java/com/hfkj/service/meal/BsMealTableOrderService.java @@ -0,0 +1,25 @@ +package com.hfkj.service.meal; + +import com.hfkj.entity.BsMealTableOrder; + +/** + * @className: BsMealTableOrderService + * @author: HuRui + * @date: 2023/11/30 + **/ +public interface BsMealTableOrderService { + + /** + * 编辑数据 + * @param mealTableOrder + */ + void editData(BsMealTableOrder mealTableOrder); + + /** + * 查询当前桌台订单 + * @param serialNumber + * @return + */ + BsMealTableOrder getCurrentTableOrder(String serialNumber); + +} diff --git a/service/src/main/java/com/hfkj/service/meal/BsMealTableService.java b/service/src/main/java/com/hfkj/service/meal/BsMealTableService.java index 50beaa8..d1f8516 100644 --- a/service/src/main/java/com/hfkj/service/meal/BsMealTableService.java +++ b/service/src/main/java/com/hfkj/service/meal/BsMealTableService.java @@ -46,4 +46,17 @@ public interface BsMealTableService { */ List getTableList(Map param); + /** + * 开台 + * @param serialNumber 桌台编号 + * @param peopleNum 人数 + */ + void startTable(String serialNumber, Integer peopleNum); + + /** + * 关台 + * @param serialNumber + */ + void endTable(String serialNumber); + } diff --git a/service/src/main/java/com/hfkj/service/meal/impl/BsMealShopCartServiceImpl.java b/service/src/main/java/com/hfkj/service/meal/impl/BsMealShopCartServiceImpl.java new file mode 100644 index 0000000..8e59089 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/meal/impl/BsMealShopCartServiceImpl.java @@ -0,0 +1,220 @@ +package com.hfkj.service.meal.impl; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.common.QRCodeGenerator; +import com.hfkj.common.exception.BaseException; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.IDGenerator; +import com.hfkj.config.CommonSysConst; +import com.hfkj.config.mqtt.MqttProviderService; +import com.hfkj.dao.BsMealShopCartMapper; +import com.hfkj.dao.BsStoreProductMapper; +import com.hfkj.entity.*; +import com.hfkj.service.group.BsStoreGroupProductService; +import com.hfkj.service.group.BsStoreGroupService; +import com.hfkj.service.meal.BsMealShopCartService; +import com.hfkj.service.meal.BsMealTableOrderService; +import com.hfkj.service.meal.BsMealTableService; +import com.hfkj.sysenum.MealTableOrderStatusEnum; +import com.hfkj.sysenum.MealTableStatusEnum; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.eclipse.paho.client.mqttv3.MqttClient; +import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @className: BsMealShopCartServiceImpl + * @author: HuRui + * @date: 2023/11/30 + **/ +@Service("mealShopCartService") +public class BsMealShopCartServiceImpl implements BsMealShopCartService { + + @Resource + private BsMealShopCartMapper mealShopCartMapper; + + @Resource + private BsMealTableService mealTableService; + + @Resource + private BsStoreGroupService storeGroupService; + + @Resource + private BsMealTableOrderService mealTableOrderService; + + @Resource + private MqttProviderService mqttProviderService; + + @Autowired + private RedisTemplate redisTemplate; + + @Override + public void editData(BsMealShopCart shopCart) { + if (shopCart.getId() == null) { + shopCart.setCreateTime(new Date()); + shopCart.setUpdateTime(new Date()); + mealShopCartMapper.insert(shopCart); + } else { + shopCart.setUpdateTime(new Date()); + mealShopCartMapper.updateByPrimaryKey(shopCart); + } + } + + @Override + public void addProduct(String serialNumber, Long productId) { + String lockKey = "MEAL_SHOP_CART_" + serialNumber; + try { + Boolean lock = redisTemplate.opsForValue().setIfAbsent(lockKey, null); + if(lock) { + // 加锁成功 + // 查询桌台订单 + BsMealTableOrder tableOrder = mealTableOrderService.getCurrentTableOrder(serialNumber); + if (tableOrder != null) { + // 查询产品 + BsStoreProduct product = storeGroupService.findStoreProduct(productId); + if (product == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到产品"); + } + // 查询购物车中的产品 + BsMealShopCart shopCart = getShopCartProduct(tableOrder.getOrderNo(), productId); + if (shopCart == null) { + BsMealShopCart mealShopCart = new BsMealShopCart(); + mealShopCart.setStoreId(tableOrder.getStoreId()); + mealShopCart.setStoreName(tableOrder.getStoreName()); + mealShopCart.setSerialNumber(tableOrder.getSerialNumber()); + mealShopCart.setTableNumber(tableOrder.getTableNumber()); + mealShopCart.setTableName(tableOrder.getTableName()); + mealShopCart.setOrderNo(tableOrder.getOrderNo()); + mealShopCart.setProductCategoryId(product.getProductCategoryId()); + mealShopCart.setProductCategoryName(product.getProductCategoryName()); + mealShopCart.setProductId(product.getId()); + mealShopCart.setProductImg(product.getImg()); + mealShopCart.setProductName(product.getName()); + mealShopCart.setProductSpec(product.getSpec()); + mealShopCart.setProductPrice(product.getPrice()); + mealShopCart.setProductNum(1); + // 数量 * 产品单价 + mealShopCart.setProductTotalPrice(new BigDecimal(mealShopCart.getProductNum().toString()).multiply(product.getPrice())); + mealShopCart.setStatus(1); + editData(mealShopCart); + } else { + // 增加数量 + shopCart.setProductNum(shopCart.getProductNum()+1); + // 数量 * 产品单价 + shopCart.setProductTotalPrice(new BigDecimal(shopCart.getProductNum().toString()).multiply(product.getPrice())); + editData(shopCart); + } + } + + // 推送MQTT + Map param = new HashMap<>(); + param.put("serialNumber", serialNumber); + mqttProviderService.publish(2, false, "MEAL_TABLE_" + serialNumber, JSONObject.toJSONString(getShopCartProductList(param))); + + redisTemplate.delete(lockKey); + + } else { + System.out.println("加锁失败"); + Thread.sleep(100); // 加锁失败,重试 + addProduct(serialNumber, productId); + } + } catch (BaseException baseException) { + redisTemplate.delete(lockKey); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, baseException.getErrorMsg()); + + } catch (Exception e) { + redisTemplate.delete(lockKey); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "生成失败!未知错误"); + } + } + + @Override + public void reduceProduct(String serialNumber, Long productId) { + String lockKey = "MEAL_SHOP_CART_" + serialNumber; + try { + Boolean lock = redisTemplate.opsForValue().setIfAbsent(lockKey, null); + if(lock) { + // 加锁成功 + // 查询桌台订单 + BsMealTableOrder tableOrder = mealTableOrderService.getCurrentTableOrder(serialNumber); + if (tableOrder != null) { + // 查询产品 + BsStoreProduct product = storeGroupService.findStoreProduct(productId); + if (product == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到产品"); + } + // 查询购物车中的产品 + BsMealShopCart shopCart = getShopCartProduct(tableOrder.getOrderNo(), productId); + if (shopCart != null) { + // 减少数量 + shopCart.setProductNum(shopCart.getProductNum()-1); + // 数量 * 产品单价 + shopCart.setProductTotalPrice(new BigDecimal(shopCart.getProductNum().toString()).multiply(product.getPrice())); + if (shopCart.getProductNum() == 0) { + shopCart.setStatus(0); + } + editData(shopCart); + } + } + + // 推送MQTT + Map param = new HashMap<>(); + param.put("serialNumber", serialNumber); + mqttProviderService.publish(0, false, "MEAL_TABLE_" + serialNumber, JSONObject.toJSONString(getShopCartProductList(param))); + + redisTemplate.delete(lockKey); + + } else { + System.out.println("加锁失败"); + Thread.sleep(100); // 加锁失败,重试 + reduceProduct(serialNumber, productId); + } + } catch (BaseException baseException) { + redisTemplate.delete(lockKey); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, baseException.getErrorMsg()); + + } catch (Exception e) { + redisTemplate.delete(lockKey); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "生成失败!未知错误"); + } + } + + @Override + public BsMealShopCart getShopCartProduct(String orderNo, Long productId) { + BsMealShopCartExample example = new BsMealShopCartExample(); + example.createCriteria() + .andOrderNoEqualTo(orderNo) + .andProductIdEqualTo(productId) + .andStatusNotEqualTo(0); + List list = mealShopCartMapper.selectByExample(example); + if (!list.isEmpty()) { + return list.get(0); + } + return null; + } + + @Override + public List getShopCartProductList(Map param) { + BsMealShopCartExample example = new BsMealShopCartExample(); + BsMealShopCartExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (StringUtils.isNotBlank(MapUtils.getString(param, "serialNumber"))) { + criteria.andSerialNumberEqualTo(MapUtils.getString(param, "serialNumber")); + } + + example.setOrderByClause("create_time desc"); + return mealShopCartMapper.selectByExample(example); + } +} diff --git a/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableOrderServiceImpl.java new file mode 100644 index 0000000..f3d4325 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableOrderServiceImpl.java @@ -0,0 +1,50 @@ +package com.hfkj.service.meal.impl; + +import com.hfkj.dao.BsMealTableOrderMapper; +import com.hfkj.entity.BsMealTableOrder; +import com.hfkj.entity.BsMealTableOrderExample; +import com.hfkj.service.meal.BsMealTableOrderService; +import com.hfkj.sysenum.MealTableOrderStatusEnum; +import com.hfkj.sysenum.MealTableStatusEnum; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * @className: BsMealTableOrderServiceImpl + * @author: HuRui + * @date: 2023/11/30 + **/ +@Service("mealTableOrderService") +public class BsMealTableOrderServiceImpl implements BsMealTableOrderService { + + @Resource + private BsMealTableOrderMapper mealTableOrderMapper; + + @Override + public void editData(BsMealTableOrder mealTableOrder) { + if (mealTableOrder.getId() == null) { + mealTableOrder.setCreateTime(new Date()); + mealTableOrder.setUpdateTime(new Date()); + mealTableOrderMapper.insert(mealTableOrder); + } else { + mealTableOrder.setUpdateTime(new Date()); + mealTableOrderMapper.updateByPrimaryKey(mealTableOrder); + } + } + + @Override + public BsMealTableOrder getCurrentTableOrder(String serialNumber) { + BsMealTableOrderExample example = new BsMealTableOrderExample(); + example.createCriteria() + .andSerialNumberEqualTo(serialNumber) + .andStatusEqualTo(MealTableOrderStatusEnum.status1.getNumber()); + List orderList = mealTableOrderMapper.selectByExample(example); + if (!orderList.isEmpty()) { + return orderList.get(0); + } + return null; + } +} diff --git a/service/src/main/java/com/hfkj/service/meal/BsMealTableServiceImpl.java b/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableServiceImpl.java similarity index 67% rename from service/src/main/java/com/hfkj/service/meal/BsMealTableServiceImpl.java rename to service/src/main/java/com/hfkj/service/meal/impl/BsMealTableServiceImpl.java index 8b6851e..0ac18c9 100644 --- a/service/src/main/java/com/hfkj/service/meal/BsMealTableServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableServiceImpl.java @@ -1,28 +1,32 @@ -package com.hfkj.service.meal; +package com.hfkj.service.meal.impl; import com.hfkj.common.QRCodeGenerator; import com.hfkj.common.exception.BaseException; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.DateUtil; import com.hfkj.common.utils.GenerateUtil; import com.hfkj.common.utils.IDGenerator; import com.hfkj.config.CommonSysConst; import com.hfkj.dao.BsMealTableMapper; -import com.hfkj.entity.BsMealTable; -import com.hfkj.entity.BsMealTableExample; -import com.hfkj.entity.BsMer; -import com.hfkj.entity.BsStore; +import com.hfkj.entity.*; import com.hfkj.model.MerBasisModel; +import com.hfkj.service.BsDeviceService; import com.hfkj.service.BsMerService; import com.hfkj.service.BsStoreService; +import com.hfkj.service.meal.BsMealTableOrderService; +import com.hfkj.service.meal.BsMealTableService; import com.hfkj.sysenum.*; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Map; @@ -45,6 +49,12 @@ public class BsMealTableServiceImpl implements BsMealTableService { @Resource private BsMerService merService; + @Resource + private BsMealTableOrderService mealTableOrderService; + + @Resource + private BsDeviceService deviceService; + @Resource private RedisTemplate redisTemplate; @@ -84,6 +94,7 @@ public class BsMealTableServiceImpl implements BsMealTableService { } for (int i = 0; i < generateNum; i++) { + tableNumber = tableNumber + 1; BsMealTable mealTable = new BsMealTable(); mealTable.setMerId(mer.getId()); mealTable.setMerNo(mer.getMerNo()); @@ -93,7 +104,7 @@ public class BsMealTableServiceImpl implements BsMealTableService { mealTable.setStoreName(store.getName()); // 桌码唯一编号 13位时间戳 + 1位线程生成数 mealTable.setSerialNumber(System.currentTimeMillis()+IDGenerator.nextId(1)); - mealTable.setTableNumber(tableNumber + 1); + mealTable.setTableNumber(tableNumber); mealTable.setTableName(mealTable.getTableNumber() + "号桌"); mealTable.setStatus(MealTableStatusEnum.status1.getNumber()); @@ -171,4 +182,61 @@ public class BsMealTableServiceImpl implements BsMealTableService { example.setOrderByClause("table_number"); return mealTableMapper.selectByExample(example); } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void startTable(String serialNumber, Integer peopleNum) { + // 查询桌台 + BsMealTable mealTable = getTableBySerialNumber(serialNumber); + if (mealTable == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到桌台"); + } + if (!mealTable.getStatus().equals(MealTableStatusEnum.status1.getNumber())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前桌台状态不处于:未开台"); + } + mealTable.setStatus(MealTableStatusEnum.status2.getNumber()); + editData(mealTable); + + BsMealTableOrder order = new BsMealTableOrder(); + order.setMerId(mealTable.getMerId()); + order.setMerNo(mealTable.getMerNo()); + order.setMerName(mealTable.getMerName()); + order.setMerAbbreviate(mealTable.getMerAbbreviate()); + order.setStoreId(mealTable.getStoreId()); + order.setStoreName(mealTable.getStoreName()); + order.setSerialNumber(mealTable.getSerialNumber()); + order.setTableNumber(mealTable.getTableNumber()); + order.setTableName(mealTable.getTableName()); + order.setPeopleNum(peopleNum); + order.setOrderNo(DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(10)); + order.setOrderAmount(new BigDecimal("0")); + order.setStatus(MealTableOrderStatusEnum.status1.getNumber()); + mealTableOrderService.editData(order); + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void endTable(String serialNumber) { + // 查询桌台 + BsMealTable mealTable = getTableBySerialNumber(serialNumber); + if (mealTable == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到桌台"); + } + if (!mealTable.getStatus().equals(MealTableStatusEnum.status2.getNumber())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前桌台状态不处于:已开台"); + } + mealTable.setStatus(MealTableStatusEnum.status1.getNumber()); + editData(mealTable); + + // 查询桌台订单 + BsMealTableOrder tableOrder = mealTableOrderService.getCurrentTableOrder(serialNumber); + if (tableOrder != null) { + tableOrder.setStatus(MealTableOrderStatusEnum.status2.getNumber()); + tableOrder.setPayTime(new Date()); + mealTableOrderService.editData(tableOrder); + + // TODO 打印小票订单 + + } + } } diff --git a/service/src/main/java/com/hfkj/sysenum/MealTableOrderStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/MealTableOrderStatusEnum.java new file mode 100644 index 0000000..b25590c --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/MealTableOrderStatusEnum.java @@ -0,0 +1,51 @@ +package com.hfkj.sysenum; + +import java.util.Objects; + +/** + * @className: MealTableOrderStatus + * @author: HuRui + * @date: 2023/11/30 + **/ +public enum MealTableOrderStatusEnum { + + status0(0, "不可用"), + status1(1, "未结账"), + status2(2, "已结账"), + ; + + private Integer number; + + private String name; + + MealTableOrderStatusEnum(int number, String name) { + this.number = number; + this.name = name; + } + + public static MealTableOrderStatusEnum getDataByNumber(Integer number) { + for (MealTableOrderStatusEnum ele : values()) { + if (Objects.equals(number,ele.getNumber())) { + return ele; + } + } + return null; + } + + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +}