Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王宇航
supplier
Commits
ad8f3296
Commit
ad8f3296
authored
Oct 30, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
處理餐檯開台時間格式問題導致閃退
parent
5aab5e4e
Show whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
486 additions
and
4323 deletions
+486
-4323
arms/build.gradle
+1
-0
base-module/build.gradle
+1
-1
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
+3
-19
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/expandInfo/ExpandInfoSetting.java
+36
-8
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Discount.java
+232
-48
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoMaster.java
+2
-2
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DiscountDao.java
+138
-32
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ColorBeanDao.java
+0
-202
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ComboItemDao.java
+0
-259
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoMaster.java
+0
-132
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoSession.java
+0
-216
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DiscountDao.java
+0
-201
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ExpandInfoDao.java
+0
-233
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodComboDao.java
+0
-242
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodDao.java
+0
-647
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodModifierDao.java
+0
-271
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FunctionDao.java
+0
-193
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/LanguageDao.java
+0
-135
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ModifierDao.java
+0
-515
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintCurrencyBeanDao.java
+0
-295
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintModelBeanDao.java
+0
-163
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrinterDeviceBeanDao.java
+0
-421
config.gradle
+3
-0
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/bean/OrderBean.java
+3
-3
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/bean/OrderDetail.java
+1
-1
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/bean/discount/OrderDiscount.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/OrderContentModel.java
+5
-3
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/cart/ShoppingCart.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/discount/NomalDiscount.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
+12
-6
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
+27
-10
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/TableAdapter.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/ComboAdapter.java
+1
-30
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodAdapter.java
+3
-11
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodGroupAdapter.java
+0
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/ModifierAdapter.java
+5
-10
table-module/src/main/res/layout/table_activity_meal_stand.xml
+4
-3
No files found.
arms/build.gradle
View file @
ad8f3296
...
@@ -101,6 +101,7 @@ dependencies {
...
@@ -101,6 +101,7 @@ dependencies {
exclude
module:
'support-annotations'
exclude
module:
'support-annotations'
}
}
api
rootProject
.
ext
.
dependencies
[
'rxerrorhandler2'
]
api
rootProject
.
ext
.
dependencies
[
'rxerrorhandler2'
]
api
rootProject
.
ext
.
dependencies
[
'rxbinding'
]
//network
//network
api
(
rootProject
.
ext
.
dependencies
[
"retrofit"
])
{
api
(
rootProject
.
ext
.
dependencies
[
"retrofit"
])
{
exclude
module:
'okhttp'
exclude
module:
'okhttp'
...
...
base-module/build.gradle
View file @
ad8f3296
...
@@ -51,7 +51,7 @@ android {
...
@@ -51,7 +51,7 @@ android {
/**
/**
* 版本号
* 版本号
*/
*/
schemaVersion
2
0
schemaVersion
2
1
/**
/**
* greendao输出dao的数据库操作实体类文件夹(相对路径 包名+自定义路径名称,包将创建于包名的直接路径下)
* greendao输出dao的数据库操作实体类文件夹(相对路径 包名+自定义路径名称,包将创建于包名的直接路径下)
*/
*/
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
View file @
ad8f3296
...
@@ -104,6 +104,7 @@ public class GsaCloudApplication extends BaseApplication {
...
@@ -104,6 +104,7 @@ public class GsaCloudApplication extends BaseApplication {
//指定为经典Footer,默认是 BallPulseFooter
//指定为经典Footer,默认是 BallPulseFooter
return
new
ClassicsFooter
(
context
).
setDrawableSize
(
20
);
return
new
ClassicsFooter
(
context
).
setDrawableSize
(
20
);
});
});
}
}
@Override
@Override
...
@@ -133,14 +134,12 @@ public class GsaCloudApplication extends BaseApplication {
...
@@ -133,14 +134,12 @@ public class GsaCloudApplication extends BaseApplication {
//初始化crash記錄
//初始化crash記錄
AppCrashHandler
.
getInstance
().
init
(
this
);
AppCrashHandler
.
getInstance
().
init
(
this
);
uiStyleConfiguration
=
new
UIStyleExtendedConfiguration
();
functionConfiguration
=
new
FunctionExtendedConfiguration
();
isLogin
=
(
boolean
)
SPUtils
.
get
(
this
,
PrintConstans
.
IS_LOGIN
,
false
);
isLogin
=
(
boolean
)
SPUtils
.
get
(
this
,
PrintConstans
.
IS_LOGIN
,
false
);
uiStyleConfiguration
=
new
UIStyleExtendedConfiguration
();
functionConfiguration
=
new
FunctionExtendedConfiguration
();
//上傳餐廳擴展信息
//上傳餐廳擴展信息
ExpandInfoSetting
.
initUpdateExtendedConfiguration
(
uiStyleConfiguration
,
functionConfiguration
);
ExpandInfoSetting
.
initUpdateExtendedConfiguration
(
uiStyleConfiguration
,
functionConfiguration
);
//獲取餐廳擴展表數據
initExpandInfo
();
// 设定一些通用的属性,这些属性在每次统计事件中都会附带
// 设定一些通用的属性,这些属性在每次统计事件中都会附带
// 注意:如果此处的属性名与内置属性的名称相同,则内置属性会被覆盖
// 注意:如果此处的属性名与内置属性的名称相同,则内置属性会被覆盖
...
@@ -158,21 +157,6 @@ public class GsaCloudApplication extends BaseApplication {
...
@@ -158,21 +157,6 @@ public class GsaCloudApplication extends BaseApplication {
// Tracker.INSTANCE.initialize(this);
// Tracker.INSTANCE.initialize(this);
}
}
private
void
initExpandInfo
()
{
//在IO线程执行数据库处理操作
Observable
.
just
(
0
)
.
subscribeOn
(
Schedulers
.
io
())
.
subscribe
(
new
Consumer
<
Integer
>()
{
@Override
public
void
accept
(
@io
.
reactivex
.
annotations
.
NonNull
Integer
integer
)
throws
Exception
{
ExpandInfoDaoUtils
expandInfoDaoUtils
=
new
ExpandInfoDaoUtils
(
getAppContext
());
List
<
ExpandInfo
>
expandInfos
=
expandInfoDaoUtils
.
queryAllExpandInfo
();
if
(
expandInfos
!=
null
)
{
RestaurantExpandInfoUtils
.
setCommonExpandInfo
(
expandInfos
);
}
}
});
}
public
Activity
getCurrentActivity
()
{
public
Activity
getCurrentActivity
()
{
return
mCurrentActivity
;
return
mCurrentActivity
;
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/expandInfo/ExpandInfoSetting.java
View file @
ad8f3296
package
com
.
gingersoft
.
gsa
.
cloud
.
bean
.
expandInfo
;
package
com
.
gingersoft
.
gsa
.
cloud
.
bean
.
expandInfo
;
import
android.util.SparseArray
;
import
com.gingersoft.gsa.cloud.base.Api
;
import
com.gingersoft.gsa.cloud.base.Api
;
import
com.gingersoft.gsa.cloud.base.utils.JsonUtils
;
import
com.gingersoft.gsa.cloud.base.utils.JsonUtils
;
import
com.gingersoft.gsa.cloud.base.utils.ReflectionUtils
;
import
com.gingersoft.gsa.cloud.base.utils.ReflectionUtils
;
import
com.gingersoft.gsa.cloud.base.utils.RestaurantExpandInfoUtils
;
import
com.gingersoft.gsa.cloud.base.utils.RestaurantExpandInfoUtils
;
import
com.gingersoft.gsa.cloud.base.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.base.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.base.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.constans.HttpsConstans
;
import
com.gingersoft.gsa.cloud.constans.HttpsConstans
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
...
@@ -18,15 +19,18 @@ import java.util.HashMap;
...
@@ -18,15 +19,18 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
import
io.reactivex.Observer
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.schedulers.Schedulers
;
import
io.reactivex.schedulers.Schedulers
;
import
lombok.Builder
;
import
lombok.Builder
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.jessyan.retrofiturlmanager.RetrofitUrlManager
;
import
okhttp3.MediaType
;
import
okhttp3.MediaType
;
import
okhttp3.RequestBody
;
import
okhttp3.RequestBody
;
import
static
com
.
gingersoft
.
gsa
.
cloud
.
base
.
application
.
GsaCloudApplication
.
getAppContext
;
/**
/**
* @author : bin
* @author : bin
* @create date: 2020-10-20
* @create date: 2020-10-20
...
@@ -46,7 +50,7 @@ public class ExpandInfoSetting {
...
@@ -46,7 +50,7 @@ public class ExpandInfoSetting {
/**
/**
* 數據類型 1:整形,2:字符型,3:布爾型,4:日期類型
* 數據類型 1:整形,2:字符型,3:布爾型,4:日期類型
*/
*/
private
byte
dataType
;
private
int
dataType
;
private
int
sort
;
private
int
sort
;
private
String
showName
;
private
String
showName
;
private
String
remark
;
private
String
remark
;
...
@@ -67,7 +71,7 @@ public class ExpandInfoSetting {
...
@@ -67,7 +71,7 @@ public class ExpandInfoSetting {
public
static
void
initUpdateExtendedConfiguration
(
Object
...
objects
)
{
public
static
void
initUpdateExtendedConfiguration
(
Object
...
objects
)
{
Observable
.
just
(
0
)
Observable
.
just
(
0
)
.
subscribeOn
(
Schedulers
.
newThread
())
.
subscribeOn
(
Schedulers
.
io
())
.
subscribe
(
new
Consumer
<
Integer
>()
{
.
subscribe
(
new
Consumer
<
Integer
>()
{
@Override
@Override
public
void
accept
(
@io
.
reactivex
.
annotations
.
NonNull
Integer
integer
)
throws
Exception
{
public
void
accept
(
@io
.
reactivex
.
annotations
.
NonNull
Integer
integer
)
throws
Exception
{
...
@@ -78,10 +82,34 @@ public class ExpandInfoSetting {
...
@@ -78,10 +82,34 @@ public class ExpandInfoSetting {
}
}
String
expandInfoListJson
=
JsonUtils
.
toJson
(
expandInfoSettingList
);
String
expandInfoListJson
=
JsonUtils
.
toJson
(
expandInfoSettingList
);
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
expandInfoListJson
);
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
expandInfoListJson
);
OkHttp3Utils
.
post
(
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
+
Api
.
add_restaurant_base_table_configuration
,
requestBody
)
.
subscribe
(
new
Observer
<
String
>()
{
@Override
public
void
onSubscribe
(
Disposable
d
)
{
OkHttp3Utils
.
post
(
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
+
Api
.
add_restaurant_base_table_configuration
,
requestBody
)
}
.
subscribe
();
@Override
public
void
onNext
(
String
s
)
{
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onComplete
()
{
//從本地獲取餐廳擴展表數據
ExpandInfoDaoUtils
expandInfoDaoUtils
=
new
ExpandInfoDaoUtils
(
getAppContext
());
List
<
ExpandInfo
>
expandInfos
=
expandInfoDaoUtils
.
queryAllExpandInfo
();
if
(
expandInfos
!=
null
)
{
RestaurantExpandInfoUtils
.
setCommonExpandInfo
(
expandInfos
);
}
}
});
}
}
});
});
}
}
...
@@ -104,7 +132,7 @@ public class ExpandInfoSetting {
...
@@ -104,7 +132,7 @@ public class ExpandInfoSetting {
Class
<?>
returnClass
=
method
.
getReturnType
();
Class
<?>
returnClass
=
method
.
getReturnType
();
if
(
method
.
getName
().
startsWith
(
"get"
)
&&
returnClass
.
equals
(
ExpandInfoSetting
.
class
))
{
if
(
method
.
getName
().
startsWith
(
"get"
)
&&
returnClass
.
equals
(
ExpandInfoSetting
.
class
))
{
try
{
try
{
Object
[]
objs
=
{};
Object
[]
objs
=
{};
//反射執行get方法 獲取每個配置類信息
//反射執行get方法 獲取每個配置類信息
ExpandInfoSetting
expandInfo
=
(
ExpandInfoSetting
)
ReflectionUtils
.
invokeMethod
(
method
,
obj
,
objs
);
ExpandInfoSetting
expandInfo
=
(
ExpandInfoSetting
)
ReflectionUtils
.
invokeMethod
(
method
,
obj
,
objs
);
//獲取完整的settingName
//獲取完整的settingName
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Discount.java
View file @
ad8f3296
...
@@ -28,19 +28,25 @@ public class Discount {
...
@@ -28,19 +28,25 @@ public class Discount {
@Id
(
autoincrement
=
true
)
@Id
(
autoincrement
=
true
)
private
Long
id
;
private
Long
id
;
private
int
restaurant
_i
d
;
private
int
restaurant
I
d
;
/**
/**
* 金額
* 金額
*/
*/
private
double
amount
;
private
double
amount
;
/**
/**
* 折扣
* 折扣
比例
*/
*/
private
double
discount_v
alue
;
private
int
discountV
alue
;
/**
/**
* 类型#0:金额;1:折扣
;
* 类型#0:金额;1:折扣
比例;2:自定義金額;3:自定義金額鍵盤輸入;4:免服務費
*/
*/
private
int
type
;
private
int
type
;
public
static
final
byte
DISCOUNT_TYPE_AMOUNT
=
0
;
public
static
final
byte
DISCOUNT_TYPE_RATE
=
1
;
public
static
final
byte
DISCOUNT_TYPE_CUSTOM_AMOUNT
=
2
;
public
static
final
byte
DISCOUNT_TYPE_KEYBOARD
=
3
;
public
static
final
byte
DISCOUNT_TYPE_FREE_SERVICE_CHARGE
=
4
;
/**
/**
* 折扣可使用范围#0:食品;1:账单;
* 折扣可使用范围#0:食品;1:账单;
*/
*/
...
@@ -53,9 +59,69 @@ public class Discount {
...
@@ -53,9 +59,69 @@ public class Discount {
* 折扣描述
* 折扣描述
*/
*/
private
String
remark
;
private
String
remark
;
private
String
begin_time
;
/**
private
String
end_time
;
* 是否免服務費 0:否,1:是
*/
private
byte
freeServiceCharge
;
/**
* 是否經理批准 0:否,1:是
*/
private
byte
managerApproval
;
/**
* 顏色
*/
private
String
color
;
/**
* 落單類型 0:餐檯模式,1:外賣模式,2:外送模式,3:自取模式
*/
private
String
placeOrderType
;
/**
* 折扣上限
*/
private
double
discountCap
;
/**
* 銷售額
*/
private
double
salesAmount
;
/**
* 免稅 0:否,1:是
*/
private
byte
taxFree
;
/**
* 獨佔折扣 0:否,1:是
*/
private
byte
exclusive
;
/**
* 暫停 0:否,1:是
*/
private
byte
pause
;
/**
* 折上折 0:否,1:是
*/
private
byte
additionalDiscount
;
/**
* 只一次 0:否,1:是
*/
private
byte
onlyOnce
;
/**
* 最小賬單金額
*/
private
double
minBillAmount
;
/**
* 扣減積分 0:否,1:是
*/
private
byte
pointsDeduction
;
/**
* 整單免積分 0:否,1:是
*/
private
byte
wholeFreePoints
;
/**
* 最小金額類型 0:合計,1:總金額 默認 1
*/
private
byte
amountTypeMin
;
private
String
beginTime
;
private
String
endTime
;
/**
/**
* 自定義字段
* 自定義字段
...
@@ -64,27 +130,43 @@ public class Discount {
...
@@ -64,27 +130,43 @@ public class Discount {
private
long
memberId
=
-
1
;
private
long
memberId
=
-
1
;
@Generated
(
hash
=
901376651
)
@Generated
(
hash
=
1938515536
)
public
Discount
(
Long
id
,
int
restaurant_id
,
double
amount
,
double
discount_value
,
public
Discount
(
Long
id
,
int
restaurantId
,
double
amount
,
int
discountValue
,
int
type
,
String
discountType
,
int
status
,
int
type
,
String
discountType
,
int
status
,
String
remark
,
String
begin_time
,
String
remark
,
byte
freeServiceCharge
,
byte
managerApproval
,
String
color
,
String
placeOrderType
,
double
discountCap
,
String
end_time
)
{
double
salesAmount
,
byte
taxFree
,
byte
exclusive
,
byte
pause
,
byte
additionalDiscount
,
byte
onlyOnce
,
double
minBillAmount
,
byte
pointsDeduction
,
byte
wholeFreePoints
,
byte
amountTypeMin
,
String
beginTime
,
String
endTime
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
restaurant
_id
=
restaurant_i
d
;
this
.
restaurant
Id
=
restaurantI
d
;
this
.
amount
=
amount
;
this
.
amount
=
amount
;
this
.
discount
_value
=
discount_v
alue
;
this
.
discount
Value
=
discountV
alue
;
this
.
type
=
type
;
this
.
type
=
type
;
this
.
discountType
=
discountType
;
this
.
discountType
=
discountType
;
this
.
status
=
status
;
this
.
status
=
status
;
this
.
remark
=
remark
;
this
.
remark
=
remark
;
this
.
begin_time
=
begin_time
;
this
.
freeServiceCharge
=
freeServiceCharge
;
this
.
end_time
=
end_time
;
this
.
managerApproval
=
managerApproval
;
this
.
color
=
color
;
this
.
placeOrderType
=
placeOrderType
;
this
.
discountCap
=
discountCap
;
this
.
salesAmount
=
salesAmount
;
this
.
taxFree
=
taxFree
;
this
.
exclusive
=
exclusive
;
this
.
pause
=
pause
;
this
.
additionalDiscount
=
additionalDiscount
;
this
.
onlyOnce
=
onlyOnce
;
this
.
minBillAmount
=
minBillAmount
;
this
.
pointsDeduction
=
pointsDeduction
;
this
.
wholeFreePoints
=
wholeFreePoints
;
this
.
amountTypeMin
=
amountTypeMin
;
this
.
beginTime
=
beginTime
;
this
.
endTime
=
endTime
;
}
}
@Generated
(
hash
=
1777606421
)
@Generated
(
hash
=
1777606421
)
public
Discount
()
{
public
Discount
()
{
}
}
public
long
getMemberId
()
{
public
long
getMemberId
()
{
return
memberId
;
return
memberId
;
}
}
...
@@ -107,7 +189,7 @@ public class Discount {
...
@@ -107,7 +189,7 @@ public class Discount {
discountPrice
=
discount
.
getAmount
();
discountPrice
=
discount
.
getAmount
();
}
else
{
}
else
{
//百分比折扣
//百分比折扣
discountPrice
=
MoneyUtil
.
divide
(
MoneyUtil
.
multiply
(
sourcePrice
,
discount
.
getDiscount
_v
alue
()),
100
).
doubleValue
();
discountPrice
=
MoneyUtil
.
divide
(
MoneyUtil
.
multiply
(
sourcePrice
,
discount
.
getDiscount
V
alue
()),
100
).
doubleValue
();
}
}
if
(
sourcePrice
<
discountPrice
)
{
if
(
sourcePrice
<
discountPrice
)
{
//折扣金額不能超出總額
//折扣金額不能超出總額
...
@@ -131,105 +213,207 @@ public class Discount {
...
@@ -131,105 +213,207 @@ public class Discount {
return
-
MoneyUtil
.
get_ItemDecimals_money
(
Math
.
abs
(
discountPrice
));
return
-
MoneyUtil
.
get_ItemDecimals_money
(
Math
.
abs
(
discountPrice
));
}
}
public
Long
getId
()
{
public
Long
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
void
setId
(
Long
id
)
{
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
int
getRestaurantId
()
{
public
int
getRestaurant_id
()
{
return
this
.
restaurantId
;
return
this
.
restaurant_id
;
}
}
public
void
setRestaurantId
(
int
restaurantId
)
{
public
void
setRestaurant_id
(
int
restaurant_id
)
{
this
.
restaurantId
=
restaurantId
;
this
.
restaurant_id
=
restaurant_id
;
}
}
public
double
getAmount
()
{
public
double
getAmount
()
{
return
this
.
amount
;
return
this
.
amount
;
}
}
public
void
setAmount
(
double
amount
)
{
public
void
setAmount
(
double
amount
)
{
this
.
amount
=
amount
;
this
.
amount
=
amount
;
}
}
public
int
getDiscountValue
()
{
public
double
getDiscount_value
()
{
return
this
.
discountValue
;
return
this
.
discount_value
;
}
}
public
void
setDiscountValue
(
int
discountValue
)
{
public
void
setDiscount_value
(
double
discount_value
)
{
this
.
discountValue
=
discountValue
;
this
.
discount_value
=
discount_value
;
}
}
public
int
getType
()
{
public
int
getType
()
{
return
this
.
type
;
return
this
.
type
;
}
}
public
void
setType
(
int
type
)
{
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
String
getDiscountType
()
{
public
String
getDiscountType
()
{
return
this
.
discountType
;
return
this
.
discountType
;
}
}
public
void
setDiscountType
(
String
discountType
)
{
public
void
setDiscountType
(
String
discountType
)
{
this
.
discountType
=
discountType
;
this
.
discountType
=
discountType
;
}
}
public
int
getStatus
()
{
public
int
getStatus
()
{
return
this
.
status
;
return
this
.
status
;
}
}
public
void
setStatus
(
int
status
)
{
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
this
.
status
=
status
;
}
}
public
String
getRemark
()
{
public
String
getRemark
()
{
return
this
.
remark
;
return
this
.
remark
;
}
}
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
byte
getFreeServiceCharge
()
{
return
this
.
freeServiceCharge
;
}
public
String
getBegin_time
(
)
{
public
void
setFreeServiceCharge
(
byte
freeServiceCharge
)
{
return
this
.
begin_tim
e
;
this
.
freeServiceCharge
=
freeServiceCharg
e
;
}
}
public
byte
getManagerApproval
()
{
return
this
.
managerApproval
;
}
public
void
set
Begin_time
(
String
begin_time
)
{
public
void
set
ManagerApproval
(
byte
managerApproval
)
{
this
.
begin_time
=
begin_time
;
this
.
managerApproval
=
managerApproval
;
}
}
public
String
getColor
()
{
return
this
.
color
;
}
public
String
getEnd_time
(
)
{
public
void
setColor
(
String
color
)
{
return
this
.
end_time
;
this
.
color
=
color
;
}
}
public
String
getPlaceOrderType
()
{
return
this
.
placeOrderType
;
}
public
void
set
End_time
(
String
end_tim
e
)
{
public
void
set
PlaceOrderType
(
String
placeOrderTyp
e
)
{
this
.
end_time
=
end_tim
e
;
this
.
placeOrderType
=
placeOrderTyp
e
;
}
}
public
double
getDiscountCap
()
{
return
this
.
discountCap
;
}
public
void
setDiscountCap
(
double
discountCap
)
{
this
.
discountCap
=
discountCap
;
}
public
double
getSalesAmount
()
{
return
this
.
salesAmount
;
}
public
void
setSalesAmount
(
double
salesAmount
)
{
this
.
salesAmount
=
salesAmount
;
}
public
byte
getTaxFree
()
{
return
this
.
taxFree
;
}
public
void
setTaxFree
(
byte
taxFree
)
{
this
.
taxFree
=
taxFree
;
}
public
byte
getExclusive
()
{
return
this
.
exclusive
;
}
public
void
setExclusive
(
byte
exclusive
)
{
this
.
exclusive
=
exclusive
;
}
public
byte
getPause
()
{
return
this
.
pause
;
}
public
void
setPause
(
byte
pause
)
{
this
.
pause
=
pause
;
}
public
byte
getAdditionalDiscount
()
{
return
this
.
additionalDiscount
;
}
public
void
setAdditionalDiscount
(
byte
additionalDiscount
)
{
this
.
additionalDiscount
=
additionalDiscount
;
}
public
byte
getOnlyOnce
()
{
return
this
.
onlyOnce
;
}
public
void
setOnlyOnce
(
byte
onlyOnce
)
{
this
.
onlyOnce
=
onlyOnce
;
}
public
double
getMinBillAmount
()
{
return
this
.
minBillAmount
;
}
public
void
setMinBillAmount
(
double
minBillAmount
)
{
this
.
minBillAmount
=
minBillAmount
;
}
public
byte
getPointsDeduction
()
{
return
this
.
pointsDeduction
;
}
public
void
setPointsDeduction
(
byte
pointsDeduction
)
{
this
.
pointsDeduction
=
pointsDeduction
;
}
public
byte
getWholeFreePoints
()
{
return
this
.
wholeFreePoints
;
}
public
void
setWholeFreePoints
(
byte
wholeFreePoints
)
{
this
.
wholeFreePoints
=
wholeFreePoints
;
}
public
byte
getAmountTypeMin
()
{
return
this
.
amountTypeMin
;
}
public
void
setAmountTypeMin
(
byte
amountTypeMin
)
{
this
.
amountTypeMin
=
amountTypeMin
;
}
public
String
getBeginTime
()
{
return
this
.
beginTime
;
}
public
void
setBeginTime
(
String
beginTime
)
{
this
.
beginTime
=
beginTime
;
}
public
String
getEndTime
()
{
return
this
.
endTime
;
}
public
void
setEndTime
(
String
endTime
)
{
this
.
endTime
=
endTime
;
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoMaster.java
View file @
ad8f3296
...
@@ -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 2
0
): knows all DAOs.
* Master of DAO (schema version 2
1
): knows all DAOs.
*/
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
2
0
;
public
static
final
int
SCHEMA_VERSION
=
2
1
;
/** 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
)
{
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DiscountDao.java
View file @
ad8f3296
...
@@ -25,15 +25,30 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -25,15 +25,30 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
*/
*/
public
static
class
Properties
{
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
Restaurant
_id
=
new
Property
(
1
,
int
.
class
,
"restaurant_i
d"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
Restaurant
Id
=
new
Property
(
1
,
int
.
class
,
"restaurantI
d"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
Amount
=
new
Property
(
2
,
double
.
class
,
"amount"
,
false
,
"AMOUNT"
);
public
final
static
Property
Amount
=
new
Property
(
2
,
double
.
class
,
"amount"
,
false
,
"AMOUNT"
);
public
final
static
Property
Discount
_value
=
new
Property
(
3
,
double
.
class
,
"discount_v
alue"
,
false
,
"DISCOUNT_VALUE"
);
public
final
static
Property
Discount
Value
=
new
Property
(
3
,
int
.
class
,
"discountV
alue"
,
false
,
"DISCOUNT_VALUE"
);
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
DiscountType
=
new
Property
(
5
,
String
.
class
,
"discountType"
,
false
,
"DISCOUNT_TYPE"
);
public
final
static
Property
DiscountType
=
new
Property
(
5
,
String
.
class
,
"discountType"
,
false
,
"DISCOUNT_TYPE"
);
public
final
static
Property
Status
=
new
Property
(
6
,
int
.
class
,
"status"
,
false
,
"STATUS"
);
public
final
static
Property
Status
=
new
Property
(
6
,
int
.
class
,
"status"
,
false
,
"STATUS"
);
public
final
static
Property
Remark
=
new
Property
(
7
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
Remark
=
new
Property
(
7
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
Begin_time
=
new
Property
(
8
,
String
.
class
,
"begin_time"
,
false
,
"BEGIN_TIME"
);
public
final
static
Property
FreeServiceCharge
=
new
Property
(
8
,
byte
.
class
,
"freeServiceCharge"
,
false
,
"FREE_SERVICE_CHARGE"
);
public
final
static
Property
End_time
=
new
Property
(
9
,
String
.
class
,
"end_time"
,
false
,
"END_TIME"
);
public
final
static
Property
ManagerApproval
=
new
Property
(
9
,
byte
.
class
,
"managerApproval"
,
false
,
"MANAGER_APPROVAL"
);
public
final
static
Property
Color
=
new
Property
(
10
,
String
.
class
,
"color"
,
false
,
"COLOR"
);
public
final
static
Property
PlaceOrderType
=
new
Property
(
11
,
String
.
class
,
"placeOrderType"
,
false
,
"PLACE_ORDER_TYPE"
);
public
final
static
Property
DiscountCap
=
new
Property
(
12
,
double
.
class
,
"discountCap"
,
false
,
"DISCOUNT_CAP"
);
public
final
static
Property
SalesAmount
=
new
Property
(
13
,
double
.
class
,
"salesAmount"
,
false
,
"SALES_AMOUNT"
);
public
final
static
Property
TaxFree
=
new
Property
(
14
,
byte
.
class
,
"taxFree"
,
false
,
"TAX_FREE"
);
public
final
static
Property
Exclusive
=
new
Property
(
15
,
byte
.
class
,
"exclusive"
,
false
,
"EXCLUSIVE"
);
public
final
static
Property
Pause
=
new
Property
(
16
,
byte
.
class
,
"pause"
,
false
,
"PAUSE"
);
public
final
static
Property
AdditionalDiscount
=
new
Property
(
17
,
byte
.
class
,
"additionalDiscount"
,
false
,
"ADDITIONAL_DISCOUNT"
);
public
final
static
Property
OnlyOnce
=
new
Property
(
18
,
byte
.
class
,
"onlyOnce"
,
false
,
"ONLY_ONCE"
);
public
final
static
Property
MinBillAmount
=
new
Property
(
19
,
double
.
class
,
"minBillAmount"
,
false
,
"MIN_BILL_AMOUNT"
);
public
final
static
Property
PointsDeduction
=
new
Property
(
20
,
byte
.
class
,
"pointsDeduction"
,
false
,
"POINTS_DEDUCTION"
);
public
final
static
Property
WholeFreePoints
=
new
Property
(
21
,
byte
.
class
,
"wholeFreePoints"
,
false
,
"WHOLE_FREE_POINTS"
);
public
final
static
Property
AmountTypeMin
=
new
Property
(
22
,
byte
.
class
,
"amountTypeMin"
,
false
,
"AMOUNT_TYPE_MIN"
);
public
final
static
Property
BeginTime
=
new
Property
(
23
,
String
.
class
,
"beginTime"
,
false
,
"BEGIN_TIME"
);
public
final
static
Property
EndTime
=
new
Property
(
24
,
String
.
class
,
"endTime"
,
false
,
"END_TIME"
);
}
}
...
@@ -50,15 +65,30 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -50,15 +65,30 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"DISCOUNT\" ("
+
//
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"DISCOUNT\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 1: restaurant
_i
d
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 1: restaurant
I
d
"\"AMOUNT\" REAL NOT NULL ,"
+
// 2: amount
"\"AMOUNT\" REAL NOT NULL ,"
+
// 2: amount
"\"DISCOUNT_VALUE\"
REAL NOT NULL ,"
+
// 3: discount_v
alue
"\"DISCOUNT_VALUE\"
INTEGER NOT NULL ,"
+
// 3: discountV
alue
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"DISCOUNT_TYPE\" TEXT,"
+
// 5: discountType
"\"DISCOUNT_TYPE\" TEXT,"
+
// 5: discountType
"\"STATUS\" INTEGER NOT NULL ,"
+
// 6: status
"\"STATUS\" INTEGER NOT NULL ,"
+
// 6: status
"\"REMARK\" TEXT,"
+
// 7: remark
"\"REMARK\" TEXT,"
+
// 7: remark
"\"BEGIN_TIME\" TEXT,"
+
// 8: begin_time
"\"FREE_SERVICE_CHARGE\" INTEGER NOT NULL ,"
+
// 8: freeServiceCharge
"\"END_TIME\" TEXT);"
);
// 9: end_time
"\"MANAGER_APPROVAL\" INTEGER NOT NULL ,"
+
// 9: managerApproval
"\"COLOR\" TEXT,"
+
// 10: color
"\"PLACE_ORDER_TYPE\" TEXT,"
+
// 11: placeOrderType
"\"DISCOUNT_CAP\" REAL NOT NULL ,"
+
// 12: discountCap
"\"SALES_AMOUNT\" REAL NOT NULL ,"
+
// 13: salesAmount
"\"TAX_FREE\" INTEGER NOT NULL ,"
+
// 14: taxFree
"\"EXCLUSIVE\" INTEGER NOT NULL ,"
+
// 15: exclusive
"\"PAUSE\" INTEGER NOT NULL ,"
+
// 16: pause
"\"ADDITIONAL_DISCOUNT\" INTEGER NOT NULL ,"
+
// 17: additionalDiscount
"\"ONLY_ONCE\" INTEGER NOT NULL ,"
+
// 18: onlyOnce
"\"MIN_BILL_AMOUNT\" REAL NOT NULL ,"
+
// 19: minBillAmount
"\"POINTS_DEDUCTION\" INTEGER NOT NULL ,"
+
// 20: pointsDeduction
"\"WHOLE_FREE_POINTS\" INTEGER NOT NULL ,"
+
// 21: wholeFreePoints
"\"AMOUNT_TYPE_MIN\" INTEGER NOT NULL ,"
+
// 22: amountTypeMin
"\"BEGIN_TIME\" TEXT,"
+
// 23: beginTime
"\"END_TIME\" TEXT);"
);
// 24: endTime
}
}
/** Drops the underlying database table. */
/** Drops the underlying database table. */
...
@@ -75,9 +105,9 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -75,9 +105,9 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
if
(
id
!=
null
)
{
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
stmt
.
bindLong
(
1
,
id
);
}
}
stmt
.
bindLong
(
2
,
entity
.
getRestaurant
_i
d
());
stmt
.
bindLong
(
2
,
entity
.
getRestaurant
I
d
());
stmt
.
bindDouble
(
3
,
entity
.
getAmount
());
stmt
.
bindDouble
(
3
,
entity
.
getAmount
());
stmt
.
bind
Double
(
4
,
entity
.
getDiscount_v
alue
());
stmt
.
bind
Long
(
4
,
entity
.
getDiscountV
alue
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
String
discountType
=
entity
.
getDiscountType
();
String
discountType
=
entity
.
getDiscountType
();
...
@@ -90,15 +120,38 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -90,15 +120,38 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
if
(
remark
!=
null
)
{
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
stmt
.
bindString
(
8
,
remark
);
}
}
stmt
.
bindLong
(
9
,
entity
.
getFreeServiceCharge
());
stmt
.
bindLong
(
10
,
entity
.
getManagerApproval
());
String
begin_time
=
entity
.
getBegin_time
();
String
color
=
entity
.
getColor
();
if
(
begin_time
!=
null
)
{
if
(
color
!=
null
)
{
stmt
.
bindString
(
9
,
begin_time
);
stmt
.
bindString
(
11
,
color
);
}
}
String
end_time
=
entity
.
getEnd_time
();
String
placeOrderType
=
entity
.
getPlaceOrderType
();
if
(
end_time
!=
null
)
{
if
(
placeOrderType
!=
null
)
{
stmt
.
bindString
(
10
,
end_time
);
stmt
.
bindString
(
12
,
placeOrderType
);
}
stmt
.
bindDouble
(
13
,
entity
.
getDiscountCap
());
stmt
.
bindDouble
(
14
,
entity
.
getSalesAmount
());
stmt
.
bindLong
(
15
,
entity
.
getTaxFree
());
stmt
.
bindLong
(
16
,
entity
.
getExclusive
());
stmt
.
bindLong
(
17
,
entity
.
getPause
());
stmt
.
bindLong
(
18
,
entity
.
getAdditionalDiscount
());
stmt
.
bindLong
(
19
,
entity
.
getOnlyOnce
());
stmt
.
bindDouble
(
20
,
entity
.
getMinBillAmount
());
stmt
.
bindLong
(
21
,
entity
.
getPointsDeduction
());
stmt
.
bindLong
(
22
,
entity
.
getWholeFreePoints
());
stmt
.
bindLong
(
23
,
entity
.
getAmountTypeMin
());
String
beginTime
=
entity
.
getBeginTime
();
if
(
beginTime
!=
null
)
{
stmt
.
bindString
(
24
,
beginTime
);
}
String
endTime
=
entity
.
getEndTime
();
if
(
endTime
!=
null
)
{
stmt
.
bindString
(
25
,
endTime
);
}
}
}
}
...
@@ -110,9 +163,9 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -110,9 +163,9 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
if
(
id
!=
null
)
{
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
stmt
.
bindLong
(
1
,
id
);
}
}
stmt
.
bindLong
(
2
,
entity
.
getRestaurant
_i
d
());
stmt
.
bindLong
(
2
,
entity
.
getRestaurant
I
d
());
stmt
.
bindDouble
(
3
,
entity
.
getAmount
());
stmt
.
bindDouble
(
3
,
entity
.
getAmount
());
stmt
.
bind
Double
(
4
,
entity
.
getDiscount_v
alue
());
stmt
.
bind
Long
(
4
,
entity
.
getDiscountV
alue
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
String
discountType
=
entity
.
getDiscountType
();
String
discountType
=
entity
.
getDiscountType
();
...
@@ -125,15 +178,38 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -125,15 +178,38 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
if
(
remark
!=
null
)
{
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
stmt
.
bindString
(
8
,
remark
);
}
}
stmt
.
bindLong
(
9
,
entity
.
getFreeServiceCharge
());
stmt
.
bindLong
(
10
,
entity
.
getManagerApproval
());
String
color
=
entity
.
getColor
();
if
(
color
!=
null
)
{
stmt
.
bindString
(
11
,
color
);
}
String
placeOrderType
=
entity
.
getPlaceOrderType
();
if
(
placeOrderType
!=
null
)
{
stmt
.
bindString
(
12
,
placeOrderType
);
}
stmt
.
bindDouble
(
13
,
entity
.
getDiscountCap
());
stmt
.
bindDouble
(
14
,
entity
.
getSalesAmount
());
stmt
.
bindLong
(
15
,
entity
.
getTaxFree
());
stmt
.
bindLong
(
16
,
entity
.
getExclusive
());
stmt
.
bindLong
(
17
,
entity
.
getPause
());
stmt
.
bindLong
(
18
,
entity
.
getAdditionalDiscount
());
stmt
.
bindLong
(
19
,
entity
.
getOnlyOnce
());
stmt
.
bindDouble
(
20
,
entity
.
getMinBillAmount
());
stmt
.
bindLong
(
21
,
entity
.
getPointsDeduction
());
stmt
.
bindLong
(
22
,
entity
.
getWholeFreePoints
());
stmt
.
bindLong
(
23
,
entity
.
getAmountTypeMin
());
String
begin
_time
=
entity
.
getBegin_t
ime
();
String
begin
Time
=
entity
.
getBeginT
ime
();
if
(
begin
_t
ime
!=
null
)
{
if
(
begin
T
ime
!=
null
)
{
stmt
.
bindString
(
9
,
begin_t
ime
);
stmt
.
bindString
(
24
,
beginT
ime
);
}
}
String
end
_time
=
entity
.
getEnd_t
ime
();
String
end
Time
=
entity
.
getEndT
ime
();
if
(
end
_t
ime
!=
null
)
{
if
(
end
T
ime
!=
null
)
{
stmt
.
bindString
(
10
,
end_t
ime
);
stmt
.
bindString
(
25
,
endT
ime
);
}
}
}
}
...
@@ -146,15 +222,30 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -146,15 +222,30 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
public
Discount
readEntity
(
Cursor
cursor
,
int
offset
)
{
public
Discount
readEntity
(
Cursor
cursor
,
int
offset
)
{
Discount
entity
=
new
Discount
(
//
Discount
entity
=
new
Discount
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
getInt
(
offset
+
1
),
// restaurant
_i
d
cursor
.
getInt
(
offset
+
1
),
// restaurant
I
d
cursor
.
getDouble
(
offset
+
2
),
// amount
cursor
.
getDouble
(
offset
+
2
),
// amount
cursor
.
get
Double
(
offset
+
3
),
// discount_v
alue
cursor
.
get
Int
(
offset
+
3
),
// discountV
alue
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// discountType
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// discountType
cursor
.
getInt
(
offset
+
6
),
// status
cursor
.
getInt
(
offset
+
6
),
// status
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// remark
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// remark
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// begin_time
(
byte
)
cursor
.
getShort
(
offset
+
8
),
// freeServiceCharge
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
)
// end_time
(
byte
)
cursor
.
getShort
(
offset
+
9
),
// managerApproval
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
),
// color
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
),
// placeOrderType
cursor
.
getDouble
(
offset
+
12
),
// discountCap
cursor
.
getDouble
(
offset
+
13
),
// salesAmount
(
byte
)
cursor
.
getShort
(
offset
+
14
),
// taxFree
(
byte
)
cursor
.
getShort
(
offset
+
15
),
// exclusive
(
byte
)
cursor
.
getShort
(
offset
+
16
),
// pause
(
byte
)
cursor
.
getShort
(
offset
+
17
),
// additionalDiscount
(
byte
)
cursor
.
getShort
(
offset
+
18
),
// onlyOnce
cursor
.
getDouble
(
offset
+
19
),
// minBillAmount
(
byte
)
cursor
.
getShort
(
offset
+
20
),
// pointsDeduction
(
byte
)
cursor
.
getShort
(
offset
+
21
),
// wholeFreePoints
(
byte
)
cursor
.
getShort
(
offset
+
22
),
// amountTypeMin
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getString
(
offset
+
23
),
// beginTime
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
)
// endTime
);
);
return
entity
;
return
entity
;
}
}
...
@@ -162,15 +253,30 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -162,15 +253,30 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
@Override
@Override
public
void
readEntity
(
Cursor
cursor
,
Discount
entity
,
int
offset
)
{
public
void
readEntity
(
Cursor
cursor
,
Discount
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setRestaurant
_i
d
(
cursor
.
getInt
(
offset
+
1
));
entity
.
setRestaurant
I
d
(
cursor
.
getInt
(
offset
+
1
));
entity
.
setAmount
(
cursor
.
getDouble
(
offset
+
2
));
entity
.
setAmount
(
cursor
.
getDouble
(
offset
+
2
));
entity
.
setDiscount
_value
(
cursor
.
getDouble
(
offset
+
3
));
entity
.
setDiscount
Value
(
cursor
.
getInt
(
offset
+
3
));
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setDiscountType
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setDiscountType
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setStatus
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setStatus
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setBegin_time
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setFreeServiceCharge
((
byte
)
cursor
.
getShort
(
offset
+
8
));
entity
.
setEnd_time
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
entity
.
setManagerApproval
((
byte
)
cursor
.
getShort
(
offset
+
9
));
entity
.
setColor
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
));
entity
.
setPlaceOrderType
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
));
entity
.
setDiscountCap
(
cursor
.
getDouble
(
offset
+
12
));
entity
.
setSalesAmount
(
cursor
.
getDouble
(
offset
+
13
));
entity
.
setTaxFree
((
byte
)
cursor
.
getShort
(
offset
+
14
));
entity
.
setExclusive
((
byte
)
cursor
.
getShort
(
offset
+
15
));
entity
.
setPause
((
byte
)
cursor
.
getShort
(
offset
+
16
));
entity
.
setAdditionalDiscount
((
byte
)
cursor
.
getShort
(
offset
+
17
));
entity
.
setOnlyOnce
((
byte
)
cursor
.
getShort
(
offset
+
18
));
entity
.
setMinBillAmount
(
cursor
.
getDouble
(
offset
+
19
));
entity
.
setPointsDeduction
((
byte
)
cursor
.
getShort
(
offset
+
20
));
entity
.
setWholeFreePoints
((
byte
)
cursor
.
getShort
(
offset
+
21
));
entity
.
setAmountTypeMin
((
byte
)
cursor
.
getShort
(
offset
+
22
));
entity
.
setBeginTime
(
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getString
(
offset
+
23
));
entity
.
setEndTime
(
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
));
}
}
@Override
@Override
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ColorBeanDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.ColorBean
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "COLOR_BEAN".
*/
public
class
ColorBeanDao
extends
AbstractDao
<
ColorBean
,
Void
>
{
public
static
final
String
TABLENAME
=
"COLOR_BEAN"
;
/**
* Properties of entity ColorBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
ColorId
=
new
Property
(
0
,
int
.
class
,
"colorId"
,
false
,
"COLOR_ID"
);
public
final
static
Property
ColorStart
=
new
Property
(
1
,
String
.
class
,
"colorStart"
,
false
,
"COLOR_START"
);
public
final
static
Property
ColorStop
=
new
Property
(
2
,
String
.
class
,
"colorStop"
,
false
,
"COLOR_STOP"
);
public
final
static
Property
FontColor
=
new
Property
(
3
,
String
.
class
,
"fontColor"
,
false
,
"FONT_COLOR"
);
public
final
static
Property
AndroidColor
=
new
Property
(
4
,
String
.
class
,
"androidColor"
,
false
,
"ANDROID_COLOR"
);
public
final
static
Property
AndroidFontColor
=
new
Property
(
5
,
String
.
class
,
"androidFontColor"
,
false
,
"ANDROID_FONT_COLOR"
);
public
final
static
Property
CreateTime
=
new
Property
(
6
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
EditTime
=
new
Property
(
7
,
String
.
class
,
"editTime"
,
false
,
"EDIT_TIME"
);
}
public
ColorBeanDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
ColorBeanDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"COLOR_BEAN\" ("
+
//
"\"COLOR_ID\" INTEGER NOT NULL ,"
+
// 0: colorId
"\"COLOR_START\" TEXT,"
+
// 1: colorStart
"\"COLOR_STOP\" TEXT,"
+
// 2: colorStop
"\"FONT_COLOR\" TEXT,"
+
// 3: fontColor
"\"ANDROID_COLOR\" TEXT,"
+
// 4: androidColor
"\"ANDROID_FONT_COLOR\" TEXT,"
+
// 5: androidFontColor
"\"CREATE_TIME\" TEXT,"
+
// 6: createTime
"\"EDIT_TIME\" TEXT);"
);
// 7: editTime
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"COLOR_BEAN\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
ColorBean
entity
)
{
stmt
.
clearBindings
();
stmt
.
bindLong
(
1
,
entity
.
getColorId
());
String
colorStart
=
entity
.
getColorStart
();
if
(
colorStart
!=
null
)
{
stmt
.
bindString
(
2
,
colorStart
);
}
String
colorStop
=
entity
.
getColorStop
();
if
(
colorStop
!=
null
)
{
stmt
.
bindString
(
3
,
colorStop
);
}
String
fontColor
=
entity
.
getFontColor
();
if
(
fontColor
!=
null
)
{
stmt
.
bindString
(
4
,
fontColor
);
}
String
androidColor
=
entity
.
getAndroidColor
();
if
(
androidColor
!=
null
)
{
stmt
.
bindString
(
5
,
androidColor
);
}
String
androidFontColor
=
entity
.
getAndroidFontColor
();
if
(
androidFontColor
!=
null
)
{
stmt
.
bindString
(
6
,
androidFontColor
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
editTime
=
entity
.
getEditTime
();
if
(
editTime
!=
null
)
{
stmt
.
bindString
(
8
,
editTime
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
ColorBean
entity
)
{
stmt
.
clearBindings
();
stmt
.
bindLong
(
1
,
entity
.
getColorId
());
String
colorStart
=
entity
.
getColorStart
();
if
(
colorStart
!=
null
)
{
stmt
.
bindString
(
2
,
colorStart
);
}
String
colorStop
=
entity
.
getColorStop
();
if
(
colorStop
!=
null
)
{
stmt
.
bindString
(
3
,
colorStop
);
}
String
fontColor
=
entity
.
getFontColor
();
if
(
fontColor
!=
null
)
{
stmt
.
bindString
(
4
,
fontColor
);
}
String
androidColor
=
entity
.
getAndroidColor
();
if
(
androidColor
!=
null
)
{
stmt
.
bindString
(
5
,
androidColor
);
}
String
androidFontColor
=
entity
.
getAndroidFontColor
();
if
(
androidFontColor
!=
null
)
{
stmt
.
bindString
(
6
,
androidFontColor
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
editTime
=
entity
.
getEditTime
();
if
(
editTime
!=
null
)
{
stmt
.
bindString
(
8
,
editTime
);
}
}
@Override
public
Void
readKey
(
Cursor
cursor
,
int
offset
)
{
return
null
;
}
@Override
public
ColorBean
readEntity
(
Cursor
cursor
,
int
offset
)
{
ColorBean
entity
=
new
ColorBean
(
//
cursor
.
getInt
(
offset
+
0
),
// colorId
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
),
// colorStart
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// colorStop
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
),
// fontColor
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// androidColor
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// androidFontColor
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// createTime
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
)
// editTime
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
ColorBean
entity
,
int
offset
)
{
entity
.
setColorId
(
cursor
.
getInt
(
offset
+
0
));
entity
.
setColorStart
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
));
entity
.
setColorStop
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setFontColor
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
));
entity
.
setAndroidColor
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setAndroidFontColor
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setEditTime
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
}
@Override
protected
final
Void
updateKeyAfterInsert
(
ColorBean
entity
,
long
rowId
)
{
// Unsupported or missing PK type
return
null
;
}
@Override
public
Void
getKey
(
ColorBean
entity
)
{
return
null
;
}
@Override
public
boolean
hasKey
(
ColorBean
entity
)
{
// TODO
return
false
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ComboItemDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "COMBO_ITEM".
*/
public
class
ComboItemDao
extends
AbstractDao
<
ComboItem
,
Long
>
{
public
static
final
String
TABLENAME
=
"COMBO_ITEM"
;
/**
* Properties of entity ComboItem.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
ComId
=
new
Property
(
1
,
Long
.
class
,
"comId"
,
false
,
"COM_ID"
);
public
final
static
Property
Fid
=
new
Property
(
2
,
Long
.
class
,
"fid"
,
false
,
"FID"
);
public
final
static
Property
Qty
=
new
Property
(
3
,
long
.
class
,
"qty"
,
false
,
"QTY"
);
public
final
static
Property
DiffAmt
=
new
Property
(
4
,
double
.
class
,
"diffAmt"
,
false
,
"DIFF_AMT"
);
public
final
static
Property
SeqNo
=
new
Property
(
5
,
long
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
Visible
=
new
Property
(
6
,
long
.
class
,
"visible"
,
false
,
"VISIBLE"
);
public
final
static
Property
CreateTime
=
new
Property
(
7
,
java
.
util
.
Date
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
CreateBy
=
new
Property
(
8
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
9
,
java
.
util
.
Date
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Conditions
=
new
Property
(
10
,
long
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRT
=
new
Property
(
11
,
long
.
class
,
"isRT"
,
false
,
"IS_RT"
);
public
final
static
Property
Deletes
=
new
Property
(
12
,
byte
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
PosId
=
new
Property
(
13
,
long
.
class
,
"posId"
,
false
,
"POS_ID"
);
public
final
static
Property
Restaurant_id
=
new
Property
(
14
,
long
.
class
,
"restaurant_id"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
IsMainAccount
=
new
Property
(
15
,
byte
.
class
,
"isMainAccount"
,
false
,
"IS_MAIN_ACCOUNT"
);
public
final
static
Property
PrintSeting
=
new
Property
(
16
,
String
.
class
,
"printSeting"
,
false
,
"PRINT_SETING"
);
}
public
ComboItemDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
ComboItemDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"COMBO_ITEM\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"COM_ID\" INTEGER,"
+
// 1: comId
"\"FID\" INTEGER,"
+
// 2: fid
"\"QTY\" INTEGER NOT NULL ,"
+
// 3: qty
"\"DIFF_AMT\" REAL NOT NULL ,"
+
// 4: diffAmt
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 5: seqNo
"\"VISIBLE\" INTEGER NOT NULL ,"
+
// 6: visible
"\"CREATE_TIME\" INTEGER,"
+
// 7: createTime
"\"CREATE_BY\" TEXT,"
+
// 8: createBy
"\"UPDATE_TIME\" INTEGER,"
+
// 9: updateTime
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 10: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 11: isRT
"\"DELETES\" INTEGER NOT NULL ,"
+
// 12: deletes
"\"POS_ID\" INTEGER NOT NULL ,"
+
// 13: posId
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 14: restaurant_id
"\"IS_MAIN_ACCOUNT\" INTEGER NOT NULL ,"
+
// 15: isMainAccount
"\"PRINT_SETING\" TEXT);"
);
// 16: printSeting
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"COMBO_ITEM\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
ComboItem
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
comId
=
entity
.
getComId
();
if
(
comId
!=
null
)
{
stmt
.
bindLong
(
2
,
comId
);
}
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
3
,
fid
);
}
stmt
.
bindLong
(
4
,
entity
.
getQty
());
stmt
.
bindDouble
(
5
,
entity
.
getDiffAmt
());
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
stmt
.
bindLong
(
7
,
entity
.
getVisible
());
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
8
,
createTime
.
getTime
());
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
9
,
createBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
10
,
updateTime
.
getTime
());
}
stmt
.
bindLong
(
11
,
entity
.
getConditions
());
stmt
.
bindLong
(
12
,
entity
.
getIsRT
());
stmt
.
bindLong
(
13
,
entity
.
getDeletes
());
stmt
.
bindLong
(
14
,
entity
.
getPosId
());
stmt
.
bindLong
(
15
,
entity
.
getRestaurant_id
());
stmt
.
bindLong
(
16
,
entity
.
getIsMainAccount
());
String
printSeting
=
entity
.
getPrintSeting
();
if
(
printSeting
!=
null
)
{
stmt
.
bindString
(
17
,
printSeting
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
ComboItem
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
comId
=
entity
.
getComId
();
if
(
comId
!=
null
)
{
stmt
.
bindLong
(
2
,
comId
);
}
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
3
,
fid
);
}
stmt
.
bindLong
(
4
,
entity
.
getQty
());
stmt
.
bindDouble
(
5
,
entity
.
getDiffAmt
());
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
stmt
.
bindLong
(
7
,
entity
.
getVisible
());
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
8
,
createTime
.
getTime
());
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
9
,
createBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
10
,
updateTime
.
getTime
());
}
stmt
.
bindLong
(
11
,
entity
.
getConditions
());
stmt
.
bindLong
(
12
,
entity
.
getIsRT
());
stmt
.
bindLong
(
13
,
entity
.
getDeletes
());
stmt
.
bindLong
(
14
,
entity
.
getPosId
());
stmt
.
bindLong
(
15
,
entity
.
getRestaurant_id
());
stmt
.
bindLong
(
16
,
entity
.
getIsMainAccount
());
String
printSeting
=
entity
.
getPrintSeting
();
if
(
printSeting
!=
null
)
{
stmt
.
bindString
(
17
,
printSeting
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
ComboItem
readEntity
(
Cursor
cursor
,
int
offset
)
{
ComboItem
entity
=
new
ComboItem
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
),
// comId
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getLong
(
offset
+
2
),
// fid
cursor
.
getLong
(
offset
+
3
),
// qty
cursor
.
getDouble
(
offset
+
4
),
// diffAmt
cursor
.
getLong
(
offset
+
5
),
// seqNo
cursor
.
getLong
(
offset
+
6
),
// visible
cursor
.
isNull
(
offset
+
7
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
7
)),
// createTime
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// createBy
cursor
.
isNull
(
offset
+
9
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
9
)),
// updateTime
cursor
.
getLong
(
offset
+
10
),
// conditions
cursor
.
getLong
(
offset
+
11
),
// isRT
(
byte
)
cursor
.
getShort
(
offset
+
12
),
// deletes
cursor
.
getLong
(
offset
+
13
),
// posId
cursor
.
getLong
(
offset
+
14
),
// restaurant_id
(
byte
)
cursor
.
getShort
(
offset
+
15
),
// isMainAccount
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
)
// printSeting
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
ComboItem
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setComId
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
));
entity
.
setFid
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getLong
(
offset
+
2
));
entity
.
setQty
(
cursor
.
getLong
(
offset
+
3
));
entity
.
setDiffAmt
(
cursor
.
getDouble
(
offset
+
4
));
entity
.
setSeqNo
(
cursor
.
getLong
(
offset
+
5
));
entity
.
setVisible
(
cursor
.
getLong
(
offset
+
6
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
7
)));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
9
)));
entity
.
setConditions
(
cursor
.
getLong
(
offset
+
10
));
entity
.
setIsRT
(
cursor
.
getLong
(
offset
+
11
));
entity
.
setDeletes
((
byte
)
cursor
.
getShort
(
offset
+
12
));
entity
.
setPosId
(
cursor
.
getLong
(
offset
+
13
));
entity
.
setRestaurant_id
(
cursor
.
getLong
(
offset
+
14
));
entity
.
setIsMainAccount
((
byte
)
cursor
.
getShort
(
offset
+
15
));
entity
.
setPrintSeting
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
ComboItem
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
ComboItem
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
ComboItem
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoMaster.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.content.Context
;
import
android.database.sqlite.SQLiteDatabase
;
import
android.database.sqlite.SQLiteDatabase.CursorFactory
;
import
android.util.Log
;
import
org.greenrobot.greendao.AbstractDaoMaster
;
import
org.greenrobot.greendao.database.StandardDatabase
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseOpenHelper
;
import
org.greenrobot.greendao.identityscope.IdentityScopeType
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version 20): knows all DAOs.
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
20
;
/** Creates underlying database table using DAOs. */
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
ColorBeanDao
.
createTable
(
db
,
ifNotExists
);
ComboItemDao
.
createTable
(
db
,
ifNotExists
);
DiscountDao
.
createTable
(
db
,
ifNotExists
);
ExpandInfoDao
.
createTable
(
db
,
ifNotExists
);
FoodDao
.
createTable
(
db
,
ifNotExists
);
FoodComboDao
.
createTable
(
db
,
ifNotExists
);
FoodModifierDao
.
createTable
(
db
,
ifNotExists
);
FunctionDao
.
createTable
(
db
,
ifNotExists
);
LanguageDao
.
createTable
(
db
,
ifNotExists
);
ModifierDao
.
createTable
(
db
,
ifNotExists
);
PrintCurrencyBeanDao
.
createTable
(
db
,
ifNotExists
);
PrintModelBeanDao
.
createTable
(
db
,
ifNotExists
);
PrinterDeviceBeanDao
.
createTable
(
db
,
ifNotExists
);
}
/** Drops underlying database table using DAOs. */
public
static
void
dropAllTables
(
Database
db
,
boolean
ifExists
)
{
ColorBeanDao
.
dropTable
(
db
,
ifExists
);
ComboItemDao
.
dropTable
(
db
,
ifExists
);
DiscountDao
.
dropTable
(
db
,
ifExists
);
ExpandInfoDao
.
dropTable
(
db
,
ifExists
);
FoodDao
.
dropTable
(
db
,
ifExists
);
FoodComboDao
.
dropTable
(
db
,
ifExists
);
FoodModifierDao
.
dropTable
(
db
,
ifExists
);
FunctionDao
.
dropTable
(
db
,
ifExists
);
LanguageDao
.
dropTable
(
db
,
ifExists
);
ModifierDao
.
dropTable
(
db
,
ifExists
);
PrintCurrencyBeanDao
.
dropTable
(
db
,
ifExists
);
PrintModelBeanDao
.
dropTable
(
db
,
ifExists
);
PrinterDeviceBeanDao
.
dropTable
(
db
,
ifExists
);
}
/**
* WARNING: Drops all table on Upgrade! Use only during development.
* Convenience method using a {@link DevOpenHelper}.
*/
public
static
DaoSession
newDevSession
(
Context
context
,
String
name
)
{
Database
db
=
new
DevOpenHelper
(
context
,
name
).
getWritableDb
();
DaoMaster
daoMaster
=
new
DaoMaster
(
db
);
return
daoMaster
.
newSession
();
}
public
DaoMaster
(
SQLiteDatabase
db
)
{
this
(
new
StandardDatabase
(
db
));
}
public
DaoMaster
(
Database
db
)
{
super
(
db
,
SCHEMA_VERSION
);
registerDaoClass
(
ColorBeanDao
.
class
);
registerDaoClass
(
ComboItemDao
.
class
);
registerDaoClass
(
DiscountDao
.
class
);
registerDaoClass
(
ExpandInfoDao
.
class
);
registerDaoClass
(
FoodDao
.
class
);
registerDaoClass
(
FoodComboDao
.
class
);
registerDaoClass
(
FoodModifierDao
.
class
);
registerDaoClass
(
FunctionDao
.
class
);
registerDaoClass
(
LanguageDao
.
class
);
registerDaoClass
(
ModifierDao
.
class
);
registerDaoClass
(
PrintCurrencyBeanDao
.
class
);
registerDaoClass
(
PrintModelBeanDao
.
class
);
registerDaoClass
(
PrinterDeviceBeanDao
.
class
);
}
public
DaoSession
newSession
()
{
return
new
DaoSession
(
db
,
IdentityScopeType
.
Session
,
daoConfigMap
);
}
public
DaoSession
newSession
(
IdentityScopeType
type
)
{
return
new
DaoSession
(
db
,
type
,
daoConfigMap
);
}
/**
* Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} -
*/
public
static
abstract
class
OpenHelper
extends
DatabaseOpenHelper
{
public
OpenHelper
(
Context
context
,
String
name
)
{
super
(
context
,
name
,
SCHEMA_VERSION
);
}
public
OpenHelper
(
Context
context
,
String
name
,
CursorFactory
factory
)
{
super
(
context
,
name
,
factory
,
SCHEMA_VERSION
);
}
@Override
public
void
onCreate
(
Database
db
)
{
Log
.
i
(
"greenDAO"
,
"Creating tables for schema version "
+
SCHEMA_VERSION
);
createAllTables
(
db
,
false
);
}
}
/** WARNING: Drops all table on Upgrade! Use only during development. */
public
static
class
DevOpenHelper
extends
OpenHelper
{
public
DevOpenHelper
(
Context
context
,
String
name
)
{
super
(
context
,
name
);
}
public
DevOpenHelper
(
Context
context
,
String
name
,
CursorFactory
factory
)
{
super
(
context
,
name
,
factory
);
}
@Override
public
void
onUpgrade
(
Database
db
,
int
oldVersion
,
int
newVersion
)
{
Log
.
i
(
"greenDAO"
,
"Upgrading schema from version "
+
oldVersion
+
" to "
+
newVersion
+
" by dropping all tables"
);
dropAllTables
(
db
,
true
);
onCreate
(
db
);
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoSession.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
java.util.Map
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.AbstractDaoSession
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.identityscope.IdentityScopeType
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
com.gingersoft.gsa.cloud.database.bean.ColorBean
;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
import
com.gingersoft.gsa.cloud.database.bean.FoodModifier
;
import
com.gingersoft.gsa.cloud.database.bean.Function
;
import
com.gingersoft.gsa.cloud.database.bean.Language
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.database.bean.PrintCurrencyBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrintModelBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.greendao.ColorBeanDao
;
import
com.gingersoft.gsa.cloud.greendao.ComboItemDao
;
import
com.gingersoft.gsa.cloud.greendao.DiscountDao
;
import
com.gingersoft.gsa.cloud.greendao.ExpandInfoDao
;
import
com.gingersoft.gsa.cloud.greendao.FoodDao
;
import
com.gingersoft.gsa.cloud.greendao.FoodComboDao
;
import
com.gingersoft.gsa.cloud.greendao.FoodModifierDao
;
import
com.gingersoft.gsa.cloud.greendao.FunctionDao
;
import
com.gingersoft.gsa.cloud.greendao.LanguageDao
;
import
com.gingersoft.gsa.cloud.greendao.ModifierDao
;
import
com.gingersoft.gsa.cloud.greendao.PrintCurrencyBeanDao
;
import
com.gingersoft.gsa.cloud.greendao.PrintModelBeanDao
;
import
com.gingersoft.gsa.cloud.greendao.PrinterDeviceBeanDao
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* {@inheritDoc}
*
* @see org.greenrobot.greendao.AbstractDaoSession
*/
public
class
DaoSession
extends
AbstractDaoSession
{
private
final
DaoConfig
colorBeanDaoConfig
;
private
final
DaoConfig
comboItemDaoConfig
;
private
final
DaoConfig
discountDaoConfig
;
private
final
DaoConfig
expandInfoDaoConfig
;
private
final
DaoConfig
foodDaoConfig
;
private
final
DaoConfig
foodComboDaoConfig
;
private
final
DaoConfig
foodModifierDaoConfig
;
private
final
DaoConfig
functionDaoConfig
;
private
final
DaoConfig
languageDaoConfig
;
private
final
DaoConfig
modifierDaoConfig
;
private
final
DaoConfig
printCurrencyBeanDaoConfig
;
private
final
DaoConfig
printModelBeanDaoConfig
;
private
final
DaoConfig
printerDeviceBeanDaoConfig
;
private
final
ColorBeanDao
colorBeanDao
;
private
final
ComboItemDao
comboItemDao
;
private
final
DiscountDao
discountDao
;
private
final
ExpandInfoDao
expandInfoDao
;
private
final
FoodDao
foodDao
;
private
final
FoodComboDao
foodComboDao
;
private
final
FoodModifierDao
foodModifierDao
;
private
final
FunctionDao
functionDao
;
private
final
LanguageDao
languageDao
;
private
final
ModifierDao
modifierDao
;
private
final
PrintCurrencyBeanDao
printCurrencyBeanDao
;
private
final
PrintModelBeanDao
printModelBeanDao
;
private
final
PrinterDeviceBeanDao
printerDeviceBeanDao
;
public
DaoSession
(
Database
db
,
IdentityScopeType
type
,
Map
<
Class
<?
extends
AbstractDao
<?,
?>>,
DaoConfig
>
daoConfigMap
)
{
super
(
db
);
colorBeanDaoConfig
=
daoConfigMap
.
get
(
ColorBeanDao
.
class
).
clone
();
colorBeanDaoConfig
.
initIdentityScope
(
type
);
comboItemDaoConfig
=
daoConfigMap
.
get
(
ComboItemDao
.
class
).
clone
();
comboItemDaoConfig
.
initIdentityScope
(
type
);
discountDaoConfig
=
daoConfigMap
.
get
(
DiscountDao
.
class
).
clone
();
discountDaoConfig
.
initIdentityScope
(
type
);
expandInfoDaoConfig
=
daoConfigMap
.
get
(
ExpandInfoDao
.
class
).
clone
();
expandInfoDaoConfig
.
initIdentityScope
(
type
);
foodDaoConfig
=
daoConfigMap
.
get
(
FoodDao
.
class
).
clone
();
foodDaoConfig
.
initIdentityScope
(
type
);
foodComboDaoConfig
=
daoConfigMap
.
get
(
FoodComboDao
.
class
).
clone
();
foodComboDaoConfig
.
initIdentityScope
(
type
);
foodModifierDaoConfig
=
daoConfigMap
.
get
(
FoodModifierDao
.
class
).
clone
();
foodModifierDaoConfig
.
initIdentityScope
(
type
);
functionDaoConfig
=
daoConfigMap
.
get
(
FunctionDao
.
class
).
clone
();
functionDaoConfig
.
initIdentityScope
(
type
);
languageDaoConfig
=
daoConfigMap
.
get
(
LanguageDao
.
class
).
clone
();
languageDaoConfig
.
initIdentityScope
(
type
);
modifierDaoConfig
=
daoConfigMap
.
get
(
ModifierDao
.
class
).
clone
();
modifierDaoConfig
.
initIdentityScope
(
type
);
printCurrencyBeanDaoConfig
=
daoConfigMap
.
get
(
PrintCurrencyBeanDao
.
class
).
clone
();
printCurrencyBeanDaoConfig
.
initIdentityScope
(
type
);
printModelBeanDaoConfig
=
daoConfigMap
.
get
(
PrintModelBeanDao
.
class
).
clone
();
printModelBeanDaoConfig
.
initIdentityScope
(
type
);
printerDeviceBeanDaoConfig
=
daoConfigMap
.
get
(
PrinterDeviceBeanDao
.
class
).
clone
();
printerDeviceBeanDaoConfig
.
initIdentityScope
(
type
);
colorBeanDao
=
new
ColorBeanDao
(
colorBeanDaoConfig
,
this
);
comboItemDao
=
new
ComboItemDao
(
comboItemDaoConfig
,
this
);
discountDao
=
new
DiscountDao
(
discountDaoConfig
,
this
);
expandInfoDao
=
new
ExpandInfoDao
(
expandInfoDaoConfig
,
this
);
foodDao
=
new
FoodDao
(
foodDaoConfig
,
this
);
foodComboDao
=
new
FoodComboDao
(
foodComboDaoConfig
,
this
);
foodModifierDao
=
new
FoodModifierDao
(
foodModifierDaoConfig
,
this
);
functionDao
=
new
FunctionDao
(
functionDaoConfig
,
this
);
languageDao
=
new
LanguageDao
(
languageDaoConfig
,
this
);
modifierDao
=
new
ModifierDao
(
modifierDaoConfig
,
this
);
printCurrencyBeanDao
=
new
PrintCurrencyBeanDao
(
printCurrencyBeanDaoConfig
,
this
);
printModelBeanDao
=
new
PrintModelBeanDao
(
printModelBeanDaoConfig
,
this
);
printerDeviceBeanDao
=
new
PrinterDeviceBeanDao
(
printerDeviceBeanDaoConfig
,
this
);
registerDao
(
ColorBean
.
class
,
colorBeanDao
);
registerDao
(
ComboItem
.
class
,
comboItemDao
);
registerDao
(
Discount
.
class
,
discountDao
);
registerDao
(
ExpandInfo
.
class
,
expandInfoDao
);
registerDao
(
Food
.
class
,
foodDao
);
registerDao
(
FoodCombo
.
class
,
foodComboDao
);
registerDao
(
FoodModifier
.
class
,
foodModifierDao
);
registerDao
(
Function
.
class
,
functionDao
);
registerDao
(
Language
.
class
,
languageDao
);
registerDao
(
Modifier
.
class
,
modifierDao
);
registerDao
(
PrintCurrencyBean
.
class
,
printCurrencyBeanDao
);
registerDao
(
PrintModelBean
.
class
,
printModelBeanDao
);
registerDao
(
PrinterDeviceBean
.
class
,
printerDeviceBeanDao
);
}
public
void
clear
()
{
colorBeanDaoConfig
.
clearIdentityScope
();
comboItemDaoConfig
.
clearIdentityScope
();
discountDaoConfig
.
clearIdentityScope
();
expandInfoDaoConfig
.
clearIdentityScope
();
foodDaoConfig
.
clearIdentityScope
();
foodComboDaoConfig
.
clearIdentityScope
();
foodModifierDaoConfig
.
clearIdentityScope
();
functionDaoConfig
.
clearIdentityScope
();
languageDaoConfig
.
clearIdentityScope
();
modifierDaoConfig
.
clearIdentityScope
();
printCurrencyBeanDaoConfig
.
clearIdentityScope
();
printModelBeanDaoConfig
.
clearIdentityScope
();
printerDeviceBeanDaoConfig
.
clearIdentityScope
();
}
public
ColorBeanDao
getColorBeanDao
()
{
return
colorBeanDao
;
}
public
ComboItemDao
getComboItemDao
()
{
return
comboItemDao
;
}
public
DiscountDao
getDiscountDao
()
{
return
discountDao
;
}
public
ExpandInfoDao
getExpandInfoDao
()
{
return
expandInfoDao
;
}
public
FoodDao
getFoodDao
()
{
return
foodDao
;
}
public
FoodComboDao
getFoodComboDao
()
{
return
foodComboDao
;
}
public
FoodModifierDao
getFoodModifierDao
()
{
return
foodModifierDao
;
}
public
FunctionDao
getFunctionDao
()
{
return
functionDao
;
}
public
LanguageDao
getLanguageDao
()
{
return
languageDao
;
}
public
ModifierDao
getModifierDao
()
{
return
modifierDao
;
}
public
PrintCurrencyBeanDao
getPrintCurrencyBeanDao
()
{
return
printCurrencyBeanDao
;
}
public
PrintModelBeanDao
getPrintModelBeanDao
()
{
return
printModelBeanDao
;
}
public
PrinterDeviceBeanDao
getPrinterDeviceBeanDao
()
{
return
printerDeviceBeanDao
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DiscountDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "DISCOUNT".
*/
public
class
DiscountDao
extends
AbstractDao
<
Discount
,
Long
>
{
public
static
final
String
TABLENAME
=
"DISCOUNT"
;
/**
* Properties of entity Discount.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
Restaurant_id
=
new
Property
(
1
,
int
.
class
,
"restaurant_id"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
Amount
=
new
Property
(
2
,
double
.
class
,
"amount"
,
false
,
"AMOUNT"
);
public
final
static
Property
Discount_value
=
new
Property
(
3
,
double
.
class
,
"discount_value"
,
false
,
"DISCOUNT_VALUE"
);
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
DiscountType
=
new
Property
(
5
,
String
.
class
,
"discountType"
,
false
,
"DISCOUNT_TYPE"
);
public
final
static
Property
Status
=
new
Property
(
6
,
int
.
class
,
"status"
,
false
,
"STATUS"
);
public
final
static
Property
Remark
=
new
Property
(
7
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
Begin_time
=
new
Property
(
8
,
String
.
class
,
"begin_time"
,
false
,
"BEGIN_TIME"
);
public
final
static
Property
End_time
=
new
Property
(
9
,
String
.
class
,
"end_time"
,
false
,
"END_TIME"
);
}
public
DiscountDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
DiscountDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"DISCOUNT\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 1: restaurant_id
"\"AMOUNT\" REAL NOT NULL ,"
+
// 2: amount
"\"DISCOUNT_VALUE\" REAL NOT NULL ,"
+
// 3: discount_value
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"DISCOUNT_TYPE\" TEXT,"
+
// 5: discountType
"\"STATUS\" INTEGER NOT NULL ,"
+
// 6: status
"\"REMARK\" TEXT,"
+
// 7: remark
"\"BEGIN_TIME\" TEXT,"
+
// 8: begin_time
"\"END_TIME\" TEXT);"
);
// 9: end_time
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"DISCOUNT\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Discount
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getRestaurant_id
());
stmt
.
bindDouble
(
3
,
entity
.
getAmount
());
stmt
.
bindDouble
(
4
,
entity
.
getDiscount_value
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
String
discountType
=
entity
.
getDiscountType
();
if
(
discountType
!=
null
)
{
stmt
.
bindString
(
6
,
discountType
);
}
stmt
.
bindLong
(
7
,
entity
.
getStatus
());
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
}
String
begin_time
=
entity
.
getBegin_time
();
if
(
begin_time
!=
null
)
{
stmt
.
bindString
(
9
,
begin_time
);
}
String
end_time
=
entity
.
getEnd_time
();
if
(
end_time
!=
null
)
{
stmt
.
bindString
(
10
,
end_time
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Discount
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getRestaurant_id
());
stmt
.
bindDouble
(
3
,
entity
.
getAmount
());
stmt
.
bindDouble
(
4
,
entity
.
getDiscount_value
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
String
discountType
=
entity
.
getDiscountType
();
if
(
discountType
!=
null
)
{
stmt
.
bindString
(
6
,
discountType
);
}
stmt
.
bindLong
(
7
,
entity
.
getStatus
());
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
}
String
begin_time
=
entity
.
getBegin_time
();
if
(
begin_time
!=
null
)
{
stmt
.
bindString
(
9
,
begin_time
);
}
String
end_time
=
entity
.
getEnd_time
();
if
(
end_time
!=
null
)
{
stmt
.
bindString
(
10
,
end_time
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Discount
readEntity
(
Cursor
cursor
,
int
offset
)
{
Discount
entity
=
new
Discount
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
getInt
(
offset
+
1
),
// restaurant_id
cursor
.
getDouble
(
offset
+
2
),
// amount
cursor
.
getDouble
(
offset
+
3
),
// discount_value
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// discountType
cursor
.
getInt
(
offset
+
6
),
// status
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// remark
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// begin_time
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
)
// end_time
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Discount
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setRestaurant_id
(
cursor
.
getInt
(
offset
+
1
));
entity
.
setAmount
(
cursor
.
getDouble
(
offset
+
2
));
entity
.
setDiscount_value
(
cursor
.
getDouble
(
offset
+
3
));
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setDiscountType
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setStatus
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setBegin_time
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setEnd_time
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Discount
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Discount
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Discount
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ExpandInfoDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "EXPAND_INFO".
*/
public
class
ExpandInfoDao
extends
AbstractDao
<
ExpandInfo
,
Long
>
{
public
static
final
String
TABLENAME
=
"EXPAND_INFO"
;
/**
* Properties of entity ExpandInfo.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
RestaurantId
=
new
Property
(
1
,
Integer
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
SettingName
=
new
Property
(
2
,
String
.
class
,
"settingName"
,
false
,
"SETTING_NAME"
);
public
final
static
Property
ValueInt
=
new
Property
(
3
,
Integer
.
class
,
"valueInt"
,
false
,
"VALUE_INT"
);
public
final
static
Property
ValueChar
=
new
Property
(
4
,
String
.
class
,
"valueChar"
,
false
,
"VALUE_CHAR"
);
public
final
static
Property
ValueBoolean
=
new
Property
(
5
,
Boolean
.
class
,
"valueBoolean"
,
false
,
"VALUE_BOOLEAN"
);
public
final
static
Property
ValueDatetime
=
new
Property
(
6
,
String
.
class
,
"valueDatetime"
,
false
,
"VALUE_DATETIME"
);
public
final
static
Property
Remark
=
new
Property
(
7
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
DataType
=
new
Property
(
8
,
int
.
class
,
"dataType"
,
false
,
"DATA_TYPE"
);
public
final
static
Property
ShowName
=
new
Property
(
9
,
String
.
class
,
"showName"
,
false
,
"SHOW_NAME"
);
}
public
ExpandInfoDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
ExpandInfoDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"EXPAND_INFO\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"RESTAURANT_ID\" INTEGER,"
+
// 1: restaurantId
"\"SETTING_NAME\" TEXT,"
+
// 2: settingName
"\"VALUE_INT\" INTEGER,"
+
// 3: valueInt
"\"VALUE_CHAR\" TEXT,"
+
// 4: valueChar
"\"VALUE_BOOLEAN\" INTEGER,"
+
// 5: valueBoolean
"\"VALUE_DATETIME\" TEXT,"
+
// 6: valueDatetime
"\"REMARK\" TEXT,"
+
// 7: remark
"\"DATA_TYPE\" INTEGER NOT NULL ,"
+
// 8: dataType
"\"SHOW_NAME\" TEXT);"
);
// 9: showName
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"EXPAND_INFO\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
ExpandInfo
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
2
,
restaurantId
);
}
String
settingName
=
entity
.
getSettingName
();
if
(
settingName
!=
null
)
{
stmt
.
bindString
(
3
,
settingName
);
}
Integer
valueInt
=
entity
.
getValueInt
();
if
(
valueInt
!=
null
)
{
stmt
.
bindLong
(
4
,
valueInt
);
}
String
valueChar
=
entity
.
getValueChar
();
if
(
valueChar
!=
null
)
{
stmt
.
bindString
(
5
,
valueChar
);
}
Boolean
valueBoolean
=
entity
.
getValueBoolean
();
if
(
valueBoolean
!=
null
)
{
stmt
.
bindLong
(
6
,
valueBoolean
?
1L
:
0L
);
}
String
valueDatetime
=
entity
.
getValueDatetime
();
if
(
valueDatetime
!=
null
)
{
stmt
.
bindString
(
7
,
valueDatetime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
}
stmt
.
bindLong
(
9
,
entity
.
getDataType
());
String
showName
=
entity
.
getShowName
();
if
(
showName
!=
null
)
{
stmt
.
bindString
(
10
,
showName
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
ExpandInfo
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
2
,
restaurantId
);
}
String
settingName
=
entity
.
getSettingName
();
if
(
settingName
!=
null
)
{
stmt
.
bindString
(
3
,
settingName
);
}
Integer
valueInt
=
entity
.
getValueInt
();
if
(
valueInt
!=
null
)
{
stmt
.
bindLong
(
4
,
valueInt
);
}
String
valueChar
=
entity
.
getValueChar
();
if
(
valueChar
!=
null
)
{
stmt
.
bindString
(
5
,
valueChar
);
}
Boolean
valueBoolean
=
entity
.
getValueBoolean
();
if
(
valueBoolean
!=
null
)
{
stmt
.
bindLong
(
6
,
valueBoolean
?
1L
:
0L
);
}
String
valueDatetime
=
entity
.
getValueDatetime
();
if
(
valueDatetime
!=
null
)
{
stmt
.
bindString
(
7
,
valueDatetime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
}
stmt
.
bindLong
(
9
,
entity
.
getDataType
());
String
showName
=
entity
.
getShowName
();
if
(
showName
!=
null
)
{
stmt
.
bindString
(
10
,
showName
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
ExpandInfo
readEntity
(
Cursor
cursor
,
int
offset
)
{
ExpandInfo
entity
=
new
ExpandInfo
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getInt
(
offset
+
1
),
// restaurantId
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// settingName
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
),
// valueInt
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// valueChar
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getShort
(
offset
+
5
)
!=
0
,
// valueBoolean
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// valueDatetime
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// remark
cursor
.
getInt
(
offset
+
8
),
// dataType
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
)
// showName
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
ExpandInfo
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setRestaurantId
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getInt
(
offset
+
1
));
entity
.
setSettingName
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setValueInt
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
));
entity
.
setValueChar
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setValueBoolean
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getShort
(
offset
+
5
)
!=
0
);
entity
.
setValueDatetime
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setDataType
(
cursor
.
getInt
(
offset
+
8
));
entity
.
setShowName
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
ExpandInfo
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
ExpandInfo
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
ExpandInfo
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodComboDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "FOOD_COMBO".
*/
public
class
FoodComboDao
extends
AbstractDao
<
FoodCombo
,
Void
>
{
public
static
final
String
TABLENAME
=
"FOOD_COMBO"
;
/**
* Properties of entity FoodCombo.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
false
,
"_id"
);
public
final
static
Property
Fid
=
new
Property
(
1
,
Long
.
class
,
"fid"
,
false
,
"FID"
);
public
final
static
Property
ComId
=
new
Property
(
2
,
int
.
class
,
"comId"
,
false
,
"COM_ID"
);
public
final
static
Property
SeqNo
=
new
Property
(
3
,
int
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
DiffAmt
=
new
Property
(
4
,
int
.
class
,
"diffAmt"
,
false
,
"DIFF_AMT"
);
public
final
static
Property
SelectQty
=
new
Property
(
5
,
int
.
class
,
"selectQty"
,
false
,
"SELECT_QTY"
);
public
final
static
Property
CreateTime
=
new
Property
(
6
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
DefModifier
=
new
Property
(
7
,
String
.
class
,
"defModifier"
,
false
,
"DEF_MODIFIER"
);
public
final
static
Property
ExcModifier
=
new
Property
(
8
,
String
.
class
,
"excModifier"
,
false
,
"EXC_MODIFIER"
);
public
final
static
Property
AutoNext
=
new
Property
(
9
,
int
.
class
,
"autoNext"
,
false
,
"AUTO_NEXT"
);
public
final
static
Property
MultipleSelect
=
new
Property
(
10
,
int
.
class
,
"multipleSelect"
,
false
,
"MULTIPLE_SELECT"
);
public
final
static
Property
UpdateTime
=
new
Property
(
11
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Conditions
=
new
Property
(
12
,
int
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRT
=
new
Property
(
13
,
int
.
class
,
"isRT"
,
false
,
"IS_RT"
);
public
final
static
Property
Deletes
=
new
Property
(
14
,
int
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
RestaurantId
=
new
Property
(
15
,
int
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
}
public
FoodComboDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
FoodComboDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"FOOD_COMBO\" ("
+
//
"\"_id\" INTEGER,"
+
// 0: id
"\"FID\" INTEGER,"
+
// 1: fid
"\"COM_ID\" INTEGER NOT NULL ,"
+
// 2: comId
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 3: seqNo
"\"DIFF_AMT\" INTEGER NOT NULL ,"
+
// 4: diffAmt
"\"SELECT_QTY\" INTEGER NOT NULL ,"
+
// 5: selectQty
"\"CREATE_TIME\" TEXT,"
+
// 6: createTime
"\"DEF_MODIFIER\" TEXT,"
+
// 7: defModifier
"\"EXC_MODIFIER\" TEXT,"
+
// 8: excModifier
"\"AUTO_NEXT\" INTEGER NOT NULL ,"
+
// 9: autoNext
"\"MULTIPLE_SELECT\" INTEGER NOT NULL ,"
+
// 10: multipleSelect
"\"UPDATE_TIME\" TEXT,"
+
// 11: updateTime
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 12: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 13: isRT
"\"DELETES\" INTEGER NOT NULL ,"
+
// 14: deletes
"\"RESTAURANT_ID\" INTEGER NOT NULL );"
);
// 15: restaurantId
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"FOOD_COMBO\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
FoodCombo
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
2
,
fid
);
}
stmt
.
bindLong
(
3
,
entity
.
getComId
());
stmt
.
bindLong
(
4
,
entity
.
getSeqNo
());
stmt
.
bindLong
(
5
,
entity
.
getDiffAmt
());
stmt
.
bindLong
(
6
,
entity
.
getSelectQty
());
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
defModifier
=
entity
.
getDefModifier
();
if
(
defModifier
!=
null
)
{
stmt
.
bindString
(
8
,
defModifier
);
}
String
excModifier
=
entity
.
getExcModifier
();
if
(
excModifier
!=
null
)
{
stmt
.
bindString
(
9
,
excModifier
);
}
stmt
.
bindLong
(
10
,
entity
.
getAutoNext
());
stmt
.
bindLong
(
11
,
entity
.
getMultipleSelect
());
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
12
,
updateTime
);
}
stmt
.
bindLong
(
13
,
entity
.
getConditions
());
stmt
.
bindLong
(
14
,
entity
.
getIsRT
());
stmt
.
bindLong
(
15
,
entity
.
getDeletes
());
stmt
.
bindLong
(
16
,
entity
.
getRestaurantId
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
FoodCombo
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
2
,
fid
);
}
stmt
.
bindLong
(
3
,
entity
.
getComId
());
stmt
.
bindLong
(
4
,
entity
.
getSeqNo
());
stmt
.
bindLong
(
5
,
entity
.
getDiffAmt
());
stmt
.
bindLong
(
6
,
entity
.
getSelectQty
());
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
defModifier
=
entity
.
getDefModifier
();
if
(
defModifier
!=
null
)
{
stmt
.
bindString
(
8
,
defModifier
);
}
String
excModifier
=
entity
.
getExcModifier
();
if
(
excModifier
!=
null
)
{
stmt
.
bindString
(
9
,
excModifier
);
}
stmt
.
bindLong
(
10
,
entity
.
getAutoNext
());
stmt
.
bindLong
(
11
,
entity
.
getMultipleSelect
());
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
12
,
updateTime
);
}
stmt
.
bindLong
(
13
,
entity
.
getConditions
());
stmt
.
bindLong
(
14
,
entity
.
getIsRT
());
stmt
.
bindLong
(
15
,
entity
.
getDeletes
());
stmt
.
bindLong
(
16
,
entity
.
getRestaurantId
());
}
@Override
public
Void
readKey
(
Cursor
cursor
,
int
offset
)
{
return
null
;
}
@Override
public
FoodCombo
readEntity
(
Cursor
cursor
,
int
offset
)
{
FoodCombo
entity
=
new
FoodCombo
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
),
// fid
cursor
.
getInt
(
offset
+
2
),
// comId
cursor
.
getInt
(
offset
+
3
),
// seqNo
cursor
.
getInt
(
offset
+
4
),
// diffAmt
cursor
.
getInt
(
offset
+
5
),
// selectQty
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// createTime
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// defModifier
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// excModifier
cursor
.
getInt
(
offset
+
9
),
// autoNext
cursor
.
getInt
(
offset
+
10
),
// multipleSelect
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
),
// updateTime
cursor
.
getInt
(
offset
+
12
),
// conditions
cursor
.
getInt
(
offset
+
13
),
// isRT
cursor
.
getInt
(
offset
+
14
),
// deletes
cursor
.
getInt
(
offset
+
15
)
// restaurantId
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
FoodCombo
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setFid
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
));
entity
.
setComId
(
cursor
.
getInt
(
offset
+
2
));
entity
.
setSeqNo
(
cursor
.
getInt
(
offset
+
3
));
entity
.
setDiffAmt
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setSelectQty
(
cursor
.
getInt
(
offset
+
5
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setDefModifier
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setExcModifier
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setAutoNext
(
cursor
.
getInt
(
offset
+
9
));
entity
.
setMultipleSelect
(
cursor
.
getInt
(
offset
+
10
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
));
entity
.
setConditions
(
cursor
.
getInt
(
offset
+
12
));
entity
.
setIsRT
(
cursor
.
getInt
(
offset
+
13
));
entity
.
setDeletes
(
cursor
.
getInt
(
offset
+
14
));
entity
.
setRestaurantId
(
cursor
.
getInt
(
offset
+
15
));
}
@Override
protected
final
Void
updateKeyAfterInsert
(
FoodCombo
entity
,
long
rowId
)
{
// Unsupported or missing PK type
return
null
;
}
@Override
public
Void
getKey
(
FoodCombo
entity
)
{
return
null
;
}
@Override
public
boolean
hasKey
(
FoodCombo
entity
)
{
// TODO
return
false
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "FOOD".
*/
public
class
FoodDao
extends
AbstractDao
<
Food
,
Long
>
{
public
static
final
String
TABLENAME
=
"FOOD"
;
/**
* Properties of entity Food.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"FID"
);
public
final
static
Property
ParentId
=
new
Property
(
1
,
long
.
class
,
"parentId"
,
false
,
"PARENT_ID"
);
public
final
static
Property
RestaurantId
=
new
Property
(
2
,
long
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
IsParent
=
new
Property
(
3
,
byte
.
class
,
"isParent"
,
false
,
"IS_PARENT"
);
public
final
static
Property
SeqNo
=
new
Property
(
4
,
long
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
FoodName
=
new
Property
(
5
,
String
.
class
,
"foodName"
,
false
,
"FOOD_NAME"
);
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
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
FoodDesc
=
new
Property
(
10
,
String
.
class
,
"foodDesc"
,
false
,
"FOOD_DESC"
);
public
final
static
Property
LimitAmount
=
new
Property
(
11
,
long
.
class
,
"limitAmount"
,
false
,
"LIMIT_AMOUNT"
);
public
final
static
Property
LimitType
=
new
Property
(
12
,
long
.
class
,
"limitType"
,
false
,
"LIMIT_TYPE"
);
public
final
static
Property
FoodSummary
=
new
Property
(
13
,
String
.
class
,
"foodSummary"
,
false
,
"FOOD_SUMMARY"
);
public
final
static
Property
Invisible
=
new
Property
(
14
,
long
.
class
,
"invisible"
,
false
,
"INVISIBLE"
);
public
final
static
Property
AutoMod
=
new
Property
(
15
,
byte
.
class
,
"autoMod"
,
false
,
"AUTO_MOD"
);
public
final
static
Property
Price
=
new
Property
(
16
,
double
.
class
,
"price"
,
false
,
"PRICE"
);
public
final
static
Property
MarketPrice
=
new
Property
(
17
,
double
.
class
,
"marketPrice"
,
false
,
"MARKET_PRICE"
);
public
final
static
Property
LunchboxPrice
=
new
Property
(
18
,
double
.
class
,
"lunchboxPrice"
,
false
,
"LUNCHBOX_PRICE"
);
public
final
static
Property
ImgUrlSmall
=
new
Property
(
19
,
String
.
class
,
"imgUrlSmall"
,
false
,
"IMG_URL_SMALL"
);
public
final
static
Property
Imageurl
=
new
Property
(
20
,
String
.
class
,
"imageurl"
,
false
,
"IMAGEURL"
);
public
final
static
Property
RiceponInvisible
=
new
Property
(
21
,
long
.
class
,
"riceponInvisible"
,
false
,
"RICEPON_INVISIBLE"
);
public
final
static
Property
Cost
=
new
Property
(
22
,
double
.
class
,
"cost"
,
false
,
"COST"
);
public
final
static
Property
StartDate
=
new
Property
(
23
,
java
.
util
.
Date
.
class
,
"startDate"
,
false
,
"START_DATE"
);
public
final
static
Property
EndDate
=
new
Property
(
24
,
java
.
util
.
Date
.
class
,
"endDate"
,
false
,
"END_DATE"
);
public
final
static
Property
Like
=
new
Property
(
25
,
long
.
class
,
"like"
,
false
,
"LIKE"
);
public
final
static
Property
TotalSold
=
new
Property
(
26
,
long
.
class
,
"totalSold"
,
false
,
"TOTAL_SOLD"
);
public
final
static
Property
IsSold
=
new
Property
(
27
,
long
.
class
,
"isSold"
,
false
,
"IS_SOLD"
);
public
final
static
Property
CreateBy
=
new
Property
(
28
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
29
,
java
.
util
.
Date
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
30
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
31
,
java
.
util
.
Date
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
PeriodId
=
new
Property
(
32
,
long
.
class
,
"periodId"
,
false
,
"PERIOD_ID"
);
public
final
static
Property
AbleDiscount
=
new
Property
(
33
,
long
.
class
,
"ableDiscount"
,
false
,
"ABLE_DISCOUNT"
);
public
final
static
Property
Takeaway
=
new
Property
(
34
,
long
.
class
,
"takeaway"
,
false
,
"TAKEAWAY"
);
public
final
static
Property
BlueEdit
=
new
Property
(
35
,
long
.
class
,
"blueEdit"
,
false
,
"BLUE_EDIT"
);
public
final
static
Property
CartEdit
=
new
Property
(
36
,
long
.
class
,
"cartEdit"
,
false
,
"CART_EDIT"
);
public
final
static
Property
AutoMerge
=
new
Property
(
37
,
long
.
class
,
"autoMerge"
,
false
,
"AUTO_MERGE"
);
public
final
static
Property
PrintSeting
=
new
Property
(
38
,
String
.
class
,
"printSeting"
,
false
,
"PRINT_SETING"
);
public
final
static
Property
IsPrintQueueCode
=
new
Property
(
39
,
long
.
class
,
"isPrintQueueCode"
,
false
,
"IS_PRINT_QUEUE_CODE"
);
public
final
static
Property
QueueHeadId
=
new
Property
(
40
,
long
.
class
,
"queueHeadId"
,
false
,
"QUEUE_HEAD_ID"
);
public
final
static
Property
Approve
=
new
Property
(
41
,
long
.
class
,
"approve"
,
false
,
"APPROVE"
);
public
final
static
Property
PrintFont
=
new
Property
(
42
,
long
.
class
,
"printFont"
,
false
,
"PRINT_FONT"
);
public
final
static
Property
AdvPrice
=
new
Property
(
43
,
long
.
class
,
"advPrice"
,
false
,
"ADV_PRICE"
);
public
final
static
Property
PrintToBill
=
new
Property
(
44
,
long
.
class
,
"printToBill"
,
false
,
"PRINT_TO_BILL"
);
public
final
static
Property
PointsAdd
=
new
Property
(
45
,
double
.
class
,
"pointsAdd"
,
false
,
"POINTS_ADD"
);
public
final
static
Property
PointsRatio
=
new
Property
(
46
,
long
.
class
,
"pointsRatio"
,
false
,
"POINTS_RATIO"
);
public
final
static
Property
PointsRedeem
=
new
Property
(
47
,
double
.
class
,
"pointsRedeem"
,
false
,
"POINTS_REDEEM"
);
public
final
static
Property
KtPrintMainItem
=
new
Property
(
48
,
long
.
class
,
"ktPrintMainItem"
,
false
,
"KT_PRINT_MAIN_ITEM"
);
public
final
static
Property
KtShowPrice
=
new
Property
(
49
,
long
.
class
,
"ktShowPrice"
,
false
,
"KT_SHOW_PRICE"
);
public
final
static
Property
PrintTo
=
new
Property
(
50
,
long
.
class
,
"printTo"
,
false
,
"PRINT_TO"
);
public
final
static
Property
ToPax
=
new
Property
(
51
,
long
.
class
,
"toPax"
,
false
,
"TO_PAX"
);
public
final
static
Property
FoodType
=
new
Property
(
52
,
long
.
class
,
"foodType"
,
false
,
"FOOD_TYPE"
);
public
final
static
Property
MajorMainId
=
new
Property
(
53
,
long
.
class
,
"majorMainId"
,
false
,
"MAJOR_MAIN_ID"
);
public
final
static
Property
DeptId
=
new
Property
(
54
,
long
.
class
,
"deptId"
,
false
,
"DEPT_ID"
);
public
final
static
Property
ServiceCharge
=
new
Property
(
55
,
byte
.
class
,
"serviceCharge"
,
false
,
"SERVICE_CHARGE"
);
public
final
static
Property
ColorId
=
new
Property
(
56
,
long
.
class
,
"colorId"
,
false
,
"COLOR_ID"
);
public
final
static
Property
Conditions
=
new
Property
(
57
,
long
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRt
=
new
Property
(
58
,
long
.
class
,
"isRt"
,
false
,
"IS_RT"
);
public
final
static
Property
Deletes
=
new
Property
(
59
,
long
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
IsTimingFood
=
new
Property
(
60
,
long
.
class
,
"isTimingFood"
,
false
,
"IS_TIMING_FOOD"
);
public
final
static
Property
MinLongTime
=
new
Property
(
61
,
long
.
class
,
"minLongTime"
,
false
,
"MIN_LONG_TIME"
);
public
final
static
Property
UnitTime
=
new
Property
(
62
,
long
.
class
,
"unitTime"
,
false
,
"UNIT_TIME"
);
public
final
static
Property
UnitPrice
=
new
Property
(
63
,
double
.
class
,
"unitPrice"
,
false
,
"UNIT_PRICE"
);
public
final
static
Property
FreeLongTime
=
new
Property
(
64
,
long
.
class
,
"freeLongTime"
,
false
,
"FREE_LONG_TIME"
);
public
final
static
Property
FreePeriodBegin
=
new
Property
(
65
,
java
.
util
.
Date
.
class
,
"freePeriodBegin"
,
false
,
"FREE_PERIOD_BEGIN"
);
public
final
static
Property
IsStatistic
=
new
Property
(
66
,
long
.
class
,
"isStatistic"
,
false
,
"IS_STATISTIC"
);
}
public
FoodDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
FoodDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"FOOD\" ("
+
//
"\"FID\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"PARENT_ID\" INTEGER NOT NULL ,"
+
// 1: parentId
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 2: restaurantId
"\"IS_PARENT\" INTEGER NOT NULL ,"
+
// 3: isParent
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 4: seqNo
"\"FOOD_NAME\" TEXT,"
+
// 5: foodName
"\"FOOD_NAME1\" TEXT,"
+
// 6: foodName1
"\"FOOD_NAME2\" TEXT,"
+
// 7: foodName2
"\"PLU\" TEXT,"
+
// 8: plu
"\"POS_FID\" TEXT,"
+
// 9: posFid
"\"FOOD_DESC\" TEXT,"
+
// 10: foodDesc
"\"LIMIT_AMOUNT\" INTEGER NOT NULL ,"
+
// 11: limitAmount
"\"LIMIT_TYPE\" INTEGER NOT NULL ,"
+
// 12: limitType
"\"FOOD_SUMMARY\" TEXT,"
+
// 13: foodSummary
"\"INVISIBLE\" INTEGER NOT NULL ,"
+
// 14: invisible
"\"AUTO_MOD\" INTEGER NOT NULL ,"
+
// 15: autoMod
"\"PRICE\" REAL NOT NULL ,"
+
// 16: price
"\"MARKET_PRICE\" REAL NOT NULL ,"
+
// 17: marketPrice
"\"LUNCHBOX_PRICE\" REAL NOT NULL ,"
+
// 18: lunchboxPrice
"\"IMG_URL_SMALL\" TEXT,"
+
// 19: imgUrlSmall
"\"IMAGEURL\" TEXT,"
+
// 20: imageurl
"\"RICEPON_INVISIBLE\" INTEGER NOT NULL ,"
+
// 21: riceponInvisible
"\"COST\" REAL NOT NULL ,"
+
// 22: cost
"\"START_DATE\" INTEGER,"
+
// 23: startDate
"\"END_DATE\" INTEGER,"
+
// 24: endDate
"\"LIKE\" INTEGER NOT NULL ,"
+
// 25: like
"\"TOTAL_SOLD\" INTEGER NOT NULL ,"
+
// 26: totalSold
"\"IS_SOLD\" INTEGER NOT NULL ,"
+
// 27: isSold
"\"CREATE_BY\" TEXT,"
+
// 28: createBy
"\"CREATE_TIME\" INTEGER,"
+
// 29: createTime
"\"UPDATE_BY\" TEXT,"
+
// 30: updateBy
"\"UPDATE_TIME\" INTEGER,"
+
// 31: updateTime
"\"PERIOD_ID\" INTEGER NOT NULL ,"
+
// 32: periodId
"\"ABLE_DISCOUNT\" INTEGER NOT NULL ,"
+
// 33: ableDiscount
"\"TAKEAWAY\" INTEGER NOT NULL ,"
+
// 34: takeaway
"\"BLUE_EDIT\" INTEGER NOT NULL ,"
+
// 35: blueEdit
"\"CART_EDIT\" INTEGER NOT NULL ,"
+
// 36: cartEdit
"\"AUTO_MERGE\" INTEGER NOT NULL ,"
+
// 37: autoMerge
"\"PRINT_SETING\" TEXT,"
+
// 38: printSeting
"\"IS_PRINT_QUEUE_CODE\" INTEGER NOT NULL ,"
+
// 39: isPrintQueueCode
"\"QUEUE_HEAD_ID\" INTEGER NOT NULL ,"
+
// 40: queueHeadId
"\"APPROVE\" INTEGER NOT NULL ,"
+
// 41: approve
"\"PRINT_FONT\" INTEGER NOT NULL ,"
+
// 42: printFont
"\"ADV_PRICE\" INTEGER NOT NULL ,"
+
// 43: advPrice
"\"PRINT_TO_BILL\" INTEGER NOT NULL ,"
+
// 44: printToBill
"\"POINTS_ADD\" REAL NOT NULL ,"
+
// 45: pointsAdd
"\"POINTS_RATIO\" INTEGER NOT NULL ,"
+
// 46: pointsRatio
"\"POINTS_REDEEM\" REAL NOT NULL ,"
+
// 47: pointsRedeem
"\"KT_PRINT_MAIN_ITEM\" INTEGER NOT NULL ,"
+
// 48: ktPrintMainItem
"\"KT_SHOW_PRICE\" INTEGER NOT NULL ,"
+
// 49: ktShowPrice
"\"PRINT_TO\" INTEGER NOT NULL ,"
+
// 50: printTo
"\"TO_PAX\" INTEGER NOT NULL ,"
+
// 51: toPax
"\"FOOD_TYPE\" INTEGER NOT NULL ,"
+
// 52: foodType
"\"MAJOR_MAIN_ID\" INTEGER NOT NULL ,"
+
// 53: majorMainId
"\"DEPT_ID\" INTEGER NOT NULL ,"
+
// 54: deptId
"\"SERVICE_CHARGE\" INTEGER NOT NULL ,"
+
// 55: serviceCharge
"\"COLOR_ID\" INTEGER NOT NULL ,"
+
// 56: colorId
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 57: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 58: isRt
"\"DELETES\" INTEGER NOT NULL ,"
+
// 59: deletes
"\"IS_TIMING_FOOD\" INTEGER NOT NULL ,"
+
// 60: isTimingFood
"\"MIN_LONG_TIME\" INTEGER NOT NULL ,"
+
// 61: minLongTime
"\"UNIT_TIME\" INTEGER NOT NULL ,"
+
// 62: unitTime
"\"UNIT_PRICE\" REAL NOT NULL ,"
+
// 63: unitPrice
"\"FREE_LONG_TIME\" INTEGER NOT NULL ,"
+
// 64: freeLongTime
"\"FREE_PERIOD_BEGIN\" INTEGER,"
+
// 65: freePeriodBegin
"\"IS_STATISTIC\" INTEGER NOT NULL );"
);
// 66: isStatistic
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"FOOD\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Food
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getParentId
());
stmt
.
bindLong
(
3
,
entity
.
getRestaurantId
());
stmt
.
bindLong
(
4
,
entity
.
getIsParent
());
stmt
.
bindLong
(
5
,
entity
.
getSeqNo
());
String
foodName
=
entity
.
getFoodName
();
if
(
foodName
!=
null
)
{
stmt
.
bindString
(
6
,
foodName
);
}
String
foodName1
=
entity
.
getFoodName1
();
if
(
foodName1
!=
null
)
{
stmt
.
bindString
(
7
,
foodName1
);
}
String
foodName2
=
entity
.
getFoodName2
();
if
(
foodName2
!=
null
)
{
stmt
.
bindString
(
8
,
foodName2
);
}
String
plu
=
entity
.
getPlu
();
if
(
plu
!=
null
)
{
stmt
.
bindString
(
9
,
plu
);
}
String
posFid
=
entity
.
getPosFid
();
if
(
posFid
!=
null
)
{
stmt
.
bindString
(
10
,
posFid
);
}
String
foodDesc
=
entity
.
getFoodDesc
();
if
(
foodDesc
!=
null
)
{
stmt
.
bindString
(
11
,
foodDesc
);
}
stmt
.
bindLong
(
12
,
entity
.
getLimitAmount
());
stmt
.
bindLong
(
13
,
entity
.
getLimitType
());
String
foodSummary
=
entity
.
getFoodSummary
();
if
(
foodSummary
!=
null
)
{
stmt
.
bindString
(
14
,
foodSummary
);
}
stmt
.
bindLong
(
15
,
entity
.
getInvisible
());
stmt
.
bindLong
(
16
,
entity
.
getAutoMod
());
stmt
.
bindDouble
(
17
,
entity
.
getPrice
());
stmt
.
bindDouble
(
18
,
entity
.
getMarketPrice
());
stmt
.
bindDouble
(
19
,
entity
.
getLunchboxPrice
());
String
imgUrlSmall
=
entity
.
getImgUrlSmall
();
if
(
imgUrlSmall
!=
null
)
{
stmt
.
bindString
(
20
,
imgUrlSmall
);
}
String
imageurl
=
entity
.
getImageurl
();
if
(
imageurl
!=
null
)
{
stmt
.
bindString
(
21
,
imageurl
);
}
stmt
.
bindLong
(
22
,
entity
.
getRiceponInvisible
());
stmt
.
bindDouble
(
23
,
entity
.
getCost
());
java
.
util
.
Date
startDate
=
entity
.
getStartDate
();
if
(
startDate
!=
null
)
{
stmt
.
bindLong
(
24
,
startDate
.
getTime
());
}
java
.
util
.
Date
endDate
=
entity
.
getEndDate
();
if
(
endDate
!=
null
)
{
stmt
.
bindLong
(
25
,
endDate
.
getTime
());
}
stmt
.
bindLong
(
26
,
entity
.
getLike
());
stmt
.
bindLong
(
27
,
entity
.
getTotalSold
());
stmt
.
bindLong
(
28
,
entity
.
getIsSold
());
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
29
,
createBy
);
}
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
30
,
createTime
.
getTime
());
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
31
,
updateBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
32
,
updateTime
.
getTime
());
}
stmt
.
bindLong
(
33
,
entity
.
getPeriodId
());
stmt
.
bindLong
(
34
,
entity
.
getAbleDiscount
());
stmt
.
bindLong
(
35
,
entity
.
getTakeaway
());
stmt
.
bindLong
(
36
,
entity
.
getBlueEdit
());
stmt
.
bindLong
(
37
,
entity
.
getCartEdit
());
stmt
.
bindLong
(
38
,
entity
.
getAutoMerge
());
String
printSeting
=
entity
.
getPrintSeting
();
if
(
printSeting
!=
null
)
{
stmt
.
bindString
(
39
,
printSeting
);
}
stmt
.
bindLong
(
40
,
entity
.
getIsPrintQueueCode
());
stmt
.
bindLong
(
41
,
entity
.
getQueueHeadId
());
stmt
.
bindLong
(
42
,
entity
.
getApprove
());
stmt
.
bindLong
(
43
,
entity
.
getPrintFont
());
stmt
.
bindLong
(
44
,
entity
.
getAdvPrice
());
stmt
.
bindLong
(
45
,
entity
.
getPrintToBill
());
stmt
.
bindDouble
(
46
,
entity
.
getPointsAdd
());
stmt
.
bindLong
(
47
,
entity
.
getPointsRatio
());
stmt
.
bindDouble
(
48
,
entity
.
getPointsRedeem
());
stmt
.
bindLong
(
49
,
entity
.
getKtPrintMainItem
());
stmt
.
bindLong
(
50
,
entity
.
getKtShowPrice
());
stmt
.
bindLong
(
51
,
entity
.
getPrintTo
());
stmt
.
bindLong
(
52
,
entity
.
getToPax
());
stmt
.
bindLong
(
53
,
entity
.
getFoodType
());
stmt
.
bindLong
(
54
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
55
,
entity
.
getDeptId
());
stmt
.
bindLong
(
56
,
entity
.
getServiceCharge
());
stmt
.
bindLong
(
57
,
entity
.
getColorId
());
stmt
.
bindLong
(
58
,
entity
.
getConditions
());
stmt
.
bindLong
(
59
,
entity
.
getIsRt
());
stmt
.
bindLong
(
60
,
entity
.
getDeletes
());
stmt
.
bindLong
(
61
,
entity
.
getIsTimingFood
());
stmt
.
bindLong
(
62
,
entity
.
getMinLongTime
());
stmt
.
bindLong
(
63
,
entity
.
getUnitTime
());
stmt
.
bindDouble
(
64
,
entity
.
getUnitPrice
());
stmt
.
bindLong
(
65
,
entity
.
getFreeLongTime
());
java
.
util
.
Date
freePeriodBegin
=
entity
.
getFreePeriodBegin
();
if
(
freePeriodBegin
!=
null
)
{
stmt
.
bindLong
(
66
,
freePeriodBegin
.
getTime
());
}
stmt
.
bindLong
(
67
,
entity
.
getIsStatistic
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Food
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getParentId
());
stmt
.
bindLong
(
3
,
entity
.
getRestaurantId
());
stmt
.
bindLong
(
4
,
entity
.
getIsParent
());
stmt
.
bindLong
(
5
,
entity
.
getSeqNo
());
String
foodName
=
entity
.
getFoodName
();
if
(
foodName
!=
null
)
{
stmt
.
bindString
(
6
,
foodName
);
}
String
foodName1
=
entity
.
getFoodName1
();
if
(
foodName1
!=
null
)
{
stmt
.
bindString
(
7
,
foodName1
);
}
String
foodName2
=
entity
.
getFoodName2
();
if
(
foodName2
!=
null
)
{
stmt
.
bindString
(
8
,
foodName2
);
}
String
plu
=
entity
.
getPlu
();
if
(
plu
!=
null
)
{
stmt
.
bindString
(
9
,
plu
);
}
String
posFid
=
entity
.
getPosFid
();
if
(
posFid
!=
null
)
{
stmt
.
bindString
(
10
,
posFid
);
}
String
foodDesc
=
entity
.
getFoodDesc
();
if
(
foodDesc
!=
null
)
{
stmt
.
bindString
(
11
,
foodDesc
);
}
stmt
.
bindLong
(
12
,
entity
.
getLimitAmount
());
stmt
.
bindLong
(
13
,
entity
.
getLimitType
());
String
foodSummary
=
entity
.
getFoodSummary
();
if
(
foodSummary
!=
null
)
{
stmt
.
bindString
(
14
,
foodSummary
);
}
stmt
.
bindLong
(
15
,
entity
.
getInvisible
());
stmt
.
bindLong
(
16
,
entity
.
getAutoMod
());
stmt
.
bindDouble
(
17
,
entity
.
getPrice
());
stmt
.
bindDouble
(
18
,
entity
.
getMarketPrice
());
stmt
.
bindDouble
(
19
,
entity
.
getLunchboxPrice
());
String
imgUrlSmall
=
entity
.
getImgUrlSmall
();
if
(
imgUrlSmall
!=
null
)
{
stmt
.
bindString
(
20
,
imgUrlSmall
);
}
String
imageurl
=
entity
.
getImageurl
();
if
(
imageurl
!=
null
)
{
stmt
.
bindString
(
21
,
imageurl
);
}
stmt
.
bindLong
(
22
,
entity
.
getRiceponInvisible
());
stmt
.
bindDouble
(
23
,
entity
.
getCost
());
java
.
util
.
Date
startDate
=
entity
.
getStartDate
();
if
(
startDate
!=
null
)
{
stmt
.
bindLong
(
24
,
startDate
.
getTime
());
}
java
.
util
.
Date
endDate
=
entity
.
getEndDate
();
if
(
endDate
!=
null
)
{
stmt
.
bindLong
(
25
,
endDate
.
getTime
());
}
stmt
.
bindLong
(
26
,
entity
.
getLike
());
stmt
.
bindLong
(
27
,
entity
.
getTotalSold
());
stmt
.
bindLong
(
28
,
entity
.
getIsSold
());
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
29
,
createBy
);
}
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
30
,
createTime
.
getTime
());
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
31
,
updateBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
32
,
updateTime
.
getTime
());
}
stmt
.
bindLong
(
33
,
entity
.
getPeriodId
());
stmt
.
bindLong
(
34
,
entity
.
getAbleDiscount
());
stmt
.
bindLong
(
35
,
entity
.
getTakeaway
());
stmt
.
bindLong
(
36
,
entity
.
getBlueEdit
());
stmt
.
bindLong
(
37
,
entity
.
getCartEdit
());
stmt
.
bindLong
(
38
,
entity
.
getAutoMerge
());
String
printSeting
=
entity
.
getPrintSeting
();
if
(
printSeting
!=
null
)
{
stmt
.
bindString
(
39
,
printSeting
);
}
stmt
.
bindLong
(
40
,
entity
.
getIsPrintQueueCode
());
stmt
.
bindLong
(
41
,
entity
.
getQueueHeadId
());
stmt
.
bindLong
(
42
,
entity
.
getApprove
());
stmt
.
bindLong
(
43
,
entity
.
getPrintFont
());
stmt
.
bindLong
(
44
,
entity
.
getAdvPrice
());
stmt
.
bindLong
(
45
,
entity
.
getPrintToBill
());
stmt
.
bindDouble
(
46
,
entity
.
getPointsAdd
());
stmt
.
bindLong
(
47
,
entity
.
getPointsRatio
());
stmt
.
bindDouble
(
48
,
entity
.
getPointsRedeem
());
stmt
.
bindLong
(
49
,
entity
.
getKtPrintMainItem
());
stmt
.
bindLong
(
50
,
entity
.
getKtShowPrice
());
stmt
.
bindLong
(
51
,
entity
.
getPrintTo
());
stmt
.
bindLong
(
52
,
entity
.
getToPax
());
stmt
.
bindLong
(
53
,
entity
.
getFoodType
());
stmt
.
bindLong
(
54
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
55
,
entity
.
getDeptId
());
stmt
.
bindLong
(
56
,
entity
.
getServiceCharge
());
stmt
.
bindLong
(
57
,
entity
.
getColorId
());
stmt
.
bindLong
(
58
,
entity
.
getConditions
());
stmt
.
bindLong
(
59
,
entity
.
getIsRt
());
stmt
.
bindLong
(
60
,
entity
.
getDeletes
());
stmt
.
bindLong
(
61
,
entity
.
getIsTimingFood
());
stmt
.
bindLong
(
62
,
entity
.
getMinLongTime
());
stmt
.
bindLong
(
63
,
entity
.
getUnitTime
());
stmt
.
bindDouble
(
64
,
entity
.
getUnitPrice
());
stmt
.
bindLong
(
65
,
entity
.
getFreeLongTime
());
java
.
util
.
Date
freePeriodBegin
=
entity
.
getFreePeriodBegin
();
if
(
freePeriodBegin
!=
null
)
{
stmt
.
bindLong
(
66
,
freePeriodBegin
.
getTime
());
}
stmt
.
bindLong
(
67
,
entity
.
getIsStatistic
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Food
readEntity
(
Cursor
cursor
,
int
offset
)
{
Food
entity
=
new
Food
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
getLong
(
offset
+
1
),
// parentId
cursor
.
getLong
(
offset
+
2
),
// restaurantId
(
byte
)
cursor
.
getShort
(
offset
+
3
),
// isParent
cursor
.
getLong
(
offset
+
4
),
// seqNo
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// foodName
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// foodName1
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// foodName2
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// plu
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
),
// posFid
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
),
// foodDesc
cursor
.
getLong
(
offset
+
11
),
// limitAmount
cursor
.
getLong
(
offset
+
12
),
// limitType
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// foodSummary
cursor
.
getLong
(
offset
+
14
),
// invisible
(
byte
)
cursor
.
getShort
(
offset
+
15
),
// autoMod
cursor
.
getDouble
(
offset
+
16
),
// price
cursor
.
getDouble
(
offset
+
17
),
// marketPrice
cursor
.
getDouble
(
offset
+
18
),
// lunchboxPrice
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
),
// imgUrlSmall
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
),
// imageurl
cursor
.
getLong
(
offset
+
21
),
// riceponInvisible
cursor
.
getDouble
(
offset
+
22
),
// cost
cursor
.
isNull
(
offset
+
23
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
23
)),
// startDate
cursor
.
isNull
(
offset
+
24
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
24
)),
// endDate
cursor
.
getLong
(
offset
+
25
),
// like
cursor
.
getLong
(
offset
+
26
),
// totalSold
cursor
.
getLong
(
offset
+
27
),
// isSold
cursor
.
isNull
(
offset
+
28
)
?
null
:
cursor
.
getString
(
offset
+
28
),
// createBy
cursor
.
isNull
(
offset
+
29
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
29
)),
// createTime
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
),
// updateBy
cursor
.
isNull
(
offset
+
31
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
31
)),
// updateTime
cursor
.
getLong
(
offset
+
32
),
// periodId
cursor
.
getLong
(
offset
+
33
),
// ableDiscount
cursor
.
getLong
(
offset
+
34
),
// takeaway
cursor
.
getLong
(
offset
+
35
),
// blueEdit
cursor
.
getLong
(
offset
+
36
),
// cartEdit
cursor
.
getLong
(
offset
+
37
),
// autoMerge
cursor
.
isNull
(
offset
+
38
)
?
null
:
cursor
.
getString
(
offset
+
38
),
// printSeting
cursor
.
getLong
(
offset
+
39
),
// isPrintQueueCode
cursor
.
getLong
(
offset
+
40
),
// queueHeadId
cursor
.
getLong
(
offset
+
41
),
// approve
cursor
.
getLong
(
offset
+
42
),
// printFont
cursor
.
getLong
(
offset
+
43
),
// advPrice
cursor
.
getLong
(
offset
+
44
),
// printToBill
cursor
.
getDouble
(
offset
+
45
),
// pointsAdd
cursor
.
getLong
(
offset
+
46
),
// pointsRatio
cursor
.
getDouble
(
offset
+
47
),
// pointsRedeem
cursor
.
getLong
(
offset
+
48
),
// ktPrintMainItem
cursor
.
getLong
(
offset
+
49
),
// ktShowPrice
cursor
.
getLong
(
offset
+
50
),
// printTo
cursor
.
getLong
(
offset
+
51
),
// toPax
cursor
.
getLong
(
offset
+
52
),
// foodType
cursor
.
getLong
(
offset
+
53
),
// majorMainId
cursor
.
getLong
(
offset
+
54
),
// deptId
(
byte
)
cursor
.
getShort
(
offset
+
55
),
// serviceCharge
cursor
.
getLong
(
offset
+
56
),
// colorId
cursor
.
getLong
(
offset
+
57
),
// conditions
cursor
.
getLong
(
offset
+
58
),
// isRt
cursor
.
getLong
(
offset
+
59
),
// deletes
cursor
.
getLong
(
offset
+
60
),
// isTimingFood
cursor
.
getLong
(
offset
+
61
),
// minLongTime
cursor
.
getLong
(
offset
+
62
),
// unitTime
cursor
.
getDouble
(
offset
+
63
),
// unitPrice
cursor
.
getLong
(
offset
+
64
),
// freeLongTime
cursor
.
isNull
(
offset
+
65
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
65
)),
// freePeriodBegin
cursor
.
getLong
(
offset
+
66
)
// isStatistic
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Food
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setParentId
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setRestaurantId
(
cursor
.
getLong
(
offset
+
2
));
entity
.
setIsParent
((
byte
)
cursor
.
getShort
(
offset
+
3
));
entity
.
setSeqNo
(
cursor
.
getLong
(
offset
+
4
));
entity
.
setFoodName
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setFoodName1
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setFoodName2
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setPlu
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setPosFid
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
entity
.
setFoodDesc
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
));
entity
.
setLimitAmount
(
cursor
.
getLong
(
offset
+
11
));
entity
.
setLimitType
(
cursor
.
getLong
(
offset
+
12
));
entity
.
setFoodSummary
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setInvisible
(
cursor
.
getLong
(
offset
+
14
));
entity
.
setAutoMod
((
byte
)
cursor
.
getShort
(
offset
+
15
));
entity
.
setPrice
(
cursor
.
getDouble
(
offset
+
16
));
entity
.
setMarketPrice
(
cursor
.
getDouble
(
offset
+
17
));
entity
.
setLunchboxPrice
(
cursor
.
getDouble
(
offset
+
18
));
entity
.
setImgUrlSmall
(
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
));
entity
.
setImageurl
(
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
));
entity
.
setRiceponInvisible
(
cursor
.
getLong
(
offset
+
21
));
entity
.
setCost
(
cursor
.
getDouble
(
offset
+
22
));
entity
.
setStartDate
(
cursor
.
isNull
(
offset
+
23
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
23
)));
entity
.
setEndDate
(
cursor
.
isNull
(
offset
+
24
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
24
)));
entity
.
setLike
(
cursor
.
getLong
(
offset
+
25
));
entity
.
setTotalSold
(
cursor
.
getLong
(
offset
+
26
));
entity
.
setIsSold
(
cursor
.
getLong
(
offset
+
27
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
28
)
?
null
:
cursor
.
getString
(
offset
+
28
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
29
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
29
)));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
31
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
31
)));
entity
.
setPeriodId
(
cursor
.
getLong
(
offset
+
32
));
entity
.
setAbleDiscount
(
cursor
.
getLong
(
offset
+
33
));
entity
.
setTakeaway
(
cursor
.
getLong
(
offset
+
34
));
entity
.
setBlueEdit
(
cursor
.
getLong
(
offset
+
35
));
entity
.
setCartEdit
(
cursor
.
getLong
(
offset
+
36
));
entity
.
setAutoMerge
(
cursor
.
getLong
(
offset
+
37
));
entity
.
setPrintSeting
(
cursor
.
isNull
(
offset
+
38
)
?
null
:
cursor
.
getString
(
offset
+
38
));
entity
.
setIsPrintQueueCode
(
cursor
.
getLong
(
offset
+
39
));
entity
.
setQueueHeadId
(
cursor
.
getLong
(
offset
+
40
));
entity
.
setApprove
(
cursor
.
getLong
(
offset
+
41
));
entity
.
setPrintFont
(
cursor
.
getLong
(
offset
+
42
));
entity
.
setAdvPrice
(
cursor
.
getLong
(
offset
+
43
));
entity
.
setPrintToBill
(
cursor
.
getLong
(
offset
+
44
));
entity
.
setPointsAdd
(
cursor
.
getDouble
(
offset
+
45
));
entity
.
setPointsRatio
(
cursor
.
getLong
(
offset
+
46
));
entity
.
setPointsRedeem
(
cursor
.
getDouble
(
offset
+
47
));
entity
.
setKtPrintMainItem
(
cursor
.
getLong
(
offset
+
48
));
entity
.
setKtShowPrice
(
cursor
.
getLong
(
offset
+
49
));
entity
.
setPrintTo
(
cursor
.
getLong
(
offset
+
50
));
entity
.
setToPax
(
cursor
.
getLong
(
offset
+
51
));
entity
.
setFoodType
(
cursor
.
getLong
(
offset
+
52
));
entity
.
setMajorMainId
(
cursor
.
getLong
(
offset
+
53
));
entity
.
setDeptId
(
cursor
.
getLong
(
offset
+
54
));
entity
.
setServiceCharge
((
byte
)
cursor
.
getShort
(
offset
+
55
));
entity
.
setColorId
(
cursor
.
getLong
(
offset
+
56
));
entity
.
setConditions
(
cursor
.
getLong
(
offset
+
57
));
entity
.
setIsRt
(
cursor
.
getLong
(
offset
+
58
));
entity
.
setDeletes
(
cursor
.
getLong
(
offset
+
59
));
entity
.
setIsTimingFood
(
cursor
.
getLong
(
offset
+
60
));
entity
.
setMinLongTime
(
cursor
.
getLong
(
offset
+
61
));
entity
.
setUnitTime
(
cursor
.
getLong
(
offset
+
62
));
entity
.
setUnitPrice
(
cursor
.
getDouble
(
offset
+
63
));
entity
.
setFreeLongTime
(
cursor
.
getLong
(
offset
+
64
));
entity
.
setFreePeriodBegin
(
cursor
.
isNull
(
offset
+
65
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
65
)));
entity
.
setIsStatistic
(
cursor
.
getLong
(
offset
+
66
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Food
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Food
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Food
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodModifierDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.FoodModifier
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "FOOD_MODIFIER".
*/
public
class
FoodModifierDao
extends
AbstractDao
<
FoodModifier
,
Long
>
{
public
static
final
String
TABLENAME
=
"FOOD_MODIFIER"
;
/**
* Properties of entity FoodModifier.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
Mid
=
new
Property
(
1
,
Long
.
class
,
"mid"
,
false
,
"MID"
);
public
final
static
Property
Fid
=
new
Property
(
2
,
Long
.
class
,
"fid"
,
false
,
"FID"
);
public
final
static
Property
MinQty
=
new
Property
(
3
,
int
.
class
,
"minQty"
,
false
,
"MIN_QTY"
);
public
final
static
Property
MaxQty
=
new
Property
(
4
,
int
.
class
,
"maxQty"
,
false
,
"MAX_QTY"
);
public
final
static
Property
SeqNo
=
new
Property
(
5
,
int
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
CreateTime
=
new
Property
(
6
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
CreateBy
=
new
Property
(
7
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
8
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
ShowType
=
new
Property
(
9
,
int
.
class
,
"showType"
,
false
,
"SHOW_TYPE"
);
public
final
static
Property
AutoNext
=
new
Property
(
10
,
int
.
class
,
"autoNext"
,
false
,
"AUTO_NEXT"
);
public
final
static
Property
MultipleSelect
=
new
Property
(
11
,
int
.
class
,
"multipleSelect"
,
false
,
"MULTIPLE_SELECT"
);
public
final
static
Property
Defmodifier
=
new
Property
(
12
,
String
.
class
,
"defmodifier"
,
false
,
"DEFMODIFIER"
);
public
final
static
Property
Excmodifier
=
new
Property
(
13
,
String
.
class
,
"excmodifier"
,
false
,
"EXCMODIFIER"
);
public
final
static
Property
Conditions
=
new
Property
(
14
,
int
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRT
=
new
Property
(
15
,
int
.
class
,
"isRT"
,
false
,
"IS_RT"
);
public
final
static
Property
RestaurantId
=
new
Property
(
16
,
int
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
PreferentialPrice
=
new
Property
(
17
,
int
.
class
,
"preferentialPrice"
,
false
,
"PREFERENTIAL_PRICE"
);
public
final
static
Property
PosId
=
new
Property
(
18
,
int
.
class
,
"posId"
,
false
,
"POS_ID"
);
}
public
FoodModifierDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
FoodModifierDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"FOOD_MODIFIER\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"MID\" INTEGER NOT NULL ,"
+
// 1: mid
"\"FID\" INTEGER,"
+
// 2: fid
"\"MIN_QTY\" INTEGER NOT NULL ,"
+
// 3: minQty
"\"MAX_QTY\" INTEGER NOT NULL ,"
+
// 4: maxQty
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 5: seqNo
"\"CREATE_TIME\" TEXT,"
+
// 6: createTime
"\"CREATE_BY\" TEXT,"
+
// 7: createBy
"\"UPDATE_TIME\" TEXT,"
+
// 8: updateTime
"\"SHOW_TYPE\" INTEGER NOT NULL ,"
+
// 9: showType
"\"AUTO_NEXT\" INTEGER NOT NULL ,"
+
// 10: autoNext
"\"MULTIPLE_SELECT\" INTEGER NOT NULL ,"
+
// 11: multipleSelect
"\"DEFMODIFIER\" TEXT,"
+
// 12: defmodifier
"\"EXCMODIFIER\" TEXT,"
+
// 13: excmodifier
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 14: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 15: isRT
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 16: restaurantId
"\"PREFERENTIAL_PRICE\" INTEGER NOT NULL ,"
+
// 17: preferentialPrice
"\"POS_ID\" INTEGER NOT NULL );"
);
// 18: posId
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"FOOD_MODIFIER\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
FoodModifier
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getMid
());
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
3
,
fid
);
}
stmt
.
bindLong
(
4
,
entity
.
getMinQty
());
stmt
.
bindLong
(
5
,
entity
.
getMaxQty
());
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
8
,
createBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
9
,
updateTime
);
}
stmt
.
bindLong
(
10
,
entity
.
getShowType
());
stmt
.
bindLong
(
11
,
entity
.
getAutoNext
());
stmt
.
bindLong
(
12
,
entity
.
getMultipleSelect
());
String
defmodifier
=
entity
.
getDefmodifier
();
if
(
defmodifier
!=
null
)
{
stmt
.
bindString
(
13
,
defmodifier
);
}
String
excmodifier
=
entity
.
getExcmodifier
();
if
(
excmodifier
!=
null
)
{
stmt
.
bindString
(
14
,
excmodifier
);
}
stmt
.
bindLong
(
15
,
entity
.
getConditions
());
stmt
.
bindLong
(
16
,
entity
.
getIsRT
());
stmt
.
bindLong
(
17
,
entity
.
getRestaurantId
());
stmt
.
bindLong
(
18
,
entity
.
getPreferentialPrice
());
stmt
.
bindLong
(
19
,
entity
.
getPosId
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
FoodModifier
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getMid
());
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
3
,
fid
);
}
stmt
.
bindLong
(
4
,
entity
.
getMinQty
());
stmt
.
bindLong
(
5
,
entity
.
getMaxQty
());
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
8
,
createBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
9
,
updateTime
);
}
stmt
.
bindLong
(
10
,
entity
.
getShowType
());
stmt
.
bindLong
(
11
,
entity
.
getAutoNext
());
stmt
.
bindLong
(
12
,
entity
.
getMultipleSelect
());
String
defmodifier
=
entity
.
getDefmodifier
();
if
(
defmodifier
!=
null
)
{
stmt
.
bindString
(
13
,
defmodifier
);
}
String
excmodifier
=
entity
.
getExcmodifier
();
if
(
excmodifier
!=
null
)
{
stmt
.
bindString
(
14
,
excmodifier
);
}
stmt
.
bindLong
(
15
,
entity
.
getConditions
());
stmt
.
bindLong
(
16
,
entity
.
getIsRT
());
stmt
.
bindLong
(
17
,
entity
.
getRestaurantId
());
stmt
.
bindLong
(
18
,
entity
.
getPreferentialPrice
());
stmt
.
bindLong
(
19
,
entity
.
getPosId
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
FoodModifier
readEntity
(
Cursor
cursor
,
int
offset
)
{
FoodModifier
entity
=
new
FoodModifier
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
getLong
(
offset
+
1
),
// mid
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getLong
(
offset
+
2
),
// fid
cursor
.
getInt
(
offset
+
3
),
// minQty
cursor
.
getInt
(
offset
+
4
),
// maxQty
cursor
.
getInt
(
offset
+
5
),
// seqNo
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// createTime
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// createBy
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// updateTime
cursor
.
getInt
(
offset
+
9
),
// showType
cursor
.
getInt
(
offset
+
10
),
// autoNext
cursor
.
getInt
(
offset
+
11
),
// multipleSelect
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
),
// defmodifier
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// excmodifier
cursor
.
getInt
(
offset
+
14
),
// conditions
cursor
.
getInt
(
offset
+
15
),
// isRT
cursor
.
getInt
(
offset
+
16
),
// restaurantId
cursor
.
getInt
(
offset
+
17
),
// preferentialPrice
cursor
.
getInt
(
offset
+
18
)
// posId
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
FoodModifier
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setMid
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setFid
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getLong
(
offset
+
2
));
entity
.
setMinQty
(
cursor
.
getInt
(
offset
+
3
));
entity
.
setMaxQty
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setSeqNo
(
cursor
.
getInt
(
offset
+
5
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setShowType
(
cursor
.
getInt
(
offset
+
9
));
entity
.
setAutoNext
(
cursor
.
getInt
(
offset
+
10
));
entity
.
setMultipleSelect
(
cursor
.
getInt
(
offset
+
11
));
entity
.
setDefmodifier
(
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
));
entity
.
setExcmodifier
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setConditions
(
cursor
.
getInt
(
offset
+
14
));
entity
.
setIsRT
(
cursor
.
getInt
(
offset
+
15
));
entity
.
setRestaurantId
(
cursor
.
getInt
(
offset
+
16
));
entity
.
setPreferentialPrice
(
cursor
.
getInt
(
offset
+
17
));
entity
.
setPosId
(
cursor
.
getInt
(
offset
+
18
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
FoodModifier
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
FoodModifier
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
FoodModifier
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FunctionDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Function
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "FUNCTION".
*/
public
class
FunctionDao
extends
AbstractDao
<
Function
,
Long
>
{
public
static
final
String
TABLENAME
=
"FUNCTION"
;
/**
* Properties of entity Function.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Dbid
=
new
Property
(
0
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Id
=
new
Property
(
1
,
Long
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
ParentId
=
new
Property
(
2
,
int
.
class
,
"parentId"
,
false
,
"PARENT_ID"
);
public
final
static
Property
GroupId
=
new
Property
(
3
,
int
.
class
,
"groupId"
,
false
,
"GROUP_ID"
);
public
final
static
Property
EffectiveTime
=
new
Property
(
4
,
long
.
class
,
"effectiveTime"
,
false
,
"EFFECTIVE_TIME"
);
public
final
static
Property
ResName
=
new
Property
(
5
,
String
.
class
,
"resName"
,
false
,
"RES_NAME"
);
public
final
static
Property
ResUrl
=
new
Property
(
6
,
String
.
class
,
"resUrl"
,
false
,
"RES_URL"
);
public
final
static
Property
ImageURL
=
new
Property
(
7
,
String
.
class
,
"imageURL"
,
false
,
"IMAGE_URL"
);
public
final
static
Property
IcRes
=
new
Property
(
8
,
int
.
class
,
"icRes"
,
false
,
"IC_RES"
);
public
final
static
Property
Status
=
new
Property
(
9
,
int
.
class
,
"status"
,
false
,
"STATUS"
);
}
public
FunctionDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
FunctionDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"FUNCTION\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: dbid
"\"ID\" INTEGER NOT NULL ,"
+
// 1: id
"\"PARENT_ID\" INTEGER NOT NULL ,"
+
// 2: parentId
"\"GROUP_ID\" INTEGER NOT NULL ,"
+
// 3: groupId
"\"EFFECTIVE_TIME\" INTEGER NOT NULL ,"
+
// 4: effectiveTime
"\"RES_NAME\" TEXT,"
+
// 5: resName
"\"RES_URL\" TEXT,"
+
// 6: resUrl
"\"IMAGE_URL\" TEXT,"
+
// 7: imageURL
"\"IC_RES\" INTEGER NOT NULL ,"
+
// 8: icRes
"\"STATUS\" INTEGER NOT NULL );"
);
// 9: status
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"FUNCTION\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Function
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getId
());
stmt
.
bindLong
(
3
,
entity
.
getParentId
());
stmt
.
bindLong
(
4
,
entity
.
getGroupId
());
stmt
.
bindLong
(
5
,
entity
.
getEffectiveTime
());
String
resName
=
entity
.
getResName
();
if
(
resName
!=
null
)
{
stmt
.
bindString
(
6
,
resName
);
}
String
resUrl
=
entity
.
getResUrl
();
if
(
resUrl
!=
null
)
{
stmt
.
bindString
(
7
,
resUrl
);
}
String
imageURL
=
entity
.
getImageURL
();
if
(
imageURL
!=
null
)
{
stmt
.
bindString
(
8
,
imageURL
);
}
stmt
.
bindLong
(
9
,
entity
.
getIcRes
());
stmt
.
bindLong
(
10
,
entity
.
getStatus
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Function
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getId
());
stmt
.
bindLong
(
3
,
entity
.
getParentId
());
stmt
.
bindLong
(
4
,
entity
.
getGroupId
());
stmt
.
bindLong
(
5
,
entity
.
getEffectiveTime
());
String
resName
=
entity
.
getResName
();
if
(
resName
!=
null
)
{
stmt
.
bindString
(
6
,
resName
);
}
String
resUrl
=
entity
.
getResUrl
();
if
(
resUrl
!=
null
)
{
stmt
.
bindString
(
7
,
resUrl
);
}
String
imageURL
=
entity
.
getImageURL
();
if
(
imageURL
!=
null
)
{
stmt
.
bindString
(
8
,
imageURL
);
}
stmt
.
bindLong
(
9
,
entity
.
getIcRes
());
stmt
.
bindLong
(
10
,
entity
.
getStatus
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Function
readEntity
(
Cursor
cursor
,
int
offset
)
{
Function
entity
=
new
Function
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// dbid
cursor
.
getLong
(
offset
+
1
),
// id
cursor
.
getInt
(
offset
+
2
),
// parentId
cursor
.
getInt
(
offset
+
3
),
// groupId
cursor
.
getLong
(
offset
+
4
),
// effectiveTime
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// resName
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// resUrl
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// imageURL
cursor
.
getInt
(
offset
+
8
),
// icRes
cursor
.
getInt
(
offset
+
9
)
// status
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Function
entity
,
int
offset
)
{
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setId
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setParentId
(
cursor
.
getInt
(
offset
+
2
));
entity
.
setGroupId
(
cursor
.
getInt
(
offset
+
3
));
entity
.
setEffectiveTime
(
cursor
.
getLong
(
offset
+
4
));
entity
.
setResName
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setResUrl
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setImageURL
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setIcRes
(
cursor
.
getInt
(
offset
+
8
));
entity
.
setStatus
(
cursor
.
getInt
(
offset
+
9
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Function
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Function
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Function
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/LanguageDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Language
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "LANGUAGE".
*/
public
class
LanguageDao
extends
AbstractDao
<
Language
,
Long
>
{
public
static
final
String
TABLENAME
=
"LANGUAGE"
;
/**
* Properties of entity Language.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
FunctionName
=
new
Property
(
1
,
String
.
class
,
"functionName"
,
false
,
"FUNCTION_NAME"
);
public
final
static
Property
LanguageName
=
new
Property
(
2
,
String
.
class
,
"languageName"
,
false
,
"LANGUAGE_NAME"
);
}
public
LanguageDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
LanguageDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"LANGUAGE\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"FUNCTION_NAME\" TEXT NOT NULL ,"
+
// 1: functionName
"\"LANGUAGE_NAME\" TEXT);"
);
// 2: languageName
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"LANGUAGE\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Language
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindString
(
2
,
entity
.
getFunctionName
());
String
languageName
=
entity
.
getLanguageName
();
if
(
languageName
!=
null
)
{
stmt
.
bindString
(
3
,
languageName
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Language
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindString
(
2
,
entity
.
getFunctionName
());
String
languageName
=
entity
.
getLanguageName
();
if
(
languageName
!=
null
)
{
stmt
.
bindString
(
3
,
languageName
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Language
readEntity
(
Cursor
cursor
,
int
offset
)
{
Language
entity
=
new
Language
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
getString
(
offset
+
1
),
// functionName
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
)
// languageName
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Language
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setFunctionName
(
cursor
.
getString
(
offset
+
1
));
entity
.
setLanguageName
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Language
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Language
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Language
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ModifierDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "MODIFIER".
*/
public
class
ModifierDao
extends
AbstractDao
<
Modifier
,
Long
>
{
public
static
final
String
TABLENAME
=
"MODIFIER"
;
/**
* Properties of entity Modifier.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Dbid
=
new
Property
(
0
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Mid
=
new
Property
(
1
,
long
.
class
,
"mid"
,
false
,
"MID"
);
public
final
static
Property
TopId
=
new
Property
(
2
,
long
.
class
,
"topId"
,
false
,
"TOP_ID"
);
public
final
static
Property
RestaurantId
=
new
Property
(
3
,
long
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
ModifierName
=
new
Property
(
4
,
String
.
class
,
"modifierName"
,
false
,
"MODIFIER_NAME"
);
public
final
static
Property
SeqNo
=
new
Property
(
5
,
long
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
MarketPrice
=
new
Property
(
6
,
double
.
class
,
"marketPrice"
,
false
,
"MARKET_PRICE"
);
public
final
static
Property
Price
=
new
Property
(
7
,
double
.
class
,
"price"
,
false
,
"PRICE"
);
public
final
static
Property
LunchboxPrice
=
new
Property
(
8
,
double
.
class
,
"lunchboxPrice"
,
false
,
"LUNCHBOX_PRICE"
);
public
final
static
Property
ColorId
=
new
Property
(
9
,
long
.
class
,
"colorId"
,
false
,
"COLOR_ID"
);
public
final
static
Property
ImageUrl
=
new
Property
(
10
,
String
.
class
,
"imageUrl"
,
false
,
"IMAGE_URL"
);
public
final
static
Property
Invisible
=
new
Property
(
11
,
long
.
class
,
"invisible"
,
false
,
"INVISIBLE"
);
public
final
static
Property
Cost
=
new
Property
(
12
,
double
.
class
,
"cost"
,
false
,
"COST"
);
public
final
static
Property
StartDate
=
new
Property
(
13
,
java
.
util
.
Date
.
class
,
"startDate"
,
false
,
"START_DATE"
);
public
final
static
Property
EndDate
=
new
Property
(
14
,
java
.
util
.
Date
.
class
,
"endDate"
,
false
,
"END_DATE"
);
public
final
static
Property
Like
=
new
Property
(
15
,
long
.
class
,
"like"
,
false
,
"LIKE"
);
public
final
static
Property
TotalSold
=
new
Property
(
16
,
long
.
class
,
"totalSold"
,
false
,
"TOTAL_SOLD"
);
public
final
static
Property
MajorMainId
=
new
Property
(
17
,
long
.
class
,
"majorMainId"
,
false
,
"MAJOR_MAIN_ID"
);
public
final
static
Property
DeptId
=
new
Property
(
18
,
long
.
class
,
"deptId"
,
false
,
"DEPT_ID"
);
public
final
static
Property
CreateBy
=
new
Property
(
19
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
20
,
java
.
util
.
Date
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
21
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
22
,
java
.
util
.
Date
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
PosFid
=
new
Property
(
23
,
String
.
class
,
"posFid"
,
false
,
"POS_FID"
);
public
final
static
Property
PId
=
new
Property
(
24
,
String
.
class
,
"pId"
,
false
,
"P_ID"
);
public
final
static
Property
AutoMod
=
new
Property
(
25
,
long
.
class
,
"autoMod"
,
false
,
"AUTO_MOD"
);
public
final
static
Property
BlueEdit
=
new
Property
(
26
,
long
.
class
,
"blueEdit"
,
false
,
"BLUE_EDIT"
);
public
final
static
Property
AutoMerge
=
new
Property
(
27
,
long
.
class
,
"autoMerge"
,
false
,
"AUTO_MERGE"
);
public
final
static
Property
CustomMsg
=
new
Property
(
28
,
long
.
class
,
"customMsg"
,
false
,
"CUSTOM_MSG"
);
public
final
static
Property
IsParent
=
new
Property
(
29
,
long
.
class
,
"isParent"
,
false
,
"IS_PARENT"
);
public
final
static
Property
ModifierName1
=
new
Property
(
30
,
String
.
class
,
"modifierName1"
,
false
,
"MODIFIER_NAME1"
);
public
final
static
Property
ModifierName2
=
new
Property
(
31
,
String
.
class
,
"modifierName2"
,
false
,
"MODIFIER_NAME2"
);
public
final
static
Property
Multiple
=
new
Property
(
32
,
double
.
class
,
"multiple"
,
false
,
"MULTIPLE"
);
public
final
static
Property
PrintSet
=
new
Property
(
33
,
String
.
class
,
"printSet"
,
false
,
"PRINT_SET"
);
public
final
static
Property
KtSetting
=
new
Property
(
34
,
String
.
class
,
"ktSetting"
,
false
,
"KT_SETTING"
);
public
final
static
Property
ModComm
=
new
Property
(
35
,
long
.
class
,
"modComm"
,
false
,
"MOD_COMM"
);
public
final
static
Property
ModTaste
=
new
Property
(
36
,
long
.
class
,
"modTaste"
,
false
,
"MOD_TASTE"
);
public
final
static
Property
ModMsg
=
new
Property
(
37
,
long
.
class
,
"modMsg"
,
false
,
"MOD_MSG"
);
public
final
static
Property
KtFireCourse
=
new
Property
(
38
,
long
.
class
,
"ktFireCourse"
,
false
,
"KT_FIRE_COURSE"
);
public
final
static
Property
AbleDisCount
=
new
Property
(
39
,
long
.
class
,
"ableDisCount"
,
false
,
"ABLE_DIS_COUNT"
);
public
final
static
Property
PrintToBill
=
new
Property
(
40
,
long
.
class
,
"printToBill"
,
false
,
"PRINT_TO_BILL"
);
public
final
static
Property
KtPrintMainItem
=
new
Property
(
41
,
long
.
class
,
"ktPrintMainItem"
,
false
,
"KT_PRINT_MAIN_ITEM"
);
public
final
static
Property
KtShowPrice
=
new
Property
(
42
,
long
.
class
,
"ktShowPrice"
,
false
,
"KT_SHOW_PRICE"
);
public
final
static
Property
KtFont
=
new
Property
(
43
,
long
.
class
,
"ktFont"
,
false
,
"KT_FONT"
);
public
final
static
Property
Conditions
=
new
Property
(
44
,
long
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRt
=
new
Property
(
45
,
long
.
class
,
"isRt"
,
false
,
"IS_RT"
);
public
final
static
Property
Visible
=
new
Property
(
46
,
byte
.
class
,
"visible"
,
false
,
"VISIBLE"
);
public
final
static
Property
Deletes
=
new
Property
(
47
,
long
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
IsStatistic
=
new
Property
(
48
,
long
.
class
,
"isStatistic"
,
false
,
"IS_STATISTIC"
);
}
public
ModifierDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
ModifierDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"MODIFIER\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: dbid
"\"MID\" INTEGER NOT NULL ,"
+
// 1: mid
"\"TOP_ID\" INTEGER NOT NULL ,"
+
// 2: topId
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 3: restaurantId
"\"MODIFIER_NAME\" TEXT,"
+
// 4: modifierName
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 5: seqNo
"\"MARKET_PRICE\" REAL NOT NULL ,"
+
// 6: marketPrice
"\"PRICE\" REAL NOT NULL ,"
+
// 7: price
"\"LUNCHBOX_PRICE\" REAL NOT NULL ,"
+
// 8: lunchboxPrice
"\"COLOR_ID\" INTEGER NOT NULL ,"
+
// 9: colorId
"\"IMAGE_URL\" TEXT,"
+
// 10: imageUrl
"\"INVISIBLE\" INTEGER NOT NULL ,"
+
// 11: invisible
"\"COST\" REAL NOT NULL ,"
+
// 12: cost
"\"START_DATE\" INTEGER,"
+
// 13: startDate
"\"END_DATE\" INTEGER,"
+
// 14: endDate
"\"LIKE\" INTEGER NOT NULL ,"
+
// 15: like
"\"TOTAL_SOLD\" INTEGER NOT NULL ,"
+
// 16: totalSold
"\"MAJOR_MAIN_ID\" INTEGER NOT NULL ,"
+
// 17: majorMainId
"\"DEPT_ID\" INTEGER NOT NULL ,"
+
// 18: deptId
"\"CREATE_BY\" TEXT,"
+
// 19: createBy
"\"CREATE_TIME\" INTEGER,"
+
// 20: createTime
"\"UPDATE_BY\" TEXT,"
+
// 21: updateBy
"\"UPDATE_TIME\" INTEGER,"
+
// 22: updateTime
"\"POS_FID\" TEXT,"
+
// 23: posFid
"\"P_ID\" TEXT,"
+
// 24: pId
"\"AUTO_MOD\" INTEGER NOT NULL ,"
+
// 25: autoMod
"\"BLUE_EDIT\" INTEGER NOT NULL ,"
+
// 26: blueEdit
"\"AUTO_MERGE\" INTEGER NOT NULL ,"
+
// 27: autoMerge
"\"CUSTOM_MSG\" INTEGER NOT NULL ,"
+
// 28: customMsg
"\"IS_PARENT\" INTEGER NOT NULL ,"
+
// 29: isParent
"\"MODIFIER_NAME1\" TEXT,"
+
// 30: modifierName1
"\"MODIFIER_NAME2\" TEXT,"
+
// 31: modifierName2
"\"MULTIPLE\" REAL NOT NULL ,"
+
// 32: multiple
"\"PRINT_SET\" TEXT,"
+
// 33: printSet
"\"KT_SETTING\" TEXT,"
+
// 34: ktSetting
"\"MOD_COMM\" INTEGER NOT NULL ,"
+
// 35: modComm
"\"MOD_TASTE\" INTEGER NOT NULL ,"
+
// 36: modTaste
"\"MOD_MSG\" INTEGER NOT NULL ,"
+
// 37: modMsg
"\"KT_FIRE_COURSE\" INTEGER NOT NULL ,"
+
// 38: ktFireCourse
"\"ABLE_DIS_COUNT\" INTEGER NOT NULL ,"
+
// 39: ableDisCount
"\"PRINT_TO_BILL\" INTEGER NOT NULL ,"
+
// 40: printToBill
"\"KT_PRINT_MAIN_ITEM\" INTEGER NOT NULL ,"
+
// 41: ktPrintMainItem
"\"KT_SHOW_PRICE\" INTEGER NOT NULL ,"
+
// 42: ktShowPrice
"\"KT_FONT\" INTEGER NOT NULL ,"
+
// 43: ktFont
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 44: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 45: isRt
"\"VISIBLE\" INTEGER NOT NULL ,"
+
// 46: visible
"\"DELETES\" INTEGER NOT NULL ,"
+
// 47: deletes
"\"IS_STATISTIC\" INTEGER NOT NULL );"
);
// 48: isStatistic
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"MODIFIER\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Modifier
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getMid
());
stmt
.
bindLong
(
3
,
entity
.
getTopId
());
stmt
.
bindLong
(
4
,
entity
.
getRestaurantId
());
String
modifierName
=
entity
.
getModifierName
();
if
(
modifierName
!=
null
)
{
stmt
.
bindString
(
5
,
modifierName
);
}
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
stmt
.
bindDouble
(
7
,
entity
.
getMarketPrice
());
stmt
.
bindDouble
(
8
,
entity
.
getPrice
());
stmt
.
bindDouble
(
9
,
entity
.
getLunchboxPrice
());
stmt
.
bindLong
(
10
,
entity
.
getColorId
());
String
imageUrl
=
entity
.
getImageUrl
();
if
(
imageUrl
!=
null
)
{
stmt
.
bindString
(
11
,
imageUrl
);
}
stmt
.
bindLong
(
12
,
entity
.
getInvisible
());
stmt
.
bindDouble
(
13
,
entity
.
getCost
());
java
.
util
.
Date
startDate
=
entity
.
getStartDate
();
if
(
startDate
!=
null
)
{
stmt
.
bindLong
(
14
,
startDate
.
getTime
());
}
java
.
util
.
Date
endDate
=
entity
.
getEndDate
();
if
(
endDate
!=
null
)
{
stmt
.
bindLong
(
15
,
endDate
.
getTime
());
}
stmt
.
bindLong
(
16
,
entity
.
getLike
());
stmt
.
bindLong
(
17
,
entity
.
getTotalSold
());
stmt
.
bindLong
(
18
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
19
,
entity
.
getDeptId
());
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
20
,
createBy
);
}
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
21
,
createTime
.
getTime
());
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
22
,
updateBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
23
,
updateTime
.
getTime
());
}
String
posFid
=
entity
.
getPosFid
();
if
(
posFid
!=
null
)
{
stmt
.
bindString
(
24
,
posFid
);
}
String
pId
=
entity
.
getPId
();
if
(
pId
!=
null
)
{
stmt
.
bindString
(
25
,
pId
);
}
stmt
.
bindLong
(
26
,
entity
.
getAutoMod
());
stmt
.
bindLong
(
27
,
entity
.
getBlueEdit
());
stmt
.
bindLong
(
28
,
entity
.
getAutoMerge
());
stmt
.
bindLong
(
29
,
entity
.
getCustomMsg
());
stmt
.
bindLong
(
30
,
entity
.
getIsParent
());
String
modifierName1
=
entity
.
getModifierName1
();
if
(
modifierName1
!=
null
)
{
stmt
.
bindString
(
31
,
modifierName1
);
}
String
modifierName2
=
entity
.
getModifierName2
();
if
(
modifierName2
!=
null
)
{
stmt
.
bindString
(
32
,
modifierName2
);
}
stmt
.
bindDouble
(
33
,
entity
.
getMultiple
());
String
printSet
=
entity
.
getPrintSet
();
if
(
printSet
!=
null
)
{
stmt
.
bindString
(
34
,
printSet
);
}
String
ktSetting
=
entity
.
getKtSetting
();
if
(
ktSetting
!=
null
)
{
stmt
.
bindString
(
35
,
ktSetting
);
}
stmt
.
bindLong
(
36
,
entity
.
getModComm
());
stmt
.
bindLong
(
37
,
entity
.
getModTaste
());
stmt
.
bindLong
(
38
,
entity
.
getModMsg
());
stmt
.
bindLong
(
39
,
entity
.
getKtFireCourse
());
stmt
.
bindLong
(
40
,
entity
.
getAbleDisCount
());
stmt
.
bindLong
(
41
,
entity
.
getPrintToBill
());
stmt
.
bindLong
(
42
,
entity
.
getKtPrintMainItem
());
stmt
.
bindLong
(
43
,
entity
.
getKtShowPrice
());
stmt
.
bindLong
(
44
,
entity
.
getKtFont
());
stmt
.
bindLong
(
45
,
entity
.
getConditions
());
stmt
.
bindLong
(
46
,
entity
.
getIsRt
());
stmt
.
bindLong
(
47
,
entity
.
getVisible
());
stmt
.
bindLong
(
48
,
entity
.
getDeletes
());
stmt
.
bindLong
(
49
,
entity
.
getIsStatistic
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Modifier
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getMid
());
stmt
.
bindLong
(
3
,
entity
.
getTopId
());
stmt
.
bindLong
(
4
,
entity
.
getRestaurantId
());
String
modifierName
=
entity
.
getModifierName
();
if
(
modifierName
!=
null
)
{
stmt
.
bindString
(
5
,
modifierName
);
}
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
stmt
.
bindDouble
(
7
,
entity
.
getMarketPrice
());
stmt
.
bindDouble
(
8
,
entity
.
getPrice
());
stmt
.
bindDouble
(
9
,
entity
.
getLunchboxPrice
());
stmt
.
bindLong
(
10
,
entity
.
getColorId
());
String
imageUrl
=
entity
.
getImageUrl
();
if
(
imageUrl
!=
null
)
{
stmt
.
bindString
(
11
,
imageUrl
);
}
stmt
.
bindLong
(
12
,
entity
.
getInvisible
());
stmt
.
bindDouble
(
13
,
entity
.
getCost
());
java
.
util
.
Date
startDate
=
entity
.
getStartDate
();
if
(
startDate
!=
null
)
{
stmt
.
bindLong
(
14
,
startDate
.
getTime
());
}
java
.
util
.
Date
endDate
=
entity
.
getEndDate
();
if
(
endDate
!=
null
)
{
stmt
.
bindLong
(
15
,
endDate
.
getTime
());
}
stmt
.
bindLong
(
16
,
entity
.
getLike
());
stmt
.
bindLong
(
17
,
entity
.
getTotalSold
());
stmt
.
bindLong
(
18
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
19
,
entity
.
getDeptId
());
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
20
,
createBy
);
}
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
21
,
createTime
.
getTime
());
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
22
,
updateBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
23
,
updateTime
.
getTime
());
}
String
posFid
=
entity
.
getPosFid
();
if
(
posFid
!=
null
)
{
stmt
.
bindString
(
24
,
posFid
);
}
String
pId
=
entity
.
getPId
();
if
(
pId
!=
null
)
{
stmt
.
bindString
(
25
,
pId
);
}
stmt
.
bindLong
(
26
,
entity
.
getAutoMod
());
stmt
.
bindLong
(
27
,
entity
.
getBlueEdit
());
stmt
.
bindLong
(
28
,
entity
.
getAutoMerge
());
stmt
.
bindLong
(
29
,
entity
.
getCustomMsg
());
stmt
.
bindLong
(
30
,
entity
.
getIsParent
());
String
modifierName1
=
entity
.
getModifierName1
();
if
(
modifierName1
!=
null
)
{
stmt
.
bindString
(
31
,
modifierName1
);
}
String
modifierName2
=
entity
.
getModifierName2
();
if
(
modifierName2
!=
null
)
{
stmt
.
bindString
(
32
,
modifierName2
);
}
stmt
.
bindDouble
(
33
,
entity
.
getMultiple
());
String
printSet
=
entity
.
getPrintSet
();
if
(
printSet
!=
null
)
{
stmt
.
bindString
(
34
,
printSet
);
}
String
ktSetting
=
entity
.
getKtSetting
();
if
(
ktSetting
!=
null
)
{
stmt
.
bindString
(
35
,
ktSetting
);
}
stmt
.
bindLong
(
36
,
entity
.
getModComm
());
stmt
.
bindLong
(
37
,
entity
.
getModTaste
());
stmt
.
bindLong
(
38
,
entity
.
getModMsg
());
stmt
.
bindLong
(
39
,
entity
.
getKtFireCourse
());
stmt
.
bindLong
(
40
,
entity
.
getAbleDisCount
());
stmt
.
bindLong
(
41
,
entity
.
getPrintToBill
());
stmt
.
bindLong
(
42
,
entity
.
getKtPrintMainItem
());
stmt
.
bindLong
(
43
,
entity
.
getKtShowPrice
());
stmt
.
bindLong
(
44
,
entity
.
getKtFont
());
stmt
.
bindLong
(
45
,
entity
.
getConditions
());
stmt
.
bindLong
(
46
,
entity
.
getIsRt
());
stmt
.
bindLong
(
47
,
entity
.
getVisible
());
stmt
.
bindLong
(
48
,
entity
.
getDeletes
());
stmt
.
bindLong
(
49
,
entity
.
getIsStatistic
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Modifier
readEntity
(
Cursor
cursor
,
int
offset
)
{
Modifier
entity
=
new
Modifier
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// dbid
cursor
.
getLong
(
offset
+
1
),
// mid
cursor
.
getLong
(
offset
+
2
),
// topId
cursor
.
getLong
(
offset
+
3
),
// restaurantId
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// modifierName
cursor
.
getLong
(
offset
+
5
),
// seqNo
cursor
.
getDouble
(
offset
+
6
),
// marketPrice
cursor
.
getDouble
(
offset
+
7
),
// price
cursor
.
getDouble
(
offset
+
8
),
// lunchboxPrice
cursor
.
getLong
(
offset
+
9
),
// colorId
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
),
// imageUrl
cursor
.
getLong
(
offset
+
11
),
// invisible
cursor
.
getDouble
(
offset
+
12
),
// cost
cursor
.
isNull
(
offset
+
13
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
13
)),
// startDate
cursor
.
isNull
(
offset
+
14
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
14
)),
// endDate
cursor
.
getLong
(
offset
+
15
),
// like
cursor
.
getLong
(
offset
+
16
),
// totalSold
cursor
.
getLong
(
offset
+
17
),
// majorMainId
cursor
.
getLong
(
offset
+
18
),
// deptId
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
),
// createBy
cursor
.
isNull
(
offset
+
20
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
20
)),
// createTime
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
),
// updateBy
cursor
.
isNull
(
offset
+
22
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
22
)),
// updateTime
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getString
(
offset
+
23
),
// posFid
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
),
// pId
cursor
.
getLong
(
offset
+
25
),
// autoMod
cursor
.
getLong
(
offset
+
26
),
// blueEdit
cursor
.
getLong
(
offset
+
27
),
// autoMerge
cursor
.
getLong
(
offset
+
28
),
// customMsg
cursor
.
getLong
(
offset
+
29
),
// isParent
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
),
// modifierName1
cursor
.
isNull
(
offset
+
31
)
?
null
:
cursor
.
getString
(
offset
+
31
),
// modifierName2
cursor
.
getDouble
(
offset
+
32
),
// multiple
cursor
.
isNull
(
offset
+
33
)
?
null
:
cursor
.
getString
(
offset
+
33
),
// printSet
cursor
.
isNull
(
offset
+
34
)
?
null
:
cursor
.
getString
(
offset
+
34
),
// ktSetting
cursor
.
getLong
(
offset
+
35
),
// modComm
cursor
.
getLong
(
offset
+
36
),
// modTaste
cursor
.
getLong
(
offset
+
37
),
// modMsg
cursor
.
getLong
(
offset
+
38
),
// ktFireCourse
cursor
.
getLong
(
offset
+
39
),
// ableDisCount
cursor
.
getLong
(
offset
+
40
),
// printToBill
cursor
.
getLong
(
offset
+
41
),
// ktPrintMainItem
cursor
.
getLong
(
offset
+
42
),
// ktShowPrice
cursor
.
getLong
(
offset
+
43
),
// ktFont
cursor
.
getLong
(
offset
+
44
),
// conditions
cursor
.
getLong
(
offset
+
45
),
// isRt
(
byte
)
cursor
.
getShort
(
offset
+
46
),
// visible
cursor
.
getLong
(
offset
+
47
),
// deletes
cursor
.
getLong
(
offset
+
48
)
// isStatistic
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Modifier
entity
,
int
offset
)
{
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setMid
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setTopId
(
cursor
.
getLong
(
offset
+
2
));
entity
.
setRestaurantId
(
cursor
.
getLong
(
offset
+
3
));
entity
.
setModifierName
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setSeqNo
(
cursor
.
getLong
(
offset
+
5
));
entity
.
setMarketPrice
(
cursor
.
getDouble
(
offset
+
6
));
entity
.
setPrice
(
cursor
.
getDouble
(
offset
+
7
));
entity
.
setLunchboxPrice
(
cursor
.
getDouble
(
offset
+
8
));
entity
.
setColorId
(
cursor
.
getLong
(
offset
+
9
));
entity
.
setImageUrl
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
));
entity
.
setInvisible
(
cursor
.
getLong
(
offset
+
11
));
entity
.
setCost
(
cursor
.
getDouble
(
offset
+
12
));
entity
.
setStartDate
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
13
)));
entity
.
setEndDate
(
cursor
.
isNull
(
offset
+
14
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
14
)));
entity
.
setLike
(
cursor
.
getLong
(
offset
+
15
));
entity
.
setTotalSold
(
cursor
.
getLong
(
offset
+
16
));
entity
.
setMajorMainId
(
cursor
.
getLong
(
offset
+
17
));
entity
.
setDeptId
(
cursor
.
getLong
(
offset
+
18
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
20
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
20
)));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
22
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
22
)));
entity
.
setPosFid
(
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getString
(
offset
+
23
));
entity
.
setPId
(
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
));
entity
.
setAutoMod
(
cursor
.
getLong
(
offset
+
25
));
entity
.
setBlueEdit
(
cursor
.
getLong
(
offset
+
26
));
entity
.
setAutoMerge
(
cursor
.
getLong
(
offset
+
27
));
entity
.
setCustomMsg
(
cursor
.
getLong
(
offset
+
28
));
entity
.
setIsParent
(
cursor
.
getLong
(
offset
+
29
));
entity
.
setModifierName1
(
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
));
entity
.
setModifierName2
(
cursor
.
isNull
(
offset
+
31
)
?
null
:
cursor
.
getString
(
offset
+
31
));
entity
.
setMultiple
(
cursor
.
getDouble
(
offset
+
32
));
entity
.
setPrintSet
(
cursor
.
isNull
(
offset
+
33
)
?
null
:
cursor
.
getString
(
offset
+
33
));
entity
.
setKtSetting
(
cursor
.
isNull
(
offset
+
34
)
?
null
:
cursor
.
getString
(
offset
+
34
));
entity
.
setModComm
(
cursor
.
getLong
(
offset
+
35
));
entity
.
setModTaste
(
cursor
.
getLong
(
offset
+
36
));
entity
.
setModMsg
(
cursor
.
getLong
(
offset
+
37
));
entity
.
setKtFireCourse
(
cursor
.
getLong
(
offset
+
38
));
entity
.
setAbleDisCount
(
cursor
.
getLong
(
offset
+
39
));
entity
.
setPrintToBill
(
cursor
.
getLong
(
offset
+
40
));
entity
.
setKtPrintMainItem
(
cursor
.
getLong
(
offset
+
41
));
entity
.
setKtShowPrice
(
cursor
.
getLong
(
offset
+
42
));
entity
.
setKtFont
(
cursor
.
getLong
(
offset
+
43
));
entity
.
setConditions
(
cursor
.
getLong
(
offset
+
44
));
entity
.
setIsRt
(
cursor
.
getLong
(
offset
+
45
));
entity
.
setVisible
((
byte
)
cursor
.
getShort
(
offset
+
46
));
entity
.
setDeletes
(
cursor
.
getLong
(
offset
+
47
));
entity
.
setIsStatistic
(
cursor
.
getLong
(
offset
+
48
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Modifier
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Modifier
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Modifier
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintCurrencyBeanDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.PrintCurrencyBean
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "PRINT_CURRENCY_BEAN".
*/
public
class
PrintCurrencyBeanDao
extends
AbstractDao
<
PrintCurrencyBean
,
Long
>
{
public
static
final
String
TABLENAME
=
"PRINT_CURRENCY_BEAN"
;
/**
* Properties of entity PrintCurrencyBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
Dbid
=
new
Property
(
1
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Name
=
new
Property
(
2
,
String
.
class
,
"name"
,
false
,
"NAME"
);
public
final
static
Property
RestaurantId
=
new
Property
(
3
,
Integer
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
FoodComplexion
=
new
Property
(
5
,
int
.
class
,
"foodComplexion"
,
false
,
"FOOD_COMPLEXION"
);
public
final
static
Property
ModifierComplexion
=
new
Property
(
6
,
int
.
class
,
"modifierComplexion"
,
false
,
"MODIFIER_COMPLEXION"
);
public
final
static
Property
Deletes
=
new
Property
(
7
,
int
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
Uid
=
new
Property
(
8
,
Integer
.
class
,
"uid"
,
false
,
"UID"
);
public
final
static
Property
CreateTime
=
new
Property
(
9
,
Long
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateTime
=
new
Property
(
10
,
Long
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
FontId
=
new
Property
(
11
,
Long
.
class
,
"fontId"
,
false
,
"FONT_ID"
);
public
final
static
Property
FoodIsBold
=
new
Property
(
12
,
int
.
class
,
"foodIsBold"
,
false
,
"FOOD_IS_BOLD"
);
public
final
static
Property
FoodFont
=
new
Property
(
13
,
String
.
class
,
"foodFont"
,
false
,
"FOOD_FONT"
);
public
final
static
Property
FoodIsItalic
=
new
Property
(
14
,
int
.
class
,
"foodIsItalic"
,
false
,
"FOOD_IS_ITALIC"
);
public
final
static
Property
ModifierIsBold
=
new
Property
(
15
,
int
.
class
,
"modifierIsBold"
,
false
,
"MODIFIER_IS_BOLD"
);
public
final
static
Property
ModifierFont
=
new
Property
(
16
,
String
.
class
,
"modifierFont"
,
false
,
"MODIFIER_FONT"
);
public
final
static
Property
ModifierIsItalic
=
new
Property
(
17
,
int
.
class
,
"modifierIsItalic"
,
false
,
"MODIFIER_IS_ITALIC"
);
public
final
static
Property
NumberIsFlip
=
new
Property
(
18
,
int
.
class
,
"numberIsFlip"
,
false
,
"NUMBER_IS_FLIP"
);
}
public
PrintCurrencyBeanDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
PrintCurrencyBeanDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"PRINT_CURRENCY_BEAN\" ("
+
//
"\"ID\" INTEGER,"
+
// 0: id
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 1: dbid
"\"NAME\" TEXT,"
+
// 2: name
"\"RESTAURANT_ID\" INTEGER,"
+
// 3: restaurantId
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"FOOD_COMPLEXION\" INTEGER NOT NULL ,"
+
// 5: foodComplexion
"\"MODIFIER_COMPLEXION\" INTEGER NOT NULL ,"
+
// 6: modifierComplexion
"\"DELETES\" INTEGER NOT NULL ,"
+
// 7: deletes
"\"UID\" INTEGER,"
+
// 8: uid
"\"CREATE_TIME\" INTEGER,"
+
// 9: createTime
"\"UPDATE_TIME\" INTEGER,"
+
// 10: updateTime
"\"FONT_ID\" INTEGER,"
+
// 11: fontId
"\"FOOD_IS_BOLD\" INTEGER NOT NULL ,"
+
// 12: foodIsBold
"\"FOOD_FONT\" TEXT,"
+
// 13: foodFont
"\"FOOD_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 14: foodIsItalic
"\"MODIFIER_IS_BOLD\" INTEGER NOT NULL ,"
+
// 15: modifierIsBold
"\"MODIFIER_FONT\" TEXT,"
+
// 16: modifierFont
"\"MODIFIER_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 17: modifierIsItalic
"\"NUMBER_IS_FLIP\" INTEGER NOT NULL );"
);
// 18: numberIsFlip
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"PRINT_CURRENCY_BEAN\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
PrintCurrencyBean
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
2
,
dbid
);
}
String
name
=
entity
.
getName
();
if
(
name
!=
null
)
{
stmt
.
bindString
(
3
,
name
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
4
,
restaurantId
);
}
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
6
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
7
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
8
,
entity
.
getDeletes
());
Integer
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
9
,
uid
);
}
Long
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
10
,
createTime
);
}
Long
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
11
,
updateTime
);
}
Long
fontId
=
entity
.
getFontId
();
if
(
fontId
!=
null
)
{
stmt
.
bindLong
(
12
,
fontId
);
}
stmt
.
bindLong
(
13
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
14
,
foodFont
);
}
stmt
.
bindLong
(
15
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
16
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
17
,
modifierFont
);
}
stmt
.
bindLong
(
18
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
19
,
entity
.
getNumberIsFlip
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
PrintCurrencyBean
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
2
,
dbid
);
}
String
name
=
entity
.
getName
();
if
(
name
!=
null
)
{
stmt
.
bindString
(
3
,
name
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
4
,
restaurantId
);
}
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
6
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
7
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
8
,
entity
.
getDeletes
());
Integer
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
9
,
uid
);
}
Long
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
10
,
createTime
);
}
Long
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
11
,
updateTime
);
}
Long
fontId
=
entity
.
getFontId
();
if
(
fontId
!=
null
)
{
stmt
.
bindLong
(
12
,
fontId
);
}
stmt
.
bindLong
(
13
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
14
,
foodFont
);
}
stmt
.
bindLong
(
15
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
16
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
17
,
modifierFont
);
}
stmt
.
bindLong
(
18
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
19
,
entity
.
getNumberIsFlip
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
);
}
@Override
public
PrintCurrencyBean
readEntity
(
Cursor
cursor
,
int
offset
)
{
PrintCurrencyBean
entity
=
new
PrintCurrencyBean
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
),
// dbid
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// name
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
),
// restaurantId
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
getInt
(
offset
+
5
),
// foodComplexion
cursor
.
getInt
(
offset
+
6
),
// modifierComplexion
cursor
.
getInt
(
offset
+
7
),
// deletes
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getInt
(
offset
+
8
),
// uid
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getLong
(
offset
+
9
),
// createTime
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
),
// updateTime
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getLong
(
offset
+
11
),
// fontId
cursor
.
getInt
(
offset
+
12
),
// foodIsBold
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// foodFont
cursor
.
getInt
(
offset
+
14
),
// foodIsItalic
cursor
.
getInt
(
offset
+
15
),
// modifierIsBold
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
),
// modifierFont
cursor
.
getInt
(
offset
+
17
),
// modifierIsItalic
cursor
.
getInt
(
offset
+
18
)
// numberIsFlip
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
PrintCurrencyBean
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
));
entity
.
setName
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setRestaurantId
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
));
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setFoodComplexion
(
cursor
.
getInt
(
offset
+
5
));
entity
.
setModifierComplexion
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setDeletes
(
cursor
.
getInt
(
offset
+
7
));
entity
.
setUid
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getInt
(
offset
+
8
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getLong
(
offset
+
9
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
));
entity
.
setFontId
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getLong
(
offset
+
11
));
entity
.
setFoodIsBold
(
cursor
.
getInt
(
offset
+
12
));
entity
.
setFoodFont
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setFoodIsItalic
(
cursor
.
getInt
(
offset
+
14
));
entity
.
setModifierIsBold
(
cursor
.
getInt
(
offset
+
15
));
entity
.
setModifierFont
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
));
entity
.
setModifierIsItalic
(
cursor
.
getInt
(
offset
+
17
));
entity
.
setNumberIsFlip
(
cursor
.
getInt
(
offset
+
18
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
PrintCurrencyBean
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
PrintCurrencyBean
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
PrintCurrencyBean
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintModelBeanDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.PrintModelBean
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "PRINT_MODEL_BEAN".
*/
public
class
PrintModelBeanDao
extends
AbstractDao
<
PrintModelBean
,
Long
>
{
public
static
final
String
TABLENAME
=
"PRINT_MODEL_BEAN"
;
/**
* Properties of entity PrintModelBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Dbid
=
new
Property
(
0
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Id
=
new
Property
(
1
,
int
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
PaperSpecification
=
new
Property
(
2
,
String
.
class
,
"paperSpecification"
,
false
,
"PAPER_SPECIFICATION"
);
public
final
static
Property
PrinterName
=
new
Property
(
3
,
String
.
class
,
"printerName"
,
false
,
"PRINTER_NAME"
);
public
final
static
Property
Model
=
new
Property
(
4
,
String
.
class
,
"model"
,
false
,
"MODEL"
);
}
public
PrintModelBeanDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
PrintModelBeanDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"PRINT_MODEL_BEAN\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: dbid
"\"ID\" INTEGER NOT NULL ,"
+
// 1: id
"\"PAPER_SPECIFICATION\" TEXT,"
+
// 2: paperSpecification
"\"PRINTER_NAME\" TEXT,"
+
// 3: printerName
"\"MODEL\" TEXT);"
);
// 4: model
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"PRINT_MODEL_BEAN\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
PrintModelBean
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getId
());
String
paperSpecification
=
entity
.
getPaperSpecification
();
if
(
paperSpecification
!=
null
)
{
stmt
.
bindString
(
3
,
paperSpecification
);
}
String
printerName
=
entity
.
getPrinterName
();
if
(
printerName
!=
null
)
{
stmt
.
bindString
(
4
,
printerName
);
}
String
model
=
entity
.
getModel
();
if
(
model
!=
null
)
{
stmt
.
bindString
(
5
,
model
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
PrintModelBean
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getId
());
String
paperSpecification
=
entity
.
getPaperSpecification
();
if
(
paperSpecification
!=
null
)
{
stmt
.
bindString
(
3
,
paperSpecification
);
}
String
printerName
=
entity
.
getPrinterName
();
if
(
printerName
!=
null
)
{
stmt
.
bindString
(
4
,
printerName
);
}
String
model
=
entity
.
getModel
();
if
(
model
!=
null
)
{
stmt
.
bindString
(
5
,
model
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
PrintModelBean
readEntity
(
Cursor
cursor
,
int
offset
)
{
PrintModelBean
entity
=
new
PrintModelBean
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// dbid
cursor
.
getInt
(
offset
+
1
),
// id
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// paperSpecification
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
),
// printerName
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
)
// model
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
PrintModelBean
entity
,
int
offset
)
{
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setId
(
cursor
.
getInt
(
offset
+
1
));
entity
.
setPaperSpecification
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setPrinterName
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
));
entity
.
setModel
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
PrintModelBean
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
PrintModelBean
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
PrintModelBean
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrinterDeviceBeanDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "PRINTER_DEVICE_BEAN".
*/
public
class
PrinterDeviceBeanDao
extends
AbstractDao
<
PrinterDeviceBean
,
Long
>
{
public
static
final
String
TABLENAME
=
"PRINTER_DEVICE_BEAN"
;
/**
* Properties of entity PrinterDeviceBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
Dbid
=
new
Property
(
1
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Name
=
new
Property
(
2
,
String
.
class
,
"name"
,
false
,
"NAME"
);
public
final
static
Property
RestaurantId
=
new
Property
(
3
,
Integer
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
Ip
=
new
Property
(
4
,
String
.
class
,
"ip"
,
false
,
"IP"
);
public
final
static
Property
Uid
=
new
Property
(
5
,
Long
.
class
,
"uid"
,
false
,
"UID"
);
public
final
static
Property
Port
=
new
Property
(
6
,
Integer
.
class
,
"port"
,
false
,
"PORT"
);
public
final
static
Property
Type
=
new
Property
(
7
,
Integer
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
PrinterModelId
=
new
Property
(
8
,
Long
.
class
,
"printerModelId"
,
false
,
"PRINTER_MODEL_ID"
);
public
final
static
Property
PaperSpecification
=
new
Property
(
9
,
String
.
class
,
"paperSpecification"
,
false
,
"PAPER_SPECIFICATION"
);
public
final
static
Property
LineFontStop
=
new
Property
(
10
,
int
.
class
,
"lineFontStop"
,
false
,
"LINE_FONT_STOP"
);
public
final
static
Property
PrinterName
=
new
Property
(
11
,
String
.
class
,
"printerName"
,
false
,
"PRINTER_NAME"
);
public
final
static
Property
Model
=
new
Property
(
12
,
String
.
class
,
"model"
,
false
,
"MODEL"
);
public
final
static
Property
NoteContent
=
new
Property
(
13
,
String
.
class
,
"noteContent"
,
false
,
"NOTE_CONTENT"
);
public
final
static
Property
PrinterDeviceDefaultId
=
new
Property
(
14
,
Long
.
class
,
"printerDeviceDefaultId"
,
false
,
"PRINTER_DEVICE_DEFAULT_ID"
);
public
final
static
Property
PrinterDeviceType
=
new
Property
(
15
,
int
.
class
,
"printerDeviceType"
,
false
,
"PRINTER_DEVICE_TYPE"
);
public
final
static
Property
FlyPrinterDeviceId
=
new
Property
(
16
,
Long
.
class
,
"flyPrinterDeviceId"
,
false
,
"FLY_PRINTER_DEVICE_ID"
);
public
final
static
Property
FlyPrinterDeviceId2
=
new
Property
(
17
,
Long
.
class
,
"flyPrinterDeviceId2"
,
false
,
"FLY_PRINTER_DEVICE_ID2"
);
public
final
static
Property
FoodComplexion
=
new
Property
(
18
,
int
.
class
,
"foodComplexion"
,
false
,
"FOOD_COMPLEXION"
);
public
final
static
Property
ModifierComplexion
=
new
Property
(
19
,
int
.
class
,
"modifierComplexion"
,
false
,
"MODIFIER_COMPLEXION"
);
public
final
static
Property
FoodIsBold
=
new
Property
(
20
,
int
.
class
,
"foodIsBold"
,
false
,
"FOOD_IS_BOLD"
);
public
final
static
Property
FoodFont
=
new
Property
(
21
,
String
.
class
,
"foodFont"
,
false
,
"FOOD_FONT"
);
public
final
static
Property
FoodIsItalic
=
new
Property
(
22
,
int
.
class
,
"foodIsItalic"
,
false
,
"FOOD_IS_ITALIC"
);
public
final
static
Property
ModifierIsBold
=
new
Property
(
23
,
int
.
class
,
"modifierIsBold"
,
false
,
"MODIFIER_IS_BOLD"
);
public
final
static
Property
ModifierFont
=
new
Property
(
24
,
String
.
class
,
"modifierFont"
,
false
,
"MODIFIER_FONT"
);
public
final
static
Property
ModifierIsItalic
=
new
Property
(
25
,
int
.
class
,
"modifierIsItalic"
,
false
,
"MODIFIER_IS_ITALIC"
);
public
final
static
Property
NumberIsFlip
=
new
Property
(
26
,
int
.
class
,
"numberIsFlip"
,
false
,
"NUMBER_IS_FLIP"
);
public
final
static
Property
LanguageType
=
new
Property
(
27
,
String
.
class
,
"languageType"
,
false
,
"LANGUAGE_TYPE"
);
}
public
PrinterDeviceBeanDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
PrinterDeviceBeanDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"PRINTER_DEVICE_BEAN\" ("
+
//
"\"ID\" INTEGER,"
+
// 0: id
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 1: dbid
"\"NAME\" TEXT,"
+
// 2: name
"\"RESTAURANT_ID\" INTEGER,"
+
// 3: restaurantId
"\"IP\" TEXT,"
+
// 4: ip
"\"UID\" INTEGER,"
+
// 5: uid
"\"PORT\" INTEGER,"
+
// 6: port
"\"TYPE\" INTEGER,"
+
// 7: type
"\"PRINTER_MODEL_ID\" INTEGER,"
+
// 8: printerModelId
"\"PAPER_SPECIFICATION\" TEXT,"
+
// 9: paperSpecification
"\"LINE_FONT_STOP\" INTEGER NOT NULL ,"
+
// 10: lineFontStop
"\"PRINTER_NAME\" TEXT,"
+
// 11: printerName
"\"MODEL\" TEXT,"
+
// 12: model
"\"NOTE_CONTENT\" TEXT,"
+
// 13: noteContent
"\"PRINTER_DEVICE_DEFAULT_ID\" INTEGER,"
+
// 14: printerDeviceDefaultId
"\"PRINTER_DEVICE_TYPE\" INTEGER NOT NULL ,"
+
// 15: printerDeviceType
"\"FLY_PRINTER_DEVICE_ID\" INTEGER,"
+
// 16: flyPrinterDeviceId
"\"FLY_PRINTER_DEVICE_ID2\" INTEGER,"
+
// 17: flyPrinterDeviceId2
"\"FOOD_COMPLEXION\" INTEGER NOT NULL ,"
+
// 18: foodComplexion
"\"MODIFIER_COMPLEXION\" INTEGER NOT NULL ,"
+
// 19: modifierComplexion
"\"FOOD_IS_BOLD\" INTEGER NOT NULL ,"
+
// 20: foodIsBold
"\"FOOD_FONT\" TEXT,"
+
// 21: foodFont
"\"FOOD_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 22: foodIsItalic
"\"MODIFIER_IS_BOLD\" INTEGER NOT NULL ,"
+
// 23: modifierIsBold
"\"MODIFIER_FONT\" TEXT,"
+
// 24: modifierFont
"\"MODIFIER_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 25: modifierIsItalic
"\"NUMBER_IS_FLIP\" INTEGER NOT NULL ,"
+
// 26: numberIsFlip
"\"LANGUAGE_TYPE\" TEXT);"
);
// 27: languageType
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"PRINTER_DEVICE_BEAN\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
PrinterDeviceBean
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
2
,
dbid
);
}
String
name
=
entity
.
getName
();
if
(
name
!=
null
)
{
stmt
.
bindString
(
3
,
name
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
4
,
restaurantId
);
}
String
ip
=
entity
.
getIp
();
if
(
ip
!=
null
)
{
stmt
.
bindString
(
5
,
ip
);
}
Long
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
6
,
uid
);
}
Integer
port
=
entity
.
getPort
();
if
(
port
!=
null
)
{
stmt
.
bindLong
(
7
,
port
);
}
Integer
type
=
entity
.
getType
();
if
(
type
!=
null
)
{
stmt
.
bindLong
(
8
,
type
);
}
Long
printerModelId
=
entity
.
getPrinterModelId
();
if
(
printerModelId
!=
null
)
{
stmt
.
bindLong
(
9
,
printerModelId
);
}
String
paperSpecification
=
entity
.
getPaperSpecification
();
if
(
paperSpecification
!=
null
)
{
stmt
.
bindString
(
10
,
paperSpecification
);
}
stmt
.
bindLong
(
11
,
entity
.
getLineFontStop
());
String
printerName
=
entity
.
getPrinterName
();
if
(
printerName
!=
null
)
{
stmt
.
bindString
(
12
,
printerName
);
}
String
model
=
entity
.
getModel
();
if
(
model
!=
null
)
{
stmt
.
bindString
(
13
,
model
);
}
String
noteContent
=
entity
.
getNoteContent
();
if
(
noteContent
!=
null
)
{
stmt
.
bindString
(
14
,
noteContent
);
}
Long
printerDeviceDefaultId
=
entity
.
getPrinterDeviceDefaultId
();
if
(
printerDeviceDefaultId
!=
null
)
{
stmt
.
bindLong
(
15
,
printerDeviceDefaultId
);
}
stmt
.
bindLong
(
16
,
entity
.
getPrinterDeviceType
());
Long
flyPrinterDeviceId
=
entity
.
getFlyPrinterDeviceId
();
if
(
flyPrinterDeviceId
!=
null
)
{
stmt
.
bindLong
(
17
,
flyPrinterDeviceId
);
}
Long
flyPrinterDeviceId2
=
entity
.
getFlyPrinterDeviceId2
();
if
(
flyPrinterDeviceId2
!=
null
)
{
stmt
.
bindLong
(
18
,
flyPrinterDeviceId2
);
}
stmt
.
bindLong
(
19
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
20
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
21
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
22
,
foodFont
);
}
stmt
.
bindLong
(
23
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
24
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
25
,
modifierFont
);
}
stmt
.
bindLong
(
26
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
27
,
entity
.
getNumberIsFlip
());
String
languageType
=
entity
.
getLanguageType
();
if
(
languageType
!=
null
)
{
stmt
.
bindString
(
28
,
languageType
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
PrinterDeviceBean
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
2
,
dbid
);
}
String
name
=
entity
.
getName
();
if
(
name
!=
null
)
{
stmt
.
bindString
(
3
,
name
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
4
,
restaurantId
);
}
String
ip
=
entity
.
getIp
();
if
(
ip
!=
null
)
{
stmt
.
bindString
(
5
,
ip
);
}
Long
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
6
,
uid
);
}
Integer
port
=
entity
.
getPort
();
if
(
port
!=
null
)
{
stmt
.
bindLong
(
7
,
port
);
}
Integer
type
=
entity
.
getType
();
if
(
type
!=
null
)
{
stmt
.
bindLong
(
8
,
type
);
}
Long
printerModelId
=
entity
.
getPrinterModelId
();
if
(
printerModelId
!=
null
)
{
stmt
.
bindLong
(
9
,
printerModelId
);
}
String
paperSpecification
=
entity
.
getPaperSpecification
();
if
(
paperSpecification
!=
null
)
{
stmt
.
bindString
(
10
,
paperSpecification
);
}
stmt
.
bindLong
(
11
,
entity
.
getLineFontStop
());
String
printerName
=
entity
.
getPrinterName
();
if
(
printerName
!=
null
)
{
stmt
.
bindString
(
12
,
printerName
);
}
String
model
=
entity
.
getModel
();
if
(
model
!=
null
)
{
stmt
.
bindString
(
13
,
model
);
}
String
noteContent
=
entity
.
getNoteContent
();
if
(
noteContent
!=
null
)
{
stmt
.
bindString
(
14
,
noteContent
);
}
Long
printerDeviceDefaultId
=
entity
.
getPrinterDeviceDefaultId
();
if
(
printerDeviceDefaultId
!=
null
)
{
stmt
.
bindLong
(
15
,
printerDeviceDefaultId
);
}
stmt
.
bindLong
(
16
,
entity
.
getPrinterDeviceType
());
Long
flyPrinterDeviceId
=
entity
.
getFlyPrinterDeviceId
();
if
(
flyPrinterDeviceId
!=
null
)
{
stmt
.
bindLong
(
17
,
flyPrinterDeviceId
);
}
Long
flyPrinterDeviceId2
=
entity
.
getFlyPrinterDeviceId2
();
if
(
flyPrinterDeviceId2
!=
null
)
{
stmt
.
bindLong
(
18
,
flyPrinterDeviceId2
);
}
stmt
.
bindLong
(
19
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
20
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
21
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
22
,
foodFont
);
}
stmt
.
bindLong
(
23
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
24
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
25
,
modifierFont
);
}
stmt
.
bindLong
(
26
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
27
,
entity
.
getNumberIsFlip
());
String
languageType
=
entity
.
getLanguageType
();
if
(
languageType
!=
null
)
{
stmt
.
bindString
(
28
,
languageType
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
);
}
@Override
public
PrinterDeviceBean
readEntity
(
Cursor
cursor
,
int
offset
)
{
PrinterDeviceBean
entity
=
new
PrinterDeviceBean
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
),
// dbid
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// name
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
),
// restaurantId
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// ip
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getLong
(
offset
+
5
),
// uid
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getInt
(
offset
+
6
),
// port
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getInt
(
offset
+
7
),
// type
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getLong
(
offset
+
8
),
// printerModelId
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
),
// paperSpecification
cursor
.
getInt
(
offset
+
10
),
// lineFontStop
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
),
// printerName
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
),
// model
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// noteContent
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getLong
(
offset
+
14
),
// printerDeviceDefaultId
cursor
.
getInt
(
offset
+
15
),
// printerDeviceType
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getLong
(
offset
+
16
),
// flyPrinterDeviceId
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getLong
(
offset
+
17
),
// flyPrinterDeviceId2
cursor
.
getInt
(
offset
+
18
),
// foodComplexion
cursor
.
getInt
(
offset
+
19
),
// modifierComplexion
cursor
.
getInt
(
offset
+
20
),
// foodIsBold
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
),
// foodFont
cursor
.
getInt
(
offset
+
22
),
// foodIsItalic
cursor
.
getInt
(
offset
+
23
),
// modifierIsBold
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
),
// modifierFont
cursor
.
getInt
(
offset
+
25
),
// modifierIsItalic
cursor
.
getInt
(
offset
+
26
),
// numberIsFlip
cursor
.
isNull
(
offset
+
27
)
?
null
:
cursor
.
getString
(
offset
+
27
)
// languageType
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
PrinterDeviceBean
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
));
entity
.
setName
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setRestaurantId
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
));
entity
.
setIp
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setUid
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getLong
(
offset
+
5
));
entity
.
setPort
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getInt
(
offset
+
6
));
entity
.
setType
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getInt
(
offset
+
7
));
entity
.
setPrinterModelId
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getLong
(
offset
+
8
));
entity
.
setPaperSpecification
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
entity
.
setLineFontStop
(
cursor
.
getInt
(
offset
+
10
));
entity
.
setPrinterName
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
));
entity
.
setModel
(
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
));
entity
.
setNoteContent
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setPrinterDeviceDefaultId
(
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getLong
(
offset
+
14
));
entity
.
setPrinterDeviceType
(
cursor
.
getInt
(
offset
+
15
));
entity
.
setFlyPrinterDeviceId
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getLong
(
offset
+
16
));
entity
.
setFlyPrinterDeviceId2
(
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getLong
(
offset
+
17
));
entity
.
setFoodComplexion
(
cursor
.
getInt
(
offset
+
18
));
entity
.
setModifierComplexion
(
cursor
.
getInt
(
offset
+
19
));
entity
.
setFoodIsBold
(
cursor
.
getInt
(
offset
+
20
));
entity
.
setFoodFont
(
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
));
entity
.
setFoodIsItalic
(
cursor
.
getInt
(
offset
+
22
));
entity
.
setModifierIsBold
(
cursor
.
getInt
(
offset
+
23
));
entity
.
setModifierFont
(
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
));
entity
.
setModifierIsItalic
(
cursor
.
getInt
(
offset
+
25
));
entity
.
setNumberIsFlip
(
cursor
.
getInt
(
offset
+
26
));
entity
.
setLanguageType
(
cursor
.
isNull
(
offset
+
27
)
?
null
:
cursor
.
getString
(
offset
+
27
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
PrinterDeviceBean
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
PrinterDeviceBean
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
PrinterDeviceBean
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
config.gradle
View file @
ad8f3296
...
@@ -78,6 +78,9 @@ ext {
...
@@ -78,6 +78,9 @@ ext {
"rxpermissions2"
:
"com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar"
,
"rxpermissions2"
:
"com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar"
,
"rxerrorhandler2"
:
"me.jessyan:rxerrorhandler:2.1.1"
,
"rxerrorhandler2"
:
"me.jessyan:rxerrorhandler:2.1.1"
,
//rxbinding
"rxbinding"
:
"com.jakewharton.rxbinding4:rxbinding:4.0.0"
,
//tools
//tools
"dagger2"
:
"com.google.dagger:dagger:${version["
dagger2SdkVersion
"]}"
,
"dagger2"
:
"com.google.dagger:dagger:${version["
dagger2SdkVersion
"]}"
,
"dagger2-android"
:
"com.google.dagger:dagger-android:${version["
dagger2SdkVersion
"]}"
,
"dagger2-android"
:
"com.google.dagger:dagger-android:${version["
dagger2SdkVersion
"]}"
,
...
...
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/bean/OrderBean.java
View file @
ad8f3296
...
@@ -452,7 +452,7 @@ public class OrderBean {
...
@@ -452,7 +452,7 @@ public class OrderBean {
public
static
class
RestaurantDiscountVO
implements
Serializable
{
public
static
class
RestaurantDiscountVO
implements
Serializable
{
private
long
id
;
private
long
id
;
private
int
type
;
private
int
type
;
private
floa
t
discountValue
;
private
in
t
discountValue
;
private
String
remark
;
private
String
remark
;
private
double
discountAmount
;
private
double
discountAmount
;
...
@@ -472,11 +472,11 @@ public class OrderBean {
...
@@ -472,11 +472,11 @@ public class OrderBean {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
floa
t
getDiscountValue
()
{
public
in
t
getDiscountValue
()
{
return
discountValue
;
return
discountValue
;
}
}
public
void
setDiscountValue
(
floa
t
discountValue
)
{
public
void
setDiscountValue
(
in
t
discountValue
)
{
this
.
discountValue
=
discountValue
;
this
.
discountValue
=
discountValue
;
}
}
...
...
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/bean/OrderDetail.java
View file @
ad8f3296
...
@@ -1071,7 +1071,7 @@ public class OrderDetail implements Serializable {
...
@@ -1071,7 +1071,7 @@ public class OrderDetail implements Serializable {
private
static
Discount
getDiscountItem
(
OrderBean
.
OrderDetailsBean
.
RestaurantDiscountVO
discountBean
)
{
private
static
Discount
getDiscountItem
(
OrderBean
.
OrderDetailsBean
.
RestaurantDiscountVO
discountBean
)
{
Discount
discount
=
new
Discount
();
Discount
discount
=
new
Discount
();
discount
.
setId
(
discountBean
.
getId
());
discount
.
setId
(
discountBean
.
getId
());
discount
.
setDiscount
_v
alue
(
discountBean
.
getDiscountValue
());
discount
.
setDiscount
V
alue
(
discountBean
.
getDiscountValue
());
discount
.
setAmount
(
discountBean
.
getDiscountAmount
());
discount
.
setAmount
(
discountBean
.
getDiscountAmount
());
discount
.
setType
(
discountBean
.
getType
());
discount
.
setType
(
discountBean
.
getType
());
discount
.
setRemark
(
discountBean
.
getRemark
());
discount
.
setRemark
(
discountBean
.
getRemark
());
...
...
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/bean/discount/OrderDiscount.java
View file @
ad8f3296
...
@@ -114,7 +114,7 @@ public class OrderDiscount {
...
@@ -114,7 +114,7 @@ public class OrderDiscount {
request
.
setType
(
MEMBER_DISCOUNT
);
request
.
setType
(
MEMBER_DISCOUNT
);
if
(
discount
.
getDiscount
()
!=
null
)
{
if
(
discount
.
getDiscount
()
!=
null
)
{
request
.
setMemberId
(
discount
.
getDiscount
().
getId
());
request
.
setMemberId
(
discount
.
getDiscount
().
getId
());
request
.
setMemberDiscountRate
((
int
)
discount
.
getDiscount
().
getDiscount
_v
alue
());
request
.
setMemberDiscountRate
((
int
)
discount
.
getDiscount
().
getDiscount
V
alue
());
}
}
request
.
setDiscountAmount
(
discount
.
getMoney
());
request
.
setDiscountAmount
(
discount
.
getMoney
());
request
.
setScAble
(
0
);
request
.
setScAble
(
0
);
...
@@ -127,7 +127,7 @@ public class OrderDiscount {
...
@@ -127,7 +127,7 @@ public class OrderDiscount {
if
(
discount
.
getDiscount
()
!=
null
)
{
if
(
discount
.
getDiscount
()
!=
null
)
{
request
.
setMemberId
(
discount
.
getDiscount
().
getMemberId
());
request
.
setMemberId
(
discount
.
getDiscount
().
getMemberId
());
request
.
setDiscountId
(
discount
.
getDiscount
().
getId
());
request
.
setDiscountId
(
discount
.
getDiscount
().
getId
());
request
.
setMemberDiscountRate
((
int
)
discount
.
getDiscount
().
getDiscount
_v
alue
());
request
.
setMemberDiscountRate
((
int
)
discount
.
getDiscount
().
getDiscount
V
alue
());
}
}
request
.
setDiscountAmount
(
discount
.
getMoney
());
request
.
setDiscountAmount
(
discount
.
getMoney
());
request
.
setScAble
(
0
);
request
.
setScAble
(
0
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/OrderContentModel.java
View file @
ad8f3296
...
@@ -22,6 +22,7 @@ import com.jess.arms.di.scope.ActivityScope;
...
@@ -22,6 +22,7 @@ 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.Date
;
import
java.util.List
;
import
java.util.List
;
import
javax.inject.Inject
;
import
javax.inject.Inject
;
...
@@ -66,7 +67,8 @@ public class OrderContentModel extends BaseModel implements OrderContentContract
...
@@ -66,7 +67,8 @@ public class OrderContentModel extends BaseModel implements OrderContentContract
if
(
OpenTableManage
.
getDefault
().
getTableBean
()
==
null
)
{
if
(
OpenTableManage
.
getDefault
().
getTableBean
()
==
null
)
{
OpenTableManage
.
getDefault
().
setTableBean
(
new
TableBean
.
DataBean
());
OpenTableManage
.
getDefault
().
setTableBean
(
new
TableBean
.
DataBean
());
}
}
OpenTableManage
.
getDefault
().
getTableBean
().
setCreateTime
(
TimeUtils
.
getTime
(
createTime
,
TimeUtils
.
DEFAULT_DATE_FORMAT
));
String
dateTime
=
new
Date
(
createTime
).
toString
();
OpenTableManage
.
getDefault
().
getTableBean
().
setCreateTime
(
dateTime
);
}
}
@Override
@Override
...
@@ -191,9 +193,9 @@ public class OrderContentModel extends BaseModel implements OrderContentContract
...
@@ -191,9 +193,9 @@ public class OrderContentModel extends BaseModel implements OrderContentContract
}
}
@Override
@Override
public
Observable
<
BaseResult
>
queryCoupon
(
int
tableId
,
Long
memberId
,
long
couponMemberId
,
String
couponNo
,
int
restaurantId
)
{
public
Observable
<
BaseResult
>
queryCoupon
(
int
tableId
,
Long
memberId
,
long
couponMemberId
,
String
couponNo
,
int
restaurantId
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
MemberService
.
class
)
return
mRepositoryManager
.
obtainRetrofitService
(
MemberService
.
class
)
.
queryCoupon
(
tableId
,
memberId
,
couponMemberId
,
couponNo
,
restaurantId
);
.
queryCoupon
(
tableId
,
memberId
,
couponMemberId
,
couponNo
,
restaurantId
);
}
}
@Override
@Override
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/cart/ShoppingCart.java
View file @
ad8f3296
...
@@ -36,7 +36,7 @@ public abstract class ShoppingCart {
...
@@ -36,7 +36,7 @@ public abstract class ShoppingCart {
Discount
discount
=
new
Discount
();
Discount
discount
=
new
Discount
();
discount
.
setType
(
1
);
discount
.
setType
(
1
);
discount
.
setRemark
(
"9折"
);
discount
.
setRemark
(
"9折"
);
discount
.
setDiscount
_v
alue
(
10
);
discount
.
setDiscount
V
alue
(
10
);
MemberInfo
memberDiscount
=
new
MemberInfo
();
MemberInfo
memberDiscount
=
new
MemberInfo
();
memberDiscount
.
setMemberName
(
"斯八達"
);
memberDiscount
.
setMemberName
(
"斯八達"
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/discount/NomalDiscount.java
View file @
ad8f3296
...
@@ -50,7 +50,7 @@ public class NomalDiscount extends MultyDiscount{
...
@@ -50,7 +50,7 @@ public class NomalDiscount extends MultyDiscount{
discountMoney
=
discount
.
getAmount
();
discountMoney
=
discount
.
getAmount
();
}
else
{
}
else
{
//百分比折扣
//百分比折扣
discountMoney
=
MoneyUtil
.
divide
(
MoneyUtil
.
multiply
(
sourceMoney
,
discount
.
getDiscount
_v
alue
()),
100
).
doubleValue
();
discountMoney
=
MoneyUtil
.
divide
(
MoneyUtil
.
multiply
(
sourceMoney
,
discount
.
getDiscount
V
alue
()),
100
).
doubleValue
();
}
}
if
(
sourceMoney
<
discountMoney
)
{
if
(
sourceMoney
<
discountMoney
)
{
//折扣金額不能超出總額
//折扣金額不能超出總額
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
View file @
ad8f3296
...
@@ -42,6 +42,7 @@ import com.jess.arms.utils.RxLifecycleUtils;
...
@@ -42,6 +42,7 @@ import com.jess.arms.utils.RxLifecycleUtils;
import
com.tbruyelle.rxpermissions2.RxPermissions
;
import
com.tbruyelle.rxpermissions2.RxPermissions
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -117,7 +118,8 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
...
@@ -117,7 +118,8 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
if
(
OpenTableManage
.
getDefault
().
getTableBean
()
==
null
)
{
if
(
OpenTableManage
.
getDefault
().
getTableBean
()
==
null
)
{
OpenTableManage
.
getDefault
().
setTableBean
(
new
TableBean
.
DataBean
());
OpenTableManage
.
getDefault
().
setTableBean
(
new
TableBean
.
DataBean
());
}
}
OpenTableManage
.
getDefault
().
getTableBean
().
setCreateTime
(
TimeUtils
.
getTime
(
createTime
,
TimeUtils
.
DEFAULT_DATE_FORMAT
));
String
dateTime
=
new
Date
(
createTime
).
toString
();
OpenTableManage
.
getDefault
().
getTableBean
().
setCreateTime
(
dateTime
);
}
}
...
@@ -420,7 +422,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
...
@@ -420,7 +422,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
if
(
orderDiscount
.
getDiscountValue
()
!=
0
)
{
if
(
orderDiscount
.
getDiscountValue
()
!=
0
)
{
//百分比折扣
//百分比折扣
discount
.
setType
(
1
);
discount
.
setType
(
1
);
discount
.
setDiscount
_v
alue
(
orderDiscount
.
getDiscountValue
());
discount
.
setDiscount
V
alue
(
orderDiscount
.
getDiscountValue
());
addOrderDiscount
(
true
,
discount
,
BillOrderMoney
.
BILL_ITEM_ORDER_SENT_STATUS
);
addOrderDiscount
(
true
,
discount
,
BillOrderMoney
.
BILL_ITEM_ORDER_SENT_STATUS
);
continue
;
continue
;
}
}
...
@@ -577,7 +579,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
...
@@ -577,7 +579,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
discount
.
setMemberId
(
memberId
);
discount
.
setMemberId
(
memberId
);
discount
.
setType
(
1
);
discount
.
setType
(
1
);
discount
.
setRemark
(
memberName
+
discountRate
+
"%"
);
discount
.
setRemark
(
memberName
+
discountRate
+
"%"
);
discount
.
setDiscount
_v
alue
(
discountRate
);
discount
.
setDiscount
V
alue
(
discountRate
);
orderMoney
.
setDiscount
(
discount
);
orderMoney
.
setDiscount
(
discount
);
mOrderMoneyList
.
add
(
orderMoney
);
mOrderMoneyList
.
add
(
orderMoney
);
...
@@ -627,7 +629,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
...
@@ -627,7 +629,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
discount
.
setId
(
coupon
.
getId
());
discount
.
setId
(
coupon
.
getId
());
discount
.
setMemberId
(
memberId
);
discount
.
setMemberId
(
memberId
);
discount
.
setRemark
(
coupon
.
getName
()
+
coupon
.
getDiscount
()
+
"%"
);
discount
.
setRemark
(
coupon
.
getName
()
+
coupon
.
getDiscount
()
+
"%"
);
discount
.
setDiscount
_v
alue
(
coupon
.
getDiscount
());
discount
.
setDiscount
V
alue
(
coupon
.
getDiscount
());
discount
.
setAmount
(
coupon
.
getAmount
());
discount
.
setAmount
(
coupon
.
getAmount
());
if
(
coupon
.
getDiscount
()
!=
0
)
{
if
(
coupon
.
getDiscount
()
!=
0
)
{
discount
.
setType
(
1
);
discount
.
setType
(
1
);
...
@@ -647,7 +649,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
...
@@ -647,7 +649,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
BillOrderMoney
orderMoney
=
getBillOrderItemByType
(
BillOrderMoney
.
COUPON_DISCOUNT_TYPE
);
BillOrderMoney
orderMoney
=
getBillOrderItemByType
(
BillOrderMoney
.
COUPON_DISCOUNT_TYPE
);
if
(
orderMoney
!=
null
)
{
if
(
orderMoney
!=
null
)
{
double
totalMoney
=
getDiscountableFoodTotal
(
BillOrderMoney
.
COUPON_DISCOUNT_TYPE
,
false
);
double
totalMoney
=
getDiscountableFoodTotal
(
BillOrderMoney
.
COUPON_DISCOUNT_TYPE
,
false
);
double
discountPrice
=
CouponDiscountBean
.
calculationCoupon
(
orderMoney
.
getDiscount
().
getDiscount
_v
alue
(),
orderMoney
.
getDiscount
().
getAmount
(),
totalMoney
);
double
discountPrice
=
CouponDiscountBean
.
calculationCoupon
(
orderMoney
.
getDiscount
().
getDiscount
V
alue
(),
orderMoney
.
getDiscount
().
getAmount
(),
totalMoney
);
orderMoney
.
setMoney
(
discountPrice
);
orderMoney
.
setMoney
(
discountPrice
);
}
}
}
}
...
@@ -1454,6 +1456,10 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
...
@@ -1454,6 +1456,10 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
protected
List
<
Discount
>
filterDiscountByType
(
List
<
Discount
>
discountList
,
String
discountType
)
{
protected
List
<
Discount
>
filterDiscountByType
(
List
<
Discount
>
discountList
,
String
discountType
)
{
for
(
int
i
=
discountList
.
size
()
-
1
;
i
>=
0
;
i
--)
{
for
(
int
i
=
discountList
.
size
()
-
1
;
i
>=
0
;
i
--)
{
Discount
discount
=
discountList
.
get
(
i
);
Discount
discount
=
discountList
.
get
(
i
);
if
(
discount
.
getDiscountType
().
equals
(
"2"
))
{
//2=全部類型
continue
;
}
if
(
TextUtils
.
isEmpty
(
discount
.
getDiscountType
())
||
!
discount
.
getDiscountType
().
contains
(
discountType
))
{
if
(
TextUtils
.
isEmpty
(
discount
.
getDiscountType
())
||
!
discount
.
getDiscountType
().
contains
(
discountType
))
{
discountList
.
remove
(
i
);
discountList
.
remove
(
i
);
}
}
...
@@ -1579,7 +1585,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
...
@@ -1579,7 +1585,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
}
}
p
rotected
boolean
hasNesOrderFoods
()
{
p
ublic
boolean
hasNesOrderFoods
()
{
if
(
getNewOrderFoodLists
().
size
()
>
0
)
{
if
(
getNewOrderFoodLists
().
size
()
>
0
)
{
return
true
;
return
true
;
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
View file @
ad8f3296
...
@@ -975,10 +975,10 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -975,10 +975,10 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
//更新會員信息
//更新會員信息
mRootView
.
updateMemberInfo
(
memberInfo
);
mRootView
.
updateMemberInfo
(
memberInfo
);
}
else
{
}
else
{
mRootView
.
showMessage
(
"
請輸入正確的會員號碼!
"
);
mRootView
.
showMessage
(
"
未找到相關會員電話號碼,請重新輸入
"
);
}
}
}
else
{
}
else
{
mRootView
.
showMessage
(
"獲取會員信息失敗
!
"
);
mRootView
.
showMessage
(
"獲取會員信息失敗"
);
}
}
}
else
{
}
else
{
mRootView
.
showMessage
(
info
.
getErrMsg
());
mRootView
.
showMessage
(
info
.
getErrMsg
());
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
View file @
ad8f3296
...
@@ -336,7 +336,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -336,7 +336,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
if
(
orderBean
!=
null
&&
respose
.
getData
().
getOrderDetails
()
!=
null
)
{
if
(
orderBean
!=
null
&&
respose
.
getData
().
getOrderDetails
()
!=
null
)
{
if
(
respose
.
getData
().
getCreateTime
()
!=
null
&&
openTableBean
!=
null
)
{
if
(
respose
.
getData
().
getCreateTime
()
!=
null
&&
openTableBean
!=
null
)
{
//將開台時間設置為訂單創建時間
//將開台時間設置為訂單創建時間
openTableBean
.
setCreateTime
(
TimeUtils
.
getFormatTime
(
respose
.
getData
().
getCreateTime
(),
TimeUtils
.
DEFAULT_DATE_FORMAT
));
openTableBean
.
setCreateTime
(
respose
.
getData
().
getCreateTime
(
));
}
}
OpenTableManage
.
getDefault
().
setPeopleNumber
(
orderBean
.
getPerson
());
OpenTableManage
.
getDefault
().
setPeopleNumber
(
orderBean
.
getPerson
());
...
@@ -418,7 +418,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -418,7 +418,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
if
(
orderBean
!=
null
&&
respose
.
getData
().
getOrderDetails
()
!=
null
)
{
if
(
orderBean
!=
null
&&
respose
.
getData
().
getOrderDetails
()
!=
null
)
{
if
(
respose
.
getData
().
getCreateTime
()
!=
null
&&
openTableBean
!=
null
)
{
if
(
respose
.
getData
().
getCreateTime
()
!=
null
&&
openTableBean
!=
null
)
{
//將開台時間設置為訂單創建時間
//將開台時間設置為訂單創建時間
openTableBean
.
setCreateTime
(
TimeUtils
.
getFormatTime
(
respose
.
getData
().
getCreateTime
(),
TimeUtils
.
DEFAULT_DATE_FORMAT
));
openTableBean
.
setCreateTime
(
respose
.
getData
().
getCreateTime
(
));
}
}
OpenTableManage
.
getDefault
().
setPeopleNumber
(
orderBean
.
getPerson
());
OpenTableManage
.
getDefault
().
setPeopleNumber
(
orderBean
.
getPerson
());
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
View file @
ad8f3296
...
@@ -34,6 +34,7 @@ import com.gingersoft.gsa.cloud.base.order.bean.OrderDetail;
...
@@ -34,6 +34,7 @@ import com.gingersoft.gsa.cloud.base.order.bean.OrderDetail;
import
com.gingersoft.gsa.cloud.base.order.bean.mealManger.MyOrderManage
;
import
com.gingersoft.gsa.cloud.base.order.bean.mealManger.MyOrderManage
;
import
com.gingersoft.gsa.cloud.base.order.bean.mealManger.OpenTableManage
;
import
com.gingersoft.gsa.cloud.base.order.bean.mealManger.OpenTableManage
;
import
com.gingersoft.gsa.cloud.base.table.bean.TableBean
;
import
com.gingersoft.gsa.cloud.base.table.bean.TableBean
;
import
com.gingersoft.gsa.cloud.base.utils.LanguageUtils
;
import
com.gingersoft.gsa.cloud.base.utils.VibratorUtils
;
import
com.gingersoft.gsa.cloud.base.utils.VibratorUtils
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.constans.FoodSummaryConstans
;
import
com.gingersoft.gsa.cloud.constans.FoodSummaryConstans
;
...
@@ -44,6 +45,7 @@ import com.gingersoft.gsa.cloud.table.di.component.DaggerMealStandComponent;
...
@@ -44,6 +45,7 @@ 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.presenter.BaseOrderPresenter
;
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
;
...
@@ -62,6 +64,7 @@ import com.gingersoft.gsa.cloud.ui.recylcler.decorator.GridDividerItemDecoration
...
@@ -62,6 +64,7 @@ import com.gingersoft.gsa.cloud.ui.recylcler.decorator.GridDividerItemDecoration
import
com.gingersoft.gsa.cloud.ui.view.PagerSlidingTabStrip
;
import
com.gingersoft.gsa.cloud.ui.view.PagerSlidingTabStrip
;
import
com.gingersoft.gsa.cloud.ui.view.RecyclerViewNoBugLinearLayoutManager
;
import
com.gingersoft.gsa.cloud.ui.view.RecyclerViewNoBugLinearLayoutManager
;
import
com.gingersoft.gsa.cloud.ui.view.SearchKeyBoardView
;
import
com.gingersoft.gsa.cloud.ui.view.SearchKeyBoardView
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.CommonTipDialog
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog
;
import
com.gingersoft.gsa.cloud.zxing.MipcaCaptureActivity
;
import
com.gingersoft.gsa.cloud.zxing.MipcaCaptureActivity
;
import
com.jess.arms.base.BaseFragmentActivity
;
import
com.jess.arms.base.BaseFragmentActivity
;
...
@@ -741,7 +744,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -741,7 +744,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
Intent
intent
=
new
Intent
(
this
,
OrderContentActivity
.
class
);
Intent
intent
=
new
Intent
(
this
,
OrderContentActivity
.
class
);
startActivityForResult
(
intent
,
ORDER_CONTENT_CODE
);
startActivityForResult
(
intent
,
ORDER_CONTENT_CODE
);
}
else
if
(
id
==
R
.
id
.
tv_no_save_return
)
{
}
else
if
(
id
==
R
.
id
.
tv_no_save_return
)
{
return
Befor
eActivity
(
true
);
return
Tabl
eActivity
(
true
);
}
else
if
(
id
==
R
.
id
.
btn_taste
)
{
}
else
if
(
id
==
R
.
id
.
btn_taste
)
{
currentFinePage
=
0
;
currentFinePage
=
0
;
showRemarkLayout
();
showRemarkLayout
();
...
@@ -817,10 +820,24 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -817,10 +820,24 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
@Override
@Override
public
void
onBackPressedSupport
()
{
public
void
onBackPressedSupport
()
{
super
.
onBackPressedSupport
();
//
super.onBackPressedSupport();
return
Befor
eActivity
(
true
);
return
Tabl
eActivity
(
true
);
}
}
public
void
returnTableActivity
(
boolean
initTable
)
{
if
(!
MyOrderManage
.
getInstance
().
isModifyOrder
()
&&
mPresenter
.
hasNesOrderFoods
())
{
if
(
mPresenter
.
hasNesOrderFoods
())
{
//没有过重复下单提示且有未送单食品,提示用户
String
tip
=
LanguageUtils
.
get_language_system
(
this
,
"food.not.delivered.tip"
,
"有食品未送單, 確認離開?"
);
Class
[]
parameterTypes
=
{
boolean
.
class
};
Object
[]
parameters
=
{
initTable
};
CommonTipDialog
.
showSurpisedDialog
(
this
,
tip
,
MealStandActivity
.
class
,
this
,
"returnBeforeActivity"
,
parameterTypes
,
parameters
);
}
}
else
{
returnBeforeActivity
(
initTable
);
}
}
public
void
returnBeforeActivity
(
boolean
initTable
)
{
public
void
returnBeforeActivity
(
boolean
initTable
)
{
SPUtils
.
put
(
this
,
MealConstant
.
EXIT_IS_PLU_MODE
,
isPluMode
);
SPUtils
.
put
(
this
,
MealConstant
.
EXIT_IS_PLU_MODE
,
isPluMode
);
...
@@ -885,7 +902,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -885,7 +902,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
@Override
@Override
public
void
OnBackClick
()
{
public
void
OnBackClick
()
{
recordOperat
(
true
);
recordOperat
(
true
);
return
Befor
eActivity
(
true
);
return
Tabl
eActivity
(
true
);
}
}
});
});
int
backPageBtnVisibility
;
int
backPageBtnVisibility
;
...
@@ -912,7 +929,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -912,7 +929,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
@Override
@Override
public
void
onBackPage
()
{
public
void
onBackPage
()
{
return
Befor
eActivity
(
true
);
return
Tabl
eActivity
(
true
);
}
}
});
});
mChooseNumberDialog
.
setCancelable
(
isNeedCancel
);
mChooseNumberDialog
.
setCancelable
(
isNeedCancel
);
...
@@ -1328,11 +1345,11 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -1328,11 +1345,11 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
@Override
@Override
public
void
setModifierTop
(
int
margins
)
{
public
void
setModifierTop
(
int
margins
)
{
//
RelativeLayout.LayoutParams layoutParam = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
RelativeLayout
.
LayoutParams
layoutParam
=
new
RelativeLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
//
layoutParam.setMargins(0, margins, 0, 0);
layoutParam
.
setMargins
(
0
,
margins
,
0
,
0
);
//
layoutParam.addRule(RelativeLayout.ABOVE, R.id.ll_stand_oper);
layoutParam
.
addRule
(
RelativeLayout
.
ABOVE
,
R
.
id
.
ll_stand_oper
);
//
layoutParam.addRule(RelativeLayout.BELOW, R.id.rv_combo);
layoutParam
.
addRule
(
RelativeLayout
.
BELOW
,
R
.
id
.
rv_combo
);
//
rv_modifier.setLayoutParams(layoutParam);
rv_modifier
.
setLayoutParams
(
layoutParam
);
}
}
@Override
@Override
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/TableAdapter.java
View file @
ad8f3296
...
@@ -160,7 +160,7 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
...
@@ -160,7 +160,7 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
tv_people
.
setVisibility
(
View
.
VISIBLE
);
tv_people
.
setVisibility
(
View
.
VISIBLE
);
tv_people
.
setText
(
person
+
"人"
);
tv_people
.
setText
(
person
+
"人"
);
String
createDate
=
item
.
getCreateTime
();
String
createDate
=
item
.
getCreateTime
();
if
(!
TextUtils
.
isEmpty
(
createDate
)
&&
createDate
.
startsWith
(
"Jul"
)
)
{
if
(!
TextUtils
.
isEmpty
(
createDate
))
{
LogUtil
.
d
(
TAG
,
"tableName: "
+
item
.
getTableName
()
+
" "
+
"createDate: "
+
createDate
);
LogUtil
.
d
(
TAG
,
"tableName: "
+
item
.
getTableName
()
+
" "
+
"createDate: "
+
createDate
);
Date
date
=
new
Date
(
createDate
);
Date
date
=
new
Date
(
createDate
);
String
createTime
=
TimeUtils
.
getStringByFormat
(
date
,
TimeUtils
.
DEFAULT_DATE_FORMAT
);
String
createTime
=
TimeUtils
.
getStringByFormat
(
date
,
TimeUtils
.
DEFAULT_DATE_FORMAT
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/ComboAdapter.java
View file @
ad8f3296
...
@@ -158,28 +158,6 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
...
@@ -158,28 +158,6 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
}
}
private
void
initModifierSoldout
(
Modifier
datasBean
)
{
private
void
initModifierSoldout
(
Modifier
datasBean
)
{
// if (datasBean.isSoldout()) {
// iv_qty_sold.setVisibility(View.VISIBLE);
// } else {
// iv_qty_sold.setVisibility(View.INVISIBLE);
// }
// int maxNumber = datasBean.getMaxNumber();
// int number = datasBean.getNumber();
// if (number >= maxNumber) {
// tv_soldout.setVisibility(View.VISIBLE);
// tv_soldout.setText(maxNumber);
// } else {
// tv_soldout.setVisibility(View.INVISIBLE);
// }
// String qty = datasBean.getMaxNumber();
// if (qty.equals("")) {
// tv_soldout.setVisibility(View.INVISIBLE);
// } else {
// tv_soldout.setVisibility(View.VISIBLE);
// tv_soldout.setText(datasBean.getMaxNumber());
// }
String
qty
=
datasBean
.
getCurrentMaxNumber
();
String
qty
=
datasBean
.
getCurrentMaxNumber
();
if
(
TextUtils
.
isEmpty
(
qty
))
{
if
(
TextUtils
.
isEmpty
(
qty
))
{
tv_soldout
.
setVisibility
(
View
.
INVISIBLE
);
tv_soldout
.
setVisibility
(
View
.
INVISIBLE
);
...
@@ -191,9 +169,6 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
...
@@ -191,9 +169,6 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
tv_soldout
.
setText
(
qty
);
tv_soldout
.
setText
(
qty
);
}
}
}
}
tv_soldout
.
setMaxHeight
(
soldoutModFlagHeight
);
tv_soldout
.
setMinHeight
(
soldoutModFlagHeight
);
tv_soldout
.
setTextSize
(
soldoutFoodFlagFontSize
);
}
}
private
void
initComboName
(
ComboItem
datasBean
)
{
private
void
initComboName
(
ComboItem
datasBean
)
{
...
@@ -206,14 +181,10 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
...
@@ -206,14 +181,10 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
private
void
setSolodStatus
(
ComboItem
datasBean
)
{
private
void
setSolodStatus
(
ComboItem
datasBean
)
{
tv_soldout
.
setMaxHeight
(
soldoutModFlagHeight
);
tv_soldout
.
setMinHeight
(
soldoutModFlagHeight
);
tv_soldout
.
setMinHeight
(
soldoutModFlagHeight
);
tv_soldout
.
setTextSize
(
soldoutFoodFlagFontSize
);
tv_soldout
.
setTextSize
(
soldoutFoodFlagFontSize
);
// tv_soldout.setTextColor(Color.parseColor("#000000"));
tv_soldout
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
R
.
drawable
.
meal_shape_remaining_number_bg
));
tv_soldout
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
R
.
drawable
.
meal_shape_remaining_number_bg
));
// tv_soldout.setMinWidth(15);
tv_soldout
.
setGravity
(
Gravity
.
CENTER
);
// tv_soldout.setTextSize(8);
// tv_soldout.setGravity(Gravity.CENTER);
RelativeLayout
.
LayoutParams
lp2
=
new
RelativeLayout
.
LayoutParams
(
new
ViewGroup
.
MarginLayoutParams
(
60
,
40
));
RelativeLayout
.
LayoutParams
lp2
=
new
RelativeLayout
.
LayoutParams
(
new
ViewGroup
.
MarginLayoutParams
(
60
,
40
));
lp2
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_BOTTOM
);
lp2
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_BOTTOM
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodAdapter.java
View file @
ad8f3296
...
@@ -175,19 +175,10 @@ public class FoodAdapter extends DefaultAdapter<Food> {
...
@@ -175,19 +175,10 @@ public class FoodAdapter extends DefaultAdapter<Food> {
private
void
setStatus
(
Food
datasBean
)
{
private
void
setStatus
(
Food
datasBean
)
{
tv_soldout
.
setMaxHeight
(
mSoldoutFoodFlagHeight
);
tv_soldout
.
setMinHeight
(
mSoldoutFoodFlagHeight
);
tv_soldout
.
setMinHeight
(
mSoldoutFoodFlagHeight
);
tv_soldout
.
setTextSize
(
mSoldoutFoodFlagFontSize
);
tv_soldout
.
setTextSize
(
mSoldoutFoodFlagFontSize
);
// tv_soldout.setTextColor(Color.parseColor("#000000"));
tv_soldout
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
R
.
drawable
.
meal_shape_remaining_number_bg
));
tv_soldout
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
R
.
drawable
.
meal_shape_remaining_number_bg
));
// tv_soldout.setMinWidth(20);
tv_soldout
.
setGravity
(
Gravity
.
CENTER
);
// tv_soldout.setTextSize(10);
// tv_soldout.setGravity(Gravity.CENTER);
// RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(new ViewGroup.MarginLayoutParams(60, 40));
// lp2.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
// lp2.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
// tv_soldout.setLayoutParams(lp2);
tv_soldout
.
setVisibility
(
View
.
INVISIBLE
);
tv_soldout
.
setVisibility
(
View
.
INVISIBLE
);
iv_qtySold
.
setVisibility
(
View
.
INVISIBLE
);
iv_qtySold
.
setVisibility
(
View
.
INVISIBLE
);
...
@@ -239,8 +230,9 @@ public class FoodAdapter extends DefaultAdapter<Food> {
...
@@ -239,8 +230,9 @@ public class FoodAdapter extends DefaultAdapter<Food> {
}
}
//设置当前选中item颜色
//设置当前选中item颜色
if
(
datasBean
!=
null
)
if
(
datasBean
!=
null
)
{
datasBean
.
setSelected
(
true
);
datasBean
.
setSelected
(
true
);
}
notifyDataSetChanged
();
notifyDataSetChanged
();
//保存上次操作的position
//保存上次操作的position
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodGroupAdapter.java
View file @
ad8f3296
...
@@ -226,8 +226,6 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
...
@@ -226,8 +226,6 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
String
qty
=
datasBean
.
getMaxNumber
();
String
qty
=
datasBean
.
getMaxNumber
();
if
(!
qty
.
equals
(
""
))
{
if
(!
qty
.
equals
(
""
))
{
// tv_soldout.setVisibility(View.VISIBLE);
// tv_soldout.setText(datasBean.getMaxNumber());
blv_soldout
.
setVisibility
(
View
.
VISIBLE
);
blv_soldout
.
setVisibility
(
View
.
VISIBLE
);
blv_soldout
.
setLableText
(
datasBean
.
getMaxNumber
());
blv_soldout
.
setLableText
(
datasBean
.
getMaxNumber
());
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/ModifierAdapter.java
View file @
ad8f3296
...
@@ -35,6 +35,7 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
...
@@ -35,6 +35,7 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
private
int
ColHeight
;
private
int
ColHeight
;
private
int
FontSize
;
private
int
FontSize
;
private
int
soldoutModFlagHeight
;
private
int
OrderNumberChildFontSize
;
private
int
OrderNumberChildFontSize
;
...
@@ -44,6 +45,7 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
...
@@ -44,6 +45,7 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
ColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeightValue
();
ColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeightValue
();
FontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSizeValue
();
FontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSizeValue
();
soldoutModFlagHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutModFlagHeightValue
();
OrderNumberChildFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutModFlagFontSizeValue
();
OrderNumberChildFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutModFlagFontSizeValue
();
}
}
...
@@ -142,17 +144,10 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
...
@@ -142,17 +144,10 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
private
void
initModifierSoldout
(
Modifier
datasBean
)
{
private
void
initModifierSoldout
(
Modifier
datasBean
)
{
// String qty = datasBean.getCurrentMaxNumber();
tv_soldout
.
setMinHeight
(
soldoutModFlagHeight
);
// if (qty.equals("")) {
// tv_soldout.setVisibility(View.INVISIBLE);
// } else {
// tv_soldout.setVisibility(View.VISIBLE);
// tv_soldout.setText(datasBean.getCurrentMaxNumber());
// }
tv_soldout
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
R
.
drawable
.
meal_shape_remaining_number_bg
));
// tv_soldout.setMaxHeight(OrderNumberChildShowSize);
// tv_soldout.setMinHeight(OrderNumberChildShowSize);
tv_soldout
.
setTextSize
(
OrderNumberChildFontSize
);
tv_soldout
.
setTextSize
(
OrderNumberChildFontSize
);
tv_soldout
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
R
.
drawable
.
meal_shape_remaining_number_bg
));
tv_soldout
.
setGravity
(
Gravity
.
CENTER
);
tv_soldout
.
setVisibility
(
View
.
INVISIBLE
);
tv_soldout
.
setVisibility
(
View
.
INVISIBLE
);
iv_qty_sold
.
setVisibility
(
View
.
INVISIBLE
);
iv_qty_sold
.
setVisibility
(
View
.
INVISIBLE
);
...
...
table-module/src/main/res/layout/table_activity_meal_stand.xml
View file @
ad8f3296
...
@@ -499,7 +499,7 @@
...
@@ -499,7 +499,7 @@
android:layout_height=
"38dp"
android:layout_height=
"38dp"
android:layout_below=
"@+id/ll_meals"
android:layout_below=
"@+id/ll_meals"
android:background=
"@color/theme_white_color"
android:background=
"@color/theme_white_color"
android:visibility=
"visible"
>
android:visibility=
"
in
visible"
>
<ImageView
<ImageView
android:id=
"@+id/iv_fine_back"
android:id=
"@+id/iv_fine_back"
...
@@ -543,7 +543,7 @@
...
@@ -543,7 +543,7 @@
android:layout_below=
"@+id/ll_meals"
android:layout_below=
"@+id/ll_meals"
android:layout_above=
"@+id/ll_stand_oper"
>
android:layout_above=
"@+id/ll_stand_oper"
>
<
Linear
Layout
<
Relative
Layout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -565,8 +565,9 @@
...
@@ -565,8 +565,9 @@
android:divider=
"@null"
android:divider=
"@null"
android:fadeScrollbars=
"false"
android:fadeScrollbars=
"false"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:layout_below=
"@+id/rv_combo"
android:visibility=
"visible"
/>
android:visibility=
"visible"
/>
</
Linear
Layout>
</
Relative
Layout>
</ScrollView>
</ScrollView>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment