|
|
@ -34,7 +34,8 @@ public class ProfileRecordPointSetDao { |
|
|
|
values.put("create_time", currentTime); |
|
|
|
values.put("update_time", currentTime); |
|
|
|
values.put("profile_record_uuid", pointSet.getProfileRecordUuid()); |
|
|
|
values.put("points", pointSet.getPoints()); |
|
|
|
values.put("left_points", pointSet.getLeftPoints()); |
|
|
|
values.put("right_points", pointSet.getRightPoints()); |
|
|
|
long id = db.insert(MyDatabaseHelper.TABLE_PROFILE_RECORD_POINT_SET, null, values); |
|
|
|
db.close(); |
|
|
|
return id; |
|
|
@ -46,7 +47,8 @@ public class ProfileRecordPointSetDao { |
|
|
|
ContentValues values = new ContentValues(); |
|
|
|
values.put("update_time", getCurrentTime()); |
|
|
|
values.put("profile_record_uuid", pointSet.getProfileRecordUuid()); |
|
|
|
values.put("points", pointSet.getPoints()); |
|
|
|
values.put("left_points", pointSet.getLeftPoints()); |
|
|
|
values.put("right_points", pointSet.getRightPoints()); |
|
|
|
int rows = db.update(MyDatabaseHelper.TABLE_PROFILE_RECORD_POINT_SET, values, "id = ?", new String[]{String.valueOf(pointSet.getId())}); |
|
|
|
db.close(); |
|
|
|
return rows; |
|
|
@ -71,7 +73,8 @@ public class ProfileRecordPointSetDao { |
|
|
|
ProfileRecordPointSet pointSet = new ProfileRecordPointSet(); |
|
|
|
pointSet.setId(cursor.getLong(cursor.getColumnIndex("id"))); |
|
|
|
pointSet.setProfileRecordUuid(cursor.getString(cursor.getColumnIndex("profile_record_uuid"))); |
|
|
|
pointSet.setPoints(cursor.getString(cursor.getColumnIndex("points"))); |
|
|
|
pointSet.setLeftPoints(cursor.getString(cursor.getColumnIndex("left_points"))); |
|
|
|
pointSet.setRightPoints(cursor.getString(cursor.getColumnIndex("right_points"))); |
|
|
|
pointSet.setCreateTime(LocalDateTime.parse(cursor.getString(cursor.getColumnIndex("create_time")), FORMATTER)); |
|
|
|
pointSet.setUpdateTime(LocalDateTime.parse(cursor.getString(cursor.getColumnIndex("update_time")), FORMATTER)); |
|
|
|
list.add(pointSet); |
|
|
@ -92,7 +95,8 @@ public class ProfileRecordPointSetDao { |
|
|
|
pointSet = new ProfileRecordPointSet(); |
|
|
|
pointSet.setId(cursor.getLong(cursor.getColumnIndex("id"))); |
|
|
|
pointSet.setProfileRecordUuid(cursor.getString(cursor.getColumnIndex("profile_record_uuid"))); |
|
|
|
pointSet.setPoints(cursor.getString(cursor.getColumnIndex("points"))); |
|
|
|
pointSet.setLeftPoints(cursor.getString(cursor.getColumnIndex("left_points"))); |
|
|
|
pointSet.setRightPoints(cursor.getString(cursor.getColumnIndex("right_points"))); |
|
|
|
pointSet.setCreateTime(LocalDateTime.parse(cursor.getString(cursor.getColumnIndex("create_time")), FORMATTER)); |
|
|
|
pointSet.setUpdateTime(LocalDateTime.parse(cursor.getString(cursor.getColumnIndex("update_time")), FORMATTER)); |
|
|
|
cursor.close(); |
|
|
@ -111,7 +115,8 @@ public class ProfileRecordPointSetDao { |
|
|
|
pointSet = new ProfileRecordPointSet(); |
|
|
|
pointSet.setId(cursor.getLong(cursor.getColumnIndex("id"))); |
|
|
|
pointSet.setProfileRecordUuid(cursor.getString(cursor.getColumnIndex("profile_record_uuid"))); |
|
|
|
pointSet.setPoints(cursor.getString(cursor.getColumnIndex("points"))); |
|
|
|
pointSet.setLeftPoints(cursor.getString(cursor.getColumnIndex("left_points"))); |
|
|
|
pointSet.setRightPoints(cursor.getString(cursor.getColumnIndex("right_points"))); |
|
|
|
pointSet.setCreateTime(LocalDateTime.parse(cursor.getString(cursor.getColumnIndex("create_time")), FORMATTER)); |
|
|
|
pointSet.setUpdateTime(LocalDateTime.parse(cursor.getString(cursor.getColumnIndex("update_time")), FORMATTER)); |
|
|
|
cursor.close(); |
|
|
|