Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
admin
Project
Project
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
曲欣亮
admin
Commits
de09544f
Commit
de09544f
authored
Aug 07, 2018
by
曲欣红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
a4c013eb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
ThemeTemplateServiceImpl.java
...om/egolm/admin/service/impl/ThemeTemplateServiceImpl.java
+23
-5
No files found.
src/main/java/com/egolm/admin/service/impl/ThemeTemplateServiceImpl.java
View file @
de09544f
...
...
@@ -57,7 +57,9 @@ public class ThemeTemplateServiceImpl implements ThemeTemplateService{
public
TPlatformTheme
selectByNO
(
String
themeNO
,
String
LangID
)
{
try
{
String
sql
=
"select * from tPlatformTheme where sThemeNO = ?"
;
return
jdbcTemplate
.
queryForBean
(
sql
,
TPlatformTheme
.
class
,
themeNO
);
TPlatformTheme
theme
=
jdbcTemplate
.
queryForBean
(
sql
,
TPlatformTheme
.
class
,
themeNO
);
System
.
out
.
println
(
theme
);
return
theme
;
}
catch
(
Exception
e
){
throw
new
XException
(
I18NUtils
.
getMessage
(
LangID
,
"Msg_Query_Error"
),
e
);
//查询失败
}
...
...
@@ -75,11 +77,27 @@ public class ThemeTemplateServiceImpl implements ThemeTemplateService{
public
TPlatformTheme
update
(
TPlatformTheme
theme
,
String
LangID
)
{
try
{
String
sThemeNO
=
theme
.
getsThemeNO
();
boolean
haveTheme
=
haveTheme
(
sThemeNO
);
if
(!
haveTheme
){
TPlatformTheme
oldTheme
;
try
{
oldTheme
=
selectByNO
(
sThemeNO
,
LangID
);
}
catch
(
Exception
e
){
throw
new
XException
(
I18NUtils
.
getMessage
(
LangID
,
"Msg_No_Template"
)+
": "
+
sThemeNO
);
//无此模板
}
String
sql
=
"update tPlatformTheme set sThemeName = ?, sThemeAuthor = ?, sCaption = ?, sThemeJson = ?, sSnapshot1 = ?, sSnapshot2 = ?, sSnapshot3 = ?, sMemo = ?, nTag = ?, sUpdateUser = ?, dUpdateDate = ?, dLastUpdateTime = ? where sThemeNO = ?"
;
oldTheme
.
setsThemeName
(
theme
.
getsThemeName
());
oldTheme
.
setsThemeAuthor
(
theme
.
getsThemeAuthor
());
oldTheme
.
setsCaption
(
theme
.
getsCaption
());
oldTheme
.
setsThemeJson
(
theme
.
getsThemeJson
());
oldTheme
.
setsSnapshot1
(
theme
.
getsSnapshot1
());
oldTheme
.
setsSnapshot2
(
theme
.
getsSnapshot2
());
oldTheme
.
setsSnapshot3
(
theme
.
getsSnapshot3
());
oldTheme
.
setsMemo
(
theme
.
getsMemo
());
oldTheme
.
setnTag
(
theme
.
getnTag
());
oldTheme
.
setsUpdateUser
(
theme
.
getsUpdateUser
());
oldTheme
.
setdUpdateDate
(
theme
.
getdUpdateDate
());
oldTheme
.
setdLastUpdateTime
(
theme
.
getdLastUpdateTime
());
oldTheme
.
setsThemeNO
(
sThemeNO
);
jdbcTemplate
.
update
(
oldTheme
);
/*String sql = "update tPlatformTheme set sThemeName = ?, sThemeAuthor = ?, sCaption = ?, sThemeJson = ?, sSnapshot1 = ?, sSnapshot2 = ?, sSnapshot3 = ?, sMemo = ?, nTag = ?, sUpdateUser = ?, dUpdateDate = ?, dLastUpdateTime = ? where sThemeNO = ?";
jdbcTemplate.update(
sql,
theme.getsThemeName(),
...
...
@@ -95,7 +113,7 @@ public class ThemeTemplateServiceImpl implements ThemeTemplateService{
theme.getdUpdateDate(),
theme.getdLastUpdateTime(),
sThemeNO
);
);
*/
}
catch
(
Exception
e
){
throw
new
XException
(
I18NUtils
.
getMessage
(
LangID
,
"Msg_Update_Error"
));
//修改失败
}
...
...
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