优化APP异常提醒功能
This commit is contained in:
@@ -5,7 +5,7 @@ package com.synebula.gaea.data
|
||||
*
|
||||
* @author alex
|
||||
* @version 0.1
|
||||
* @since 2018 18-2-2
|
||||
* @since 2020-05-15
|
||||
*/
|
||||
interface IObjectConverter {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ package com.synebula.gaea.data.code
|
||||
*
|
||||
* @author alex
|
||||
* @version 0.1
|
||||
* @since 2018 18-2-1
|
||||
* @since 2020-05-15
|
||||
*
|
||||
*
|
||||
* Twitter_Snowflake<br></br>
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.synebula.gaea.data.serializable
|
||||
|
||||
abstract class AbstractJsonSerializer : IJsonSerializable {
|
||||
|
||||
protected lateinit var data: Any
|
||||
|
||||
|
||||
/**
|
||||
* 序列化data数据。
|
||||
* 实现的serialize方法必须序列化data对象。
|
||||
*
|
||||
* @param data 需要序列号的数据。
|
||||
* @return 序列化后的json数据。
|
||||
*/
|
||||
fun serialize(data: Any): String {
|
||||
this.data = data
|
||||
return this.serialize()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.synebula.gaea.data.serialization
|
||||
|
||||
/**
|
||||
* 序列化器
|
||||
*/
|
||||
interface IDeserializer {
|
||||
|
||||
/**
|
||||
* 反序列化
|
||||
*
|
||||
* @param <S> 源数据类型
|
||||
* @param <T> 目标数据类型
|
||||
* @param src 源数据
|
||||
* @return 目标数据
|
||||
*/
|
||||
fun <S, T> deserialize(src: S): T
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.synebula.gaea.data.serializable
|
||||
package com.synebula.gaea.data.serialization
|
||||
|
||||
/**
|
||||
* 继承该接口的类都可以序列号对象。
|
||||
* 继承该接口的类都可以序列化对象。
|
||||
*
|
||||
* @author alex
|
||||
* @version 0.0.1
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.synebula.gaea.data.serialization
|
||||
|
||||
/**
|
||||
* 序列化器
|
||||
*/
|
||||
interface ISerializer {
|
||||
|
||||
/**
|
||||
* 序列化
|
||||
*
|
||||
* @param <S> 源数据类型
|
||||
* @param <T> 目标数据类型
|
||||
* @param src 源数据
|
||||
* @return 目标数据
|
||||
*/
|
||||
fun <S, T> serialize(src: S): T
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.synebula.gaea.data.serialization.json
|
||||
|
||||
/**
|
||||
* 序列化器
|
||||
*/
|
||||
interface IJsonDeserializer {
|
||||
/**
|
||||
* 反序列化
|
||||
*
|
||||
* @param <T> 目标数据类型
|
||||
* @param src Json字符串数据
|
||||
* @return 目标数据
|
||||
*/
|
||||
fun <T> deserialize(src: String): T
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
package com.synebula.gaea.data.serializable
|
||||
package com.synebula.gaea.data.serialization.json
|
||||
|
||||
import com.synebula.gaea.data.serialization.ISerializable
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.synebula.gaea.data.serialization.json
|
||||
|
||||
/**
|
||||
* 序列化器
|
||||
*/
|
||||
interface IJsonSerializer {
|
||||
/**
|
||||
* 序列化
|
||||
*
|
||||
* @param <S> 源数据类型
|
||||
* @param src 源数据
|
||||
* @return Json字符串
|
||||
*/
|
||||
fun <S> serialize(src: S): String
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import java.util.*
|
||||
*
|
||||
* @author alex
|
||||
* @version 0.1
|
||||
* @since 2018 18-2-8
|
||||
* @since 2020-05-15
|
||||
*/
|
||||
class Command : ICommand {
|
||||
override var timestamp = 0L
|
||||
|
||||
@@ -5,7 +5,7 @@ package com.synebula.gaea.domain.service
|
||||
*
|
||||
* @author alex
|
||||
* @version 0.1
|
||||
* @since 2018 18-2-8
|
||||
* @since 2020-05-15
|
||||
*/
|
||||
interface ICommand {
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.synebula.gaea.data.message.Message
|
||||
*
|
||||
* @author alex
|
||||
* @version 0.1
|
||||
* @since 2018 18-2-8
|
||||
* @since 2020-05-15
|
||||
*/
|
||||
interface IServiceComplex<TKey, TSecond> {
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.synebula.gaea.log.ILogger
|
||||
* @param logger 日志组件
|
||||
* @author alex
|
||||
* @version 0.1
|
||||
* @since 2018 18-2-8
|
||||
* @since 2020-05-15
|
||||
*/
|
||||
open class Service<TAggregateRoot : IAggregateRoot<TKey>, TKey>(
|
||||
protected var rootClass: Class<TAggregateRoot>,
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.synebula.gaea.log.ILogger
|
||||
*
|
||||
* @author alex
|
||||
* @version 0.1
|
||||
* @since 2018 18-2-8
|
||||
* @since 2020-05-15
|
||||
*/
|
||||
open class ServiceComplex<TAggregateRoot : IComplexAggregateRoot<TKey, TSecond>, TKey, TSecond>
|
||||
(var logger: ILogger, protected var repository: IRepositoryComplex<TAggregateRoot, TKey, TSecond>,
|
||||
|
||||
@@ -5,7 +5,7 @@ package com.synebula.gaea.query
|
||||
*
|
||||
* @author alex
|
||||
* @version 0.1
|
||||
* @since 2018 18-2-6
|
||||
* @since 2020-05-15
|
||||
*/
|
||||
enum class OrderType {
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@ package com.synebula.gaea.query
|
||||
*
|
||||
* @author alex
|
||||
* @version 0.1
|
||||
* @since 2018 18-2-5
|
||||
* @since 2020-05-15
|
||||
*/
|
||||
data class PagingParam(var page: Int = 1, var size: Int = 10) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user