Commit 029dc97d by 宁斌

1、餐台模式新增自定义食品 2、在onTrimMemory,onLowMemory方法内部清除内存缓存

parent cffe4c2a
...@@ -11,6 +11,7 @@ import com.gingersoft.gsa.cloud.database.bean.Food; ...@@ -11,6 +11,7 @@ import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.database.bean.FoodCombo; import com.gingersoft.gsa.cloud.database.bean.FoodCombo;
import com.gingersoft.gsa.cloud.database.bean.FoodModifier; import com.gingersoft.gsa.cloud.database.bean.FoodModifier;
import com.gingersoft.gsa.cloud.database.bean.Modifier; import com.gingersoft.gsa.cloud.database.bean.Modifier;
import com.gingersoft.gsa.cloud.order.commodity.OrderDetail;
import com.gingersoft.gsa.cloud.table.mvp.model.bean.response.BaseOrderResponse; import com.gingersoft.gsa.cloud.table.mvp.model.bean.response.BaseOrderResponse;
import com.jess.arms.base.DefaultAdapter; import com.jess.arms.base.DefaultAdapter;
...@@ -108,6 +109,7 @@ public interface MealStandContract { ...@@ -108,6 +109,7 @@ public interface MealStandContract {
void setModifierTop(int Margins); void setModifierTop(int Margins);
void setCustomFoodDialog(int customType, OrderDetail foodItem);
} }
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存 //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
......
...@@ -3,6 +3,7 @@ package com.gingersoft.gsa.cloud.table.mvp.model; ...@@ -3,6 +3,7 @@ package com.gingersoft.gsa.cloud.table.mvp.model;
import android.app.Application; import android.app.Application;
import com.gingersoft.gsa.cloud.common.bean.BaseResult; import com.gingersoft.gsa.cloud.common.bean.BaseResult;
import com.gingersoft.gsa.cloud.common.logan.LoganManager;
import com.gingersoft.gsa.cloud.database.bean.ComboItem; import com.gingersoft.gsa.cloud.database.bean.ComboItem;
import com.gingersoft.gsa.cloud.database.bean.Discount; import com.gingersoft.gsa.cloud.database.bean.Discount;
import com.gingersoft.gsa.cloud.database.bean.Food; import com.gingersoft.gsa.cloud.database.bean.Food;
...@@ -27,13 +28,19 @@ import com.jess.arms.di.scope.ActivityScope; ...@@ -27,13 +28,19 @@ import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.integration.IRepositoryManager; import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel; import com.jess.arms.mvp.BaseModel;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import io.reactivex.Observable; import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Action;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function; import io.reactivex.functions.Function;
import okhttp3.RequestBody; import okhttp3.RequestBody;
import retrofit2.Retrofit;
/** /**
...@@ -91,7 +98,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model ...@@ -91,7 +98,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
@Override @Override
public List<Modifier> queryDB_ModifierList(long fid, int mode) { public List<Modifier> queryDB_ModifierList(long fid, int mode) {
ModifierDaoUtils daoUtils = new ModifierDaoUtils(mApplication); ModifierDaoUtils daoUtils = new ModifierDaoUtils(mApplication);
return MealStyleUtils.assemblyModifiersColor(daoUtils.queryModifiersByFid(fid, mode)) ; return MealStyleUtils.assemblyModifiersColor(daoUtils.queryModifiersByFid(fid, mode));
} }
@Override @Override
......
...@@ -27,15 +27,17 @@ public class MealConditionFilterUtils { ...@@ -27,15 +27,17 @@ public class MealConditionFilterUtils {
* @return * @return
*/ */
public static List<Food> foodConditionFilter(List<Food> foodList, int summary) { public static List<Food> foodConditionFilter(List<Food> foodList, int summary) {
String strSummary = String.valueOf(summary);
List<Food> newFoodList = new ArrayList<>(); List<Food> newFoodList = new ArrayList<>();
for (Food food : foodList) { if (foodList == null || foodList.size() > 0) {
String foodSummary = food.getFoodSummary(); String strSummary = String.valueOf(summary);
if (!TextUtils.isEmpty(foodSummary)) { for (Food food : foodList) {
String[] summarys = foodSummary.split(","); String foodSummary = food.getFoodSummary();
for (String item : summarys) { if (!TextUtils.isEmpty(foodSummary)) {
if (item.equals(strSummary)) { String[] summarys = foodSummary.split(",");
newFoodList.add(food); for (String item : summarys) {
if (item.equals(strSummary)) {
newFoodList.add(food);
}
} }
} }
} }
...@@ -51,15 +53,17 @@ public class MealConditionFilterUtils { ...@@ -51,15 +53,17 @@ public class MealConditionFilterUtils {
* @return * @return
*/ */
public static List<ComboItem> comboConditionFilter(List<ComboItem> comboItemList, int summary) { public static List<ComboItem> comboConditionFilter(List<ComboItem> comboItemList, int summary) {
String strSummary = String.valueOf(summary);
List<ComboItem> newComboItemList = new ArrayList<>(); List<ComboItem> newComboItemList = new ArrayList<>();
for (ComboItem comboItem : comboItemList) { if (newComboItemList == null || newComboItemList.size() > 0) {
String foodSummary = comboItem.getFoodSummary(); String strSummary = String.valueOf(summary);
if (!TextUtils.isEmpty(foodSummary)) { for (ComboItem comboItem : comboItemList) {
String[] summarys = foodSummary.split(","); String foodSummary = comboItem.getFoodSummary();
for (String item : summarys) { if (!TextUtils.isEmpty(foodSummary)) {
if (item.equals(strSummary)) { String[] summarys = foodSummary.split(",");
newComboItemList.add(comboItem); for (String item : summarys) {
if (item.equals(strSummary)) {
newComboItemList.add(comboItem);
}
} }
} }
} }
......
...@@ -212,13 +212,16 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod ...@@ -212,13 +212,16 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
public void initMealData() { public void initMealData() {
long startTime = System.currentTimeMillis();
List<Food> foodGroupList = mModel.queryDB_FoodGroupList(BaseOrder.orderType); List<Food> foodGroupList = mModel.queryDB_FoodGroupList(BaseOrder.orderType);
long endTime = System.currentTimeMillis();
LoganManager.w_tableMode(TAG, "queryDB_FoodGroupList執行時間-》" + (endTime - startTime));
if (foodGroupList != null && foodGroupList.size() > 0) { if (foodGroupList != null && foodGroupList.size() > 0) {
// for (Food foodGroup: foodGroupList) {
// foodGroup.setColorBean(foodGroup.getColorBean());
// }
mFoodGroupList.addAll(foodGroupList); mFoodGroupList.addAll(foodGroupList);
Food defalutFoodGroup = getDefalutFoodGroup(mFoodGroupList); Food defalutFoodGroup = getDefalutFoodGroup(mFoodGroupList);
...@@ -327,8 +330,13 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod ...@@ -327,8 +330,13 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
changedMealByParentId(datasBean.getId()); changedMealByParentId(datasBean.getId());
} else { } else {
mCurrentOrderDetailBean = OrderDetail.foodTransOrderDetails(datasBean, 1); mCurrentOrderDetailBean = OrderDetail.foodTransOrderDetails(datasBean, 1);
//加載套餐食品 if (datasBean.getCustomType() == null) {
loadComboData(mCurrentOrderDetailBean, false); //自定義食品
mRootView.setCustomFoodDialog(Food.CUSTOM_TYPE_100, mCurrentOrderDetailBean);
} else {
//加載套餐食品
loadComboData(mCurrentOrderDetailBean, false);
}
} }
} }
}); });
...@@ -418,7 +426,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod ...@@ -418,7 +426,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
}); });
} }
private void addFoodItemBefore(OrderDetail datasBean) { private void addFoodItemBefore(OrderDetail datasBean) {
int addPosition = addFoodItem(datasBean); int addPosition = addFoodItem(datasBean);
//这里主食品作为选中主体 //这里主食品作为选中主体
...@@ -561,7 +568,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod ...@@ -561,7 +568,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
} }
} }
@Override @Override
public void onError(Throwable e) { public void onError(Throwable e) {
} }
...@@ -584,19 +590,22 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod ...@@ -584,19 +590,22 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
if (IActivity.getCurrentViewMode() != MealConstant.fine_ViewMode && isSelectedMeal || autoMod) { if (IActivity.getCurrentViewMode() != MealConstant.fine_ViewMode && isSelectedMeal || autoMod) {
mRootView.showViewModeVisibility(MealConstant.combo_ViewMode); mRootView.showViewModeVisibility(MealConstant.combo_ViewMode);
} }
if (!RvMealClicked) { toAddFoodItem(mCurrentOrderDetailBean);
//新增食品
addFoodItemBefore(mCurrentOrderDetailBean);
//更新沽清食品數量
updateFoodSoldoutCtrData();
//更新賬單金額
updateBillInfo();
}
updateOrderFoodNumber();
} }
}); });
} }
public void toAddFoodItem(OrderDetail foodItem) {
if (!RvMealClicked) {
//新增食品
addFoodItemBefore(foodItem);
//更新沽清食品數量
updateFoodSoldoutCtrData();
//更新賬單金額
updateBillInfo();
}
updateOrderFoodNumber();
}
/** /**
* 裁減掉已超出的細項 * 裁減掉已超出的細項
...@@ -1185,12 +1194,33 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod ...@@ -1185,12 +1194,33 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
} }
public void changedMealByParentId(long parentId) { public void changedMealByParentId(long parentId) {
long startTime = System.currentTimeMillis();
List<Food> foodList = mModel.queryDB_FoodList(parentId, BaseOrder.orderType); List<Food> foodList = mModel.queryDB_FoodList(parentId, BaseOrder.orderType);
long endTime = System.currentTimeMillis();
LoganManager.w_tableMode(TAG, "queryDB_FoodList執行時間-》" + (endTime - startTime));
mFoodAdapter.resetSelect(-1, null); mFoodAdapter.resetSelect(-1, null);
if (foodList != null) { if (foodList != null) {
updateFoodData(foodList, parentId); updateFoodData(foodList, parentId);
} }
mRootView.showViewModeVisibility(MealConstant.food_ViewMode, MealConstant.food_group_ViewMode); mRootView.showViewModeVisibility(MealConstant.food_ViewMode, MealConstant.food_group_ViewMode);
// .subscribeOn(Schedulers.io())
// .subscribeOn(AndroidSchedulers.mainThread())
// .observeOn(AndroidSchedulers.mainThread())
// .compose(RxLifecycleUtils.bindToLifecycle(mRootView))
// .subscribe(new ErrorHandleSubscriber<List<Food>>(mErrorHandler) {
//
// @Override
// public void onNext(@NonNull List<Food> foodList) {
// mFoodAdapter.resetSelect(-1, null);
// if (foodList != null) {
// updateFoodData(foodList, parentId);
// }
// mRootView.showViewModeVisibility(MealConstant.food_ViewMode, MealConstant.food_group_ViewMode);
// }
// });
} }
/** /**
...@@ -1821,10 +1851,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod ...@@ -1821,10 +1851,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
* @param parentId * @param parentId
*/ */
private void updateFoodData(List<Food> foodList, long parentId) { private void updateFoodData(List<Food> foodList, long parentId) {
for (Food food : foodList) {
ColorBean colorBean = food.getColorBean();
int i = 0;
}
setTopId(foodList, parentId); setTopId(foodList, parentId);
setFoodComboListStatus(foodList); setFoodComboListStatus(foodList);
mFoodList.clear(); mFoodList.clear();
......
...@@ -6,15 +6,19 @@ import android.graphics.Color; ...@@ -6,15 +6,19 @@ import android.graphics.Color;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.SystemClock; import android.os.SystemClock;
import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
import android.util.SparseArray; import android.util.SparseArray;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.ViewStub;
import android.widget.BaseAdapter; import android.widget.BaseAdapter;
import android.widget.Button; import android.widget.Button;
import android.widget.Chronometer; import android.widget.Chronometer;
import android.widget.EditText;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
...@@ -65,12 +69,14 @@ import com.gingersoft.gsa.cloud.table.di.component.DaggerMealStandComponent; ...@@ -65,12 +69,14 @@ import com.gingersoft.gsa.cloud.table.di.component.DaggerMealStandComponent;
import com.gingersoft.gsa.cloud.table.mvp.contract.MealStandContract; import com.gingersoft.gsa.cloud.table.mvp.contract.MealStandContract;
import com.gingersoft.gsa.cloud.table.mvp.model.bean.SoldoutCtrFood; import com.gingersoft.gsa.cloud.table.mvp.model.bean.SoldoutCtrFood;
import com.gingersoft.gsa.cloud.table.mvp.model.bean.event.InitTableEvent; import com.gingersoft.gsa.cloud.table.mvp.model.bean.event.InitTableEvent;
import com.gingersoft.gsa.cloud.table.mvp.model.constant.OrderConentActionConstant;
import com.gingersoft.gsa.cloud.table.mvp.presenter.MealStandPresenter; import com.gingersoft.gsa.cloud.table.mvp.presenter.MealStandPresenter;
import com.gingersoft.gsa.cloud.table.mvp.ui.adapter.BaseFragmentAdapter; import com.gingersoft.gsa.cloud.table.mvp.ui.adapter.BaseFragmentAdapter;
import com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.FoodGroupAdapter; import com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.FoodGroupAdapter;
import com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.SelectMealAdapter; import com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.SelectMealAdapter;
import com.gingersoft.gsa.cloud.table.mvp.ui.fragment.FineItemAllFragment; import com.gingersoft.gsa.cloud.table.mvp.ui.fragment.FineItemAllFragment;
import com.gingersoft.gsa.cloud.table.mvp.ui.widget.ChooseNumberDialog; import com.gingersoft.gsa.cloud.table.mvp.ui.widget.ChooseNumberDialog;
import com.gingersoft.gsa.cloud.table.mvp.ui.widget.CustomFoodDialog;
import com.gingersoft.gsa.cloud.table.mvp.ui.widget.UseMemberDialog; import com.gingersoft.gsa.cloud.table.mvp.ui.widget.UseMemberDialog;
import com.gingersoft.gsa.cloud.ui.recylcler.Indicator.PagerConfig; import com.gingersoft.gsa.cloud.ui.recylcler.Indicator.PagerConfig;
import com.gingersoft.gsa.cloud.ui.recylcler.Indicator.PagerGridLayoutManager; import com.gingersoft.gsa.cloud.ui.recylcler.Indicator.PagerGridLayoutManager;
...@@ -86,8 +92,12 @@ import com.jess.arms.base.BaseFragmentActivity; ...@@ -86,8 +92,12 @@ import com.jess.arms.base.BaseFragmentActivity;
import com.jess.arms.base.DefaultAdapter; import com.jess.arms.base.DefaultAdapter;
import com.jess.arms.di.component.AppComponent; import com.jess.arms.di.component.AppComponent;
import com.jess.arms.utils.ArmsUtils; import com.jess.arms.utils.ArmsUtils;
import com.lxj.xpopup.util.KeyboardUtils;
import com.qmuiteam.qmui.alpha.QMUIAlphaTextView; import com.qmuiteam.qmui.alpha.QMUIAlphaTextView;
import com.qmuiteam.qmui.util.QMUIDisplayHelper; import com.qmuiteam.qmui.util.QMUIDisplayHelper;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;
import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton;
import org.simple.eventbus.EventBus; import org.simple.eventbus.EventBus;
...@@ -1401,6 +1411,20 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter> ...@@ -1401,6 +1411,20 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
} }
@Override @Override
public void setCustomFoodDialog(int customType, OrderDetail foodItem) {
new CustomFoodDialog(mContext, customType)
.create(R.style.MyEditDialogTheme)
.setOnEditListener((dialog, name, money) -> {
dialog.dismiss();
foodItem.setProductName(name);
foodItem.setUnit_price(Double.parseDouble(money));
foodItem.setPrice(foodItem.getUnit_price());
mPresenter.toAddFoodItem(foodItem);
})
.show();
}
@Override
public void showBtnMealModifyRestoreVisibility(boolean show) { public void showBtnMealModifyRestoreVisibility(boolean show) {
btn_meal_modify_restore.setVisibility(show ? View.VISIBLE : View.GONE); btn_meal_modify_restore.setVisibility(show ? View.VISIBLE : View.GONE);
} }
......
package com.gingersoft.gsa.cloud.table.mvp.ui.widget;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.MessageQueue;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.gingersoft.gsa.cloud.app.GsaCloudApplication;
import com.gingersoft.gsa.cloud.common.utils.LanguageUtils;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.table.R;
import com.jess.arms.utils.ArmsUtils;
import com.lxj.xpopup.util.KeyboardUtils;
import com.qmuiteam.qmui.layout.QMUILinearLayout;
import com.qmuiteam.qmui.util.QMUIDisplayHelper;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton;
/**
* @作者: bin
* @創建時間: 2021-03-11 17:38
* @更新時間: 2021-03-11 17:38
* @描述:
*/
public class CustomFoodDialog {
private Context mContext;
private QMUIDialog customDialog;
private EditText ed_name, ed_money;
private int mRadius;
//0:value焦点、1:money焦点
private int currFocus = 0;
//0:清除、1:返回
private int clearOrReturn = 1;
private int mCustomType;
public CustomFoodDialog(Context context, int customType) {
this.mContext = context;
this.mCustomType = customType;
mRadius = QMUIDisplayHelper.dp2px(mContext, 8);
}
public CustomFoodDialog create(int style) {
customDialog = new QMUIDialog.CustomDialogBuilder(mContext)
.setLayout(R.layout.meal_dialog_custom_food)
.create(style);
buildViews();
return this;
}
public void show() {
if (customDialog != null) {
customDialog.show();
}
}
private void buildViews() {
QMUILinearLayout llContainer = customDialog.findViewById(R.id.lLayout_bg);
ViewStub vs_name = customDialog.findViewById(R.id.vs_name);
ViewStub vs_money = customDialog.findViewById(R.id.vs_money);
QMUIRoundButton btn_ok = customDialog.findViewById(R.id.btn_ok);
QMUIRoundButton btn_clear_or_return = customDialog.findViewById(R.id.btn_clear_or_return);
float mShadowAlpha = 0.25f;
int mShadowElevationDp = 14;
llContainer.setRadiusAndShadow(mRadius, QMUIDisplayHelper.dp2px(mContext, mShadowElevationDp), mShadowAlpha);
llContainer.setLayoutParams(new ConstraintLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
if (mCustomType == Food.CUSTOM_TYPE_101) {
vs_name.inflate();
TextView tv_name = customDialog.findViewById(R.id.tv_name);
ed_name = customDialog.findViewById(R.id.ed_name);
tv_name.setText("名稱");
setOnFocusChangeListener(ed_name);
addTextChangedListener(ed_name, btn_clear_or_return);
} else if (mCustomType == Food.CUSTOM_TYPE_102) {
vs_money.inflate();
TextView tv_money = customDialog.findViewById(R.id.tv_money);
ed_money = customDialog.findViewById(R.id.et_money);
tv_money.setText("金額");
setOnFocusChangeListener(ed_money);
addTextChangedListener(ed_money, btn_clear_or_return);
} else {
vs_name.inflate();
vs_money.inflate();
TextView tv_name = customDialog.findViewById(R.id.tv_name);
TextView tv_money = customDialog.findViewById(R.id.tv_money);
ed_name = customDialog.findViewById(R.id.ed_name);
ed_money = customDialog.findViewById(R.id.et_money);
tv_name.setText("名稱");
tv_money.setText("金額");
setOnFocusChangeListener(ed_name);
setOnFocusChangeListener(ed_money);
addTextChangedListener(ed_name, btn_clear_or_return);
addTextChangedListener(ed_money, btn_clear_or_return);
}
btn_ok.setOnClickListener((view) -> {
if (ed_name != null) {
KeyboardUtils.hideSoftInput(ed_name);
}
if (ed_money != null) {
KeyboardUtils.hideSoftInput(ed_money);
}
String name = getTvNameText();
String money = getTvMoneyText();
if (onEditListener != null) {
onEditListener.onInput(customDialog,name, money);
}
});
btn_clear_or_return.setOnClickListener((view) -> {
if (clearOrReturn == 1) {
customDialog.cancel();
} else {
//检查焦点
String s;
switch (currFocus) {
case 0:
s = ed_name.getText().toString();
if (s.length() > 0) {
s = s.substring(0, s.length() - 1);
ed_name.setText(s);
ed_name.setSelection(s.length());
}
break;
case 1:
s = ed_money.getText().toString();
if (s.length() > 0) {
s = s.substring(0, s.length() - 1);
ed_money.setText(s);
ed_money.setSelection(s.length());
}
break;
}
}
});
}
private void setOnFocusChangeListener(EditText editText) {
editText.setOnFocusChangeListener((v, hasFocus) -> {
if (hasFocus) {
if (editText.getId() == R.id.ed_name) {
currFocus = 0;
} else {
currFocus = 1;
}
}
});
}
private void addTextChangedListener(EditText editText, Button btn_clear_or_return) {
editText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (s.length() > 0) {
clearOrReturn = 0;
} else {
clearOrReturn = 1;
}
}
@Override
public void afterTextChanged(Editable s) {
if (clearOrReturn == 0) {
btn_clear_or_return.setText(LanguageUtils.get_language_system(GsaCloudApplication.getAppContext(), "Meal.funcMoney.clear", "clear"));
} else {
btn_clear_or_return.setText(LanguageUtils.get_language_system(GsaCloudApplication.getAppContext(), "Return", "return"));
}
}
});
}
private String getTvNameText() {
return ed_name != null ? ed_name.getText().toString() : null;
}
private String getTvMoneyText() {
return ed_money != null ? ed_money.getText().toString() : null;
}
private OnEditListener onEditListener;
public CustomFoodDialog setOnEditListener(OnEditListener onEditListener) {
this.onEditListener = onEditListener;
return this;
}
public interface OnEditListener {
void onInput(Dialog dialog,String name, String money);
}
}
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.layout.QMUILinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/lLayout_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/theme_white_color"
android:orientation="vertical"
android:padding="@dimen/normal_space">
<TextView
android:layout_width="match_parent"
android:layout_height="@dimen/head_height"
android:gravity="center"
android:text="自定義食品"
android:textColor="@color/theme_text_color"
android:textSize="@dimen/sp_18" />
<ViewStub
android:id="@+id/vs_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout="@layout/meal_layout_custom_food_name" />
<ViewStub
android:id="@+id/vs_money"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout="@layout/meal_layout_custom_food_money" />
<LinearLayout
android:id="@+id/btns"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/normal_space">
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
android:id="@+id/btn_ok"
android:layout_width="0dp"
android:layout_height="@dimen/button_height"
android:layout_marginRight="@dimen/normal_space5"
android:layout_weight="1"
android:gravity="center"
android:text="確認"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/text_size_default"
app:qmui_backgroundColor="@color/theme_color"
app:qmui_radius="@dimen/dp_5" />
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
android:id="@+id/btn_clear_or_return"
android:layout_width="0dp"
android:layout_height="@dimen/button_height"
android:layout_marginRight="@dimen/normal_space5"
android:layout_weight="1"
android:gravity="center"
android:text="返回"
android:textColor="@color/theme_black"
android:textSize="@dimen/text_size_default"
app:qmui_backgroundColor="@color/theme_hint_color"
app:qmui_borderColor="@color/theme_hint_color"
app:qmui_radius="@dimen/dp_5" />
</LinearLayout>
</com.qmuiteam.qmui.layout.QMUILinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_money"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/black"
android:textSize="@dimen/sp_16" />
<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/et_money"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/normal_space"
android:layout_weight="1"
android:background="@null"
android:hint="請輸入金額"
android:inputType="numberDecimal"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10"
android:singleLine="true"
android:textColor="@color/normal_color"
android:textColorHint="@color/hint_color"
android:textSize="@dimen/sp_16"
app:met_autoValidate="true"
app:met_baseColor="@color/theme_black"
app:met_clearButton="true"
app:met_floatingLabel="highlight"
app:met_iconPadding="2dp"
app:met_primaryColor="@color/theme_color"
app:met_singleLineEllipsis="false" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/black"
android:textSize="@dimen/sp_16" />
<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/ed_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:hint="請輸入名稱"
android:layout_margin="@dimen/normal_space"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10"
android:singleLine="true"
android:textColor="@color/normal_color"
android:textColorHint="@color/hint_color"
android:textSize="@dimen/sp_16"
app:met_autoValidate="true"
app:met_clearButton="true"
app:met_floatingLabel="highlight"
app:met_iconPadding="2dp"
app:met_baseColor="@color/theme_black"
app:met_primaryColor="@color/theme_color"
app:met_singleLineEllipsis="false"/>
</LinearLayout>
\ No newline at end of file
...@@ -21,7 +21,7 @@ ext { ...@@ -21,7 +21,7 @@ ext {
rxlifecycle2SdkVersion : "2.2.1", rxlifecycle2SdkVersion : "2.2.1",
espressoSdkVersion : "3.0.1", espressoSdkVersion : "3.0.1",
fragmentationVersion : "1.3.8", fragmentationVersion : "1.3.8",
canarySdkVersion : "1.5.4", canarySdkVersion : "2.2",
] ]
buildType = [ buildType = [
...@@ -126,7 +126,7 @@ ext { ...@@ -126,7 +126,7 @@ ext {
"timber" : "com.jakewharton.timber:timber:4.6.0", "timber" : "com.jakewharton.timber:timber:4.6.0",
"logger" : "com.orhanobut:logger:2.1.1", "logger" : "com.orhanobut:logger:2.1.1",
"canary-debug" : "com.squareup.leakcanary:leakcanary-android:${version["canarySdkVersion"]}", "canary-debug" : "com.squareup.leakcanary:leakcanary-android:${version["canarySdkVersion"]}",
"canary-release" : "com.squareup.leakcanary:leakcanary-android-no-op:${version["canarySdkVersion"]}", "canary-release" : "com.squareup.leakcanary:leakcanary-android-no-op:1.6.3",
"umeng-analytics" : "com.umeng.analytics:analytics:6.0.1", "umeng-analytics" : "com.umeng.analytics:analytics:6.0.1",
// QMUI // QMUI
"qmui" : "com.qmuiteam:qmui:2.0.0-alpha03", "qmui" : "com.qmuiteam:qmui:2.0.0-alpha03",
......
...@@ -27,6 +27,8 @@ import com.jess.arms.base.BaseApplication; ...@@ -27,6 +27,8 @@ import com.jess.arms.base.BaseApplication;
import com.jess.arms.di.component.AppComponent; import com.jess.arms.di.component.AppComponent;
import com.jess.arms.di.component.DaggerAppComponent; import com.jess.arms.di.component.DaggerAppComponent;
import com.jess.arms.di.module.GlobalConfigModule; import com.jess.arms.di.module.GlobalConfigModule;
import com.jess.arms.http.imageloader.glide.GlideArms;
import com.jess.arms.http.imageloader.glide.ImageConfigImpl;
import com.jess.arms.integration.ConfigModule; import com.jess.arms.integration.ConfigModule;
import com.jess.arms.integration.ManifestParser; import com.jess.arms.integration.ManifestParser;
import com.jess.arms.utils.ArmsUtils; import com.jess.arms.utils.ArmsUtils;
...@@ -258,6 +260,13 @@ public class AppDelegate implements App, AppLifecycles { ...@@ -258,6 +260,13 @@ public class AppDelegate implements App, AppLifecycles {
//系统正运行与低内存的状态并且你的进程正处于 LRU 列表中最容易被杀掉的位置, 你应该释放任何不影响你的 App 恢复状态的资源 //系统正运行与低内存的状态并且你的进程正处于 LRU 列表中最容易被杀掉的位置, 你应该释放任何不影响你的 App 恢复状态的资源
//低于 API 14 的 App 可以使用 onLowMemory 回调 //低于 API 14 的 App 可以使用 onLowMemory 回调
// case TRIM_MEMORY_COMPLETE: // case TRIM_MEMORY_COMPLETE:
//在 App 被置换到后台的时候,清理图片请求框架的内存缓存
if (level == TRIM_MEMORY_UI_HIDDEN) {
mAppComponent.imageLoader().clear(mApplication,
ImageConfigImpl.builder().isClearMemory(true).build());
}
//交给 Glide 处理内存情况
GlideArms.get(mApplication).trimMemory(level);
} }
@Override @Override
...@@ -274,6 +283,8 @@ public class AppDelegate implements App, AppLifecycles { ...@@ -274,6 +283,8 @@ public class AppDelegate implements App, AppLifecycles {
@Override @Override
public void onLowMemory() { public void onLowMemory() {
//系统正运行与低内存的状态并且你的进程正处于 LRU 列表中最容易被杀掉的位置, 你应该释放任何不影响你的 App 恢复状态的资源 //系统正运行与低内存的状态并且你的进程正处于 LRU 列表中最容易被杀掉的位置, 你应该释放任何不影响你的 App 恢复状态的资源
mAppComponent.imageLoader().clear(mApplication,
ImageConfigImpl.builder().isClearMemory(true).build());
} }
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<item name="QMUITopBarStyle">@style/QDTopBar</item> <item name="QMUITopBarStyle">@style/QDTopBar</item>
<!-- TabItem theme --> <!-- TabItem theme -->
<item name="QMUITabSegmentStyle">@style/QMUITabSegmentStyle</item> <item name="QMUITabSegmentStyle">@style/QMUITabSegmentStyle</item>
</style> </style>
<style name="MyCheckbox_style"> <style name="MyCheckbox_style">
......
...@@ -51,7 +51,7 @@ android { ...@@ -51,7 +51,7 @@ android {
/** /**
* 版本号 * 版本号
*/ */
schemaVersion 23 schemaVersion 24
/** /**
* greendao输出dao的数据库操作实体类文件夹(相对路径 包名+自定义路径名称,包将创建于包名的直接路径下) * greendao输出dao的数据库操作实体类文件夹(相对路径 包名+自定义路径名称,包将创建于包名的直接路径下)
*/ */
...@@ -82,4 +82,9 @@ dependencies { ...@@ -82,4 +82,9 @@ dependencies {
// 數據庫 // 數據庫
implementation 'org.greenrobot:greendao:3.2.2' implementation 'org.greenrobot:greendao:3.2.2'
implementation 'org.greenrobot:greendao-generator:3.2.2' implementation 'org.greenrobot:greendao-generator:3.2.2'
//rx
api rootProject.ext.dependencies["rxjava2"]
api(rootProject.ext.dependencies["rxandroid2"]) {
exclude module: 'rxjava'
}
} }
package com.gingersoft.gsa.cloud.database.bean; package com.gingersoft.gsa.cloud.database.bean;
import android.graphics.Color; import android.graphics.Color;
import org.greenrobot.greendao.annotation.Entity; import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated; import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id; import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property; import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.ToOne; import org.greenrobot.greendao.annotation.ToOne;
import org.greenrobot.greendao.annotation.Transient; import org.greenrobot.greendao.annotation.Transient;
import java.util.Date; import java.util.Date;
import org.greenrobot.greendao.DaoException; import org.greenrobot.greendao.DaoException;
import com.gingersoft.gsa.cloud.database.greendao.DaoSession; import com.gingersoft.gsa.cloud.database.greendao.DaoSession;
import com.gingersoft.gsa.cloud.database.greendao.ColorBeanDao; import com.gingersoft.gsa.cloud.database.greendao.ColorBeanDao;
import com.gingersoft.gsa.cloud.database.greendao.FoodDao; import com.gingersoft.gsa.cloud.database.greendao.FoodDao;
import org.greenrobot.greendao.annotation.NotNull; import org.greenrobot.greendao.annotation.NotNull;
import lombok.Data;
/** /**
* 作者:ELEGANT_BIN * 作者:ELEGANT_BIN
* 版本:1.6.0 * 版本:1.6.0
...@@ -22,6 +29,7 @@ import org.greenrobot.greendao.annotation.NotNull; ...@@ -22,6 +29,7 @@ import org.greenrobot.greendao.annotation.NotNull;
* 描述: * 描述:
*/ */
@Data
@Entity @Entity
public class Food { public class Food {
...@@ -66,6 +74,13 @@ public class Food { ...@@ -66,6 +74,13 @@ public class Food {
*/ */
private String plu; private String plu;
/** /**
* 自定義类型 #100=自定义食品名称及金额 #101=自定义食品名称 #102=自定义食品金额
*/
private Integer customType ;
public static final int CUSTOM_TYPE_100 = 100;
public static final int CUSTOM_TYPE_101 = 101;
public static final int CUSTOM_TYPE_102 = 102;
/**
* 本地对应ID * 本地对应ID
*/ */
private String posFid; private String posFid;
...@@ -301,52 +316,72 @@ public class Food { ...@@ -301,52 +316,72 @@ public class Food {
* 自定義字段 * 自定義字段
*/ */
/**選中數量*/ /**
* 選中數量
*/
@Transient @Transient
private int number; private int number;
/**食品組ID*/ /**
* 食品組ID
*/
@Transient @Transient
private long topId; private long topId;
/**背景顏色*/ /**
* 背景顏色
*/
@Transient @Transient
private int bgColor = Color.parseColor("#03a9f4"); private int bgColor = Color.parseColor("#03a9f4");
/**字體顏色*/ /**
* 字體顏色
*/
@Transient @Transient
private int fontColor = Color.parseColor("#FFFFFF"); private int fontColor = Color.parseColor("#FFFFFF");
/**最大選中數*/ /**
* 最大選中數
*/
@Transient @Transient
private String maxNumber = ""; private String maxNumber = "";
/**動態的最大選中數*/ /**
* 動態的最大選中數
*/
@Transient @Transient
private String currentMaxNumber= ""; private String currentMaxNumber = "";
/**是否選中*/ /**
* 是否選中
*/
@Transient @Transient
private boolean selected; private boolean selected;
/**是否组合食品*/ /**
* 是否组合食品
*/
@Transient @Transient
private boolean isComboFood = false; private boolean isComboFood = false;
/** Used to resolve relations */ /**
* Used to resolve relations
*/
@Generated(hash = 2040040024) @Generated(hash = 2040040024)
private transient DaoSession daoSession; private transient DaoSession daoSession;
/** Used for active entity operations. */ /**
* Used for active entity operations.
*/
@Generated(hash = 1296197325) @Generated(hash = 1296197325)
private transient FoodDao myDao; private transient FoodDao myDao;
@Generated(hash = 292980300) @Generated(hash = 292980300)
private transient Long colorBean__resolvedKey; private transient Long colorBean__resolvedKey;
@Generated(hash = 60268763)
@Generated(hash = 418551587)
public Food(Long id, long parentId, long restaurantId, byte isParent, long seqNo, String foodName, public Food(Long id, long parentId, long restaurantId, byte isParent, long seqNo, String foodName,
String foodName1, String foodName2, String plu, String posFid, String foodDesc, String foodName1, String foodName2, String plu, Integer customType, String posFid, String foodDesc,
long limitAmount, long limitType, String foodSummary, long invisible, byte autoMod, long limitAmount, long limitType, String foodSummary, long invisible, byte autoMod, double price,
double price, double marketPrice, double lunchboxPrice, String imgUrlSmall, String imageurl, double marketPrice, double lunchboxPrice, String imgUrlSmall, String imageurl, long riceponInvisible,
long riceponInvisible, double cost, long like, long totalSold, long isSold, Date startDate, double cost, long like, long totalSold, long isSold, Date startDate, Date endDate, String createBy,
Date endDate, String createBy, Date createTime, String updateBy, Date updateTime, Date createTime, String updateBy, Date updateTime, long periodId, long ableDiscount, long takeaway,
long periodId, long ableDiscount, long takeaway, long blueEdit, long cartEdit, long blueEdit, long cartEdit, long autoMerge, String printSeting, long isPrintQueueCode,
long autoMerge, String printSeting, long isPrintQueueCode, long queueHeadId, long approve, long queueHeadId, long approve, long printFont, long advPrice, long printToBill, double pointsAdd,
long printFont, long advPrice, long printToBill, double pointsAdd, long pointsRatio, long pointsRatio, double pointsRedeem, long ktPrintMainItem, long ktShowPrice, long printTo,
double pointsRedeem, long ktPrintMainItem, long ktShowPrice, long printTo, long toPax, long toPax, long foodType, long majorMainId, long deptId, byte serviceCharge, long conditions,
long foodType, long majorMainId, long deptId, byte serviceCharge, long conditions, long isRt, long deletes, long isTimingFood, long minLongTime, long unitTime, double unitPrice,
long isRt, long deletes, long isTimingFood, long minLongTime, long unitTime, long freeLongTime, Date freePeriodBegin, long isStatistic, long colorId) {
double unitPrice, long freeLongTime, Date freePeriodBegin, long isStatistic, long colorId) {
this.id = id; this.id = id;
this.parentId = parentId; this.parentId = parentId;
this.restaurantId = restaurantId; this.restaurantId = restaurantId;
...@@ -356,6 +391,7 @@ public class Food { ...@@ -356,6 +391,7 @@ public class Food {
this.foodName1 = foodName1; this.foodName1 = foodName1;
this.foodName2 = foodName2; this.foodName2 = foodName2;
this.plu = plu; this.plu = plu;
this.customType = customType;
this.posFid = posFid; this.posFid = posFid;
this.foodDesc = foodDesc; this.foodDesc = foodDesc;
this.limitAmount = limitAmount; this.limitAmount = limitAmount;
...@@ -420,64 +456,171 @@ public class Food { ...@@ -420,64 +456,171 @@ public class Food {
public Food() { public Food() {
} }
public Long getId() {
return id; /**
* To-one relationship, resolved on first access.
*/
@Generated(hash = 972194621)
public ColorBean getColorBean() {
long __key = this.colorId;
if (colorBean__resolvedKey == null || !colorBean__resolvedKey.equals(__key)) {
final DaoSession daoSession = this.daoSession;
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
ColorBeanDao targetDao = daoSession.getColorBeanDao();
ColorBean colorBeanNew = targetDao.load(__key);
synchronized (this) {
colorBean = colorBeanNew;
colorBean__resolvedKey = __key;
}
}
return colorBean;
} }
public void setId(Long id) { /**
this.id = id; * called by internal mechanisms, do not call yourself.
*/
@Generated(hash = 453682256)
public void setColorBean(@NotNull ColorBean colorBean) {
if (colorBean == null) {
throw new DaoException(
"To-one property 'colorId' has not-null constraint; cannot set to-one to null");
}
synchronized (this) {
this.colorBean = colorBean;
colorId = colorBean.getColorId();
colorBean__resolvedKey = colorId;
}
} }
public long getTopId() { /**
return topId; * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
* Entity must attached to an entity context.
*/
@Generated(hash = 128553479)
public void delete() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.delete(this);
}
/**
* Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
* Entity must attached to an entity context.
*/
@Generated(hash = 1942392019)
public void refresh() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.refresh(this);
}
/**
* Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
* Entity must attached to an entity context.
*/
@Generated(hash = 713229351)
public void update() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.update(this);
}
/**
* called by internal mechanisms, do not call yourself.
*/
@Generated(hash = 505459956)
public void __setDaoSession(DaoSession daoSession) {
this.daoSession = daoSession;
myDao = daoSession != null ? daoSession.getFoodDao() : null;
}
public Long getId() {
return this.id;
} }
public void setTopId(long topId) { public void setId(Long id) {
this.topId = topId; this.id = id;
} }
public Long getParentId() { public long getParentId() {
return parentId; return this.parentId;
} }
public void setParentId(Long parentId) { public void setParentId(long parentId) {
this.parentId = parentId; this.parentId = parentId;
} }
public Long getRestaurantId() { public long getRestaurantId() {
return restaurantId; return this.restaurantId;
} }
public void setRestaurantId(Long restaurantId) { public void setRestaurantId(long restaurantId) {
this.restaurantId = restaurantId; this.restaurantId = restaurantId;
} }
public Byte getIsParent() { public byte getIsParent() {
return isParent; return this.isParent;
} }
public void setIsParent(Byte isParent) { public void setIsParent(byte isParent) {
this.isParent = isParent; this.isParent = isParent;
} }
public Long getSeqNo() { public long getSeqNo() {
return seqNo; return this.seqNo;
} }
public void setSeqNo(Long seqNo) { public void setSeqNo(long seqNo) {
this.seqNo = seqNo; this.seqNo = seqNo;
} }
public String getFoodName() { public String getFoodName() {
return foodName; return this.foodName;
} }
public void setFoodName(String foodName) { public void setFoodName(String foodName) {
this.foodName = foodName; this.foodName = foodName;
} }
public String getFoodName1() {
return this.foodName1;
}
public void setFoodName1(String foodName1) {
this.foodName1 = foodName1;
}
public String getFoodName2() {
return this.foodName2;
}
public void setFoodName2(String foodName2) {
this.foodName2 = foodName2;
}
public String getPlu() {
return this.plu;
}
public void setPlu(String plu) {
this.plu = plu;
}
public Integer getCustomType() {
return this.customType;
}
public void setCustomType(Integer customType) {
this.customType = customType;
}
public String getPosFid() { public String getPosFid() {
return posFid; return this.posFid;
} }
public void setPosFid(String posFid) { public void setPosFid(String posFid) {
...@@ -485,75 +628,79 @@ public class Food { ...@@ -485,75 +628,79 @@ public class Food {
} }
public String getFoodDesc() { public String getFoodDesc() {
return foodDesc; return this.foodDesc;
} }
public void setFoodDesc(String foodDesc) { public void setFoodDesc(String foodDesc) {
this.foodDesc = foodDesc; this.foodDesc = foodDesc;
} }
public Long getLimitAmount() { public long getLimitAmount() {
return limitAmount; return this.limitAmount;
} }
public void setLimitAmount(Long limitAmount) { public void setLimitAmount(long limitAmount) {
this.limitAmount = limitAmount; this.limitAmount = limitAmount;
} }
public Long getLimitType() { public long getLimitType() {
return limitType; return this.limitType;
} }
public void setLimitType(Long limitType) { public void setLimitType(long limitType) {
this.limitType = limitType; this.limitType = limitType;
} }
public String getFoodSummary() { public String getFoodSummary() {
return foodSummary; return this.foodSummary;
}
public void setFoodSummary(String foodSummary) {
this.foodSummary = foodSummary;
} }
public Long getInvisible() { public long getInvisible() {
return invisible; return this.invisible;
} }
public void setInvisible(Long invisible) { public void setInvisible(long invisible) {
this.invisible = invisible; this.invisible = invisible;
} }
public Byte getAutoMod() { public byte getAutoMod() {
return autoMod; return this.autoMod;
} }
public void setAutoMod(Byte autoMod) { public void setAutoMod(byte autoMod) {
this.autoMod = autoMod; this.autoMod = autoMod;
} }
public Double getPrice() { public double getPrice() {
return price; return this.price;
} }
public void setPrice(Double price) { public void setPrice(double price) {
this.price = price; this.price = price;
} }
public Double getMarketPrice() { public double getMarketPrice() {
return marketPrice; return this.marketPrice;
} }
public void setMarketPrice(Double marketPrice) { public void setMarketPrice(double marketPrice) {
this.marketPrice = marketPrice; this.marketPrice = marketPrice;
} }
public Double getLunchboxPrice() { public double getLunchboxPrice() {
return lunchboxPrice; return this.lunchboxPrice;
} }
public void setLunchboxPrice(Double lunchboxPrice) { public void setLunchboxPrice(double lunchboxPrice) {
this.lunchboxPrice = lunchboxPrice; this.lunchboxPrice = lunchboxPrice;
} }
public String getImgUrlSmall() { public String getImgUrlSmall() {
return imgUrlSmall; return this.imgUrlSmall;
} }
public void setImgUrlSmall(String imgUrlSmall) { public void setImgUrlSmall(String imgUrlSmall) {
...@@ -561,71 +708,71 @@ public class Food { ...@@ -561,71 +708,71 @@ public class Food {
} }
public String getImageurl() { public String getImageurl() {
return imageurl; return this.imageurl;
} }
public void setImageurl(String imageurl) { public void setImageurl(String imageurl) {
this.imageurl = imageurl; this.imageurl = imageurl;
} }
public Long getRiceponInvisible() { public long getRiceponInvisible() {
return riceponInvisible; return this.riceponInvisible;
} }
public void setRiceponInvisible(Long riceponInvisible) { public void setRiceponInvisible(long riceponInvisible) {
this.riceponInvisible = riceponInvisible; this.riceponInvisible = riceponInvisible;
} }
public Double getCost() { public double getCost() {
return cost; return this.cost;
} }
public void setCost(Double cost) { public void setCost(double cost) {
this.cost = cost; this.cost = cost;
} }
public Date getStartDate() { public long getLike() {
return startDate; return this.like;
} }
public void setStartDate(Date startDate) { public void setLike(long like) {
this.startDate = startDate; this.like = like;
} }
public Date getEndDate() { public long getTotalSold() {
return endDate; return this.totalSold;
} }
public void setEndDate(Date endDate) { public void setTotalSold(long totalSold) {
this.endDate = endDate; this.totalSold = totalSold;
} }
public Long getLike() { public long getIsSold() {
return like; return this.isSold;
} }
public void setLike(Long like) { public void setIsSold(long isSold) {
this.like = like; this.isSold = isSold;
} }
public Long getTotalSold() { public Date getStartDate() {
return totalSold; return this.startDate;
} }
public void setTotalSold(Long totalSold) { public void setStartDate(Date startDate) {
this.totalSold = totalSold; this.startDate = startDate;
} }
public Long getIsSold() { public Date getEndDate() {
return isSold; return this.endDate;
} }
public void setIsSold(Long isSold) { public void setEndDate(Date endDate) {
this.isSold = isSold; this.endDate = endDate;
} }
public String getCreateBy() { public String getCreateBy() {
return createBy; return this.createBy;
} }
public void setCreateBy(String createBy) { public void setCreateBy(String createBy) {
...@@ -633,7 +780,7 @@ public class Food { ...@@ -633,7 +780,7 @@ public class Food {
} }
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return this.createTime;
} }
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
...@@ -641,7 +788,7 @@ public class Food { ...@@ -641,7 +788,7 @@ public class Food {
} }
public String getUpdateBy() { public String getUpdateBy() {
return updateBy; return this.updateBy;
} }
public void setUpdateBy(String updateBy) { public void setUpdateBy(String updateBy) {
...@@ -649,651 +796,291 @@ public class Food { ...@@ -649,651 +796,291 @@ public class Food {
} }
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return this.updateTime;
} }
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Long getPeriodId() { public long getPeriodId() {
return periodId; return this.periodId;
} }
public void setPeriodId(Long periodId) { public void setPeriodId(long periodId) {
this.periodId = periodId; this.periodId = periodId;
} }
public Long getAbleDiscount() { public long getAbleDiscount() {
return ableDiscount; return this.ableDiscount;
} }
public void setAbleDiscount(Long ableDiscount) { public void setAbleDiscount(long ableDiscount) {
this.ableDiscount = ableDiscount; this.ableDiscount = ableDiscount;
} }
public Long getTakeaway() { public long getTakeaway() {
return takeaway; return this.takeaway;
} }
public void setTakeaway(Long takeaway) { public void setTakeaway(long takeaway) {
this.takeaway = takeaway; this.takeaway = takeaway;
} }
public Long getBlueEdit() { public long getBlueEdit() {
return blueEdit; return this.blueEdit;
} }
public void setBlueEdit(Long blueEdit) { public void setBlueEdit(long blueEdit) {
this.blueEdit = blueEdit; this.blueEdit = blueEdit;
} }
public Long getCartEdit() { public long getCartEdit() {
return cartEdit; return this.cartEdit;
} }
public void setCartEdit(Long cartEdit) { public void setCartEdit(long cartEdit) {
this.cartEdit = cartEdit; this.cartEdit = cartEdit;
} }
public Long getAutoMerge() { public long getAutoMerge() {
return autoMerge; return this.autoMerge;
} }
public void setAutoMerge(Long autoMerge) { public void setAutoMerge(long autoMerge) {
this.autoMerge = autoMerge; this.autoMerge = autoMerge;
} }
public String getFoodName1() {
return foodName1;
}
public void setFoodName1(String foodName1) {
this.foodName1 = foodName1;
}
public String getFoodName2() {
return foodName2;
}
public void setFoodName2(String foodName2) {
this.foodName2 = foodName2;
}
public String getPlu() {
return plu;
}
public void setPlu(String plu) {
this.plu = plu;
}
public String getPrintSeting() { public String getPrintSeting() {
return printSeting; return this.printSeting;
} }
public void setPrintSeting(String printSeting) { public void setPrintSeting(String printSeting) {
this.printSeting = printSeting; this.printSeting = printSeting;
} }
public Long getIsPrintQueueCode() { public long getIsPrintQueueCode() {
return isPrintQueueCode; return this.isPrintQueueCode;
} }
public void setIsPrintQueueCode(Long isPrintQueueCode) { public void setIsPrintQueueCode(long isPrintQueueCode) {
this.isPrintQueueCode = isPrintQueueCode; this.isPrintQueueCode = isPrintQueueCode;
} }
public Long getQueueHeadId() { public long getQueueHeadId() {
return queueHeadId; return this.queueHeadId;
} }
public void setQueueHeadId(Long queueHeadId) { public void setQueueHeadId(long queueHeadId) {
this.queueHeadId = queueHeadId; this.queueHeadId = queueHeadId;
} }
public Long getApprove() { public long getApprove() {
return approve; return this.approve;
} }
public void setApprove(Long approve) { public void setApprove(long approve) {
this.approve = approve; this.approve = approve;
} }
public Long getPrintFont() { public long getPrintFont() {
return printFont; return this.printFont;
} }
public void setPrintFont(Long printFont) { public void setPrintFont(long printFont) {
this.printFont = printFont; this.printFont = printFont;
} }
public Long getAdvPrice() { public long getAdvPrice() {
return advPrice; return this.advPrice;
} }
public void setAdvPrice(Long advPrice) { public void setAdvPrice(long advPrice) {
this.advPrice = advPrice; this.advPrice = advPrice;
} }
public Long getPrintToBill() { public long getPrintToBill() {
return printToBill; return this.printToBill;
} }
public void setPrintToBill(Long printToBill) { public void setPrintToBill(long printToBill) {
this.printToBill = printToBill; this.printToBill = printToBill;
} }
public Double getPointsAdd() { public double getPointsAdd() {
return pointsAdd; return this.pointsAdd;
} }
public void setPointsAdd(Double pointsAdd) { public void setPointsAdd(double pointsAdd) {
this.pointsAdd = pointsAdd; this.pointsAdd = pointsAdd;
} }
public Long getPointsRatio() { public long getPointsRatio() {
return pointsRatio; return this.pointsRatio;
} }
public void setPointsRatio(Long pointsRatio) { public void setPointsRatio(long pointsRatio) {
this.pointsRatio = pointsRatio; this.pointsRatio = pointsRatio;
} }
public Double getPointsRedeem() { public double getPointsRedeem() {
return pointsRedeem; return this.pointsRedeem;
} }
public void setPointsRedeem(Double pointsRedeem) { public void setPointsRedeem(double pointsRedeem) {
this.pointsRedeem = pointsRedeem; this.pointsRedeem = pointsRedeem;
} }
public Long getKtPrintMainItem() { public long getKtPrintMainItem() {
return ktPrintMainItem; return this.ktPrintMainItem;
} }
public void setKtPrintMainItem(Long ktPrintMainItem) { public void setKtPrintMainItem(long ktPrintMainItem) {
this.ktPrintMainItem = ktPrintMainItem; this.ktPrintMainItem = ktPrintMainItem;
} }
public Long getKtShowPrice() { public long getKtShowPrice() {
return ktShowPrice; return this.ktShowPrice;
} }
public void setKtShowPrice(Long ktShowPrice) { public void setKtShowPrice(long ktShowPrice) {
this.ktShowPrice = ktShowPrice; this.ktShowPrice = ktShowPrice;
} }
public Long getPrintTo() { public long getPrintTo() {
return printTo; return this.printTo;
} }
public void setPrintTo(Long printTo) { public void setPrintTo(long printTo) {
this.printTo = printTo; this.printTo = printTo;
} }
public Long getToPax() { public long getToPax() {
return toPax; return this.toPax;
} }
public void setToPax(Long toPax) { public void setToPax(long toPax) {
this.toPax = toPax; this.toPax = toPax;
} }
public Long getFoodType() { public long getFoodType() {
return foodType; return this.foodType;
} }
public void setFoodType(Long foodType) { public void setFoodType(long foodType) {
this.foodType = foodType; this.foodType = foodType;
} }
public Long getMajorMainId() { public long getMajorMainId() {
return majorMainId; return this.majorMainId;
} }
public void setMajorMainId(Long majorMainId) { public void setMajorMainId(long majorMainId) {
this.majorMainId = majorMainId; this.majorMainId = majorMainId;
} }
public Long getDeptId() { public long getDeptId() {
return deptId; return this.deptId;
} }
public void setDeptId(Long deptId) { public void setDeptId(long deptId) {
this.deptId = deptId; this.deptId = deptId;
} }
public Byte getServiceCharge() { public byte getServiceCharge() {
return serviceCharge; return this.serviceCharge;
} }
public void setServiceCharge(Byte serviceCharge) { public void setServiceCharge(byte serviceCharge) {
this.serviceCharge = serviceCharge; this.serviceCharge = serviceCharge;
} }
public Long getColorId() { public long getConditions() {
return colorId; return this.conditions;
}
public void setColorId(Long colorId) {
this.colorId = colorId;
}
public Long getConditions() {
return conditions;
} }
public void setConditions(Long conditions) { public void setConditions(long conditions) {
this.conditions = conditions; this.conditions = conditions;
} }
public Long getIsRt() { public long getIsRt() {
return isRt; return this.isRt;
} }
public void setIsRt(Long isRt) { public void setIsRt(long isRt) {
this.isRt = isRt; this.isRt = isRt;
} }
public Long getDeletes() { public long getDeletes() {
return deletes; return this.deletes;
} }
public void setDeletes(Long deletes) { public void setDeletes(long deletes) {
this.deletes = deletes; this.deletes = deletes;
} }
public Long getIsTimingFood() { public long getIsTimingFood() {
return isTimingFood; return this.isTimingFood;
} }
public void setIsTimingFood(Long isTimingFood) { public void setIsTimingFood(long isTimingFood) {
this.isTimingFood = isTimingFood; this.isTimingFood = isTimingFood;
} }
public Long getMinLongTime() { public long getMinLongTime() {
return minLongTime; return this.minLongTime;
} }
public void setMinLongTime(Long minLongTime) { public void setMinLongTime(long minLongTime) {
this.minLongTime = minLongTime; this.minLongTime = minLongTime;
} }
public Long getUnitTime() { public long getUnitTime() {
return unitTime; return this.unitTime;
} }
public void setUnitTime(Long unitTime) { public void setUnitTime(long unitTime) {
this.unitTime = unitTime; this.unitTime = unitTime;
} }
public Double getUnitPrice() { public double getUnitPrice() {
return unitPrice; return this.unitPrice;
} }
public void setUnitPrice(Double unitPrice) { public void setUnitPrice(double unitPrice) {
this.unitPrice = unitPrice; this.unitPrice = unitPrice;
} }
public Long getFreeLongTime() { public long getFreeLongTime() {
return freeLongTime; return this.freeLongTime;
} }
public void setFreeLongTime(Long freeLongTime) { public void setFreeLongTime(long freeLongTime) {
this.freeLongTime = freeLongTime; this.freeLongTime = freeLongTime;
} }
public Date getFreePeriodBegin() { public Date getFreePeriodBegin() {
return freePeriodBegin; return this.freePeriodBegin;
} }
public void setFreePeriodBegin(Date freePeriodBegin) { public void setFreePeriodBegin(Date freePeriodBegin) {
this.freePeriodBegin = freePeriodBegin; this.freePeriodBegin = freePeriodBegin;
} }
public Long getIsStatistic() { public long getIsStatistic() {
return isStatistic; return this.isStatistic;
} }
public void setIsStatistic(Long isStatistic) { public void setIsStatistic(long isStatistic) {
this.isStatistic = isStatistic; this.isStatistic = isStatistic;
} }
public int getNumber() { public long getColorId() {
return number; return this.colorId;
}
public void setNumber(int number) {
this.number = number;
}
public int getBgColor() {
return bgColor;
}
public void setBgColor(int bgColor) {
this.bgColor = bgColor;
}
public int getFontColor() {
return fontColor;
}
public void setFontColor(int fontColor) {
this.fontColor = fontColor;
}
public String getMaxNumber() {
return maxNumber;
}
public void setMaxNumber(String maxNumber) {
this.maxNumber = maxNumber;
}
public String getCurrentMaxNumber() {
return currentMaxNumber;
}
public void setCurrentMaxNumber(String currentMaxNumber) {
this.currentMaxNumber = currentMaxNumber;
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
this.selected = selected;
}
public boolean isComboFood() {
return isComboFood;
}
public void setComboFood(boolean comboFood) {
isComboFood = comboFood;
}
public void setId(long id) {
this.id = id;
}
public void setParentId(long parentId) {
this.parentId = parentId;
}
public void setRestaurantId(long restaurantId) {
this.restaurantId = restaurantId;
}
public void setIsParent(byte isParent) {
this.isParent = isParent;
}
public void setSeqNo(long seqNo) {
this.seqNo = seqNo;
}
public void setLimitAmount(long limitAmount) {
this.limitAmount = limitAmount;
}
public void setLimitType(long limitType) {
this.limitType = limitType;
}
public void setFoodSummary(String foodSummary) {
this.foodSummary = foodSummary;
}
public void setInvisible(long invisible) {
this.invisible = invisible;
}
public void setAutoMod(byte autoMod) {
this.autoMod = autoMod;
}
public void setPrice(double price) {
this.price = price;
}
public void setMarketPrice(double marketPrice) {
this.marketPrice = marketPrice;
}
public void setLunchboxPrice(double lunchboxPrice) {
this.lunchboxPrice = lunchboxPrice;
}
public void setRiceponInvisible(long riceponInvisible) {
this.riceponInvisible = riceponInvisible;
}
public void setCost(double cost) {
this.cost = cost;
}
public void setLike(long like) {
this.like = like;
}
public void setTotalSold(long totalSold) {
this.totalSold = totalSold;
}
public void setIsSold(long isSold) {
this.isSold = isSold;
}
public void setPeriodId(long periodId) {
this.periodId = periodId;
}
public void setAbleDiscount(long ableDiscount) {
this.ableDiscount = ableDiscount;
}
public void setTakeaway(long takeaway) {
this.takeaway = takeaway;
}
public void setBlueEdit(long blueEdit) {
this.blueEdit = blueEdit;
}
public void setCartEdit(long cartEdit) {
this.cartEdit = cartEdit;
}
public void setAutoMerge(long autoMerge) {
this.autoMerge = autoMerge;
}
public void setIsPrintQueueCode(long isPrintQueueCode) {
this.isPrintQueueCode = isPrintQueueCode;
}
public void setQueueHeadId(long queueHeadId) {
this.queueHeadId = queueHeadId;
}
public void setApprove(long approve) {
this.approve = approve;
}
public void setPrintFont(long printFont) {
this.printFont = printFont;
}
public void setAdvPrice(long advPrice) {
this.advPrice = advPrice;
}
public void setPrintToBill(long printToBill) {
this.printToBill = printToBill;
}
public void setPointsAdd(double pointsAdd) {
this.pointsAdd = pointsAdd;
}
public void setPointsRatio(long pointsRatio) {
this.pointsRatio = pointsRatio;
}
public void setPointsRedeem(double pointsRedeem) {
this.pointsRedeem = pointsRedeem;
}
public void setKtPrintMainItem(long ktPrintMainItem) {
this.ktPrintMainItem = ktPrintMainItem;
}
public void setKtShowPrice(long ktShowPrice) {
this.ktShowPrice = ktShowPrice;
}
public void setPrintTo(long printTo) {
this.printTo = printTo;
}
public void setToPax(long toPax) {
this.toPax = toPax;
}
public void setFoodType(long foodType) {
this.foodType = foodType;
}
public void setMajorMainId(long majorMainId) {
this.majorMainId = majorMainId;
}
public void setDeptId(long deptId) {
this.deptId = deptId;
}
public void setServiceCharge(byte serviceCharge) {
this.serviceCharge = serviceCharge;
} }
public void setColorId(long colorId) { public void setColorId(long colorId) {
this.colorId = colorId; this.colorId = colorId;
} }
public void setConditions(long conditions) {
this.conditions = conditions;
}
public void setIsRt(long isRt) {
this.isRt = isRt;
}
public void setDeletes(long deletes) {
this.deletes = deletes;
}
public void setIsTimingFood(long isTimingFood) {
this.isTimingFood = isTimingFood;
}
public void setMinLongTime(long minLongTime) {
this.minLongTime = minLongTime;
}
public void setUnitTime(long unitTime) {
this.unitTime = unitTime;
}
public void setUnitPrice(double unitPrice) {
this.unitPrice = unitPrice;
}
public void setFreeLongTime(long freeLongTime) {
this.freeLongTime = freeLongTime;
}
public void setIsStatistic(long isStatistic) {
this.isStatistic = isStatistic;
}
/** To-one relationship, resolved on first access. */
@Generated(hash = 972194621)
public ColorBean getColorBean() {
long __key = this.colorId;
if (colorBean__resolvedKey == null || !colorBean__resolvedKey.equals(__key)) {
final DaoSession daoSession = this.daoSession;
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
ColorBeanDao targetDao = daoSession.getColorBeanDao();
ColorBean colorBeanNew = targetDao.load(__key);
synchronized (this) {
colorBean = colorBeanNew;
colorBean__resolvedKey = __key;
}
}
return colorBean;
}
/** called by internal mechanisms, do not call yourself. */
@Generated(hash = 453682256)
public void setColorBean(@NotNull ColorBean colorBean) {
if (colorBean == null) {
throw new DaoException(
"To-one property 'colorId' has not-null constraint; cannot set to-one to null");
}
synchronized (this) {
this.colorBean = colorBean;
colorId = colorBean.getColorId();
colorBean__resolvedKey = colorId;
}
}
/**
* Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
* Entity must attached to an entity context.
*/
@Generated(hash = 128553479)
public void delete() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.delete(this);
}
/**
* Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
* Entity must attached to an entity context.
*/
@Generated(hash = 1942392019)
public void refresh() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.refresh(this);
}
/**
* Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
* Entity must attached to an entity context.
*/
@Generated(hash = 713229351)
public void update() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.update(this);
}
/** called by internal mechanisms, do not call yourself. */
@Generated(hash = 505459956)
public void __setDaoSession(DaoSession daoSession) {
this.daoSession = daoSession;
myDao = daoSession != null ? daoSession.getFoodDao() : null;
}
} }
...@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType; ...@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** /**
* Master of DAO (schema version 23): knows all DAOs. * Master of DAO (schema version 24): knows all DAOs.
*/ */
public class DaoMaster extends AbstractDaoMaster { public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 23; public static final int SCHEMA_VERSION = 24;
/** Creates underlying database table using DAOs. */ /** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) { public static void createAllTables(Database db, boolean ifNotExists) {
......
...@@ -38,64 +38,65 @@ public class FoodDao extends AbstractDao<Food, Long> { ...@@ -38,64 +38,65 @@ public class FoodDao extends AbstractDao<Food, Long> {
public final static Property FoodName1 = new Property(6, String.class, "foodName1", false, "FOOD_NAME1"); public final static Property FoodName1 = new Property(6, String.class, "foodName1", false, "FOOD_NAME1");
public final static Property FoodName2 = new Property(7, String.class, "foodName2", false, "FOOD_NAME2"); public final static Property FoodName2 = new Property(7, String.class, "foodName2", false, "FOOD_NAME2");
public final static Property Plu = new Property(8, String.class, "plu", false, "PLU"); public final static Property Plu = new Property(8, String.class, "plu", false, "PLU");
public final static Property PosFid = new Property(9, String.class, "posFid", false, "POS_FID"); public final static Property CustomType = new Property(9, Integer.class, "customType", false, "CUSTOM_TYPE");
public final static Property FoodDesc = new Property(10, String.class, "foodDesc", false, "FOOD_DESC"); public final static Property PosFid = new Property(10, String.class, "posFid", false, "POS_FID");
public final static Property LimitAmount = new Property(11, long.class, "limitAmount", false, "LIMIT_AMOUNT"); public final static Property FoodDesc = new Property(11, String.class, "foodDesc", false, "FOOD_DESC");
public final static Property LimitType = new Property(12, long.class, "limitType", false, "LIMIT_TYPE"); public final static Property LimitAmount = new Property(12, long.class, "limitAmount", false, "LIMIT_AMOUNT");
public final static Property FoodSummary = new Property(13, String.class, "foodSummary", false, "FOOD_SUMMARY"); public final static Property LimitType = new Property(13, long.class, "limitType", false, "LIMIT_TYPE");
public final static Property Invisible = new Property(14, long.class, "invisible", false, "INVISIBLE"); public final static Property FoodSummary = new Property(14, String.class, "foodSummary", false, "FOOD_SUMMARY");
public final static Property AutoMod = new Property(15, byte.class, "autoMod", false, "AUTO_MOD"); public final static Property Invisible = new Property(15, long.class, "invisible", false, "INVISIBLE");
public final static Property Price = new Property(16, double.class, "price", false, "PRICE"); public final static Property AutoMod = new Property(16, byte.class, "autoMod", false, "AUTO_MOD");
public final static Property MarketPrice = new Property(17, double.class, "marketPrice", false, "MARKET_PRICE"); public final static Property Price = new Property(17, double.class, "price", false, "PRICE");
public final static Property LunchboxPrice = new Property(18, double.class, "lunchboxPrice", false, "LUNCHBOX_PRICE"); public final static Property MarketPrice = new Property(18, double.class, "marketPrice", false, "MARKET_PRICE");
public final static Property ImgUrlSmall = new Property(19, String.class, "imgUrlSmall", false, "IMG_URL_SMALL"); public final static Property LunchboxPrice = new Property(19, double.class, "lunchboxPrice", false, "LUNCHBOX_PRICE");
public final static Property Imageurl = new Property(20, String.class, "imageurl", false, "IMAGEURL"); public final static Property ImgUrlSmall = new Property(20, String.class, "imgUrlSmall", false, "IMG_URL_SMALL");
public final static Property RiceponInvisible = new Property(21, long.class, "riceponInvisible", false, "RICEPON_INVISIBLE"); public final static Property Imageurl = new Property(21, String.class, "imageurl", false, "IMAGEURL");
public final static Property Cost = new Property(22, double.class, "cost", false, "COST"); public final static Property RiceponInvisible = new Property(22, long.class, "riceponInvisible", false, "RICEPON_INVISIBLE");
public final static Property Like = new Property(23, long.class, "like", false, "LIKE"); public final static Property Cost = new Property(23, double.class, "cost", false, "COST");
public final static Property TotalSold = new Property(24, long.class, "totalSold", false, "TOTAL_SOLD"); public final static Property Like = new Property(24, long.class, "like", false, "LIKE");
public final static Property IsSold = new Property(25, long.class, "isSold", false, "IS_SOLD"); public final static Property TotalSold = new Property(25, long.class, "totalSold", false, "TOTAL_SOLD");
public final static Property StartDate = new Property(26, java.util.Date.class, "startDate", false, "START_DATE"); public final static Property IsSold = new Property(26, long.class, "isSold", false, "IS_SOLD");
public final static Property EndDate = new Property(27, java.util.Date.class, "endDate", false, "END_DATE"); public final static Property StartDate = new Property(27, java.util.Date.class, "startDate", false, "START_DATE");
public final static Property CreateBy = new Property(28, String.class, "createBy", false, "CREATE_BY"); public final static Property EndDate = new Property(28, java.util.Date.class, "endDate", false, "END_DATE");
public final static Property CreateTime = new Property(29, java.util.Date.class, "createTime", false, "CREATE_TIME"); public final static Property CreateBy = new Property(29, String.class, "createBy", false, "CREATE_BY");
public final static Property UpdateBy = new Property(30, String.class, "updateBy", false, "UPDATE_BY"); public final static Property CreateTime = new Property(30, java.util.Date.class, "createTime", false, "CREATE_TIME");
public final static Property UpdateTime = new Property(31, java.util.Date.class, "updateTime", false, "UPDATE_TIME"); public final static Property UpdateBy = new Property(31, String.class, "updateBy", false, "UPDATE_BY");
public final static Property PeriodId = new Property(32, long.class, "periodId", false, "PERIOD_ID"); public final static Property UpdateTime = new Property(32, java.util.Date.class, "updateTime", false, "UPDATE_TIME");
public final static Property AbleDiscount = new Property(33, long.class, "ableDiscount", false, "ABLE_DISCOUNT"); public final static Property PeriodId = new Property(33, long.class, "periodId", false, "PERIOD_ID");
public final static Property Takeaway = new Property(34, long.class, "takeaway", false, "TAKEAWAY"); public final static Property AbleDiscount = new Property(34, long.class, "ableDiscount", false, "ABLE_DISCOUNT");
public final static Property BlueEdit = new Property(35, long.class, "blueEdit", false, "BLUE_EDIT"); public final static Property Takeaway = new Property(35, long.class, "takeaway", false, "TAKEAWAY");
public final static Property CartEdit = new Property(36, long.class, "cartEdit", false, "CART_EDIT"); public final static Property BlueEdit = new Property(36, long.class, "blueEdit", false, "BLUE_EDIT");
public final static Property AutoMerge = new Property(37, long.class, "autoMerge", false, "AUTO_MERGE"); public final static Property CartEdit = new Property(37, long.class, "cartEdit", false, "CART_EDIT");
public final static Property PrintSeting = new Property(38, String.class, "printSeting", false, "PRINT_SETING"); public final static Property AutoMerge = new Property(38, long.class, "autoMerge", false, "AUTO_MERGE");
public final static Property IsPrintQueueCode = new Property(39, long.class, "isPrintQueueCode", false, "IS_PRINT_QUEUE_CODE"); public final static Property PrintSeting = new Property(39, String.class, "printSeting", false, "PRINT_SETING");
public final static Property QueueHeadId = new Property(40, long.class, "queueHeadId", false, "QUEUE_HEAD_ID"); public final static Property IsPrintQueueCode = new Property(40, long.class, "isPrintQueueCode", false, "IS_PRINT_QUEUE_CODE");
public final static Property Approve = new Property(41, long.class, "approve", false, "APPROVE"); public final static Property QueueHeadId = new Property(41, long.class, "queueHeadId", false, "QUEUE_HEAD_ID");
public final static Property PrintFont = new Property(42, long.class, "printFont", false, "PRINT_FONT"); public final static Property Approve = new Property(42, long.class, "approve", false, "APPROVE");
public final static Property AdvPrice = new Property(43, long.class, "advPrice", false, "ADV_PRICE"); public final static Property PrintFont = new Property(43, long.class, "printFont", false, "PRINT_FONT");
public final static Property PrintToBill = new Property(44, long.class, "printToBill", false, "PRINT_TO_BILL"); public final static Property AdvPrice = new Property(44, long.class, "advPrice", false, "ADV_PRICE");
public final static Property PointsAdd = new Property(45, double.class, "pointsAdd", false, "POINTS_ADD"); public final static Property PrintToBill = new Property(45, long.class, "printToBill", false, "PRINT_TO_BILL");
public final static Property PointsRatio = new Property(46, long.class, "pointsRatio", false, "POINTS_RATIO"); public final static Property PointsAdd = new Property(46, double.class, "pointsAdd", false, "POINTS_ADD");
public final static Property PointsRedeem = new Property(47, double.class, "pointsRedeem", false, "POINTS_REDEEM"); public final static Property PointsRatio = new Property(47, long.class, "pointsRatio", false, "POINTS_RATIO");
public final static Property KtPrintMainItem = new Property(48, long.class, "ktPrintMainItem", false, "KT_PRINT_MAIN_ITEM"); public final static Property PointsRedeem = new Property(48, double.class, "pointsRedeem", false, "POINTS_REDEEM");
public final static Property KtShowPrice = new Property(49, long.class, "ktShowPrice", false, "KT_SHOW_PRICE"); public final static Property KtPrintMainItem = new Property(49, long.class, "ktPrintMainItem", false, "KT_PRINT_MAIN_ITEM");
public final static Property PrintTo = new Property(50, long.class, "printTo", false, "PRINT_TO"); public final static Property KtShowPrice = new Property(50, long.class, "ktShowPrice", false, "KT_SHOW_PRICE");
public final static Property ToPax = new Property(51, long.class, "toPax", false, "TO_PAX"); public final static Property PrintTo = new Property(51, long.class, "printTo", false, "PRINT_TO");
public final static Property FoodType = new Property(52, long.class, "foodType", false, "FOOD_TYPE"); public final static Property ToPax = new Property(52, long.class, "toPax", false, "TO_PAX");
public final static Property MajorMainId = new Property(53, long.class, "majorMainId", false, "MAJOR_MAIN_ID"); public final static Property FoodType = new Property(53, long.class, "foodType", false, "FOOD_TYPE");
public final static Property DeptId = new Property(54, long.class, "deptId", false, "DEPT_ID"); public final static Property MajorMainId = new Property(54, long.class, "majorMainId", false, "MAJOR_MAIN_ID");
public final static Property ServiceCharge = new Property(55, byte.class, "serviceCharge", false, "SERVICE_CHARGE"); public final static Property DeptId = new Property(55, long.class, "deptId", false, "DEPT_ID");
public final static Property Conditions = new Property(56, long.class, "conditions", false, "CONDITIONS"); public final static Property ServiceCharge = new Property(56, byte.class, "serviceCharge", false, "SERVICE_CHARGE");
public final static Property IsRt = new Property(57, long.class, "isRt", false, "IS_RT"); public final static Property Conditions = new Property(57, long.class, "conditions", false, "CONDITIONS");
public final static Property Deletes = new Property(58, long.class, "deletes", false, "DELETES"); public final static Property IsRt = new Property(58, long.class, "isRt", false, "IS_RT");
public final static Property IsTimingFood = new Property(59, long.class, "isTimingFood", false, "IS_TIMING_FOOD"); public final static Property Deletes = new Property(59, long.class, "deletes", false, "DELETES");
public final static Property MinLongTime = new Property(60, long.class, "minLongTime", false, "MIN_LONG_TIME"); public final static Property IsTimingFood = new Property(60, long.class, "isTimingFood", false, "IS_TIMING_FOOD");
public final static Property UnitTime = new Property(61, long.class, "unitTime", false, "UNIT_TIME"); public final static Property MinLongTime = new Property(61, long.class, "minLongTime", false, "MIN_LONG_TIME");
public final static Property UnitPrice = new Property(62, double.class, "unitPrice", false, "UNIT_PRICE"); public final static Property UnitTime = new Property(62, long.class, "unitTime", false, "UNIT_TIME");
public final static Property FreeLongTime = new Property(63, long.class, "freeLongTime", false, "FREE_LONG_TIME"); public final static Property UnitPrice = new Property(63, double.class, "unitPrice", false, "UNIT_PRICE");
public final static Property FreePeriodBegin = new Property(64, java.util.Date.class, "freePeriodBegin", false, "FREE_PERIOD_BEGIN"); public final static Property FreeLongTime = new Property(64, long.class, "freeLongTime", false, "FREE_LONG_TIME");
public final static Property IsStatistic = new Property(65, long.class, "isStatistic", false, "IS_STATISTIC"); public final static Property FreePeriodBegin = new Property(65, java.util.Date.class, "freePeriodBegin", false, "FREE_PERIOD_BEGIN");
public final static Property ColorId = new Property(66, long.class, "colorId", false, "COLOR_ID"); public final static Property IsStatistic = new Property(66, long.class, "isStatistic", false, "IS_STATISTIC");
public final static Property ColorId = new Property(67, long.class, "colorId", false, "COLOR_ID");
} }
private DaoSession daoSession; private DaoSession daoSession;
...@@ -123,64 +124,65 @@ public class FoodDao extends AbstractDao<Food, Long> { ...@@ -123,64 +124,65 @@ public class FoodDao extends AbstractDao<Food, Long> {
"\"FOOD_NAME1\" TEXT," + // 6: foodName1 "\"FOOD_NAME1\" TEXT," + // 6: foodName1
"\"FOOD_NAME2\" TEXT," + // 7: foodName2 "\"FOOD_NAME2\" TEXT," + // 7: foodName2
"\"PLU\" TEXT," + // 8: plu "\"PLU\" TEXT," + // 8: plu
"\"POS_FID\" TEXT," + // 9: posFid "\"CUSTOM_TYPE\" INTEGER," + // 9: customType
"\"FOOD_DESC\" TEXT," + // 10: foodDesc "\"POS_FID\" TEXT," + // 10: posFid
"\"LIMIT_AMOUNT\" INTEGER NOT NULL ," + // 11: limitAmount "\"FOOD_DESC\" TEXT," + // 11: foodDesc
"\"LIMIT_TYPE\" INTEGER NOT NULL ," + // 12: limitType "\"LIMIT_AMOUNT\" INTEGER NOT NULL ," + // 12: limitAmount
"\"FOOD_SUMMARY\" TEXT," + // 13: foodSummary "\"LIMIT_TYPE\" INTEGER NOT NULL ," + // 13: limitType
"\"INVISIBLE\" INTEGER NOT NULL ," + // 14: invisible "\"FOOD_SUMMARY\" TEXT," + // 14: foodSummary
"\"AUTO_MOD\" INTEGER NOT NULL ," + // 15: autoMod "\"INVISIBLE\" INTEGER NOT NULL ," + // 15: invisible
"\"PRICE\" REAL NOT NULL ," + // 16: price "\"AUTO_MOD\" INTEGER NOT NULL ," + // 16: autoMod
"\"MARKET_PRICE\" REAL NOT NULL ," + // 17: marketPrice "\"PRICE\" REAL NOT NULL ," + // 17: price
"\"LUNCHBOX_PRICE\" REAL NOT NULL ," + // 18: lunchboxPrice "\"MARKET_PRICE\" REAL NOT NULL ," + // 18: marketPrice
"\"IMG_URL_SMALL\" TEXT," + // 19: imgUrlSmall "\"LUNCHBOX_PRICE\" REAL NOT NULL ," + // 19: lunchboxPrice
"\"IMAGEURL\" TEXT," + // 20: imageurl "\"IMG_URL_SMALL\" TEXT," + // 20: imgUrlSmall
"\"RICEPON_INVISIBLE\" INTEGER NOT NULL ," + // 21: riceponInvisible "\"IMAGEURL\" TEXT," + // 21: imageurl
"\"COST\" REAL NOT NULL ," + // 22: cost "\"RICEPON_INVISIBLE\" INTEGER NOT NULL ," + // 22: riceponInvisible
"\"LIKE\" INTEGER NOT NULL ," + // 23: like "\"COST\" REAL NOT NULL ," + // 23: cost
"\"TOTAL_SOLD\" INTEGER NOT NULL ," + // 24: totalSold "\"LIKE\" INTEGER NOT NULL ," + // 24: like
"\"IS_SOLD\" INTEGER NOT NULL ," + // 25: isSold "\"TOTAL_SOLD\" INTEGER NOT NULL ," + // 25: totalSold
"\"START_DATE\" INTEGER," + // 26: startDate "\"IS_SOLD\" INTEGER NOT NULL ," + // 26: isSold
"\"END_DATE\" INTEGER," + // 27: endDate "\"START_DATE\" INTEGER," + // 27: startDate
"\"CREATE_BY\" TEXT," + // 28: createBy "\"END_DATE\" INTEGER," + // 28: endDate
"\"CREATE_TIME\" INTEGER," + // 29: createTime "\"CREATE_BY\" TEXT," + // 29: createBy
"\"UPDATE_BY\" TEXT," + // 30: updateBy "\"CREATE_TIME\" INTEGER," + // 30: createTime
"\"UPDATE_TIME\" INTEGER," + // 31: updateTime "\"UPDATE_BY\" TEXT," + // 31: updateBy
"\"PERIOD_ID\" INTEGER NOT NULL ," + // 32: periodId "\"UPDATE_TIME\" INTEGER," + // 32: updateTime
"\"ABLE_DISCOUNT\" INTEGER NOT NULL ," + // 33: ableDiscount "\"PERIOD_ID\" INTEGER NOT NULL ," + // 33: periodId
"\"TAKEAWAY\" INTEGER NOT NULL ," + // 34: takeaway "\"ABLE_DISCOUNT\" INTEGER NOT NULL ," + // 34: ableDiscount
"\"BLUE_EDIT\" INTEGER NOT NULL ," + // 35: blueEdit "\"TAKEAWAY\" INTEGER NOT NULL ," + // 35: takeaway
"\"CART_EDIT\" INTEGER NOT NULL ," + // 36: cartEdit "\"BLUE_EDIT\" INTEGER NOT NULL ," + // 36: blueEdit
"\"AUTO_MERGE\" INTEGER NOT NULL ," + // 37: autoMerge "\"CART_EDIT\" INTEGER NOT NULL ," + // 37: cartEdit
"\"PRINT_SETING\" TEXT," + // 38: printSeting "\"AUTO_MERGE\" INTEGER NOT NULL ," + // 38: autoMerge
"\"IS_PRINT_QUEUE_CODE\" INTEGER NOT NULL ," + // 39: isPrintQueueCode "\"PRINT_SETING\" TEXT," + // 39: printSeting
"\"QUEUE_HEAD_ID\" INTEGER NOT NULL ," + // 40: queueHeadId "\"IS_PRINT_QUEUE_CODE\" INTEGER NOT NULL ," + // 40: isPrintQueueCode
"\"APPROVE\" INTEGER NOT NULL ," + // 41: approve "\"QUEUE_HEAD_ID\" INTEGER NOT NULL ," + // 41: queueHeadId
"\"PRINT_FONT\" INTEGER NOT NULL ," + // 42: printFont "\"APPROVE\" INTEGER NOT NULL ," + // 42: approve
"\"ADV_PRICE\" INTEGER NOT NULL ," + // 43: advPrice "\"PRINT_FONT\" INTEGER NOT NULL ," + // 43: printFont
"\"PRINT_TO_BILL\" INTEGER NOT NULL ," + // 44: printToBill "\"ADV_PRICE\" INTEGER NOT NULL ," + // 44: advPrice
"\"POINTS_ADD\" REAL NOT NULL ," + // 45: pointsAdd "\"PRINT_TO_BILL\" INTEGER NOT NULL ," + // 45: printToBill
"\"POINTS_RATIO\" INTEGER NOT NULL ," + // 46: pointsRatio "\"POINTS_ADD\" REAL NOT NULL ," + // 46: pointsAdd
"\"POINTS_REDEEM\" REAL NOT NULL ," + // 47: pointsRedeem "\"POINTS_RATIO\" INTEGER NOT NULL ," + // 47: pointsRatio
"\"KT_PRINT_MAIN_ITEM\" INTEGER NOT NULL ," + // 48: ktPrintMainItem "\"POINTS_REDEEM\" REAL NOT NULL ," + // 48: pointsRedeem
"\"KT_SHOW_PRICE\" INTEGER NOT NULL ," + // 49: ktShowPrice "\"KT_PRINT_MAIN_ITEM\" INTEGER NOT NULL ," + // 49: ktPrintMainItem
"\"PRINT_TO\" INTEGER NOT NULL ," + // 50: printTo "\"KT_SHOW_PRICE\" INTEGER NOT NULL ," + // 50: ktShowPrice
"\"TO_PAX\" INTEGER NOT NULL ," + // 51: toPax "\"PRINT_TO\" INTEGER NOT NULL ," + // 51: printTo
"\"FOOD_TYPE\" INTEGER NOT NULL ," + // 52: foodType "\"TO_PAX\" INTEGER NOT NULL ," + // 52: toPax
"\"MAJOR_MAIN_ID\" INTEGER NOT NULL ," + // 53: majorMainId "\"FOOD_TYPE\" INTEGER NOT NULL ," + // 53: foodType
"\"DEPT_ID\" INTEGER NOT NULL ," + // 54: deptId "\"MAJOR_MAIN_ID\" INTEGER NOT NULL ," + // 54: majorMainId
"\"SERVICE_CHARGE\" INTEGER NOT NULL ," + // 55: serviceCharge "\"DEPT_ID\" INTEGER NOT NULL ," + // 55: deptId
"\"CONDITIONS\" INTEGER NOT NULL ," + // 56: conditions "\"SERVICE_CHARGE\" INTEGER NOT NULL ," + // 56: serviceCharge
"\"IS_RT\" INTEGER NOT NULL ," + // 57: isRt "\"CONDITIONS\" INTEGER NOT NULL ," + // 57: conditions
"\"DELETES\" INTEGER NOT NULL ," + // 58: deletes "\"IS_RT\" INTEGER NOT NULL ," + // 58: isRt
"\"IS_TIMING_FOOD\" INTEGER NOT NULL ," + // 59: isTimingFood "\"DELETES\" INTEGER NOT NULL ," + // 59: deletes
"\"MIN_LONG_TIME\" INTEGER NOT NULL ," + // 60: minLongTime "\"IS_TIMING_FOOD\" INTEGER NOT NULL ," + // 60: isTimingFood
"\"UNIT_TIME\" INTEGER NOT NULL ," + // 61: unitTime "\"MIN_LONG_TIME\" INTEGER NOT NULL ," + // 61: minLongTime
"\"UNIT_PRICE\" REAL NOT NULL ," + // 62: unitPrice "\"UNIT_TIME\" INTEGER NOT NULL ," + // 62: unitTime
"\"FREE_LONG_TIME\" INTEGER NOT NULL ," + // 63: freeLongTime "\"UNIT_PRICE\" REAL NOT NULL ," + // 63: unitPrice
"\"FREE_PERIOD_BEGIN\" INTEGER," + // 64: freePeriodBegin "\"FREE_LONG_TIME\" INTEGER NOT NULL ," + // 64: freeLongTime
"\"IS_STATISTIC\" INTEGER NOT NULL ," + // 65: isStatistic "\"FREE_PERIOD_BEGIN\" INTEGER," + // 65: freePeriodBegin
"\"COLOR_ID\" INTEGER NOT NULL );"); // 66: colorId "\"IS_STATISTIC\" INTEGER NOT NULL ," + // 66: isStatistic
"\"COLOR_ID\" INTEGER NOT NULL );"); // 67: colorId
} }
/** Drops the underlying database table. */ /** Drops the underlying database table. */
...@@ -222,115 +224,120 @@ public class FoodDao extends AbstractDao<Food, Long> { ...@@ -222,115 +224,120 @@ public class FoodDao extends AbstractDao<Food, Long> {
stmt.bindString(9, plu); stmt.bindString(9, plu);
} }
Integer customType = entity.getCustomType();
if (customType != null) {
stmt.bindLong(10, customType);
}
String posFid = entity.getPosFid(); String posFid = entity.getPosFid();
if (posFid != null) { if (posFid != null) {
stmt.bindString(10, posFid); stmt.bindString(11, posFid);
} }
String foodDesc = entity.getFoodDesc(); String foodDesc = entity.getFoodDesc();
if (foodDesc != null) { if (foodDesc != null) {
stmt.bindString(11, foodDesc); stmt.bindString(12, foodDesc);
} }
stmt.bindLong(12, entity.getLimitAmount()); stmt.bindLong(13, entity.getLimitAmount());
stmt.bindLong(13, entity.getLimitType()); stmt.bindLong(14, entity.getLimitType());
String foodSummary = entity.getFoodSummary(); String foodSummary = entity.getFoodSummary();
if (foodSummary != null) { if (foodSummary != null) {
stmt.bindString(14, foodSummary); stmt.bindString(15, foodSummary);
} }
stmt.bindLong(15, entity.getInvisible()); stmt.bindLong(16, entity.getInvisible());
stmt.bindLong(16, entity.getAutoMod()); stmt.bindLong(17, entity.getAutoMod());
stmt.bindDouble(17, entity.getPrice()); stmt.bindDouble(18, entity.getPrice());
stmt.bindDouble(18, entity.getMarketPrice()); stmt.bindDouble(19, entity.getMarketPrice());
stmt.bindDouble(19, entity.getLunchboxPrice()); stmt.bindDouble(20, entity.getLunchboxPrice());
String imgUrlSmall = entity.getImgUrlSmall(); String imgUrlSmall = entity.getImgUrlSmall();
if (imgUrlSmall != null) { if (imgUrlSmall != null) {
stmt.bindString(20, imgUrlSmall); stmt.bindString(21, imgUrlSmall);
} }
String imageurl = entity.getImageurl(); String imageurl = entity.getImageurl();
if (imageurl != null) { if (imageurl != null) {
stmt.bindString(21, imageurl); stmt.bindString(22, imageurl);
} }
stmt.bindLong(22, entity.getRiceponInvisible()); stmt.bindLong(23, entity.getRiceponInvisible());
stmt.bindDouble(23, entity.getCost()); stmt.bindDouble(24, entity.getCost());
stmt.bindLong(24, entity.getLike()); stmt.bindLong(25, entity.getLike());
stmt.bindLong(25, entity.getTotalSold()); stmt.bindLong(26, entity.getTotalSold());
stmt.bindLong(26, entity.getIsSold()); stmt.bindLong(27, entity.getIsSold());
java.util.Date startDate = entity.getStartDate(); java.util.Date startDate = entity.getStartDate();
if (startDate != null) { if (startDate != null) {
stmt.bindLong(27, startDate.getTime()); stmt.bindLong(28, startDate.getTime());
} }
java.util.Date endDate = entity.getEndDate(); java.util.Date endDate = entity.getEndDate();
if (endDate != null) { if (endDate != null) {
stmt.bindLong(28, endDate.getTime()); stmt.bindLong(29, endDate.getTime());
} }
String createBy = entity.getCreateBy(); String createBy = entity.getCreateBy();
if (createBy != null) { if (createBy != null) {
stmt.bindString(29, createBy); stmt.bindString(30, createBy);
} }
java.util.Date createTime = entity.getCreateTime(); java.util.Date createTime = entity.getCreateTime();
if (createTime != null) { if (createTime != null) {
stmt.bindLong(30, createTime.getTime()); stmt.bindLong(31, createTime.getTime());
} }
String updateBy = entity.getUpdateBy(); String updateBy = entity.getUpdateBy();
if (updateBy != null) { if (updateBy != null) {
stmt.bindString(31, updateBy); stmt.bindString(32, updateBy);
} }
java.util.Date updateTime = entity.getUpdateTime(); java.util.Date updateTime = entity.getUpdateTime();
if (updateTime != null) { if (updateTime != null) {
stmt.bindLong(32, updateTime.getTime()); stmt.bindLong(33, updateTime.getTime());
} }
stmt.bindLong(33, entity.getPeriodId()); stmt.bindLong(34, entity.getPeriodId());
stmt.bindLong(34, entity.getAbleDiscount()); stmt.bindLong(35, entity.getAbleDiscount());
stmt.bindLong(35, entity.getTakeaway()); stmt.bindLong(36, entity.getTakeaway());
stmt.bindLong(36, entity.getBlueEdit()); stmt.bindLong(37, entity.getBlueEdit());
stmt.bindLong(37, entity.getCartEdit()); stmt.bindLong(38, entity.getCartEdit());
stmt.bindLong(38, entity.getAutoMerge()); stmt.bindLong(39, entity.getAutoMerge());
String printSeting = entity.getPrintSeting(); String printSeting = entity.getPrintSeting();
if (printSeting != null) { if (printSeting != null) {
stmt.bindString(39, printSeting); stmt.bindString(40, printSeting);
} }
stmt.bindLong(40, entity.getIsPrintQueueCode()); stmt.bindLong(41, entity.getIsPrintQueueCode());
stmt.bindLong(41, entity.getQueueHeadId()); stmt.bindLong(42, entity.getQueueHeadId());
stmt.bindLong(42, entity.getApprove()); stmt.bindLong(43, entity.getApprove());
stmt.bindLong(43, entity.getPrintFont()); stmt.bindLong(44, entity.getPrintFont());
stmt.bindLong(44, entity.getAdvPrice()); stmt.bindLong(45, entity.getAdvPrice());
stmt.bindLong(45, entity.getPrintToBill()); stmt.bindLong(46, entity.getPrintToBill());
stmt.bindDouble(46, entity.getPointsAdd()); stmt.bindDouble(47, entity.getPointsAdd());
stmt.bindLong(47, entity.getPointsRatio()); stmt.bindLong(48, entity.getPointsRatio());
stmt.bindDouble(48, entity.getPointsRedeem()); stmt.bindDouble(49, entity.getPointsRedeem());
stmt.bindLong(49, entity.getKtPrintMainItem()); stmt.bindLong(50, entity.getKtPrintMainItem());
stmt.bindLong(50, entity.getKtShowPrice()); stmt.bindLong(51, entity.getKtShowPrice());
stmt.bindLong(51, entity.getPrintTo()); stmt.bindLong(52, entity.getPrintTo());
stmt.bindLong(52, entity.getToPax()); stmt.bindLong(53, entity.getToPax());
stmt.bindLong(53, entity.getFoodType()); stmt.bindLong(54, entity.getFoodType());
stmt.bindLong(54, entity.getMajorMainId()); stmt.bindLong(55, entity.getMajorMainId());
stmt.bindLong(55, entity.getDeptId()); stmt.bindLong(56, entity.getDeptId());
stmt.bindLong(56, entity.getServiceCharge()); stmt.bindLong(57, entity.getServiceCharge());
stmt.bindLong(57, entity.getConditions()); stmt.bindLong(58, entity.getConditions());
stmt.bindLong(58, entity.getIsRt()); stmt.bindLong(59, entity.getIsRt());
stmt.bindLong(59, entity.getDeletes()); stmt.bindLong(60, entity.getDeletes());
stmt.bindLong(60, entity.getIsTimingFood()); stmt.bindLong(61, entity.getIsTimingFood());
stmt.bindLong(61, entity.getMinLongTime()); stmt.bindLong(62, entity.getMinLongTime());
stmt.bindLong(62, entity.getUnitTime()); stmt.bindLong(63, entity.getUnitTime());
stmt.bindDouble(63, entity.getUnitPrice()); stmt.bindDouble(64, entity.getUnitPrice());
stmt.bindLong(64, entity.getFreeLongTime()); stmt.bindLong(65, entity.getFreeLongTime());
java.util.Date freePeriodBegin = entity.getFreePeriodBegin(); java.util.Date freePeriodBegin = entity.getFreePeriodBegin();
if (freePeriodBegin != null) { if (freePeriodBegin != null) {
stmt.bindLong(65, freePeriodBegin.getTime()); stmt.bindLong(66, freePeriodBegin.getTime());
} }
stmt.bindLong(66, entity.getIsStatistic()); stmt.bindLong(67, entity.getIsStatistic());
stmt.bindLong(67, entity.getColorId()); stmt.bindLong(68, entity.getColorId());
} }
@Override @Override
...@@ -366,115 +373,120 @@ public class FoodDao extends AbstractDao<Food, Long> { ...@@ -366,115 +373,120 @@ public class FoodDao extends AbstractDao<Food, Long> {
stmt.bindString(9, plu); stmt.bindString(9, plu);
} }
Integer customType = entity.getCustomType();
if (customType != null) {
stmt.bindLong(10, customType);
}
String posFid = entity.getPosFid(); String posFid = entity.getPosFid();
if (posFid != null) { if (posFid != null) {
stmt.bindString(10, posFid); stmt.bindString(11, posFid);
} }
String foodDesc = entity.getFoodDesc(); String foodDesc = entity.getFoodDesc();
if (foodDesc != null) { if (foodDesc != null) {
stmt.bindString(11, foodDesc); stmt.bindString(12, foodDesc);
} }
stmt.bindLong(12, entity.getLimitAmount()); stmt.bindLong(13, entity.getLimitAmount());
stmt.bindLong(13, entity.getLimitType()); stmt.bindLong(14, entity.getLimitType());
String foodSummary = entity.getFoodSummary(); String foodSummary = entity.getFoodSummary();
if (foodSummary != null) { if (foodSummary != null) {
stmt.bindString(14, foodSummary); stmt.bindString(15, foodSummary);
} }
stmt.bindLong(15, entity.getInvisible()); stmt.bindLong(16, entity.getInvisible());
stmt.bindLong(16, entity.getAutoMod()); stmt.bindLong(17, entity.getAutoMod());
stmt.bindDouble(17, entity.getPrice()); stmt.bindDouble(18, entity.getPrice());
stmt.bindDouble(18, entity.getMarketPrice()); stmt.bindDouble(19, entity.getMarketPrice());
stmt.bindDouble(19, entity.getLunchboxPrice()); stmt.bindDouble(20, entity.getLunchboxPrice());
String imgUrlSmall = entity.getImgUrlSmall(); String imgUrlSmall = entity.getImgUrlSmall();
if (imgUrlSmall != null) { if (imgUrlSmall != null) {
stmt.bindString(20, imgUrlSmall); stmt.bindString(21, imgUrlSmall);
} }
String imageurl = entity.getImageurl(); String imageurl = entity.getImageurl();
if (imageurl != null) { if (imageurl != null) {
stmt.bindString(21, imageurl); stmt.bindString(22, imageurl);
} }
stmt.bindLong(22, entity.getRiceponInvisible()); stmt.bindLong(23, entity.getRiceponInvisible());
stmt.bindDouble(23, entity.getCost()); stmt.bindDouble(24, entity.getCost());
stmt.bindLong(24, entity.getLike()); stmt.bindLong(25, entity.getLike());
stmt.bindLong(25, entity.getTotalSold()); stmt.bindLong(26, entity.getTotalSold());
stmt.bindLong(26, entity.getIsSold()); stmt.bindLong(27, entity.getIsSold());
java.util.Date startDate = entity.getStartDate(); java.util.Date startDate = entity.getStartDate();
if (startDate != null) { if (startDate != null) {
stmt.bindLong(27, startDate.getTime()); stmt.bindLong(28, startDate.getTime());
} }
java.util.Date endDate = entity.getEndDate(); java.util.Date endDate = entity.getEndDate();
if (endDate != null) { if (endDate != null) {
stmt.bindLong(28, endDate.getTime()); stmt.bindLong(29, endDate.getTime());
} }
String createBy = entity.getCreateBy(); String createBy = entity.getCreateBy();
if (createBy != null) { if (createBy != null) {
stmt.bindString(29, createBy); stmt.bindString(30, createBy);
} }
java.util.Date createTime = entity.getCreateTime(); java.util.Date createTime = entity.getCreateTime();
if (createTime != null) { if (createTime != null) {
stmt.bindLong(30, createTime.getTime()); stmt.bindLong(31, createTime.getTime());
} }
String updateBy = entity.getUpdateBy(); String updateBy = entity.getUpdateBy();
if (updateBy != null) { if (updateBy != null) {
stmt.bindString(31, updateBy); stmt.bindString(32, updateBy);
} }
java.util.Date updateTime = entity.getUpdateTime(); java.util.Date updateTime = entity.getUpdateTime();
if (updateTime != null) { if (updateTime != null) {
stmt.bindLong(32, updateTime.getTime()); stmt.bindLong(33, updateTime.getTime());
} }
stmt.bindLong(33, entity.getPeriodId()); stmt.bindLong(34, entity.getPeriodId());
stmt.bindLong(34, entity.getAbleDiscount()); stmt.bindLong(35, entity.getAbleDiscount());
stmt.bindLong(35, entity.getTakeaway()); stmt.bindLong(36, entity.getTakeaway());
stmt.bindLong(36, entity.getBlueEdit()); stmt.bindLong(37, entity.getBlueEdit());
stmt.bindLong(37, entity.getCartEdit()); stmt.bindLong(38, entity.getCartEdit());
stmt.bindLong(38, entity.getAutoMerge()); stmt.bindLong(39, entity.getAutoMerge());
String printSeting = entity.getPrintSeting(); String printSeting = entity.getPrintSeting();
if (printSeting != null) { if (printSeting != null) {
stmt.bindString(39, printSeting); stmt.bindString(40, printSeting);
} }
stmt.bindLong(40, entity.getIsPrintQueueCode()); stmt.bindLong(41, entity.getIsPrintQueueCode());
stmt.bindLong(41, entity.getQueueHeadId()); stmt.bindLong(42, entity.getQueueHeadId());
stmt.bindLong(42, entity.getApprove()); stmt.bindLong(43, entity.getApprove());
stmt.bindLong(43, entity.getPrintFont()); stmt.bindLong(44, entity.getPrintFont());
stmt.bindLong(44, entity.getAdvPrice()); stmt.bindLong(45, entity.getAdvPrice());
stmt.bindLong(45, entity.getPrintToBill()); stmt.bindLong(46, entity.getPrintToBill());
stmt.bindDouble(46, entity.getPointsAdd()); stmt.bindDouble(47, entity.getPointsAdd());
stmt.bindLong(47, entity.getPointsRatio()); stmt.bindLong(48, entity.getPointsRatio());
stmt.bindDouble(48, entity.getPointsRedeem()); stmt.bindDouble(49, entity.getPointsRedeem());
stmt.bindLong(49, entity.getKtPrintMainItem()); stmt.bindLong(50, entity.getKtPrintMainItem());
stmt.bindLong(50, entity.getKtShowPrice()); stmt.bindLong(51, entity.getKtShowPrice());
stmt.bindLong(51, entity.getPrintTo()); stmt.bindLong(52, entity.getPrintTo());
stmt.bindLong(52, entity.getToPax()); stmt.bindLong(53, entity.getToPax());
stmt.bindLong(53, entity.getFoodType()); stmt.bindLong(54, entity.getFoodType());
stmt.bindLong(54, entity.getMajorMainId()); stmt.bindLong(55, entity.getMajorMainId());
stmt.bindLong(55, entity.getDeptId()); stmt.bindLong(56, entity.getDeptId());
stmt.bindLong(56, entity.getServiceCharge()); stmt.bindLong(57, entity.getServiceCharge());
stmt.bindLong(57, entity.getConditions()); stmt.bindLong(58, entity.getConditions());
stmt.bindLong(58, entity.getIsRt()); stmt.bindLong(59, entity.getIsRt());
stmt.bindLong(59, entity.getDeletes()); stmt.bindLong(60, entity.getDeletes());
stmt.bindLong(60, entity.getIsTimingFood()); stmt.bindLong(61, entity.getIsTimingFood());
stmt.bindLong(61, entity.getMinLongTime()); stmt.bindLong(62, entity.getMinLongTime());
stmt.bindLong(62, entity.getUnitTime()); stmt.bindLong(63, entity.getUnitTime());
stmt.bindDouble(63, entity.getUnitPrice()); stmt.bindDouble(64, entity.getUnitPrice());
stmt.bindLong(64, entity.getFreeLongTime()); stmt.bindLong(65, entity.getFreeLongTime());
java.util.Date freePeriodBegin = entity.getFreePeriodBegin(); java.util.Date freePeriodBegin = entity.getFreePeriodBegin();
if (freePeriodBegin != null) { if (freePeriodBegin != null) {
stmt.bindLong(65, freePeriodBegin.getTime()); stmt.bindLong(66, freePeriodBegin.getTime());
} }
stmt.bindLong(66, entity.getIsStatistic()); stmt.bindLong(67, entity.getIsStatistic());
stmt.bindLong(67, entity.getColorId()); stmt.bindLong(68, entity.getColorId());
} }
@Override @Override
...@@ -500,64 +512,65 @@ public class FoodDao extends AbstractDao<Food, Long> { ...@@ -500,64 +512,65 @@ public class FoodDao extends AbstractDao<Food, Long> {
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // foodName1 cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // foodName1
cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // foodName2 cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // foodName2
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // plu cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // plu
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // posFid cursor.isNull(offset + 9) ? null : cursor.getInt(offset + 9), // customType
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // foodDesc cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // posFid
cursor.getLong(offset + 11), // limitAmount cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // foodDesc
cursor.getLong(offset + 12), // limitType cursor.getLong(offset + 12), // limitAmount
cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // foodSummary cursor.getLong(offset + 13), // limitType
cursor.getLong(offset + 14), // invisible cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // foodSummary
(byte) cursor.getShort(offset + 15), // autoMod cursor.getLong(offset + 15), // invisible
cursor.getDouble(offset + 16), // price (byte) cursor.getShort(offset + 16), // autoMod
cursor.getDouble(offset + 17), // marketPrice cursor.getDouble(offset + 17), // price
cursor.getDouble(offset + 18), // lunchboxPrice cursor.getDouble(offset + 18), // marketPrice
cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // imgUrlSmall cursor.getDouble(offset + 19), // lunchboxPrice
cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // imageurl cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // imgUrlSmall
cursor.getLong(offset + 21), // riceponInvisible cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // imageurl
cursor.getDouble(offset + 22), // cost cursor.getLong(offset + 22), // riceponInvisible
cursor.getLong(offset + 23), // like cursor.getDouble(offset + 23), // cost
cursor.getLong(offset + 24), // totalSold cursor.getLong(offset + 24), // like
cursor.getLong(offset + 25), // isSold cursor.getLong(offset + 25), // totalSold
cursor.isNull(offset + 26) ? null : new java.util.Date(cursor.getLong(offset + 26)), // startDate cursor.getLong(offset + 26), // isSold
cursor.isNull(offset + 27) ? null : new java.util.Date(cursor.getLong(offset + 27)), // endDate cursor.isNull(offset + 27) ? null : new java.util.Date(cursor.getLong(offset + 27)), // startDate
cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // createBy cursor.isNull(offset + 28) ? null : new java.util.Date(cursor.getLong(offset + 28)), // endDate
cursor.isNull(offset + 29) ? null : new java.util.Date(cursor.getLong(offset + 29)), // createTime cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // createBy
cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // updateBy cursor.isNull(offset + 30) ? null : new java.util.Date(cursor.getLong(offset + 30)), // createTime
cursor.isNull(offset + 31) ? null : new java.util.Date(cursor.getLong(offset + 31)), // updateTime cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // updateBy
cursor.getLong(offset + 32), // periodId cursor.isNull(offset + 32) ? null : new java.util.Date(cursor.getLong(offset + 32)), // updateTime
cursor.getLong(offset + 33), // ableDiscount cursor.getLong(offset + 33), // periodId
cursor.getLong(offset + 34), // takeaway cursor.getLong(offset + 34), // ableDiscount
cursor.getLong(offset + 35), // blueEdit cursor.getLong(offset + 35), // takeaway
cursor.getLong(offset + 36), // cartEdit cursor.getLong(offset + 36), // blueEdit
cursor.getLong(offset + 37), // autoMerge cursor.getLong(offset + 37), // cartEdit
cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // printSeting cursor.getLong(offset + 38), // autoMerge
cursor.getLong(offset + 39), // isPrintQueueCode cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // printSeting
cursor.getLong(offset + 40), // queueHeadId cursor.getLong(offset + 40), // isPrintQueueCode
cursor.getLong(offset + 41), // approve cursor.getLong(offset + 41), // queueHeadId
cursor.getLong(offset + 42), // printFont cursor.getLong(offset + 42), // approve
cursor.getLong(offset + 43), // advPrice cursor.getLong(offset + 43), // printFont
cursor.getLong(offset + 44), // printToBill cursor.getLong(offset + 44), // advPrice
cursor.getDouble(offset + 45), // pointsAdd cursor.getLong(offset + 45), // printToBill
cursor.getLong(offset + 46), // pointsRatio cursor.getDouble(offset + 46), // pointsAdd
cursor.getDouble(offset + 47), // pointsRedeem cursor.getLong(offset + 47), // pointsRatio
cursor.getLong(offset + 48), // ktPrintMainItem cursor.getDouble(offset + 48), // pointsRedeem
cursor.getLong(offset + 49), // ktShowPrice cursor.getLong(offset + 49), // ktPrintMainItem
cursor.getLong(offset + 50), // printTo cursor.getLong(offset + 50), // ktShowPrice
cursor.getLong(offset + 51), // toPax cursor.getLong(offset + 51), // printTo
cursor.getLong(offset + 52), // foodType cursor.getLong(offset + 52), // toPax
cursor.getLong(offset + 53), // majorMainId cursor.getLong(offset + 53), // foodType
cursor.getLong(offset + 54), // deptId cursor.getLong(offset + 54), // majorMainId
(byte) cursor.getShort(offset + 55), // serviceCharge cursor.getLong(offset + 55), // deptId
cursor.getLong(offset + 56), // conditions (byte) cursor.getShort(offset + 56), // serviceCharge
cursor.getLong(offset + 57), // isRt cursor.getLong(offset + 57), // conditions
cursor.getLong(offset + 58), // deletes cursor.getLong(offset + 58), // isRt
cursor.getLong(offset + 59), // isTimingFood cursor.getLong(offset + 59), // deletes
cursor.getLong(offset + 60), // minLongTime cursor.getLong(offset + 60), // isTimingFood
cursor.getLong(offset + 61), // unitTime cursor.getLong(offset + 61), // minLongTime
cursor.getDouble(offset + 62), // unitPrice cursor.getLong(offset + 62), // unitTime
cursor.getLong(offset + 63), // freeLongTime cursor.getDouble(offset + 63), // unitPrice
cursor.isNull(offset + 64) ? null : new java.util.Date(cursor.getLong(offset + 64)), // freePeriodBegin cursor.getLong(offset + 64), // freeLongTime
cursor.getLong(offset + 65), // isStatistic cursor.isNull(offset + 65) ? null : new java.util.Date(cursor.getLong(offset + 65)), // freePeriodBegin
cursor.getLong(offset + 66) // colorId cursor.getLong(offset + 66), // isStatistic
cursor.getLong(offset + 67) // colorId
); );
return entity; return entity;
} }
...@@ -573,64 +586,65 @@ public class FoodDao extends AbstractDao<Food, Long> { ...@@ -573,64 +586,65 @@ public class FoodDao extends AbstractDao<Food, Long> {
entity.setFoodName1(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6)); entity.setFoodName1(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
entity.setFoodName2(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7)); entity.setFoodName2(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
entity.setPlu(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8)); entity.setPlu(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
entity.setPosFid(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setCustomType(cursor.isNull(offset + 9) ? null : cursor.getInt(offset + 9));
entity.setFoodDesc(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); entity.setPosFid(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
entity.setLimitAmount(cursor.getLong(offset + 11)); entity.setFoodDesc(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
entity.setLimitType(cursor.getLong(offset + 12)); entity.setLimitAmount(cursor.getLong(offset + 12));
entity.setFoodSummary(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13)); entity.setLimitType(cursor.getLong(offset + 13));
entity.setInvisible(cursor.getLong(offset + 14)); entity.setFoodSummary(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
entity.setAutoMod((byte) cursor.getShort(offset + 15)); entity.setInvisible(cursor.getLong(offset + 15));
entity.setPrice(cursor.getDouble(offset + 16)); entity.setAutoMod((byte) cursor.getShort(offset + 16));
entity.setMarketPrice(cursor.getDouble(offset + 17)); entity.setPrice(cursor.getDouble(offset + 17));
entity.setLunchboxPrice(cursor.getDouble(offset + 18)); entity.setMarketPrice(cursor.getDouble(offset + 18));
entity.setImgUrlSmall(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19)); entity.setLunchboxPrice(cursor.getDouble(offset + 19));
entity.setImageurl(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20)); entity.setImgUrlSmall(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
entity.setRiceponInvisible(cursor.getLong(offset + 21)); entity.setImageurl(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
entity.setCost(cursor.getDouble(offset + 22)); entity.setRiceponInvisible(cursor.getLong(offset + 22));
entity.setLike(cursor.getLong(offset + 23)); entity.setCost(cursor.getDouble(offset + 23));
entity.setTotalSold(cursor.getLong(offset + 24)); entity.setLike(cursor.getLong(offset + 24));
entity.setIsSold(cursor.getLong(offset + 25)); entity.setTotalSold(cursor.getLong(offset + 25));
entity.setStartDate(cursor.isNull(offset + 26) ? null : new java.util.Date(cursor.getLong(offset + 26))); entity.setIsSold(cursor.getLong(offset + 26));
entity.setEndDate(cursor.isNull(offset + 27) ? null : new java.util.Date(cursor.getLong(offset + 27))); entity.setStartDate(cursor.isNull(offset + 27) ? null : new java.util.Date(cursor.getLong(offset + 27)));
entity.setCreateBy(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28)); entity.setEndDate(cursor.isNull(offset + 28) ? null : new java.util.Date(cursor.getLong(offset + 28)));
entity.setCreateTime(cursor.isNull(offset + 29) ? null : new java.util.Date(cursor.getLong(offset + 29))); entity.setCreateBy(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
entity.setUpdateBy(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30)); entity.setCreateTime(cursor.isNull(offset + 30) ? null : new java.util.Date(cursor.getLong(offset + 30)));
entity.setUpdateTime(cursor.isNull(offset + 31) ? null : new java.util.Date(cursor.getLong(offset + 31))); entity.setUpdateBy(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
entity.setPeriodId(cursor.getLong(offset + 32)); entity.setUpdateTime(cursor.isNull(offset + 32) ? null : new java.util.Date(cursor.getLong(offset + 32)));
entity.setAbleDiscount(cursor.getLong(offset + 33)); entity.setPeriodId(cursor.getLong(offset + 33));
entity.setTakeaway(cursor.getLong(offset + 34)); entity.setAbleDiscount(cursor.getLong(offset + 34));
entity.setBlueEdit(cursor.getLong(offset + 35)); entity.setTakeaway(cursor.getLong(offset + 35));
entity.setCartEdit(cursor.getLong(offset + 36)); entity.setBlueEdit(cursor.getLong(offset + 36));
entity.setAutoMerge(cursor.getLong(offset + 37)); entity.setCartEdit(cursor.getLong(offset + 37));
entity.setPrintSeting(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38)); entity.setAutoMerge(cursor.getLong(offset + 38));
entity.setIsPrintQueueCode(cursor.getLong(offset + 39)); entity.setPrintSeting(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
entity.setQueueHeadId(cursor.getLong(offset + 40)); entity.setIsPrintQueueCode(cursor.getLong(offset + 40));
entity.setApprove(cursor.getLong(offset + 41)); entity.setQueueHeadId(cursor.getLong(offset + 41));
entity.setPrintFont(cursor.getLong(offset + 42)); entity.setApprove(cursor.getLong(offset + 42));
entity.setAdvPrice(cursor.getLong(offset + 43)); entity.setPrintFont(cursor.getLong(offset + 43));
entity.setPrintToBill(cursor.getLong(offset + 44)); entity.setAdvPrice(cursor.getLong(offset + 44));
entity.setPointsAdd(cursor.getDouble(offset + 45)); entity.setPrintToBill(cursor.getLong(offset + 45));
entity.setPointsRatio(cursor.getLong(offset + 46)); entity.setPointsAdd(cursor.getDouble(offset + 46));
entity.setPointsRedeem(cursor.getDouble(offset + 47)); entity.setPointsRatio(cursor.getLong(offset + 47));
entity.setKtPrintMainItem(cursor.getLong(offset + 48)); entity.setPointsRedeem(cursor.getDouble(offset + 48));
entity.setKtShowPrice(cursor.getLong(offset + 49)); entity.setKtPrintMainItem(cursor.getLong(offset + 49));
entity.setPrintTo(cursor.getLong(offset + 50)); entity.setKtShowPrice(cursor.getLong(offset + 50));
entity.setToPax(cursor.getLong(offset + 51)); entity.setPrintTo(cursor.getLong(offset + 51));
entity.setFoodType(cursor.getLong(offset + 52)); entity.setToPax(cursor.getLong(offset + 52));
entity.setMajorMainId(cursor.getLong(offset + 53)); entity.setFoodType(cursor.getLong(offset + 53));
entity.setDeptId(cursor.getLong(offset + 54)); entity.setMajorMainId(cursor.getLong(offset + 54));
entity.setServiceCharge((byte) cursor.getShort(offset + 55)); entity.setDeptId(cursor.getLong(offset + 55));
entity.setConditions(cursor.getLong(offset + 56)); entity.setServiceCharge((byte) cursor.getShort(offset + 56));
entity.setIsRt(cursor.getLong(offset + 57)); entity.setConditions(cursor.getLong(offset + 57));
entity.setDeletes(cursor.getLong(offset + 58)); entity.setIsRt(cursor.getLong(offset + 58));
entity.setIsTimingFood(cursor.getLong(offset + 59)); entity.setDeletes(cursor.getLong(offset + 59));
entity.setMinLongTime(cursor.getLong(offset + 60)); entity.setIsTimingFood(cursor.getLong(offset + 60));
entity.setUnitTime(cursor.getLong(offset + 61)); entity.setMinLongTime(cursor.getLong(offset + 61));
entity.setUnitPrice(cursor.getDouble(offset + 62)); entity.setUnitTime(cursor.getLong(offset + 62));
entity.setFreeLongTime(cursor.getLong(offset + 63)); entity.setUnitPrice(cursor.getDouble(offset + 63));
entity.setFreePeriodBegin(cursor.isNull(offset + 64) ? null : new java.util.Date(cursor.getLong(offset + 64))); entity.setFreeLongTime(cursor.getLong(offset + 64));
entity.setIsStatistic(cursor.getLong(offset + 65)); entity.setFreePeriodBegin(cursor.isNull(offset + 65) ? null : new java.util.Date(cursor.getLong(offset + 65)));
entity.setColorId(cursor.getLong(offset + 66)); entity.setIsStatistic(cursor.getLong(offset + 66));
entity.setColorId(cursor.getLong(offset + 67));
} }
@Override @Override
......
...@@ -13,6 +13,8 @@ import org.greenrobot.greendao.query.QueryBuilder; ...@@ -13,6 +13,8 @@ import org.greenrobot.greendao.query.QueryBuilder;
import java.util.List; import java.util.List;
import io.reactivex.Observable;
/** /**
* 作者:ELEGANT_BIN * 作者:ELEGANT_BIN
* 版本:1.6.0 * 版本:1.6.0
...@@ -206,7 +208,6 @@ public class FoodDaoUtils { ...@@ -206,7 +208,6 @@ public class FoodDaoUtils {
public List<Food> queryFoodByQueryBuilder(long parentId, int foodSummary) { public List<Food> queryFoodByQueryBuilder(long parentId, int foodSummary) {
QueryBuilder<Food> queryBuilder = mManager.getDaoSession().queryBuilder(Food.class); QueryBuilder<Food> queryBuilder = mManager.getDaoSession().queryBuilder(Food.class);
long currentTime = System.currentTimeMillis(); long currentTime = System.currentTimeMillis();
// queryBuilder.join(ColorBeanDao.Properties.AndroidColor, Food.class, FoodDao.Properties.ColorId);
queryBuilder.where(queryBuilder.and( queryBuilder.where(queryBuilder.and(
FoodDao.Properties.ParentId.eq(parentId), FoodDao.Properties.ParentId.eq(parentId),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment