Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
吴迪
gs1-office-web-sit
Commits
cf82092c
Commit
cf82092c
authored
Jul 30, 2023
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】渗透修改
parent
83b26d6b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
24 deletions
+49
-24
idwork-starter-0.0.1.jar
libs/idwork-starter-0.0.1.jar
+0
-0
pom.xml
pom.xml
+2
-1
OfficeApplication.java
src/main/java/io/office/OfficeApplication.java
+25
-8
NewsMovieController.java
...office/modules/manage/controller/NewsMovieController.java
+2
-0
LogLoginServiceImpl.java
...fice/modules/manage/service/impl/LogLoginServiceImpl.java
+4
-4
NewsMovieServiceImpl.java
...ice/modules/manage/service/impl/NewsMovieServiceImpl.java
+16
-11
No files found.
libs/idwork-starter-0.0.1.jar
0 → 100644
View file @
cf82092c
File added
pom.xml
View file @
cf82092c
...
...
@@ -333,8 +333,9 @@
<groupId>
com.sitech
</groupId>
<artifactId>
idwork-starter
</artifactId>
<version>
0.0.1
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/libs/idwork-starter-0.0.1.jar
</systemPath>
</dependency>
<dependency>
<groupId>
eu.bitwalker
</groupId>
<artifactId>
UserAgentUtils
</artifactId>
...
...
src/main/java/io/office/OfficeApplication.java
View file @
cf82092c
...
...
@@ -4,21 +4,20 @@
package
io
.
office
;
import
com.sitech.idworkstarter.IdWorkAutoConfiguration
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.boot.web.servlet.MultipartConfigFactory
;
import
org.springframework.context.annotation.Bean
;
import
javax.
annotation.PostConstruc
t
;
import
javax.
servlet.MultipartConfigElemen
t
;
/**
* @author DELL
*/
@SpringBootApplication
@Import
(
IdWorkAutoConfiguration
.
class
)
public
class
OfficeApplication
{
...
...
@@ -26,6 +25,25 @@ public class OfficeApplication {
SpringApplication
.
run
(
OfficeApplication
.
class
,
args
);
}
/**
* 文件上传配置
* @return4r
*/
@Bean
public
MultipartConfigElement
multipartConfigElement
()
{
MultipartConfigFactory
factory
=
new
MultipartConfigFactory
();
//单个文件最大
factory
.
setMaxFileSize
(
"200MB"
);
//KB,MB
/// 设置总上传数据总大小
factory
.
setMaxRequestSize
(
"200MB"
);
return
factory
.
createMultipartConfig
();
}
/* @PostConstruct
private void initSeq(){
...
...
@@ -35,4 +53,4 @@ public class OfficeApplication {
}*/
}
\ No newline at end of file
}
src/main/java/io/office/modules/manage/controller/NewsMovieController.java
View file @
cf82092c
...
...
@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -85,6 +86,7 @@ public class NewsMovieController extends AbstractController {
public
R
update
(
@RequestBody
NewsMovieEntity
newsMovieEntity
)
{
SysUserEntity
user
=
getUser
();
newsMovieEntity
.
setLasteditor
(
user
.
getUsername
());
newsMovieEntity
.
setUpdatedate
(
new
Date
());
QueryWrapper
<
NewsMovieEntity
>
newsMovieEntityQueryWrapper
=
new
QueryWrapper
<>();
newsMovieEntityQueryWrapper
.
eq
(
"id"
,
newsMovieEntity
.
getId
());
if
(
StringUtils
.
isNotBlank
(
newsMovieEntity
.
getPic
()))
{
...
...
src/main/java/io/office/modules/manage/service/impl/LogLoginServiceImpl.java
View file @
cf82092c
...
...
@@ -91,7 +91,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
JSONObject
jsonObject
=
JSON
.
parseObject
(
s
);
String
status
=
jsonObject
.
getString
(
"status"
);
if
(!
status
.
equals
(
"1"
))
{
throw
new
RRException
(
"登录失败"
+
jsonObject
.
getString
(
"msg"
));
throw
new
RRException
(
jsonObject
.
getString
(
"msg"
));
}
else
{
//登录成功
search
=
"manager"
;
...
...
@@ -142,7 +142,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
String
passwordMD5
=
MD5Util
.
md5Encrypt32Lower
(
passWord
);
//判断密码是否正确
if
(!
passwordMD5
.
equalsIgnoreCase
(
password
))
{
throw
new
RRException
(
"
密码不正确
!"
);
throw
new
RRException
(
"
用户名或密码错误
!"
);
}
//添加登录日志 log_login
...
...
@@ -197,7 +197,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
JSONObject
jsonObject
=
JSON
.
parseObject
(
result
);
String
status
=
jsonObject
.
getString
(
"status"
);
if
(!
status
.
equals
(
"1"
))
{
throw
new
RRException
(
"登录失败"
+
jsonObject
.
getString
(
"msg"
));
throw
new
RRException
(
jsonObject
.
getString
(
"msg"
));
}
else
{
//登录成功
id
=
phone
;
...
...
@@ -259,7 +259,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
String
passwordMD5
=
MD5Util
.
md5Encrypt32Lower
(
passWord
);
//判断密码是否正确
if
(!
passwordMD5
.
equalsIgnoreCase
(
password
))
{
throw
new
RRException
(
"
密码不正确
!"
);
throw
new
RRException
(
"
用户名或密码错误
!"
);
}
//添加登录日志 log_login
}
...
...
src/main/java/io/office/modules/manage/service/impl/NewsMovieServiceImpl.java
View file @
cf82092c
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.DateUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.NewsMovieDao
;
import
io.office.modules.manage.entity.NewsMovieEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.service.NewsMovieService
;
import
io.office.modules.manage.vo.request.NewsMovieEntityVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -13,15 +21,6 @@ import org.springframework.stereotype.Service;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.NewsMovieDao
;
import
io.office.modules.manage.entity.NewsMovieEntity
;
import
io.office.modules.manage.service.NewsMovieService
;
@Service
(
"newsMovieService"
)
...
...
@@ -61,6 +60,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
//newtopicEntityVo.setAuthor(user.getUsername());
newtopicEntityVo
.
setReleasedate
(
date
);
newtopicEntityVo
.
setUpdatedate
(
date
);
newtopicEntityVo
.
setEditor
(
user
.
getUsername
());
newtopicEntityVo
.
setShowtime
(
DateUtils
.
format
(
date
,
DateUtils
.
DATE_PATTERN_1
));
newtopicEntityVo
.
setLasteditor
(
user
.
getUsername
());
if
(
StringUtils
.
isNotBlank
(
newtopicEntityVo
.
getPic
())){
...
...
@@ -70,6 +70,12 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
newtopicEntityVo
.
setStatus
(
0
);
NewsMovieEntity
newsMovieEntity
=
new
NewsMovieEntity
();
BeanUtils
.
copyProperties
(
newtopicEntityVo
,
newsMovieEntity
);
newsMovieEntity
.
setEditor
(
user
.
getUsername
());
newsMovieEntity
.
setReleasedate
(
date
);
newsMovieEntity
.
setUpdatedate
(
date
);
newsMovieEntity
.
setEditor
(
user
.
getUsername
());
newsMovieEntity
.
setShowtime
(
DateUtils
.
format
(
date
,
DateUtils
.
DATE_PATTERN_1
));
newsMovieEntity
.
setLasteditor
(
user
.
getUsername
());
baseMapper
.
insert
(
newsMovieEntity
);
}
...
...
@@ -81,4 +87,4 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
}
}
\ No newline at end of file
}
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