Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECM code optimization #4449

Merged
merged 8 commits into from
Apr 16, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,16 @@ import java.nio.file.Paths

object ECPathUtils {

def getECWOrkDirPathSuffix(
user: String,
ticketId: String,
engineType: String,
timeStamp: Long = System.currentTimeMillis()
): String = {
val suffix = if (StringUtils.isBlank(engineType)) {
Paths
.get(user, DateFormatUtils.format(System.currentTimeMillis(), "yyyyMMdd"))
.toFile
.getPath
} else {
Paths
.get(user, DateFormatUtils.format(System.currentTimeMillis(), "yyyyMMdd"), engineType)
.toFile
.getPath
}
suffix + File.separator + ticketId
def getECWOrkDirPathSuffix(user: String, ticketId: String, engineType: String): String = {
Paths
.get(
user,
DateFormatUtils.format(System.currentTimeMillis(), "yyyyMMdd"),
if (StringUtils.isBlank(engineType)) "" else engineType
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
If empty skip

)
.toFile
.getPath + File.separator + ticketId

}

}