Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-spark-tag-4.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaokang
gic-spark-tag-4.0
Commits
015cd9cc
Commit
015cd9cc
authored
Aug 24, 2020
by
guos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员标签4.0
parent
5bebdb55
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
5 deletions
+41
-5
Test.java
src/main/java/com/gic/spark/Test.java
+13
-3
TagLowestSingleConsumptionMoneyFilter.java
...c/spark/filter/TagLowestSingleConsumptionMoneyFilter.java
+2
-2
CommonUtil.java
src/main/java/com/gic/spark/util/CommonUtil.java
+26
-0
No files found.
src/main/java/com/gic/spark/Test.java
View file @
015cd9cc
...
...
@@ -6,6 +6,7 @@ import com.gic.spark.util.DateUtil;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.*
;
import
java.util.regex.Pattern
;
/**
* @description:
...
...
@@ -31,8 +32,17 @@ public class Test {
/* String[] strs="timeRange.fixation".split("\\.");
System.out.println(strs.length);
System.out.println(strs[0]);*/
String
[]
strs
=
"timeRange,fixation"
.
split
(
","
);
System
.
out
.
println
(
strs
.
length
);
System
.
out
.
println
(
strs
[
0
]);
// String[] strs="timeRange,fixation".split(",");
// System.out.println(strs.length);
// System.out.println(strs[0]);
System
.
out
.
println
(
Pattern
.
compile
(
"flag"
).
matcher
(
"flag.mcuInfo.flag"
).
find
());
String
[]
keys
=
"flag.mcuInfo.flag"
.
split
(
"flag"
);
System
.
out
.
println
(
"keys[0]==>"
+
keys
[
0
]);
System
.
out
.
println
(
"keys[1]==>"
+
keys
[
1
]);
for
(
String
key
:
keys
)
{
System
.
out
.
println
(
"k==>"
+
key
.
replaceAll
(
"\\."
,
""
));
}
}
}
src/main/java/com/gic/spark/filter/TagLowestSingleConsumptionMoneyFilter.java
View file @
015cd9cc
...
...
@@ -91,8 +91,8 @@ public class TagLowestSingleConsumptionMoneyFilter extends AbstractTagConsumReco
});
for
(
TrdVirtualOrderBean
amountBean:
effectiveOrderMap
.
values
()){
topConsumAmount
=
configStatus
==
1
?
(
topConsumeAmountBean
.
getPaid_amt
()<
topConsumAmount
?
topConsumeAmountBean
.
getPaid_amt
(
):
topConsumAmount
):
(
topConsumeAmountBean
.
getPay_amt
()<
topConsumAmount
?
topConsumeAmountBean
.
getPay_amt
(
):
topConsumAmount
);
(
CommonUtil
.
isEmptyDouble2double
(
topConsumeAmountBean
.
getPaid_amt
())<
topConsumAmount
?
CommonUtil
.
isEmptyDouble2double
(
topConsumeAmountBean
.
getPaid_amt
()
):
topConsumAmount
):
(
CommonUtil
.
isEmptyDouble2double
(
topConsumeAmountBean
.
getPay_amt
())<
topConsumAmount
?
CommonUtil
.
isEmptyDouble2double
(
topConsumeAmountBean
.
getPay_amt
()
):
topConsumAmount
);
}
...
...
src/main/java/com/gic/spark/util/CommonUtil.java
View file @
015cd9cc
...
...
@@ -29,4 +29,30 @@ public class CommonUtil {
return
dataActuallyPaidConfig
.
getConfig_Status
();
}
}
public
static
int
isEmptyInteger2int
(
Integer
param
,
int
defaultValue
){
return
null
==
param
?
defaultValue:
param
;
}
public
static
int
isEmptyInteger2int
(
Integer
param
){
return
isEmptyInteger2int
(
param
,
0
);
}
public
static
long
isEmptyLong2long
(
Long
param
,
long
defaultValue
){
return
null
==
param
?
defaultValue:
param
;
}
public
static
long
isEmptyLong2long
(
Long
param
){
return
isEmptyLong2long
(
param
,
0
l
);
}
public
static
float
isEmptyFloat2float
(
Float
param
,
float
defaultValue
){
return
null
==
param
?
defaultValue:
param
;
}
public
static
float
isEmptyFloat2float
(
Float
param
){
return
isEmptyFloat2float
(
param
,
0
f
);
}
public
static
double
isEmptyDouble2double
(
Double
param
,
double
defaultValue
){
return
null
==
param
?
defaultValue:
param
;
}
public
static
double
isEmptyDouble2double
(
Double
param
){
return
isEmptyDouble2double
(
param
,
0
d
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment