WT1.0.20 Product - product_id_ios, product_id_android
This commit is contained in:
parent
785cd3f008
commit
df19de5103
@ -11,7 +11,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "com.aitrainer"
|
||||
version = "1.0.19"
|
||||
version = "1.0.20"
|
||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
repositories {
|
||||
|
@ -780,24 +780,26 @@ CREATE TABLE IF NOT EXISTS `product` (
|
||||
`type` enum('subscription','in-app-currency') NOT NULL DEFAULT 'subscription',
|
||||
`valid_from` date DEFAULT NULL,
|
||||
`valid_to` date DEFAULT NULL,
|
||||
`product_id_ios` char(50) NULL DEFAULT NULL,
|
||||
`product_id_android` char(50) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`product_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- Tábla adatainak mentése aitrainer2.product: ~12 rows (hozzávetőleg)
|
||||
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
|
||||
REPLACE INTO `product` (`product_id`, `name`, `description`, `type`, `valid_from`, `valid_to`) VALUES
|
||||
(1, 'Subscription A', '700 Ft', 'subscription', '2020-11-01', NULL),
|
||||
(2, 'Subscription B', '1000 Ft', 'subscription', '2020-11-01', NULL),
|
||||
(3, 'Subscription C', '1500 Ft', 'subscription', '2020-11-01', NULL),
|
||||
(4, 'Subscription D', '2000 Ft', 'subscription', '2020-11-01', NULL),
|
||||
(5, 'Subscription E', '3000 Ft', 'subscription', '2020-11-01', NULL),
|
||||
(6, 'Subscription F', '5000 Ft', 'subscription', '2020-11-01', NULL),
|
||||
(7, 'Subscription A Yearly', '7000 Ft', 'subscription', '2020-11-01', NULL),
|
||||
(8, 'Subscription B Yearly', '10000', 'subscription', '2020-11-04', NULL),
|
||||
(9, 'Subscription C Yearly', '15000', 'subscription', '2020-11-04', NULL),
|
||||
(10, 'Subscription D Yearly', '20000', 'subscription', '2020-11-04', NULL),
|
||||
(11, 'Subscription E Yearly', '30000', 'subscription', '2020-11-04', NULL),
|
||||
(12, 'Subscription F Yearly', '50000', 'subscription', '2020-11-04', NULL);
|
||||
(1, 'Subscription A', '700 Ft', 'subscription', '2020-11-01', NULL, 'p_ios_1', 'p_android_1'),
|
||||
(2, 'Subscription B', '1000 Ft', 'subscription', '2020-11-01', NULL, NULL, NULL),
|
||||
(3, 'Subscription C', '1500 Ft', 'subscription', '2020-11-01', NULL, NULL, NULL),
|
||||
(4, 'Subscription D', '2000 Ft', 'subscription', '2020-11-01', NULL, NULL, NULL),
|
||||
(5, 'Subscription E', '3000 Ft', 'subscription', '2020-11-01', NULL, NULL, NULL),
|
||||
(6, 'Subscription F', '5000 Ft', 'subscription', '2020-11-01', NULL, NULL, NULL),
|
||||
(7, 'Subscription A Yearly', '7000 Ft', 'subscription', '2020-11-01', NULL, NULL, NULL),
|
||||
(8, 'Subscription B Yearly', '10000', 'subscription', '2020-11-04', NULL, NULL, NULL),
|
||||
(9, 'Subscription C Yearly', '15000', 'subscription', '2020-11-04', NULL, NULL, NULL),
|
||||
(10, 'Subscription D Yearly', '20000', 'subscription', '2020-11-04', NULL, NULL, NULL),
|
||||
(11, 'Subscription E Yearly', '30000', 'subscription', '2020-11-04', NULL, NULL, NULL),
|
||||
(12, 'Subscription F Yearly', '50000', 'subscription', '2020-11-04', NULL, NULL, NULL);
|
||||
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
|
||||
|
||||
-- Struktúra mentése tábla aitrainer2. product_test
|
||||
|
5
data/db/update_1_0_20.sql
Normal file
5
data/db/update_1_0_20.sql
Normal file
@ -0,0 +1,5 @@
|
||||
ALTER TABLE `product`
|
||||
ADD COLUMN `product_id_ios` CHAR(50) NULL DEFAULT NULL AFTER `valid_to`,
|
||||
ADD COLUMN `product_id_android` CHAR(50) NULL DEFAULT NULL AFTER `product_id_ios`;
|
||||
|
||||
UPDATE configuration set config_value = "1.0.20", date_change=CURRENT_DATE WHERE config_key = "db_version";
|
BIN
logs/aitrainer.2020-11-27.0.log.gz
Normal file
BIN
logs/aitrainer.2020-11-27.0.log.gz
Normal file
Binary file not shown.
BIN
logs/aitrainer.2020-11-28.0.log.gz
Normal file
BIN
logs/aitrainer.2020-11-28.0.log.gz
Normal file
Binary file not shown.
BIN
logs/aitrainer.2020-12-05.0.log.gz
Normal file
BIN
logs/aitrainer.2020-12-05.0.log.gz
Normal file
Binary file not shown.
BIN
logs/aitrainer.2020-12-06.0.log.gz
Normal file
BIN
logs/aitrainer.2020-12-06.0.log.gz
Normal file
Binary file not shown.
@ -20,5 +20,7 @@ data class Product (
|
||||
@get: NotBlank var description: String = "",
|
||||
@get: NonNull var type: String? = null,
|
||||
@get: NonNull var validFrom: String? = null,
|
||||
@get: NonNull var validTo: String? = null
|
||||
@get: NonNull var validTo: String? = null,
|
||||
@get: NonNull var productIdIos: String? = null,
|
||||
@get: NonNull var productIdAndroid: String? = null
|
||||
)
|
@ -16,6 +16,6 @@ logging.config=classpath:logback-spring.xml
|
||||
logging.file=logs
|
||||
|
||||
# if the database structure has been changed, increment this version number
|
||||
application.version=1.0.19
|
||||
application.version=1.0.20
|
||||
|
||||
jwt.secret=aitrainer
|
@ -16,6 +16,6 @@ logging.config=classpath:logback-spring.xml
|
||||
logging.file=logs
|
||||
|
||||
# if the database structure has been changed, increment this version number
|
||||
application.version=1.0.19
|
||||
application.version=1.0.20
|
||||
|
||||
jwt.secret=aitrainer
|
@ -27,7 +27,7 @@ class ExerciseResultTest {
|
||||
|
||||
val exerciseResults = response.body
|
||||
assertTrue(exerciseResults is List)
|
||||
assertEquals(exerciseResults.size, 4)
|
||||
assertEquals(exerciseResults!!.size, 4)
|
||||
assertEquals(exerciseResults[0].customerId, 90)
|
||||
assertEquals(exerciseResults[0].exerciseId, 1)
|
||||
assertEquals(exerciseResults[0].value, 134.0)
|
||||
@ -51,7 +51,7 @@ class ExerciseResultTest {
|
||||
val exerciseNew = response.body
|
||||
|
||||
assertTrue(exerciseNew is ExerciseResult)
|
||||
assertTrue(exerciseNew.exercisePlanId == null)
|
||||
assertTrue(exerciseNew!!.exercisePlanId == null)
|
||||
assertEquals(exerciseNew.customerId, 103)
|
||||
assertEquals(exerciseNew.resultType, "calorie")
|
||||
|
||||
|
@ -39,7 +39,7 @@ class ExerciseTreeParentsTest {
|
||||
|
||||
assertTrue(responseEntity.body!!.isNotEmpty())
|
||||
val exerciseTreeParentList = responseEntity.body!!
|
||||
assertEquals(exerciseTreeParentList.size, 20)
|
||||
assertEquals(exerciseTreeParentList.size, 27)
|
||||
assertEquals(exerciseTreeParentList[4].exerciseTreeParentId, 3)
|
||||
assertEquals(exerciseTreeParentList[4].exerciseTreeChildId, 7)
|
||||
|
||||
|
@ -25,9 +25,11 @@ class ProductTesting {
|
||||
val products = response.body
|
||||
|
||||
assertTrue(products is List)
|
||||
assertTrue(products.isNotEmpty())
|
||||
assertTrue(products!!.isNotEmpty())
|
||||
assertEquals(products.size, 12)
|
||||
assertEquals(products[0].name, "Subscription A")
|
||||
assertEquals(products[0].productIdIos, "p_ios_1")
|
||||
assertEquals(products[0].productIdAndroid, "p_android_1")
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user