Skip to content

Commit

Permalink
精简代码
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlightL committed Apr 8, 2022
1 parent 4c44430 commit 1d87113
Show file tree
Hide file tree
Showing 632 changed files with 478 additions and 143,196 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@
<groupId>com.qcloud</groupId>
<artifactId>cos_api</artifactId>
<version>5.6.70</version>
<exclusions>
<exclusion>
<artifactId>bcprov-jdk15on</artifactId>
<groupId>org.bouncycastle</groupId>
</exclusion>
</exclusions>
</dependency>

<!-- 查询 ip 对应国家、城市 -->
Expand Down
Binary file removed src/main/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.github.pagehelper.PageInfo;
import com.light.hexo.business.admin.constant.HexoExceptionEnum;
import com.light.hexo.business.admin.model.Album;
import com.light.hexo.business.admin.model.AlbumDetail;
import com.light.hexo.business.admin.service.AlbumDetailService;
import com.light.hexo.business.admin.service.AlbumService;
import com.light.hexo.common.base.BaseController;
Expand Down Expand Up @@ -196,13 +195,12 @@ public Result list(AlbumRequest request) {
/**
* 详情页
* @param id
* @param pageNum
* @param resultMap
* @return
* @throws GlobalException
*/
@GetMapping("/detailUI.html")
public String detailUI(Integer id, Integer pageNum, Map<String,Object> resultMap) throws GlobalException {
public String detailUI(Integer id, Map<String,Object> resultMap) throws GlobalException {
Album album = this.albumService.findById(id);
if (album == null) {
ExceptionUtil.throwEx(HexoExceptionEnum.ERROR_ALBUM_NOT_EXIST);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ public String install(Map<String, Object> resultMap) {

/**
* 安装系统
* @param request
* @param installRequest
* @return
*/
@RequestMapping("/install.json")
@ResponseBody
@OperateLog(value = "安装博客系统", actionType = ActionEnum.INSTALL)
public Result install(@Validated(BaseRequest.Save.class) InstallRequest request, HttpServletRequest httpServletRequest) throws Exception{
public Result install(@Validated(BaseRequest.Save.class) InstallRequest installRequest, HttpServletRequest httpServletRequest) throws Exception{
this.installService.installApplication(
request,
installRequest,
BrowserUtil.getOsName(httpServletRequest),
BrowserUtil.getBrowserName(httpServletRequest),
IpUtil.getIpAddr(httpServletRequest));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,14 @@ public FileResponse upload(FileRequest fileRequest) {

String coverBase64 = fileRequest.getCoverBase64();
if (StringUtils.isNotBlank(coverBase64)) {
// 解密
Base64.Decoder decoder = Base64.getDecoder();

coverBase64 = coverBase64.substring(coverBase64.indexOf(",", 1) + 1);
byte[] data = decoder.decode(coverBase64);
// 处理数据
for (int i = 0; i < data.length; ++i) {
if (data[i] < 0) {
data[i] += 256;
}
}

String filePath = this.configService.getConfigValue(ConfigEnum.LOCAL_FILE_PATH.getName());
String localFilePath = StringUtils.isNotBlank(filePath) ? filePath + File.separator : this.blogProperty.getAttachmentDir();
String coverName = FilenameUtils.getBaseName(fileRequest.getOriginalName()) + "_" + RandomUtil.randomNumbers(6) + ".jpg";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
@Setter
@Getter
public class InstallRequest {
public class InstallRequest extends BaseRequest<Object> {

/**
* 用户名
Expand Down
Loading

0 comments on commit 1d87113

Please sign in to comment.