Skip to content

Commit

Permalink
🎨 fix: 修复
Browse files Browse the repository at this point in the history
  • Loading branch information
cokie committed Jan 22, 2024
1 parent 4346745 commit fd1db9c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import io.micro.core.exception.requireNonNull
import io.micro.core.function.sdk.Cmd
import io.micro.core.rest.CommonCode
import io.micro.server.robot.domain.model.valobj.Switch
import kotlin.properties.Delegates

class FeatureFunctionDO {

Expand All @@ -28,15 +27,15 @@ class FeatureFunctionDO {

var requireQuota: Boolean? = null

var cmd: Cmd by Delegates.notNull()
var cmd: Cmd? = null

var args: MutableList<String> = mutableListOf()

var switch: Switch = Switch()

var groupId: Long by Delegates.notNull()
var groupId: Long? = null

var memberId: Long by Delegates.notNull()
var memberId: Long? = null

companion object {
const val BRACES = "{}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class RobotManagerServiceImpl(
if (switched) {
runCatching {
functionContext.call(
featureFunction.cmd,
featureFunction.cmd!!,
featureFunction.args,
featureFunction.getConfigMap(objectMapper)
).awaitSuspending()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package io.micro.server.robot.infra.event.dto

import io.micro.core.function.sdk.Cmd
import io.micro.server.robot.domain.model.valobj.Switch
import kotlin.properties.Delegates

class FeatureFunctionDTO {

Expand All @@ -24,14 +23,14 @@ class FeatureFunctionDTO {

var requireQuota: Boolean? = null

var cmd: Cmd by Delegates.notNull()
var cmd: Cmd? = null

var args: MutableList<String> = mutableListOf()

var switch: Switch = Switch()

var groupId: Long by Delegates.notNull()
var groupId: Long? = null

var memberId: Long by Delegates.notNull()
var memberId: Long? = null

}

0 comments on commit fd1db9c

Please sign in to comment.