Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
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
huluobin
bailuntec-cost
Commits
b87dadfa
Commit
b87dadfa
authored
Jan 08, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d54238d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
7 deletions
+26
-7
CookieUtil.java
...e/src/main/java/com/blt/other/common/util/CookieUtil.java
+8
-7
OtherApplicationTests.java
...re/src/test/java/com/blt/other/OtherApplicationTests.java
+18
-0
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/common/util/CookieUtil.java
View file @
b87dadfa
...
@@ -7,24 +7,25 @@ public class CookieUtil {
...
@@ -7,24 +7,25 @@ public class CookieUtil {
/**
/**
* 获取 Cookie
* 获取 Cookie
*
* @param request
* @param request
* @return
* @return
*/
*/
public
static
Cookie
[]
getCookieArray
(
HttpServletRequest
request
){
public
static
Cookie
[]
getCookieArray
(
HttpServletRequest
request
)
{
Cookie
[]
cookies
=
request
.
getCookies
();
return
request
.
getCookies
();
return
cookies
;
}
}
/**
/**
* 根据 cookieName 获取 cookieValue
* 根据 cookieName 获取 cookieValue
*
* @return
* @return
*/
*/
public
static
String
getBLUserAcct
(
HttpServletRequest
request
){
public
static
String
getBLUserAcct
(
HttpServletRequest
request
)
{
Cookie
[]
cookieArray
=
getCookieArray
(
request
);
Cookie
[]
cookieArray
=
getCookieArray
(
request
);
if
(
null
!=
cookieArray
&&
cookieArray
.
length
>=
1
)
{
if
(
null
!=
cookieArray
&&
cookieArray
.
length
>=
1
)
{
for
(
Cookie
cookie
:
cookieArray
){
for
(
Cookie
cookie
:
cookieArray
)
{
if
(
"BLUserAcct"
.
equals
(
cookie
.
getName
())){
if
(
"BLUserAcct"
.
equals
(
cookie
.
getName
()))
{
return
cookie
.
getValue
();
return
cookie
.
getValue
();
}
}
}
}
...
...
bailuntec-cost-core/src/test/java/com/blt/other/OtherApplicationTests.java
View file @
b87dadfa
...
@@ -358,6 +358,24 @@ public class OtherApplicationTests {
...
@@ -358,6 +358,24 @@ public class OtherApplicationTests {
mailService
.
sendSimpleMail
(
"robbendev@qq.com"
,
"pre"
,
"test"
);
mailService
.
sendSimpleMail
(
"robbendev@qq.com"
,
"pre"
,
"test"
);
}
}
@Resource
CostTypeDao
costTypeDao
;
@Rollback
(
value
=
false
)
@Test
public
void
testType
()
{
costTypeDao
.
selectList
(
new
LambdaQueryWrapper
<
CostTypeDomain
>()
.
eq
(
CostTypeDomain:
:
getCostTemplateType
,
CostTypeDomain
.
feeType
))
.
forEach
(
costTypeDomain
->
{
CostTypeDomain
item
=
new
CostTypeDomain
();
item
.
setCostTemplateType
(
CostTypeDomain
.
borrow
);
item
.
setAccountingSubjectNo
(
"1345912843756503041"
);
item
.
setDescription
(
costTypeDomain
.
getDescription
());
item
.
setTypeNo
(
IdWorker
.
getIdStr
());
item
.
setTypeName
(
costTypeDomain
.
getTypeName
());
costTypeDao
.
insert
(
item
);
});
}
}
}
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