Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meser
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Suryono
meser
Commits
c6c27f3b
Commit
c6c27f3b
authored
Sep 03, 2020
by
Muhammad Suryono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maintenance daos
parent
6a44ae1a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
PaymentPendingDaos.java
...ain/java/com/yono/messeripos/daos/PaymentPendingDaos.java
+5
-3
LocalDatabase.java
...main/java/com/yono/messeripos/database/LocalDatabase.java
+1
-1
PaymentPending.java
.../main/java/com/yono/messeripos/models/PaymentPending.java
+1
-1
No files found.
app/src/main/java/com/yono/messeripos/daos/PaymentPendingDaos.java
View file @
c6c27f3b
package
com
.
yono
.
messeripos
.
daos
;
import
androidx.lifecycle.LiveData
;
import
androidx.room.Dao
;
import
androidx.room.Insert
;
import
androidx.room.OnConflictStrategy
;
import
androidx.room.Query
;
...
...
@@ -11,16 +12,17 @@ import com.yono.messeripos.models.ProductCartModels;
import
java.util.List
;
@Dao
public
interface
PaymentPendingDaos
{
@Query
(
"SELECT * FROM payment
_p
ending ORDER BY id DESC"
)
@Query
(
"SELECT * FROM payment
P
ending ORDER BY id DESC"
)
public
LiveData
<
List
<
PaymentPending
>>
getAll
();
@Query
(
"SELECT * FROM payment
_p
ending WHERE id_orders = :idOrders"
)
@Query
(
"SELECT * FROM payment
P
ending WHERE id_orders = :idOrders"
)
public
LiveData
<
List
<
PaymentPending
>>
getPaymentByIdOrder
(
String
idOrders
);
@Insert
(
onConflict
=
OnConflictStrategy
.
IGNORE
)
public
void
insertPaymentPending
(
PaymentPending
paymentPending
);
@Query
(
"UPDATE payment
_p
ending SET id_nfc = :idNfc WHERE id = :id"
)
@Query
(
"UPDATE payment
P
ending SET id_nfc = :idNfc WHERE id = :id"
)
public
void
updateNfc
(
String
idNfc
,
long
id
);
}
app/src/main/java/com/yono/messeripos/database/LocalDatabase.java
View file @
c6c27f3b
...
...
@@ -34,7 +34,7 @@ public abstract class LocalDatabase extends RoomDatabase {
synchronized
(
LocalDatabase
.
class
){
if
(
INSTANCE
==
null
){
INSTANCE
=
Room
.
databaseBuilder
(
context
.
getApplicationContext
(),
LocalDatabase
.
class
,
"db_
new
"
).
build
();
LocalDatabase
.
class
,
"db_
messer
"
).
build
();
}
}
}
...
...
app/src/main/java/com/yono/messeripos/models/PaymentPending.java
View file @
c6c27f3b
...
...
@@ -8,7 +8,7 @@ import androidx.room.PrimaryKey;
import
com.google.gson.annotations.SerializedName
;
@Entity
(
tableName
=
"payment
_p
ending"
)
@Entity
(
tableName
=
"payment
P
ending"
)
public
class
PaymentPending
implements
Parcelable
{
@PrimaryKey
(
autoGenerate
=
true
)
@SerializedName
(
"id"
)
...
...
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