Commit cf82092c by 吴迪

【修改】渗透修改

parent 83b26d6b
...@@ -333,8 +333,9 @@ ...@@ -333,8 +333,9 @@
<groupId>com.sitech</groupId> <groupId>com.sitech</groupId>
<artifactId>idwork-starter</artifactId> <artifactId>idwork-starter</artifactId>
<version>0.0.1</version> <version>0.0.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/idwork-starter-0.0.1.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>eu.bitwalker</groupId> <groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId> <artifactId>UserAgentUtils</artifactId>
......
...@@ -4,21 +4,20 @@ ...@@ -4,21 +4,20 @@
package io.office; 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.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; 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.PostConstruct; import javax.servlet.MultipartConfigElement;
/** /**
* @author DELL * @author DELL
*/ */
@SpringBootApplication @SpringBootApplication
@Import(IdWorkAutoConfiguration.class)
public class OfficeApplication { public class OfficeApplication {
...@@ -26,6 +25,25 @@ public class OfficeApplication { ...@@ -26,6 +25,25 @@ public class OfficeApplication {
SpringApplication.run(OfficeApplication.class, args); 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 /* @PostConstruct
private void initSeq(){ private void initSeq(){
......
...@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List; import java.util.List;
...@@ -85,6 +86,7 @@ public class NewsMovieController extends AbstractController { ...@@ -85,6 +86,7 @@ public class NewsMovieController extends AbstractController {
public R update(@RequestBody NewsMovieEntity newsMovieEntity) { public R update(@RequestBody NewsMovieEntity newsMovieEntity) {
SysUserEntity user = getUser(); SysUserEntity user = getUser();
newsMovieEntity.setLasteditor(user.getUsername()); newsMovieEntity.setLasteditor(user.getUsername());
newsMovieEntity.setUpdatedate(new Date());
QueryWrapper<NewsMovieEntity> newsMovieEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<NewsMovieEntity> newsMovieEntityQueryWrapper = new QueryWrapper<>();
newsMovieEntityQueryWrapper.eq("id", newsMovieEntity.getId()); newsMovieEntityQueryWrapper.eq("id", newsMovieEntity.getId());
if (StringUtils.isNotBlank(newsMovieEntity.getPic())) { if (StringUtils.isNotBlank(newsMovieEntity.getPic())) {
......
...@@ -91,7 +91,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity ...@@ -91,7 +91,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
JSONObject jsonObject = JSON.parseObject(s); JSONObject jsonObject = JSON.parseObject(s);
String status = jsonObject.getString("status"); String status = jsonObject.getString("status");
if (!status.equals("1")) { if (!status.equals("1")) {
throw new RRException("登录失败" + jsonObject.getString("msg")); throw new RRException( jsonObject.getString("msg"));
} else { } else {
//登录成功 //登录成功
search = "manager"; search = "manager";
...@@ -142,7 +142,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity ...@@ -142,7 +142,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
String passwordMD5 = MD5Util.md5Encrypt32Lower(passWord); String passwordMD5 = MD5Util.md5Encrypt32Lower(passWord);
//判断密码是否正确 //判断密码是否正确
if (!passwordMD5.equalsIgnoreCase(password)) { if (!passwordMD5.equalsIgnoreCase(password)) {
throw new RRException("密码不正确!"); throw new RRException("用户名或密码错误!");
} }
//添加登录日志 log_login //添加登录日志 log_login
...@@ -197,7 +197,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity ...@@ -197,7 +197,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
JSONObject jsonObject = JSON.parseObject(result); JSONObject jsonObject = JSON.parseObject(result);
String status = jsonObject.getString("status"); String status = jsonObject.getString("status");
if (!status.equals("1")) { if (!status.equals("1")) {
throw new RRException("登录失败" + jsonObject.getString("msg")); throw new RRException(jsonObject.getString("msg"));
} else { } else {
//登录成功 //登录成功
id = phone; id = phone;
...@@ -259,7 +259,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity ...@@ -259,7 +259,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
String passwordMD5 = MD5Util.md5Encrypt32Lower(passWord); String passwordMD5 = MD5Util.md5Encrypt32Lower(passWord);
//判断密码是否正确 //判断密码是否正确
if (!passwordMD5.equalsIgnoreCase(password)) { if (!passwordMD5.equalsIgnoreCase(password)) {
throw new RRException("密码不正确!"); throw new RRException("用户名或密码错误!");
} }
//添加登录日志 log_login //添加登录日志 log_login
} }
......
package io.office.modules.manage.service.impl; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.DateUtils; 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.entity.dto.NewsParams;
import io.office.modules.manage.service.NewsMovieService;
import io.office.modules.manage.vo.request.NewsMovieEntityVo; import io.office.modules.manage.vo.request.NewsMovieEntityVo;
import io.office.modules.sys.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -13,15 +21,6 @@ import org.springframework.stereotype.Service; ...@@ -13,15 +21,6 @@ import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; 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") @Service("newsMovieService")
...@@ -61,6 +60,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt ...@@ -61,6 +60,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
//newtopicEntityVo.setAuthor(user.getUsername()); //newtopicEntityVo.setAuthor(user.getUsername());
newtopicEntityVo.setReleasedate(date); newtopicEntityVo.setReleasedate(date);
newtopicEntityVo.setUpdatedate(date); newtopicEntityVo.setUpdatedate(date);
newtopicEntityVo.setEditor(user.getUsername());
newtopicEntityVo.setShowtime(DateUtils.format(date,DateUtils.DATE_PATTERN_1)); newtopicEntityVo.setShowtime(DateUtils.format(date,DateUtils.DATE_PATTERN_1));
newtopicEntityVo.setLasteditor(user.getUsername()); newtopicEntityVo.setLasteditor(user.getUsername());
if(StringUtils.isNotBlank(newtopicEntityVo.getPic())){ if(StringUtils.isNotBlank(newtopicEntityVo.getPic())){
...@@ -70,6 +70,12 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt ...@@ -70,6 +70,12 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
newtopicEntityVo.setStatus(0); newtopicEntityVo.setStatus(0);
NewsMovieEntity newsMovieEntity = new NewsMovieEntity(); NewsMovieEntity newsMovieEntity = new NewsMovieEntity();
BeanUtils.copyProperties(newtopicEntityVo,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); baseMapper.insert(newsMovieEntity);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment