Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
62f35401
Commit
62f35401
authored
Mar 09, 2023
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reportLockUserNameとsendBackUserNameをローカルDB内に保存する際に、難読化するようにした。
parent
833d44f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
14 deletions
+88
-14
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ReportStatusDao.java
+2
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
+86
-12
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ReportStatusDao.java
View file @
62f35401
...
@@ -164,10 +164,10 @@ public class ReportStatusDao extends AbstractDao {
...
@@ -164,10 +164,10 @@ public class ReportStatusDao extends AbstractDao {
dto
.
taskReportId
=
longOrNull
(
cursor
,
"task_report_id"
);
dto
.
taskReportId
=
longOrNull
(
cursor
,
"task_report_id"
);
dto
.
reportStartDate
=
dateOrNull
(
cursor
,
"report_start_date"
);
dto
.
reportStartDate
=
dateOrNull
(
cursor
,
"report_start_date"
);
dto
.
reportLockUserId
=
stringOrNull
(
cursor
,
"report_lock_user_id"
);
dto
.
reportLockUserId
=
stringOrNull
(
cursor
,
"report_lock_user_id"
);
dto
.
reportLockUserName
=
stringOrNull
(
cursor
,
"report_lock_user_name"
);
dto
.
reportLockUserName
=
TaskReportDao
.
decode
(
stringOrNull
(
cursor
,
"report_lock_user_name"
)
);
dto
.
reportLockTime
=
dateOrNull
(
cursor
,
"report_lock_time"
);
dto
.
reportLockTime
=
dateOrNull
(
cursor
,
"report_lock_time"
);
dto
.
sendBackUserId
=
stringOrNull
(
cursor
,
"send_back_user_id"
);
dto
.
sendBackUserId
=
stringOrNull
(
cursor
,
"send_back_user_id"
);
dto
.
sendBackUserName
=
stringOrNull
(
cursor
,
"send_back_user_name"
);
dto
.
sendBackUserName
=
TaskReportDao
.
decode
(
stringOrNull
(
cursor
,
"send_back_user_name"
)
);
dto
.
sendBackComment
=
stringOrNull
(
cursor
,
"send_back_comment"
);
dto
.
sendBackComment
=
stringOrNull
(
cursor
,
"send_back_comment"
);
return
dto
;
return
dto
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
View file @
62f35401
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Base64
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.TimeZone
;
import
java.util.TimeZone
;
...
@@ -106,7 +107,7 @@ public class TaskReportDao extends AbstractDao {
...
@@ -106,7 +107,7 @@ public class TaskReportDao extends AbstractDao {
column
=
cursor
.
getColumnIndex
(
"report_lock_user_name"
);
column
=
cursor
.
getColumnIndex
(
"report_lock_user_name"
);
if
(
column
!=
-
1
)
{
if
(
column
!=
-
1
)
{
dto
.
reportLockUserName
=
cursor
.
getString
(
column
);
dto
.
reportLockUserName
=
decode
(
cursor
.
getString
(
column
)
);
}
}
column
=
cursor
.
getColumnIndex
(
"report_lock_time"
);
column
=
cursor
.
getColumnIndex
(
"report_lock_time"
);
...
@@ -121,7 +122,7 @@ public class TaskReportDao extends AbstractDao {
...
@@ -121,7 +122,7 @@ public class TaskReportDao extends AbstractDao {
column
=
cursor
.
getColumnIndex
(
"send_back_user_name"
);
column
=
cursor
.
getColumnIndex
(
"send_back_user_name"
);
if
(
column
!=
-
1
)
{
if
(
column
!=
-
1
)
{
dto
.
sendBackUserName
=
cursor
.
getString
(
column
);
dto
.
sendBackUserName
=
decode
(
cursor
.
getString
(
column
)
);
}
}
column
=
cursor
.
getColumnIndex
(
"send_back_comment"
);
column
=
cursor
.
getColumnIndex
(
"send_back_comment"
);
...
@@ -169,7 +170,29 @@ public class TaskReportDao extends AbstractDao {
...
@@ -169,7 +170,29 @@ public class TaskReportDao extends AbstractDao {
+
"local_saved_flg ) "
+
"local_saved_flg ) "
+
"values "
+
"values "
+
"(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
,
+
"(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
,
dto
.
getInsertValues
());
new
Object
[]
{
dto
.
taskKey
,
dto
.
jsonData
,
dto
.
attachedFileName
,
dto
.
localAttachedFileName
,
dto
.
attachedFileSendFlg
,
dto
.
dataSendFlg
,
dto
.
taskReportId
,
dto
.
taskReportInfoId
,
dto
.
reportStartDate
,
dto
.
reportEndDate
,
dto
.
enableReport
,
dto
.
taskReportLevel
,
dto
.
reportLockUserId
,
encode
(
dto
.
reportLockUserName
),
dto
.
reportLockTime
,
dto
.
sendBackUserId
,
encode
(
dto
.
sendBackUserName
),
dto
.
sendBackComment
,
dto
.
taskStatus
,
dto
.
reportStatus
,
dto
.
localSavedFlg
});
}
}
/**
/**
...
@@ -202,15 +225,52 @@ public class TaskReportDao extends AbstractDao {
...
@@ -202,15 +225,52 @@ public class TaskReportDao extends AbstractDao {
sql
.
append
(
"WHERE task_key=? AND task_report_level=?"
);
sql
.
append
(
"WHERE task_key=? AND task_report_level=?"
);
if
(
dto
.
reportStartDate
!=
null
)
{
if
(
dto
.
reportStartDate
!=
null
)
{
sql
.
append
(
" AND datetime(report_start_date)=datetime(?)"
);
sql
.
append
(
" AND datetime(report_start_date)=datetime(?)"
);
objects
=
new
Object
[]{
dto
.
jsonData
,
dto
.
attachedFileName
,
dto
.
localAttachedFileName
,
dto
.
attachedFileSendFlg
,
dto
.
dataSendFlg
,
objects
=
new
Object
[]{
dto
.
reportEndDate
,
dto
.
enableReport
,
dto
.
taskReportLevel
,
dto
.
localSavedFlg
,
dto
.
jsonData
,
dto
.
reportLockUserId
,
dto
.
reportLockUserName
,
dto
.
reportLockTime
,
dto
.
sendBackUserId
,
dto
.
sendBackUserName
,
dto
.
sendBackComment
,
dto
.
taskStatus
,
dto
.
reportStatus
,
dto
.
attachedFileName
,
dto
.
taskReportInfoId
,
dto
.
taskKey
,
dto
.
taskReportLevel
,
dto
.
reportStartDate
};
dto
.
localAttachedFileName
,
dto
.
attachedFileSendFlg
,
dto
.
dataSendFlg
,
dto
.
reportEndDate
,
dto
.
enableReport
,
dto
.
taskReportLevel
,
dto
.
localSavedFlg
,
dto
.
reportLockUserId
,
encode
(
dto
.
reportLockUserName
),
dto
.
reportLockTime
,
dto
.
sendBackUserId
,
encode
(
dto
.
sendBackUserName
),
dto
.
sendBackComment
,
dto
.
taskStatus
,
dto
.
reportStatus
,
dto
.
taskReportInfoId
,
dto
.
taskKey
,
dto
.
taskReportLevel
,
dto
.
reportStartDate
};
}
else
{
}
else
{
objects
=
new
Object
[]{
dto
.
jsonData
,
dto
.
attachedFileName
,
dto
.
localAttachedFileName
,
dto
.
attachedFileSendFlg
,
dto
.
dataSendFlg
,
objects
=
new
Object
[]{
dto
.
reportEndDate
,
dto
.
enableReport
,
dto
.
taskReportLevel
,
dto
.
localSavedFlg
,
dto
.
jsonData
,
dto
.
reportLockUserId
,
dto
.
reportLockUserName
,
dto
.
reportLockTime
,
dto
.
sendBackUserId
,
dto
.
sendBackUserName
,
dto
.
sendBackComment
,
dto
.
taskStatus
,
dto
.
reportStatus
,
dto
.
attachedFileName
,
dto
.
taskReportInfoId
,
dto
.
taskKey
,
dto
.
taskReportLevel
};
dto
.
localAttachedFileName
,
dto
.
attachedFileSendFlg
,
dto
.
dataSendFlg
,
dto
.
reportEndDate
,
dto
.
enableReport
,
dto
.
taskReportLevel
,
dto
.
localSavedFlg
,
dto
.
reportLockUserId
,
encode
(
dto
.
reportLockUserName
),
dto
.
reportLockTime
,
dto
.
sendBackUserId
,
encode
(
dto
.
sendBackUserName
),
dto
.
sendBackComment
,
dto
.
taskStatus
,
dto
.
reportStatus
,
dto
.
taskReportInfoId
,
dto
.
taskKey
,
dto
.
taskReportLevel
};
}
}
return
update
(
sql
.
toString
(),
objects
)
>
0
;
return
update
(
sql
.
toString
(),
objects
)
>
0
;
...
@@ -252,7 +312,7 @@ public class TaskReportDao extends AbstractDao {
...
@@ -252,7 +312,7 @@ public class TaskReportDao extends AbstractDao {
}
}
args
.
add
(
reportStatus
);
args
.
add
(
reportStatus
);
args
.
add
(
reportLockUserId
);
args
.
add
(
reportLockUserId
);
args
.
add
(
reportLockUserName
);
args
.
add
(
encode
(
reportLockUserName
)
);
args
.
add
(
reportLockTime
);
args
.
add
(
reportLockTime
);
if
(
reportStartDate
!=
null
)
{
if
(
reportStartDate
!=
null
)
{
args
.
add
(
taskReportId
);
args
.
add
(
taskReportId
);
...
@@ -551,4 +611,18 @@ public class TaskReportDao extends AbstractDao {
...
@@ -551,4 +611,18 @@ public class TaskReportDao extends AbstractDao {
}
}
return
count
>
0
;
return
count
>
0
;
}
}
public
static
String
encode
(
String
plain
)
{
if
(
plain
==
null
)
{
return
null
;
}
return
Base64
.
getEncoder
().
encodeToString
(
plain
.
getBytes
());
}
public
static
String
decode
(
String
encoded
)
{
if
(
encoded
==
null
)
{
return
null
;
}
return
new
String
(
Base64
.
getDecoder
().
decode
(
encoded
));
}
}
}
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