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
aa267293
Commit
aa267293
authored
Oct 21, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
餐廳擴展同步完善
parent
81e309bb
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
5349 additions
and
289 deletions
+5349
-289
base-module/build.gradle
+1
-1
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
+21
-10
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/ReflectionUtils.java
+626
-43
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/RestaurantExpandInfoUtils.java
+28
-10
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/expandInfo/ExpandInfoSetting.java
+115
-4
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/expandInfo/FunctionExtendedConfiguration.java
+84
-85
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/expandInfo/UIStyleExtendedConfiguration.java
+174
-24
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/ExpandInfo.java
+26
-23
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/ExpandInfoDao.java
+38
-24
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ColorBeanDao.java
+202
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ComboItemDao.java
+259
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoMaster.java
+132
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoSession.java
+216
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DiscountDao.java
+201
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ExpandInfoDao.java
+233
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodComboDao.java
+242
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodDao.java
+647
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodModifierDao.java
+271
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FunctionDao.java
+193
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/LanguageDao.java
+135
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ModifierDao.java
+515
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintCurrencyBeanDao.java
+295
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintModelBeanDao.java
+163
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrinterDeviceBeanDao.java
+421
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/contract/NewMainContract.java
+3
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/NewMainModel.java
+7
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/service/MainService.java
+12
-4
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/NewMainPresenter.java
+19
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/NewMainActivity.java
+1
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
+10
-8
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderContentActivity.java
+2
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/SoldoutCtrlActivity.java
+5
-4
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/CurrentSlodoutFoodAdapter.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/FineItemOneAdapter.java
+6
-5
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/FineItemTwoAdapter.java
+6
-5
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/ComboAdapter.java
+12
-12
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/DiscountAdapter.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodAdapter.java
+12
-11
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodGroupAdapter.java
+7
-6
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/ModifierAdapter.java
+3
-3
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/FineItemAllFragment.java
+1
-1
No files found.
base-module/build.gradle
View file @
aa267293
...
...
@@ -51,7 +51,7 @@ android {
/**
* 版本号
*/
schemaVersion
19
schemaVersion
20
/**
* greendao输出dao的数据库操作实体类文件夹(相对路径 包名+自定义路径名称,包将创建于包名的直接路径下)
*/
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
View file @
aa267293
...
...
@@ -11,6 +11,7 @@ import android.os.RemoteException;
import
androidx.annotation.NonNull
;
import
com.billy.cc.core.component.CC
;
import
com.bumptech.glide.Glide
;
import
com.elvishew.xlog.LogConfiguration
;
import
com.elvishew.xlog.LogLevel
;
import
com.elvishew.xlog.XLog
;
...
...
@@ -30,6 +31,7 @@ import com.gingersoft.gsa.cloud.base.utils.crash.AppCrashHandler;
import
com.gingersoft.gsa.cloud.base.utils.log.LogUtil
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.base.utils.xlog.MyBackupStrategy
;
import
com.gingersoft.gsa.cloud.bean.expandInfo.ExpandInfoSetting
;
import
com.gingersoft.gsa.cloud.bean.expandInfo.FunctionExtendedConfiguration
;
import
com.gingersoft.gsa.cloud.bean.expandInfo.UIStyleExtendedConfiguration
;
import
com.gingersoft.gsa.cloud.constans.HttpsConstans
;
...
...
@@ -51,6 +53,8 @@ import java.util.Locale;
import
io.reactivex.Observable
;
import
io.reactivex.ObservableEmitter
;
import
io.reactivex.ObservableOnSubscribe
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.schedulers.Schedulers
;
import
me.jessyan.autosize.AutoSize
;
import
me.jessyan.autosize.AutoSizeConfig
;
...
...
@@ -133,7 +137,11 @@ public class GsaCloudApplication extends BaseApplication {
functionConfiguration
=
new
FunctionExtendedConfiguration
();
isLogin
=
(
boolean
)
SPUtils
.
get
(
this
,
PrintConstans
.
IS_LOGIN
,
false
);
//上傳餐廳擴展信息
ExpandInfoSetting
.
initUpdateExtendedConfiguration
(
uiStyleConfiguration
,
functionConfiguration
);
//獲取餐廳擴展表數據
initExpandInfo
();
// 设定一些通用的属性,这些属性在每次统计事件中都会附带
// 注意:如果此处的属性名与内置属性的名称相同,则内置属性会被覆盖
// Tracker.INSTANCE.addProperty("附加的属性1", "附加的属性1");
...
...
@@ -151,16 +159,19 @@ public class GsaCloudApplication extends BaseApplication {
}
private
void
initExpandInfo
()
{
Observable
.
create
(
new
ObservableOnSubscribe
<
Void
>()
{
@Override
public
void
subscribe
(
ObservableEmitter
<
Void
>
emitter
)
throws
Exception
{
ExpandInfoDaoUtils
expandInfoDaoUtils
=
new
ExpandInfoDaoUtils
(
getAppContext
());
List
<
ExpandInfo
>
expandInfos
=
expandInfoDaoUtils
.
queryAllExpandInfo
();
if
(
expandInfos
!=
null
)
{
RestaurantExpandInfoUtils
.
setCommonExpandInfo
(
expandInfos
);
}
}
}).
subscribeOn
(
Schedulers
.
io
()).
subscribe
();
//在IO线程执行数据库处理操作
//在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
()
{
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/ReflectionUtils.java
View file @
aa267293
...
...
@@ -3,81 +3,663 @@ package com.gingersoft.gsa.cloud.base.utils;
import
android.util.Log
;
import
java.lang.annotation.Annotation
;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Modifier
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.Type
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 反射工具类
* 反射工具类 <br />
* <br />
* 提供了一系列的获取某一个类的信息的方法<br />
* 包括获取全类名,实现的接口,接口的泛型等<br />
* 并且提供了根据Class类型获取对应的实例对象的方法,以及修改属性和调用对象的方法等
*/
public
class
ReflectionUtils
{
private
static
final
String
TAG
=
"ReflectionUtils"
;
/**
* 获取包名
*
* @return 包名【String类型】
*/
public
static
String
getPackage
(
Class
<?>
clazz
)
{
Package
pck
=
clazz
.
getPackage
();
if
(
null
!=
pck
)
{
return
pck
.
getName
();
}
else
{
return
"没有包!"
;
}
}
/**
* 获取继承的父类的全类名
*
* @return 继承的父类的全类名【String类型】
*/
public
static
String
getSuperClassName
(
Class
<?>
clazz
)
{
Class
<?>
superClass
=
clazz
.
getSuperclass
();
if
(
null
!=
superClass
)
{
return
superClass
.
getName
();
}
else
{
return
"没有父类!"
;
}
}
/**
* 获取全类名
*
* @return 全类名【String类型】
*/
public
static
String
getClassName
(
Class
<?>
clazz
)
{
return
clazz
.
getName
();
}
/**
* 获取实现的接口名
*
* @return 所有的接口名【每一个接口名的类型为String,最后保存到一个List集合中】
*/
public
static
List
<
String
>
getInterfaces
(
Class
<?>
clazz
)
{
Class
<?>[]
interfaces
=
clazz
.
getInterfaces
();
int
len
=
interfaces
.
length
;
List
<
String
>
list
=
new
ArrayList
<
String
>();
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Class
<?>
itfc
=
interfaces
[
i
];
// 接口名
String
interfaceName
=
itfc
.
getSimpleName
();
list
.
add
(
interfaceName
);
}
return
list
;
}
/**
* 获取所有属性
*
* @return 所有的属性【每一个属性添加到StringBuilder中,最后保存到一个List集合中】
*/
public
static
List
<
StringBuilder
>
getFields
(
Class
<?>
clazz
)
{
Field
[]
fields
=
clazz
.
getDeclaredFields
();
int
len
=
fields
.
length
;
List
<
StringBuilder
>
list
=
new
ArrayList
<
StringBuilder
>();
StringBuilder
sb
=
null
;
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Field
field
=
fields
[
i
];
sb
=
new
StringBuilder
();
// 修饰符
String
modifier
=
Modifier
.
toString
(
field
.
getModifiers
());
sb
.
append
(
modifier
+
" "
);
// 数据类型
Class
<?>
type
=
field
.
getType
();
String
typeName
=
type
.
getSimpleName
();
sb
.
append
(
typeName
+
" "
);
// 属性名
String
fieldName
=
field
.
getName
();
sb
.
append
(
fieldName
+
";"
);
list
.
add
(
sb
);
}
return
list
;
}
/**
* 获取所有公共的属性
*
* @return 所有公共的属性【每一个属性添加到StringBuilder中,最后保存到一个List集合中】
*/
public
static
List
<
StringBuilder
>
getPublicFields
(
Class
<?>
clazz
)
{
Field
[]
fields
=
clazz
.
getFields
();
int
len
=
fields
.
length
;
List
<
StringBuilder
>
list
=
new
ArrayList
<
StringBuilder
>();
StringBuilder
sb
=
null
;
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Field
field
=
fields
[
i
];
sb
=
new
StringBuilder
();
// 修饰符
String
modifier
=
Modifier
.
toString
(
field
.
getModifiers
());
sb
.
append
(
modifier
+
" "
);
// 数据类型
Class
<?>
type
=
field
.
getType
();
String
typeName
=
type
.
getSimpleName
();
sb
.
append
(
typeName
+
" "
);
// 属性名
String
fieldName
=
field
.
getName
();
sb
.
append
(
fieldName
+
";"
);
list
.
add
(
sb
);
}
return
list
;
}
/**
* 获取所有构造方法
*
* @return 所有的构造方法【每一个构造方法添加到StringBuilder中,最后保存到一个List集合中】
*/
public
static
List
<
StringBuilder
>
getConstructors
(
Class
<?>
clazz
)
{
Constructor
<?>[]
constructors
=
clazz
.
getDeclaredConstructors
();
int
len
=
constructors
.
length
;
List
<
StringBuilder
>
list
=
new
ArrayList
<
StringBuilder
>();
StringBuilder
sb
=
null
;
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Constructor
<?>
constructor
=
constructors
[
i
];
sb
=
new
StringBuilder
();
// 修饰符
String
modifier
=
Modifier
.
toString
(
constructor
.
getModifiers
());
sb
.
append
(
modifier
+
" "
);
// 方法名(类名)
String
constructorName
=
clazz
.
getSimpleName
();
sb
.
append
(
constructorName
+
" ("
);
// 形参列表
Class
<?>[]
parameterTypes
=
constructor
.
getParameterTypes
();
int
length
=
parameterTypes
.
length
;
for
(
int
j
=
0
;
j
<
length
;
j
++)
{
Class
<?>
parameterType
=
parameterTypes
[
j
];
String
parameterTypeName
=
parameterType
.
getSimpleName
();
if
(
j
<
length
-
1
)
{
sb
.
append
(
parameterTypeName
+
", "
);
}
else
{
sb
.
append
(
parameterTypeName
);
}
}
sb
.
append
(
") {}"
);
list
.
add
(
sb
);
}
return
list
;
}
/**
* 根据属性名获取属性值
* 获取所有自身的方法
*
* @return 所有自身的方法【每一个方法添加到StringBuilder中,最后保存到一个List集合中】
*/
public
static
Object
getFieldValueByName
(
String
fieldName
,
Object
o
)
{
try
{
String
firstLetter
=
fieldName
.
substring
(
0
,
1
).
toUpperCase
();
String
getter
=
"get"
+
firstLetter
+
fieldName
.
substring
(
1
);
Method
method
=
o
.
getClass
().
getMethod
(
getter
,
new
Class
[]{});
Object
value
=
method
.
invoke
(
o
,
new
Object
[]{});
return
value
;
}
catch
(
Exception
e
)
{
Log
.
d
(
TAG
,
"getFieldValueByName: "
+
e
.
getMessage
());
return
null
;
public
static
List
<
StringBuilder
>
getMethods
(
Class
<?>
clazz
)
{
Method
[]
methods
=
clazz
.
getDeclaredMethods
();
int
len
=
methods
.
length
;
List
<
StringBuilder
>
list
=
new
ArrayList
<
StringBuilder
>();
StringBuilder
sb
=
null
;
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Method
method
=
methods
[
i
];
sb
=
new
StringBuilder
();
// 修饰符
String
modifier
=
Modifier
.
toString
(
method
.
getModifiers
());
sb
.
append
(
modifier
+
" "
);
// 返回值类型
Class
<?>
returnClass
=
method
.
getReturnType
();
String
returnType
=
returnClass
.
getSimpleName
();
sb
.
append
(
returnType
+
" "
);
// 方法名
String
methodName
=
method
.
getName
();
sb
.
append
(
methodName
+
" ("
);
// 形参列表
Class
<?>[]
parameterTypes
=
method
.
getParameterTypes
();
int
length
=
parameterTypes
.
length
;
for
(
int
j
=
0
;
j
<
length
;
j
++)
{
Class
<?>
parameterType
=
parameterTypes
[
j
];
// 形参类型
String
parameterTypeName
=
parameterType
.
getSimpleName
();
if
(
j
<
length
-
1
)
{
sb
.
append
(
parameterTypeName
+
", "
);
}
else
{
sb
.
append
(
parameterTypeName
);
}
}
sb
.
append
(
") {}"
);
list
.
add
(
sb
);
}
return
list
;
}
/**
* 获取所有公共的方法
*
* @return 所有公共的方法【每一个方法添加到StringBuilder中,最后保存到一个List集合中】
*/
public
static
List
<
StringBuilder
>
getPublicMethods
(
Class
<?>
clazz
)
{
Method
[]
methods
=
clazz
.
getMethods
();
int
len
=
methods
.
length
;
List
<
StringBuilder
>
list
=
new
ArrayList
<
StringBuilder
>();
StringBuilder
sb
=
null
;
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Method
method
=
methods
[
i
];
sb
=
new
StringBuilder
();
// 修饰符
String
modifier
=
Modifier
.
toString
(
method
.
getModifiers
());
sb
.
append
(
modifier
+
" "
);
// 返回值类型
Class
<?>
returnClass
=
method
.
getReturnType
();
String
returnType
=
returnClass
.
getSimpleName
();
sb
.
append
(
returnType
+
" "
);
// 方法名
String
methodName
=
method
.
getName
();
sb
.
append
(
methodName
+
" ("
);
// 形参列表
Class
<?>[]
parameterTypes
=
method
.
getParameterTypes
();
int
length
=
parameterTypes
.
length
;
for
(
int
j
=
0
;
j
<
length
;
j
++)
{
Class
<?>
parameterType
=
parameterTypes
[
j
];
// 形参类型
String
parameterTypeName
=
parameterType
.
getSimpleName
();
if
(
j
<
length
-
1
)
{
sb
.
append
(
parameterTypeName
+
", "
);
}
else
{
sb
.
append
(
parameterTypeName
);
}
}
sb
.
append
(
") {}"
);
list
.
add
(
sb
);
}
return
list
;
}
/**
* 获取属性名数组
* 获取所有的注解名
*
* @return 所有的注解名【每一个注解名的类型为String,最后保存到一个List集合中】
*/
public
static
String
[]
getFiledName
(
Object
o
)
{
Field
[]
fields
=
o
.
getClass
().
getDeclaredFields
();
String
[]
fieldNames
=
new
String
[
fields
.
length
];
for
(
int
i
=
0
;
i
<
fields
.
length
;
i
++)
{
System
.
out
.
println
(
"类型"
+
fields
[
i
].
getType
());
System
.
out
.
println
(
"名称="
+
fields
[
i
].
getName
());
fieldNames
[
i
]
=
fields
[
i
].
getName
();
public
static
List
<
String
>
getAnnotations
(
Class
<?>
clazz
)
{
Annotation
[]
annotations
=
clazz
.
getAnnotations
();
int
len
=
annotations
.
length
;
List
<
String
>
list
=
new
ArrayList
<
String
>();
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Annotation
annotation
=
annotations
[
i
];
String
annotationName
=
annotation
.
annotationType
().
getSimpleName
();
list
.
add
(
annotationName
);
}
return
fieldNames
;
return
list
;
}
/**
* 获取父类的泛型
*
* @return 父类的泛型【Class类型】
*/
public
static
Class
<?>
getSuperClassGenericParameterizedType
(
Class
<?>
clazz
)
{
Type
genericSuperClass
=
clazz
.
getGenericSuperclass
();
Class
<?>
superClassGenericParameterizedType
=
null
;
// 判断父类是否有泛型
if
(
genericSuperClass
instanceof
ParameterizedType
)
{
// 向下转型,以便调用方法
ParameterizedType
pt
=
(
ParameterizedType
)
genericSuperClass
;
// 只取第一个,因为一个类只能继承一个父类
Type
superClazz
=
pt
.
getActualTypeArguments
()[
0
];
// 转换为Class类型
superClassGenericParameterizedType
=
(
Class
<?>)
superClazz
;
}
return
superClassGenericParameterizedType
;
}
/**
* 获取属性类型(type),属性名(name),属性值(value)的map组成的list
* 获取接口的所有泛型
*
* @return 所有的泛型接口【每一个泛型接口的类型为Class,最后保存到一个List集合中】
*/
public
static
List
getFiledsInfo
(
Object
o
)
{
Field
[]
fields
=
o
.
getClass
().
getDeclaredFields
();
String
[]
fieldNames
=
new
String
[
fields
.
length
];
List
list
=
new
ArrayList
();
Map
infoMap
=
null
;
for
(
int
i
=
0
;
i
<
fields
.
length
;
i
++)
{
infoMap
=
new
HashMap
();
infoMap
.
put
(
"field"
,
fields
[
i
]);
infoMap
.
put
(
"type"
,
fields
[
i
].
getType
().
toString
());
infoMap
.
put
(
"name"
,
fields
[
i
].
getName
());
infoMap
.
put
(
"value"
,
getFieldValueByName
(
fields
[
i
].
getName
(),
o
));
list
.
add
(
infoMap
);
public
static
List
<
Class
<?>>
getInterfaceGenericParameterizedTypes
(
Class
<?>
clazz
)
{
Type
[]
genericInterfaces
=
clazz
.
getGenericInterfaces
();
int
len
=
genericInterfaces
.
length
;
List
<
Class
<?>>
list
=
new
ArrayList
<
Class
<?>>();
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Type
genericInterface
=
genericInterfaces
[
i
];
// 判断接口是否有泛型
if
(
genericInterface
instanceof
ParameterizedType
)
{
ParameterizedType
pt
=
(
ParameterizedType
)
genericInterface
;
// 得到所有的泛型【Type类型的数组】
Type
[]
interfaceTypes
=
pt
.
getActualTypeArguments
();
int
length
=
interfaceTypes
.
length
;
for
(
int
j
=
0
;
j
<
length
;
j
++)
{
// 获取对应的泛型【Type类型】
Type
interfaceType
=
interfaceTypes
[
j
];
// 转换为Class类型
Class
<?>
interfaceClass
=
(
Class
<?>)
interfaceType
;
list
.
add
(
interfaceClass
);
}
}
}
return
list
;
}
/**
* 获取对象的所有属性值,返回一个对象数组
* 打印包名
*/
public
static
void
printPackage
(
Class
<?>
clazz
)
{
System
.
out
.
println
(
getPackage
(
clazz
));
}
/**
* 打印继承的父类的全类名
*/
public
static
void
printSuperClassName
(
Class
<?>
clazz
)
{
System
.
out
.
println
(
getSuperClassName
(
clazz
));
}
/**
* 打印全类名
*/
public
static
void
printClassName
(
Class
<?>
clazz
)
{
System
.
out
.
println
(
getClassName
(
clazz
));
}
/**
* 打印实现的接口
*/
public
static
void
printInterfaces
(
Class
<?>
clazz
)
{
List
<
String
>
list
=
getInterfaces
(
clazz
);
int
size
=
list
.
size
();
if
(
0
<
size
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
System
.
out
.
println
(
list
.
get
(
i
));
}
}
else
{
System
.
out
.
println
(
"没有实现接口!"
);
}
}
/**
* 打印所有属性
*/
public
static
void
printFields
(
Class
<?>
clazz
)
{
List
<
StringBuilder
>
list
=
getFields
(
clazz
);
int
size
=
list
.
size
();
if
(
0
<
size
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
System
.
out
.
println
(
list
.
get
(
i
));
}
}
else
{
System
.
out
.
println
(
"没有属性!"
);
}
}
/**
* 打印所有公共的属性
*/
public
static
void
printPublicFields
(
Class
<?>
clazz
)
{
List
<
StringBuilder
>
list
=
getPublicFields
(
clazz
);
int
size
=
list
.
size
();
if
(
0
<
size
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
System
.
out
.
println
(
list
.
get
(
i
));
}
}
else
{
System
.
out
.
println
(
"没有属性!"
);
}
}
/**
* 打印所有构造方法
*/
public
static
void
printConstructors
(
Class
<?>
clazz
)
{
List
<
StringBuilder
>
list
=
getConstructors
(
clazz
);
int
size
=
list
.
size
();
if
(
0
<
size
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
System
.
out
.
println
(
list
.
get
(
i
));
}
}
else
{
System
.
out
.
println
(
"没有构造方法!"
);
}
}
/**
* 打印所有方法
*/
public
static
void
printMethods
(
Class
<?>
clazz
)
{
List
<
StringBuilder
>
list
=
getMethods
(
clazz
);
int
size
=
list
.
size
();
if
(
0
<
size
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
System
.
out
.
println
(
list
.
get
(
i
));
}
}
else
{
System
.
out
.
println
(
"没有方法!"
);
}
}
/**
* 打印所有公共的方法
*/
public
static
void
printPublicMethods
(
Class
<?>
clazz
)
{
List
<
StringBuilder
>
list
=
getPublicMethods
(
clazz
);
int
size
=
list
.
size
();
if
(
0
<
size
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
System
.
out
.
println
(
list
.
get
(
i
));
}
}
else
{
System
.
out
.
println
(
"没有方法!"
);
}
}
/**
* 打印所有的注解
*/
public
static
Object
[]
getFiledValues
(
Object
o
)
{
String
[]
fieldNames
=
getFiledName
(
o
);
Object
[]
value
=
new
Object
[
fieldNames
.
length
];
for
(
int
i
=
0
;
i
<
fieldNames
.
length
;
i
++)
{
value
[
i
]
=
getFieldValueByName
(
fieldNames
[
i
],
o
);
public
static
void
printAnnotations
(
Class
<?>
clazz
)
{
List
<
String
>
list
=
getAnnotations
(
clazz
);
int
size
=
list
.
size
();
if
(
0
<
size
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
System
.
out
.
println
(
list
.
get
(
i
));
}
}
else
{
System
.
out
.
println
(
"没有注解!"
);
}
return
value
;
}
}
/**
* 打印父类的泛型名
*/
public
static
void
printSuperClassGenericParameterizedType
(
Class
<?>
clazz
)
{
Class
<?>
superClassGenericParameterizedType
=
getSuperClassGenericParameterizedType
(
clazz
);
if
(
null
!=
superClassGenericParameterizedType
)
{
System
.
out
.
println
(
superClassGenericParameterizedType
.
getSimpleName
());
}
else
{
System
.
out
.
println
(
"父类没有泛型!"
);
}
}
/**
* 打印接口的泛型
*/
public
static
void
printInterfaceGenericParameterizedTypes
(
Class
<?>
clazz
)
{
List
<
Class
<?>>
list
=
getInterfaceGenericParameterizedTypes
(
clazz
);
int
size
=
list
.
size
();
if
(
0
<
size
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
System
.
out
.
println
(
list
.
get
(
i
).
getSimpleName
());
}
}
else
{
System
.
out
.
println
(
"没有泛型接口!"
);
}
}
/**
* 打印一个类的相关信息
*
* @param clazz
*/
public
static
void
printAll
(
Class
<?>
clazz
)
{
System
.
out
.
print
(
"【包名】 "
);
printPackage
(
clazz
);
System
.
out
.
print
(
"【类名】 "
);
System
.
out
.
println
(
clazz
.
getSimpleName
());
System
.
out
.
println
(
"\n【父类全类名】"
);
printSuperClassName
(
clazz
);
System
.
out
.
println
(
"【全类名】"
);
printClassName
(
clazz
);
System
.
out
.
println
(
"\n【所有已实现的接口】"
);
printInterfaces
(
clazz
);
System
.
out
.
println
(
"\n【属性】"
);
printFields
(
clazz
);
System
.
out
.
println
(
"\n【构造方法】"
);
printConstructors
(
clazz
);
System
.
out
.
println
(
"\n【方法】"
);
printMethods
(
clazz
);
System
.
out
.
println
(
"\n【公共的属性】"
);
printPublicFields
(
clazz
);
System
.
out
.
println
(
"\n【公共的方法】"
);
printPublicMethods
(
clazz
);
}
/**
* 根据Class类型,获取对应的实例【要求必须有无参的构造器】
*
* @return 对应的实例【Object类型】
*/
public
static
Object
getNewInstance
(
Class
<?>
clazz
)
throws
InstantiationException
,
IllegalAccessException
{
return
clazz
.
newInstance
();
}
/**
* 根据传入的类的Class对象,以及构造方法的形参的Class对象,获取对应的构造方法对象
*
* @param clazz
* 类的Class对象
* @param parameterTypes
* 构造方法的形参的Class对象【可以不写】
* @return 构造方法对象【Constructor类型】
*/
public
static
Constructor
<?>
getConstructor
(
Class
<?>
clazz
,
Class
<?>...
parameterTypes
)
throws
NoSuchMethodException
,
SecurityException
{
return
clazz
.
getDeclaredConstructor
(
parameterTypes
);
}
/**
* 根据传入的构造方法对象,以及,获取对应的实例
*
* @param constructor
* 构造方法对象
* @param initargs
* 传入构造方法的实参【可以不写】
* @return 对应的实例【Object类型】
*/
public
static
Object
getNewInstance
(
Constructor
<?>
constructor
,
Object
...
initargs
)
throws
InstantiationException
,
IllegalAccessException
,
IllegalArgumentException
,
InvocationTargetException
{
constructor
.
setAccessible
(
true
);
return
constructor
.
newInstance
(
initargs
);
}
/**
* 根据传入的属性名字符串,修改对应的属性值
*
* @param clazz
* 类的Class对象
* @param name
* 属性名
* @param obj
* 要修改的实例对象
* @param value
* 修改后的新值
*/
public
static
void
setField
(
Class
<?>
clazz
,
String
name
,
Object
obj
,
Object
value
)
throws
NoSuchFieldException
,
SecurityException
,
IllegalArgumentException
,
IllegalAccessException
{
Field
field
=
clazz
.
getDeclaredField
(
name
);
field
.
setAccessible
(
true
);
field
.
set
(
obj
,
value
);
}
/**
* 根据传入的方法名字符串,获取对应的方法
*
* @param clazz
* 类的Class对象
* @param name
* 方法名
* @param parameterTypes
* 方法的形参对应的Class类型【可以不写】
* @return 方法对象【Method类型】
*/
public
static
Method
getMethod
(
Class
<?>
clazz
,
String
name
,
Class
<?>...
parameterTypes
)
throws
NoSuchMethodException
,
SecurityException
{
return
clazz
.
getDeclaredMethod
(
name
,
parameterTypes
);
}
/**
* 根据传入的方法对象,调用对应的方法
*
* @param method
* 方法对象
* @param obj
* 要调用的实例对象【如果是调用静态方法,则可以传入null】
* @param args
* 传入方法的实参【可以不写】
* @return 方法的返回值【没有返回值,则返回null】
*/
public
static
Object
invokeMethod
(
Method
method
,
Object
obj
,
Object
...
args
)
throws
IllegalAccessException
,
IllegalArgumentException
,
InvocationTargetException
{
method
.
setAccessible
(
true
);
return
method
.
invoke
(
obj
,
args
);
}
}
\ No newline at end of file
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/RestaurantExpandInfoUtils.java
View file @
aa267293
...
...
@@ -3,6 +3,7 @@ package com.gingersoft.gsa.cloud.base.utils;
import
android.text.TextUtils
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.bean.expandInfo.ExpandInfoSetting
;
import
com.gingersoft.gsa.cloud.bean.expandInfo.FunctionExtendedConfiguration
;
import
com.gingersoft.gsa.cloud.bean.expandInfo.UIStyleExtendedConfiguration
;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
...
...
@@ -100,15 +101,23 @@ public class RestaurantExpandInfoUtils {
Object
value
=
map
.
get
(
expandinfoName
);
try
{
field
.
setAccessible
(
true
);
Object
fieldType
=
field
.
get
(
uiStyleConfiguration
);
boolean
typeMatch
=
(
value
instanceof
Integer
&&
fieldType
instanceof
Integer
)
||
(
value
instanceof
String
&&
fieldType
instanceof
String
)
||
(
value
instanceof
Boolean
&&
fieldType
instanceof
Boolean
);
ExpandInfoSetting
expandInfo
=
(
ExpandInfoSetting
)
field
.
get
(
uiStyleConfiguration
);
boolean
typeMatch
=
(
value
instanceof
Integer
&&
expandInfo
.
getDataType
()
==
1
)
||
(
value
instanceof
String
&&
(
expandInfo
.
getDataType
()
==
2
||
expandInfo
.
getDataType
()
==
4
)
)
||
(
value
instanceof
Boolean
&&
expandInfo
.
getDataType
()
==
3
);
if
(!
typeMatch
)
{
//後台配置的類型與前端的不一致 直接不管
continue
;
}
field
.
set
(
uiStyleConfiguration
,
value
);
if
(
expandInfo
.
getDataType
()
==
1
)
{
expandInfo
.
setValueInt
((
Integer
)
value
);
}
else
if
(
expandInfo
.
getDataType
()
==
2
)
{
expandInfo
.
setValueChar
((
String
)
value
);
}
else
if
(
expandInfo
.
getDataType
()
==
3
)
{
expandInfo
.
setValueBoolean
((
Boolean
)
value
);
}
else
if
(
expandInfo
.
getDataType
()
==
4
)
{
expandInfo
.
setValueDateTime
((
String
)
value
);
}
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -123,20 +132,29 @@ public class RestaurantExpandInfoUtils {
Object
value
=
map
.
get
(
expandinfoName
);
try
{
field
.
setAccessible
(
true
);
Object
fieldType
=
field
.
get
(
functionConfiguration
);
boolean
typeMatch
=
(
value
instanceof
Integer
&&
fieldType
instanceof
Integer
)
||
(
value
instanceof
String
&&
fieldType
instanceof
String
)
||
(
value
instanceof
Boolean
&&
fieldType
instanceof
Boolean
);
ExpandInfoSetting
expandInfo
=
(
ExpandInfoSetting
)
field
.
get
(
functionConfiguration
);
boolean
typeMatch
=
(
value
instanceof
Integer
&&
expandInfo
.
getDataType
()
==
1
)
||
(
value
instanceof
String
&&
(
expandInfo
.
getDataType
()
==
2
||
expandInfo
.
getDataType
()
==
4
)
)
||
(
value
instanceof
Boolean
&&
expandInfo
.
getDataType
()
==
3
);
if
(!
typeMatch
)
{
//後台配置的類型與前端的不一致 直接不管
continue
;
}
field
.
set
(
functionConfiguration
,
value
);
if
(
expandInfo
.
getDataType
()
==
1
)
{
expandInfo
.
setValueInt
((
Integer
)
value
);
}
else
if
(
expandInfo
.
getDataType
()
==
2
)
{
expandInfo
.
setValueChar
((
String
)
value
);
}
else
if
(
expandInfo
.
getDataType
()
==
3
)
{
expandInfo
.
setValueBoolean
((
Boolean
)
value
);
}
else
if
(
expandInfo
.
getDataType
()
==
4
)
{
expandInfo
.
setValueDateTime
((
String
)
value
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
int
i
=
100
;
}
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/expandInfo/ExpandInfoSetting.java
View file @
aa267293
package
com
.
gingersoft
.
gsa
.
cloud
.
bean
.
expandInfo
;
import
com.gingersoft.gsa.cloud.base.Api
;
import
com.gingersoft.gsa.cloud.base.utils.JsonUtils
;
import
com.gingersoft.gsa.cloud.base.utils.ReflectionUtils
;
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.constans.HttpsConstans
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
com.gingersoft.gsa.cloud.database.utils.ExpandInfoDaoUtils
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
io.reactivex.Observable
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.schedulers.Schedulers
;
import
lombok.Builder
;
import
lombok.Getter
;
import
lombok.Setter
;
import
me.jessyan.retrofiturlmanager.RetrofitUrlManager
;
import
okhttp3.MediaType
;
import
okhttp3.RequestBody
;
/**
* @author : bin
...
...
@@ -14,13 +37,12 @@ import lombok.Setter;
@Builder
@Getter
@Setter
public
class
ExpandInfoSetting
{
public
class
ExpandInfoSetting
{
private
String
settingName
;
private
int
valueInt
;
private
Integer
valueInt
;
private
String
valueChar
;
private
b
oolean
valueBoolean
;
private
B
oolean
valueBoolean
;
private
String
valueDateTime
;
private
String
valueDateTime2
;
/**
* 數據類型 1:整形,2:字符型,3:布爾型,4:日期類型
*/
...
...
@@ -28,5 +50,94 @@ public class ExpandInfoSetting{
private
int
sort
;
private
String
showName
;
private
String
remark
;
public
<
T
>
T
getValue
()
{
if
(
valueInt
!=
null
)
{
return
(
T
)
valueInt
;
}
else
if
(
valueChar
!=
null
)
{
return
(
T
)
valueChar
;
}
else
if
(
valueBoolean
!=
null
)
{
return
(
T
)
valueBoolean
;
}
else
if
(
valueDateTime
!=
null
)
{
return
(
T
)
valueDateTime
;
}
return
null
;
}
public
static
void
initUpdateExtendedConfiguration
(
Object
...
objects
)
{
Observable
.
just
(
0
)
.
subscribeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
Integer
>()
{
@Override
public
void
accept
(
@io
.
reactivex
.
annotations
.
NonNull
Integer
integer
)
throws
Exception
{
List
<
ExpandInfoSetting
>
expandInfoSettingList
=
new
ArrayList
<>();
for
(
Object
obj
:
objects
)
{
expandInfoSettingList
.
addAll
(
scanExtendedConfiguration
(
obj
));
}
String
expandInfoListJson
=
JsonUtils
.
toJson
(
expandInfoSettingList
);
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
expandInfoListJson
);
OkHttp3Utils
.
post
(
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
+
Api
.
add_restaurant_base_table_configuration
,
requestBody
)
.
subscribe
();
}
});
}
private
static
List
<
ExpandInfoSetting
>
scanExtendedConfiguration
(
Object
obj
)
{
List
<
ExpandInfoSetting
>
expandInfoList
=
new
ArrayList
<>();
HashMap
<
String
,
String
>
settingNameMap
=
new
HashMap
<>();
Field
[]
fields
=
obj
.
getClass
().
getDeclaredFields
();
for
(
Field
field
:
fields
)
{
settingNameMap
.
put
(
field
.
getName
().
substring
(
1
),
field
.
getName
());
}
Method
[]
methods
=
obj
.
getClass
().
getDeclaredMethods
();
for
(
Method
method
:
methods
)
{
Class
<?>
returnClass
=
method
.
getReturnType
();
if
(
method
.
getName
().
startsWith
(
"get"
)
&&
returnClass
.
equals
(
ExpandInfoSetting
.
class
))
{
try
{
Object
[]
objs
={};
//反射執行get方法 獲取每個配置類信息
ExpandInfoSetting
expandInfo
=
(
ExpandInfoSetting
)
ReflectionUtils
.
invokeMethod
(
method
,
obj
,
objs
);
//獲取完整的settingName
String
settingName
;
if
(
settingNameMap
.
containsKey
(
method
.
getName
().
substring
(
4
)))
{
settingName
=
settingNameMap
.
get
(
method
.
getName
().
substring
(
4
));
}
else
{
settingName
=
method
.
getName
().
substring
(
3
);
}
expandInfo
.
setSettingName
(
settingName
);
expandInfo
.
setShowName
(
settingName
);
if
(
expandInfo
.
getValueInt
()
!=
null
)
{
expandInfo
.
setDataType
(
ExpandInfo
.
data_type_int
);
}
else
if
(
expandInfo
.
getValueChar
()
!=
null
)
{
expandInfo
.
setDataType
(
ExpandInfo
.
data_type_string
);
}
else
if
(
expandInfo
.
getValueBoolean
()
!=
null
)
{
expandInfo
.
setDataType
(
ExpandInfo
.
data_type_boolean
);
}
else
if
(
expandInfo
.
getValueDateTime
()
!=
null
)
{
expandInfo
.
setDataType
(
ExpandInfo
.
data_type_date
);
}
if
(
expandInfo
.
getValueInt
()
==
null
)
{
//為了兼容後台,這裡不是valueInt值默認給0
expandInfo
.
setValueInt
(
0
);
}
expandInfoList
.
add
(
expandInfo
);
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
catch
(
InvocationTargetException
e
)
{
e
.
printStackTrace
();
}
}
}
return
expandInfoList
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/expandInfo/FunctionExtendedConfiguration.java
View file @
aa267293
...
...
@@ -14,165 +14,164 @@ import lombok.Setter;
public
class
FunctionExtendedConfiguration
{
private
ExpandInfoSetting
Rounding
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"Rounding"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"Rounding"
)
.
remark
(
"賬單小數相關"
)
.
build
();
private
ExpandInfoSetting
RoundingDecimal
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"RoundingDecimal"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"RoundingDecimal"
)
.
valueInt
(
1
)
.
remark
(
"賬單小數相關"
)
.
build
();
private
ExpandInfoSetting
ItemDecimals
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"ItemDecimals"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"ItemDecimals"
)
.
valueInt
(
2
)
.
remark
(
"小數位金額"
)
.
build
();
private
ExpandInfoSetting
DeliveryPrintCount
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"DeliveryPrintCount"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"DeliveryPrintCount"
)
.
valueInt
(
1
)
.
remark
(
"外送印單打印次數"
)
.
build
();
private
ExpandInfoSetting
DeliveryClosingPC
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"DeliveryClosingPC"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"DeliveryClosingPC"
)
.
valueInt
(
1
)
.
remark
(
"外送結賬打印次數"
)
.
build
();
private
ExpandInfoSetting
TableModePrintCount
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"TableModePrintCount"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"TableModePrintCount"
)
.
valueInt
(
1
)
.
remark
(
"餐檯印單打印次數"
)
.
build
();
private
ExpandInfoSetting
TableModeClosingPC
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"TableModeClosingPC"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"TableModeClosingPC"
)
.
valueInt
(
1
)
.
remark
(
"餐檯模式結賬單打印次數"
)
.
build
();
private
ExpandInfoSetting
OrderReceivingTimeout
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"OrderReceivingTimeout"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"OrderReceivingTimeout"
)
.
valueInt
(
60
*
60
*
1000
)
.
remark
(
"外送接單超時時間"
)
.
build
();
private
ExpandInfoSetting
PrintMemberInfo
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"PrintMemberInfo"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"PrintMemberInfo"
)
.
valueBoolean
(
false
)
.
remark
(
"是否打印會員信息"
)
.
build
();
private
ExpandInfoSetting
PrintPage
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"PrintPage"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"PrintPage"
)
.
valueBoolean
(
false
)
.
remark
(
"是否打印頁數"
)
.
build
();
private
ExpandInfoSetting
PrintMergerFood
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"PrintMergerFood"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"PrintMergerFood"
)
.
valueBoolean
(
false
)
.
remark
(
"是否合併食品"
)
.
build
();
private
ExpandInfoSetting
PrintStatisticsAmount
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"PrintStatisticsAmount"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"PrintStatisticsAmount"
)
.
valueBoolean
(
false
)
.
remark
(
"是否顯示統計打印數"
)
.
build
();
private
ExpandInfoSetting
PrintFirstOrder
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"PrintFirstOrder"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"PrintFirstOrder"
)
.
valueBoolean
(
false
)
.
remark
(
"是否打印\"頭單\"文字"
)
.
build
();
private
ExpandInfoSetting
FrozenChainAutoOrder
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"FrozenChainAutoOrder"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"FrozenChainAutoOrder"
)
.
valueBoolean
(
true
)
.
remark
(
"是否自動接單 為0true"
)
.
build
();
private
ExpandInfoSetting
MergeSendFood
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"MergeSendFood"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"MergeSendFood"
)
.
valueBoolean
(
false
)
.
remark
(
"送單是否自動合併食品"
)
.
build
();
private
ExpandInfoSetting
AutoPrinterPaper
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"AutoPrinterPaper"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"AutoPrinterPaper"
)
.
valueBoolean
(
false
)
.
remark
(
"送單自動打印上菜紙"
)
.
build
();
private
ExpandInfoSetting
ToPrintQRCode
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"ToPrintQRCode"
)
.
valueInt
(
0
)
.
dataType
((
byte
)
1
)
.
showName
(
"ToPrintQRCode"
)
.
valueBoolean
(
false
)
.
remark
(
"結賬是否打印積分二維碼"
)
.
build
();
private
ExpandInfoSetting
AutoQuitTime
=
ExpandInfoSetting
.
builder
()
.
settingName
(
"AutoQuitTime"
)
.
valueInt
(
600
)
.
dataType
((
byte
)
1
)
.
showName
(
"AutoQuitTime"
)
.
remark
(
"餐檯模式下單頁多少秒不操作返回餐檯頁面"
)
.
build
();
private
int
DeliveryPrintCount
;
//外送印單打印次數
private
int
DeliveryClosingPC
;
//外送結賬打印次數
private
int
TableModePrintCount
;
//餐檯印單打印次數
private
int
TableModeClosingPC
;
//餐檯模式結賬單打印次數
private
int
OrderReceivingTimeout
;
//外送接單超時時間
private
int
PrintMemberInfo
;
//是否打印會員信息
private
int
PrintPage
;
//是否打印頁數
private
int
PrintMergerFood
;
//是否合併食品
private
int
PrintStatisticsAmount
;
//是否顯示統計打印數
private
int
PrintFirstOrder
;
//是否打印"頭單"文字
private
int
FrozenChainAutoOrder
;
//是否自動接單 為0true
public
<
T
>
T
getRoundingVaule
()
{
return
Rounding
.
getValue
();
}
public
<
T
>
T
getRoundingDecimalVaule
()
{
return
RoundingDecimal
.
getValue
();
}
public
<
T
>
T
getItemDecimalsVaule
()
{
return
ItemDecimals
.
getValue
();
}
public
<
T
>
T
getDeliveryPrintCountVaule
()
{
return
DeliveryPrintCount
.
getValue
();
}
public
<
T
>
T
getDeliveryClosingPCVaule
()
{
return
DeliveryClosingPC
.
getValue
();
}
public
<
T
>
T
getTableModePrintCountVaule
()
{
return
TableModePrintCount
.
getValue
();
}
public
<
T
>
T
getTableModeClosingPCVaule
()
{
return
TableModeClosingPC
.
getValue
();
}
public
<
T
>
T
getOrderReceivingTimeoutVaule
()
{
return
OrderReceivingTimeout
.
getValue
();
}
public
<
T
>
T
getPrintMemberInfoVaule
()
{
return
PrintMemberInfo
.
getValue
();
}
public
<
T
>
T
getPrintPageVaule
()
{
return
PrintPage
.
getValue
();
}
public
<
T
>
T
getPrintMergerFoodVaule
()
{
return
PrintMergerFood
.
getValue
();
}
public
<
T
>
T
getPrintStatisticsAmountVaule
()
{
return
PrintStatisticsAmount
.
getValue
();
}
public
<
T
>
T
getPrintFirstOrderVaule
()
{
return
PrintFirstOrder
.
getValue
();
}
public
<
T
>
T
getFrozenChainAutoOrderVaule
()
{
return
FrozenChainAutoOrder
.
getValue
();
}
public
<
T
>
T
getMergeSendFoodVaule
()
{
return
MergeSendFood
.
getValue
();
}
private
int
MergeSendFood
;
//送單是否自動合併食品
private
int
AutoPrinterPaper
;
//送單自動打印上菜紙
private
int
ToPrintQRCode
;
//結賬是否打印積分二維碼
private
int
AutoQuitTime
=
600
;
//餐檯模式下單頁多少秒不操作返回餐檯頁面
public
<
T
>
T
getAutoPrinterPaperVaule
()
{
return
AutoPrinterPaper
.
getValue
();
}
public
<
T
>
T
getToPrintQRCodeVaule
()
{
return
ToPrintQRCode
.
getValue
();
}
public
<
T
>
T
getAutoQuitTimeVaule
()
{
return
AutoQuitTime
.
getValue
();
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/expandInfo/UIStyleExtendedConfiguration.java
View file @
aa267293
...
...
@@ -16,38 +16,188 @@ public class UIStyleExtendedConfiguration {
/**
* 食品組、食品、細項、折扣行列寬高
*/
private
int
foodGroupRow
=
2
;
private
int
foodGroupColumn
=
5
;
private
int
foodColumn
=
4
;
private
int
comboColumn
=
4
;
private
int
modColumn
=
4
;
private
int
discountColumn
=
4
;
private
ExpandInfoSetting
foodGroupRow
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
2
)
.
remark
(
"食品組行數"
)
.
build
();
private
ExpandInfoSetting
foodGroupColumn
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
5
)
.
remark
(
"食品組列數"
)
.
build
();
private
ExpandInfoSetting
foodColumn
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
4
)
.
remark
(
"食品列數"
)
.
build
();
private
ExpandInfoSetting
comboColumn
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
4
)
.
remark
(
"套餐列數"
)
.
build
();
private
ExpandInfoSetting
modColumn
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
4
)
.
remark
(
"細項列數"
)
.
build
();
private
ExpandInfoSetting
discountColumn
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
4
)
.
remark
(
"餐牌折扣列數"
)
.
build
();
/**
* 食品組、食品、細項、折扣Item高度
*/
private
int
foodGroupBtnHeight
=
150
;
private
int
foodBtnHeight
=
120
;
private
int
modBtnHeight
=
80
;
private
int
comboHeight
=
90
;
private
int
discountHeight
=
80
;
private
int
LayoutQtyHeight
=
40
;
private
ExpandInfoSetting
foodGroupBtnHeight
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
150
)
.
remark
(
"食品組高度"
)
.
build
();
private
ExpandInfoSetting
foodBtnHeight
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
120
)
.
remark
(
"食品高度"
)
.
build
();
private
ExpandInfoSetting
modBtnHeight
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
80
)
.
remark
(
"細項高度"
)
.
build
();
private
ExpandInfoSetting
comboHeight
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
90
)
.
remark
(
"套餐高度"
)
.
build
();
private
ExpandInfoSetting
discountHeight
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
80
)
.
remark
(
"餐牌折扣Item高度"
)
.
build
();
private
ExpandInfoSetting
LayoutQtyHeight
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
40
)
.
remark
(
"選擇數量紅點高度"
)
.
build
();
private
ExpandInfoSetting
soldoutFoodFlagHeight
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
20
)
.
remark
(
"食品沽清標誌高度"
)
.
build
();
private
ExpandInfoSetting
soldoutModFlagHeight
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
15
)
.
remark
(
"細項沽清標誌高度"
)
.
build
();
/**
* 食品組、食品、細項、折扣字體大小
*/
private
int
foodGroupFontSize
=
14
;
private
int
foodFontSize
=
14
;
private
int
comboFontSize
=
12
;
private
int
modFontSize
=
12
;
private
int
discountFontSize
=
12
;
private
ExpandInfoSetting
foodGroupFontSize
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
40
)
.
remark
(
"食品組字體大小"
)
.
build
();
private
ExpandInfoSetting
foodFontSize
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
40
)
.
remark
(
"食品字體大小"
)
.
build
();
private
ExpandInfoSetting
comboFontSize
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
40
)
.
remark
(
"套餐字體大小"
)
.
build
();
private
ExpandInfoSetting
modFontSize
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
40
)
.
remark
(
"細項字體大小"
)
.
build
();
private
ExpandInfoSetting
discountFontSize
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
40
)
.
remark
(
"折扣字體大小"
)
.
build
();
private
ExpandInfoSetting
soldoutFoodFlagFontSize
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
10
)
.
remark
(
"食品沽清標誌字體大小"
)
.
build
();
private
ExpandInfoSetting
soldoutModFlagFontSize
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
7
)
.
remark
(
"細項沽清標誌字體大小"
)
.
build
();
private
ExpandInfoSetting
soldoutCtrlFoodFontSize
=
ExpandInfoSetting
.
builder
()
.
valueInt
(
40
)
.
remark
(
"估清控制item字體大小"
)
.
build
();
public
<
T
>
T
getFoodGroupRowValue
()
{
return
foodGroupRow
.
getValue
();
}
public
<
T
>
T
getFoodGroupColumnValue
()
{
return
foodGroupColumn
.
getValue
();
}
public
<
T
>
T
getFoodColumnValue
()
{
return
foodColumn
.
getValue
();
}
public
<
T
>
T
getComboColumnValue
()
{
return
comboColumn
.
getValue
();
}
public
<
T
>
T
getModColumnValue
()
{
return
modColumn
.
getValue
();
}
public
<
T
>
T
getDiscountColumnValue
()
{
return
discountColumn
.
getValue
();
}
public
<
T
>
T
getFoodGroupBtnHeightValue
()
{
return
foodGroupBtnHeight
.
getValue
();
}
public
<
T
>
T
getFoodBtnHeightValue
()
{
return
foodBtnHeight
.
getValue
();
}
public
<
T
>
T
getModBtnHeightValue
()
{
return
modBtnHeight
.
getValue
();
}
public
<
T
>
T
getComboHeightValue
()
{
return
comboHeight
.
getValue
();
}
public
<
T
>
T
getDiscountHeightValue
()
{
return
discountHeight
.
getValue
();
}
public
<
T
>
T
getLayoutQtyHeightValue
()
{
return
LayoutQtyHeight
.
getValue
();
}
public
<
T
>
T
getSoldoutFoodFlagHeightValue
()
{
return
soldoutFoodFlagHeight
.
getValue
();
}
public
<
T
>
T
getSoldoutModFlagHeightValue
()
{
return
soldoutModFlagHeight
.
getValue
();
}
public
<
T
>
T
getFoodGroupFontSizeValue
()
{
return
foodGroupFontSize
.
getValue
();
}
public
<
T
>
T
getFoodFontSizeValue
()
{
return
foodFontSize
.
getValue
();
}
public
<
T
>
T
getComboFontSizeValue
()
{
return
comboFontSize
.
getValue
();
}
public
<
T
>
T
getModFontSizeValue
()
{
return
modFontSize
.
getValue
();
}
private
int
OrderNumberShowSize
=
20
;
private
int
OrderNumberFontSize
=
7
;
private
int
OrderNumberChildShowSize
=
20
;
private
int
OrderNumberChildFontSize
=
10
;
public
<
T
>
T
getDiscountFontSizeValue
()
{
return
discountFontSize
.
getValue
();
}
//估清控制食品字體大小
private
int
soldoutCtrlFoodFontSize
=
16
;
public
<
T
>
T
getSoldoutFoodFlagFontSizeValue
()
{
return
soldoutFoodFlagFontSize
.
getValue
();
}
public
<
T
>
T
getSoldoutModFlagFontSizeValue
()
{
return
soldoutModFlagFontSize
.
getValue
();
}
public
<
T
>
T
getSoldoutCtrlFoodFontSizeValue
()
{
return
soldoutCtrlFoodFontSize
.
getValue
();
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/ExpandInfo.java
View file @
aa267293
...
...
@@ -21,7 +21,6 @@ import lombok.Data;
@Entity
public
class
ExpandInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
82395061667241608L
;
@Property
(
nameInDb
=
"_id"
)
...
...
@@ -38,6 +37,7 @@ public class ExpandInfo implements Serializable {
*/
private
Integer
valueInt
;
private
String
valueChar
;
private
Boolean
valueBoolean
;
private
String
valueDatetime
;
/**
* 功能说明
...
...
@@ -58,20 +58,23 @@ public class ExpandInfo implements Serializable {
@Transient
private
boolean
isUpdate
=
false
;
public
static
final
int
data_type_int
=
1
;
public
static
final
int
data_type_string
=
2
;
public
static
final
int
data_type_boolean
=
3
;
public
static
final
int
data_type_date
=
4
;
public
static
final
byte
data_type_int
=
1
;
public
static
final
byte
data_type_string
=
2
;
public
static
final
byte
data_type_boolean
=
3
;
public
static
final
byte
data_type_date
=
4
;
@Generated
(
hash
=
1
155994232
)
@Generated
(
hash
=
1
753053413
)
public
ExpandInfo
(
Long
id
,
int
restaurantId
,
String
settingName
,
Integer
valueInt
,
String
valueChar
,
String
valueDatetime
,
String
remark
,
int
dataType
,
String
showName
)
{
Integer
valueInt
,
String
valueChar
,
Boolean
valueBoolean
,
String
valueDatetime
,
String
remark
,
int
dataType
,
String
showName
)
{
this
.
id
=
id
;
this
.
restaurantId
=
restaurantId
;
this
.
settingName
=
settingName
;
this
.
valueInt
=
valueInt
;
this
.
valueChar
=
valueChar
;
this
.
valueBoolean
=
valueBoolean
;
this
.
valueDatetime
=
valueDatetime
;
this
.
remark
=
remark
;
this
.
dataType
=
dataType
;
...
...
@@ -80,6 +83,9 @@ public class ExpandInfo implements Serializable {
@Generated
(
hash
=
9429432
)
public
ExpandInfo
()
{
}
public
Long
getId
()
{
return
this
.
id
;
}
...
...
@@ -122,6 +128,18 @@ public class ExpandInfo implements Serializable {
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getShowName
()
{
return
this
.
showName
;
}
public
void
setShowName
(
String
showName
)
{
this
.
showName
=
showName
;
}
public
Boolean
getValueBoolean
()
{
return
this
.
valueBoolean
;
}
public
void
setValueBoolean
(
Boolean
valueBoolean
)
{
this
.
valueBoolean
=
valueBoolean
;
}
public
int
getDataType
()
{
return
this
.
dataType
;
}
...
...
@@ -129,19 +147,4 @@ public class ExpandInfo implements Serializable {
this
.
dataType
=
dataType
;
}
public
boolean
isUpdate
()
{
return
isUpdate
;
}
public
void
setUpdate
(
boolean
update
)
{
isUpdate
=
update
;
}
public
String
getShowName
()
{
return
showName
;
}
public
void
setShowName
(
String
showName
)
{
this
.
showName
=
showName
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoMaster.java
View file @
aa267293
...
...
@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version
19
): knows all DAOs.
* Master of DAO (schema version
20
): knows all DAOs.
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
19
;
public
static
final
int
SCHEMA_VERSION
=
20
;
/** Creates underlying database table using DAOs. */
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/ExpandInfoDao.java
View file @
aa267293
...
...
@@ -29,10 +29,11 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
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
ValueDatetime
=
new
Property
(
5
,
String
.
class
,
"valueDatetime"
,
false
,
"VALUE_DATETIME"
);
public
final
static
Property
Remark
=
new
Property
(
6
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
DataType
=
new
Property
(
7
,
int
.
class
,
"dataType"
,
false
,
"DATA_TYPE"
);
public
final
static
Property
ShowName
=
new
Property
(
8
,
String
.
class
,
"showName"
,
false
,
"SHOW_NAME"
);
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"
);
}
...
...
@@ -53,10 +54,11 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
"\"SETTING_NAME\" TEXT,"
+
// 2: settingName
"\"VALUE_INT\" INTEGER,"
+
// 3: valueInt
"\"VALUE_CHAR\" TEXT,"
+
// 4: valueChar
"\"VALUE_DATETIME\" TEXT,"
+
// 5: valueDatetime
"\"REMARK\" TEXT,"
+
// 6: remark
"\"DATA_TYPE\" INTEGER NOT NULL ,"
+
// 7: dataType
"\"SHOW_NAME\" TEXT);"
);
// 8: showName
"\"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. */
...
...
@@ -90,20 +92,25 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
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
(
6
,
valueDatetime
);
stmt
.
bindString
(
7
,
valueDatetime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
7
,
remark
);
stmt
.
bindString
(
8
,
remark
);
}
stmt
.
bindLong
(
8
,
entity
.
getDataType
());
stmt
.
bindLong
(
9
,
entity
.
getDataType
());
String
showName
=
entity
.
getShowName
();
if
(
showName
!=
null
)
{
stmt
.
bindString
(
9
,
showName
);
stmt
.
bindString
(
10
,
showName
);
}
}
...
...
@@ -132,20 +139,25 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
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
(
6
,
valueDatetime
);
stmt
.
bindString
(
7
,
valueDatetime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
7
,
remark
);
stmt
.
bindString
(
8
,
remark
);
}
stmt
.
bindLong
(
8
,
entity
.
getDataType
());
stmt
.
bindLong
(
9
,
entity
.
getDataType
());
String
showName
=
entity
.
getShowName
();
if
(
showName
!=
null
)
{
stmt
.
bindString
(
9
,
showName
);
stmt
.
bindString
(
10
,
showName
);
}
}
...
...
@@ -162,10 +174,11 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
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
.
getString
(
offset
+
5
),
// valueDatetime
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// remark
cursor
.
getInt
(
offset
+
7
),
// dataType
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
)
// showName
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
;
}
...
...
@@ -177,10 +190,11 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
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
.
setValueDatetime
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setDataType
(
cursor
.
getInt
(
offset
+
7
));
entity
.
setShowName
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
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
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ColorBeanDao.java
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
0 → 100644
View file @
aa267293
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
;
}
}
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/contract/NewMainContract.java
View file @
aa267293
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
contract
;
import
com.gingersoft.gsa.cloud.base.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.CheckVersionRequest
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IModel
;
...
...
@@ -33,6 +34,8 @@ public interface NewMainContract {
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface
Model
extends
IModel
{
Observable
<
BaseResult
>
syncRestaurantExtendedConfiguration
(
int
restaurantId
);
Observable
<
CheckVersionRequest
>
checkAppVersion
(
String
version
);
Observable
<
Object
>
loginOut
(
RequestBody
requestBody
);
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/NewMainModel.java
View file @
aa267293
...
...
@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.main.mvp.model;
import
android.app.Application
;
import
com.gingersoft.gsa.cloud.base.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.CheckVersionRequest
;
import
com.gingersoft.gsa.cloud.main.mvp.model.service.MainService
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.activity.MainActivity
;
...
...
@@ -51,6 +52,12 @@ public class NewMainModel extends BaseModel implements NewMainContract.Model {
}
@Override
public
Observable
<
BaseResult
>
syncRestaurantExtendedConfiguration
(
int
restaurantId
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
MainService
.
class
)
.
syncRestaurantExtendedConfiguration
(
restaurantId
);
}
@Override
public
Observable
<
CheckVersionRequest
>
checkAppVersion
(
String
version
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
MainService
.
class
)
.
checkAppVersion
(
version
);
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/service/MainService.java
View file @
aa267293
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
model
.
service
;
import
com.gingersoft.gsa.cloud.base.Api
;
import
com.gingersoft.gsa.cloud.base.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.CheckVersionRequest
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.RestaurantQrBean
;
...
...
@@ -7,6 +9,8 @@ import io.reactivex.Observable;
import
me.jessyan.retrofiturlmanager.RetrofitUrlManager
;
import
okhttp3.RequestBody
;
import
retrofit2.http.Body
;
import
retrofit2.http.Field
;
import
retrofit2.http.FormUrlEncoded
;
import
retrofit2.http.GET
;
import
retrofit2.http.Headers
;
import
retrofit2.http.POST
;
...
...
@@ -17,14 +21,18 @@ import retrofit2.http.Query;
*/
public
interface
MainService
{
// @Headers({"Domain-Name: system_url"})/**/
@POST
(
"user/logout"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
Object
>
loginOut
(
@Body
RequestBody
requestBody
);
@Headers
({
"Domain-Name: update_version"
})
@GET
(
"system/checkAppVersionGsa"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
CheckVersionRequest
>
checkAppVersion
(
@Query
(
"version"
)
String
version
);
@FormUrlEncoded
@POST
(
Api
.
sync_restaurant_base_table_configuration
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
syncRestaurantExtendedConfiguration
(
@Field
(
"restaurantId"
)
int
restaurantId
);
// @Headers({"Domain-Name: system_url"})/**/
@POST
(
"user/logout"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
Object
>
loginOut
(
@Body
RequestBody
requestBody
);
@Headers
({
"Domain-Name: update_version"
})
@POST
(
"restaurant/clearHeartbeat"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
Object
>
clearHeartbeat
(
@Body
RequestBody
requestBody
);
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/NewMainPresenter.java
View file @
aa267293
...
...
@@ -7,6 +7,7 @@ import android.text.TextUtils;
import
com.billy.cc.core.component.CC
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.main.mvp.contract.NewMainContract
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.CheckVersionRequest
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.activity.NewMainActivity
;
...
...
@@ -72,6 +73,24 @@ public class NewMainPresenter extends BasePresenter<NewMainContract.Model, NewMa
this
.
mApplication
=
null
;
}
public
void
syncRestaurantExtendedConfiguration
()
{
mModel
.
syncRestaurantExtendedConfiguration
(
GsaCloudApplication
.
getRestaurantId
())
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseResult
>(
mErrorHandler
)
{
@Override
public
void
onNext
(
@NonNull
BaseResult
result
)
{
if
(
result
!=
null
)
{
}
else
{
}
}
});
}
public
void
checkAppVersion
()
{
// RequestBody requestBody = new FormBody.Builder()
// .add("version", )
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/NewMainActivity.java
View file @
aa267293
...
...
@@ -131,6 +131,7 @@ public class NewMainActivity extends BaseFragmentActivity<NewMainPresenter> impl
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
mPresenter
.
checkAppVersion
();
mPresenter
.
syncRestaurantExtendedConfiguration
();
}
@Override
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
View file @
aa267293
...
...
@@ -321,12 +321,12 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
}
private
void
initUIStyleConfiguration
()
{
foodGroupColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupColumn
();
foodGroupRow
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupRow
();
foodColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodColumn
();
comboColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getComboColumn
();
modColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
();
discountColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
();
foodGroupColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupColumn
Value
();
foodGroupRow
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupRow
Value
();
foodColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodColumn
Value
();
comboColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getComboColumn
Value
();
modColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
Value
();
discountColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
Value
();
}
private
void
initTableDetail
()
{
...
...
@@ -412,7 +412,8 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
}
});
int
mParentColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupBtnHeight
()
*
Rows
;
int
foodGroupBtnHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupBtnHeightValue
();
int
mParentColHeight
=
foodGroupBtnHeight
*
Rows
;
//设置ViewPager适配器
rv_food_group
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
...
...
@@ -840,7 +841,8 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
public
void
onChronometerTick
(
Chronometer
chronometer
)
{
// 执行一下看看是否按下了home键的线程
// 如果开始计时到现在超过了autoQuitTime秒
if
(
SystemClock
.
elapsedRealtime
()
-
chronometer
.
getBase
()
>
GsaCloudApplication
.
functionConfiguration
.
getAutoQuitTime
()
*
1000
)
{
int
autoQuitTime
=
GsaCloudApplication
.
functionConfiguration
.
getAutoQuitTimeVaule
();
if
(
SystemClock
.
elapsedRealtime
()
-
chronometer
.
getBase
()
>
autoQuitTime
*
1000
)
{
// 停止计时
chronometer
.
stop
();
returnBeforeActivity
(
true
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderContentActivity.java
View file @
aa267293
...
...
@@ -445,7 +445,8 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
public
void
onChronometerTick
(
Chronometer
chronometer
)
{
// 执行一下看看是否按下了home键的线程
// 如果开始计时到现在超过了autoQuitTime秒
if
(
SystemClock
.
elapsedRealtime
()
-
chronometer
.
getBase
()
>
GsaCloudApplication
.
functionConfiguration
.
getAutoQuitTime
()
*
1000
)
{
int
autoQuitTime
=
GsaCloudApplication
.
functionConfiguration
.
getAutoQuitTimeVaule
();
if
(
SystemClock
.
elapsedRealtime
()
-
chronometer
.
getBase
()
>
autoQuitTime
*
1000
)
{
// 停止计时
chronometer
.
stop
();
returnTableActivity
(
true
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/SoldoutCtrlActivity.java
View file @
aa267293
...
...
@@ -223,9 +223,9 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
para1
.
height
=
screenHeidth
*
33
/
100
;
recycle_current_soldout_food
.
setLayoutParams
(
para1
);
foodGroupColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupColumn
();
foodGroupRow
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupRow
();
foodColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodColumn
();
foodGroupColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupColumn
Value
();
foodGroupRow
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupRow
Value
();
foodColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodColumn
Value
();
}
public
void
initFoodGroupView
(
List
<
Food
>
foodGroupList
)
{
...
...
@@ -299,7 +299,8 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
}
});
int
mParentColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupBtnHeight
()
*
Rows
;
int
foodGroupBtnHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupBtnHeightValue
();
int
mParentColHeight
=
foodGroupBtnHeight
*
Rows
;
//设置ViewPager适配器
recycle_food_group
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
mParentColHeight
));
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/CurrentSlodoutFoodAdapter.java
View file @
aa267293
...
...
@@ -37,7 +37,7 @@ public class CurrentSlodoutFoodAdapter extends DefaultAdapter<SoldoutCtrFood> {
public
CurrentSlodoutFoodAdapter
(
Context
context
,
List
<
SoldoutCtrFood
>
infos
)
{
super
(
infos
);
this
.
mContext
=
context
;
this
.
soldoutCtrlFoodFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutCtrlFoodFontSize
();
this
.
soldoutCtrlFoodFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutCtrlFoodFontSize
Value
();
}
public
void
setSelectPosition
(
int
select_position
)
{
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/FineItemOneAdapter.java
View file @
aa267293
...
...
@@ -57,11 +57,12 @@ public class FineItemOneAdapter extends DefaultAdapter<Modifier> {
public
FineItemOneAdapter
(
Context
context
,
List
<
Modifier
>
infos
)
{
super
(
infos
);
this
.
mContext
=
context
;
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildShowSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildFontSize
();
this
.
mModFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
();
this
.
mColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
();
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
()));
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutModFlagHeightValue
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutModFlagFontSizeValue
();
this
.
mModFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSizeValue
();
this
.
mColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeightValue
();
int
modColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumnValue
();
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
modColumn
));
// Db_Color dc = new Db_Color(context);
// mColorList = dc.query("");
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/FineItemTwoAdapter.java
View file @
aa267293
...
...
@@ -58,11 +58,12 @@ public class FineItemTwoAdapter extends DefaultAdapter<Modifier> {
public
FineItemTwoAdapter
(
Context
context
,
List
<
Modifier
>
infos
)
{
super
(
infos
);
this
.
mContext
=
context
;
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildShowSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildFontSize
();
this
.
mModFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
();
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
()));
this
.
mColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
();
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutModFlagHeightValue
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutModFlagFontSizeValue
();
this
.
mModFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSizeValue
();
int
modColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumnValue
();
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
modColumn
));
this
.
mColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeightValue
();
// Db_Color dc = new Db_Color(context);
// mColorList = dc.query("");
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/ComboAdapter.java
View file @
aa267293
...
...
@@ -41,8 +41,8 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
private
int
ColHeight
;
private
int
FontSize
;
private
int
OrderNumberChildShowSize
;
private
int
OrderNumberChild
FontSize
;
private
int
soldoutModFlagHeight
;
private
int
soldoutFoodFlag
FontSize
;
public
ComboAdapter
(
Context
context
,
List
<
ComboItem
>
infos
)
{
...
...
@@ -52,10 +52,10 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
int
ComboColCount
=
4
;
int
screenWidth
=
(
int
)
DeviceUtils
.
getScreenWidth
(
context
);
ColWidth
=
((
screenWidth
-
ComboColCount
)
/
ComboColCount
);
ColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
();
FontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
();
OrderNumberChildShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildShowSiz
e
();
OrderNumberChildFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildFontSiz
e
();
ColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
Value
();
FontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
Value
();
soldoutModFlagHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutModFlagHeightValu
e
();
soldoutFoodFlagFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutFoodFlagFontSizeValu
e
();
}
@Override
...
...
@@ -191,9 +191,9 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
tv_soldout
.
setText
(
qty
);
}
}
tv_soldout
.
setMaxHeight
(
OrderNumberChildShowSize
);
tv_soldout
.
setMinHeight
(
OrderNumberChildShowSize
);
tv_soldout
.
setTextSize
(
OrderNumberChild
FontSize
);
tv_soldout
.
setMaxHeight
(
soldoutModFlagHeight
);
tv_soldout
.
setMinHeight
(
soldoutModFlagHeight
);
tv_soldout
.
setTextSize
(
soldoutFoodFlag
FontSize
);
}
private
void
initComboName
(
ComboItem
datasBean
)
{
...
...
@@ -206,9 +206,9 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
private
void
setSolodStatus
(
ComboItem
datasBean
)
{
// tv_soldout.setMaxHeight(OrderNumberChildFontSize
);
// tv_soldout.setMinHeight(OrderNumberChildFontSize
);
tv_soldout
.
setTextSize
(
OrderNumberChild
FontSize
);
tv_soldout
.
setMaxHeight
(
soldoutModFlagHeight
);
tv_soldout
.
setMinHeight
(
soldoutModFlagHeight
);
tv_soldout
.
setTextSize
(
soldoutFoodFlag
FontSize
);
// tv_soldout.setTextColor(Color.parseColor("#000000"));
tv_soldout
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
R
.
drawable
.
meal_shape_remaining_number_bg
));
// tv_soldout.setMinWidth(15);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/DiscountAdapter.java
View file @
aa267293
...
...
@@ -38,8 +38,8 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
super
(
infos
);
this
.
mContext
=
context
;
fontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getDiscountFontSize
();
colHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getDiscountHeight
();
fontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getDiscountFontSize
Value
();
colHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getDiscountHeight
Value
();
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodAdapter.java
View file @
aa267293
...
...
@@ -37,8 +37,8 @@ public class FoodAdapter extends DefaultAdapter<Food> {
private
Context
mContext
;
private
int
m
OrderNumberShowSize
;
private
int
m
OrderNumber
FontSize
;
private
int
m
SoldoutFoodFlagHeight
;
private
int
m
SoldoutFoodFlag
FontSize
;
private
int
mFoodFontSize
;
private
int
mColwidth
;
...
...
@@ -59,12 +59,13 @@ public class FoodAdapter extends DefaultAdapter<Food> {
super
(
infos
);
this
.
mContext
=
context
;
this
.
mFromType
=
fromType
;
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildShowSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildFontSize
();
this
.
mFoodFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodFontSize
();
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodColumn
()));
this
.
mColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodBtnHeight
();
this
.
mLayoutQtyHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getLayoutQtyHeight
();
this
.
mSoldoutFoodFlagHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutFoodFlagHeightValue
();
this
.
mSoldoutFoodFlagFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutFoodFlagFontSizeValue
();
this
.
mFoodFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodFontSizeValue
();
int
foodColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodColumnValue
();
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
foodColumn
));
this
.
mColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodBtnHeightValue
();
this
.
mLayoutQtyHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getLayoutQtyHeightValue
();
}
@Override
...
...
@@ -174,9 +175,9 @@ public class FoodAdapter extends DefaultAdapter<Food> {
private
void
setStatus
(
Food
datasBean
)
{
// tv_soldout.setMaxHeight(mOrderNumberShowSize
);
// tv_soldout.setMinHeight(mOrderNumberShowSize
);
tv_soldout
.
setTextSize
(
m
OrderNumber
FontSize
);
tv_soldout
.
setMaxHeight
(
mSoldoutFoodFlagHeight
);
tv_soldout
.
setMinHeight
(
mSoldoutFoodFlagHeight
);
tv_soldout
.
setTextSize
(
m
SoldoutFoodFlag
FontSize
);
// tv_soldout.setTextColor(Color.parseColor("#000000"));
tv_soldout
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
R
.
drawable
.
meal_shape_remaining_number_bg
));
// tv_soldout.setMinWidth(20);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodGroupAdapter.java
View file @
aa267293
...
...
@@ -54,12 +54,13 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
this
.
mContext
=
context
;
this
.
mFromType
=
fromType
;
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberShowSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberFontSize
();
this
.
FoodTypeFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupFontSize
();
this
.
mParentColWidth
=
(
int
)
(
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupColumn
());
this
.
mParentColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupBtnHeight
();
this
.
mLayoutQtyHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getLayoutQtyHeight
();
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutFoodFlagHeightValue
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutFoodFlagFontSizeValue
();
this
.
FoodTypeFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupFontSizeValue
();
int
foodGroupColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupColumnValue
();
this
.
mParentColWidth
=
(
int
)
(
DeviceUtils
.
getScreenWidth
(
context
)
/
foodGroupColumn
);
this
.
mParentColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupBtnHeightValue
();
this
.
mLayoutQtyHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getLayoutQtyHeightValue
();
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/ModifierAdapter.java
View file @
aa267293
...
...
@@ -42,9 +42,9 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
super
(
infos
);
this
.
mContext
=
context
;
ColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
();
FontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
();
OrderNumberChildFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
get
OrderNumberChildFontSiz
e
();
ColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
Value
();
FontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
Value
();
OrderNumberChildFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
get
SoldoutModFlagFontSizeValu
e
();
}
@Override
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/FineItemAllFragment.java
View file @
aa267293
...
...
@@ -80,7 +80,7 @@ public class FineItemAllFragment extends BaseFragment<FineItemAllPresenter> impl
@Override
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
modCol
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
();
modCol
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
Value
();
mPresenter
.
initAdapter
();
mPresenter
.
initItemListener
(
mContext
);
...
...
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