Merge pull request #68 from linhaojun857/dev

merge dev
master
linhaojun857 3 years ago committed by GitHub
commit a08e4fc2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,4 +8,5 @@ import org.springframework.stereotype.Service;
@Service
public class ArticleTagServiceImpl extends ServiceImpl<ArticleTagMapper, ArticleTag> implements ArticleTagService {
}

@ -68,7 +68,6 @@ public class AuroraInfoServiceImpl implements AuroraInfoService {
@Autowired
private HttpServletRequest request;
@Override
public void report() {
String ipAddress = IpUtil.getIpAddress(request);
@ -204,4 +203,5 @@ public class AuroraInfoServiceImpl implements AuroraInfoService {
.sorted(Comparator.comparingInt(ArticleRankDTO::getViewsCount).reversed())
.collect(Collectors.toList());
}
}

@ -33,7 +33,6 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
@Autowired
private ArticleMapper articleMapper;
@Override
public List<CategoryDTO> listCategories() {
return categoryMapper.listCategories();
@ -85,4 +84,5 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
.build();
this.saveOrUpdate(category);
}
}

@ -19,7 +19,6 @@ import java.util.List;
@Service
public class ExceptionLogServiceImpl extends ServiceImpl<ExceptionLogMapper, ExceptionLog> implements ExceptionLogService {
@Override
public PageResultDTO<ExceptionLogDTO> listExceptionLogs(ConditionVO conditionVO) {
Page<ExceptionLog> page = new Page<>(PageUtil.getCurrent(), PageUtil.getSize());
@ -29,4 +28,5 @@ public class ExceptionLogServiceImpl extends ServiceImpl<ExceptionLogMapper, Exc
List<ExceptionLogDTO> exceptionLogDTOs = BeanCopyUtil.copyList(exceptionLogPage.getRecords(), ExceptionLogDTO.class);
return new PageResultDTO<>(exceptionLogDTOs, (int) exceptionLogPage.getTotal());
}
}

@ -16,7 +16,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@ -41,11 +40,10 @@ public class FriendLinkServiceImpl extends ServiceImpl<FriendLinkMapper, FriendL
return new PageResultDTO<>(friendLinkBackDTOs, (int) friendLinkPage.getTotal());
}
//todo 这里事务其实可以不用加,单条失败数据库会自己回滚
@Transactional(rollbackFor = Exception.class)
@Override
public void saveOrUpdateFriendLink(FriendLinkVO friendLinkVO) {
FriendLink friendLink = BeanCopyUtil.copyObject(friendLinkVO, FriendLink.class);
this.saveOrUpdate(friendLink);
}
}

@ -22,7 +22,6 @@ import java.util.Objects;
@Service
public class JobLogServiceImpl extends ServiceImpl<JobLogMapper, JobLog> implements JobLogService {
@Autowired
private JobLogMapper jobLogMapper;
@ -60,4 +59,5 @@ public class JobLogServiceImpl extends ServiceImpl<JobLogMapper, JobLog> impleme
public List<String> listJobLogGroups() {
return jobLogMapper.listJobLogGroups();
}
}

@ -100,10 +100,8 @@ public class JobServiceImpl extends ServiceImpl<JobMapper, Job> implements JobSe
return new PageResultDTO<>(jobDTOs, asyncCount.get());
}
//todo 同理可不加事务
@SneakyThrows
@Override
@Transactional(rollbackFor = Exception.class)
public void updateJobStatus(JobStatusVO jobStatusVO) {
Job job = jobMapper.selectById(jobStatusVO.getId());
if (job.getStatus().equals(jobStatusVO.getStatus())) {

@ -171,4 +171,5 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements Me
return userMenuDTO;
}).collect(Collectors.toList());
}
}

@ -30,4 +30,5 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope
List<OperationLogDTO> operationLogDTOs = BeanCopyUtil.copyList(operationLogPage.getRecords(), OperationLogDTO.class);
return new PageResultDTO<>(operationLogDTOs, (int) operationLogPage.getTotal());
}
}

@ -138,5 +138,4 @@ public class PhotoServiceImpl extends ServiceImpl<PhotoMapper, Photo> implements
.build();
}
}

@ -2,6 +2,7 @@ package com.aurora.service.impl;
import com.aurora.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.data.geo.Distance;
import org.springframework.data.geo.GeoResults;
@ -13,7 +14,6 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ZSetOperations;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@ -23,8 +23,10 @@ import java.util.stream.Collectors;
@Service
@SuppressWarnings("all")
public class RedisServiceImpl implements RedisService {
@Resource
@Autowired
private RedisTemplate<String, Object> redisTemplate;
@Override

@ -171,4 +171,5 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource> i
.filter(item -> Objects.nonNull(item.getParentId()))
.collect(Collectors.groupingBy(Resource::getParentId));
}
}

@ -8,4 +8,5 @@ import org.springframework.stereotype.Service;
@Service
public class RoleMenuServiceImpl extends ServiceImpl<RoleMenuMapper, RoleMenu> implements RoleMenuService {
}

@ -8,4 +8,5 @@ import org.springframework.stereotype.Service;
@Service
public class RoleResourceServiceImpl extends ServiceImpl<RoleResourceMapper, RoleResource> implements RoleResourceService {
}

@ -85,5 +85,6 @@ public class TagServiceImpl extends ServiceImpl<TagMapper, Tag> implements TagSe
}
tagMapper.deleteBatchIds(tagIds);
}
}

@ -79,7 +79,7 @@ public class UserAuthServiceImpl implements UserAuthService {
map.put("content", "您的验证码为 " + code + " 有效期15分钟请不要告诉他人哦");
EmailDTO emailDTO = EmailDTO.builder()
.email(username)
.subject("验证码")
.subject(CommonConstant.CAPTCHA)
.template("common.html")
.commentMap(map)
.build();
@ -155,6 +155,7 @@ public class UserAuthServiceImpl implements UserAuthService {
}
@Override
@SuppressWarnings("all")
public void updateAdminPassword(PasswordVO passwordVO) {
UserAuth user = userAuthMapper.selectOne(new LambdaQueryWrapper<UserAuth>()
.eq(UserAuth::getId, UserUtil.getUserDetailsDTO().getId()));
@ -202,5 +203,4 @@ public class UserAuthServiceImpl implements UserAuthService {
return Objects.nonNull(userAuth);
}
}

@ -82,4 +82,5 @@ public class UserDetailServiceImpl implements UserDetailsService {
.lastLoginTime(LocalDateTime.now())
.build();
}
}

@ -170,4 +170,5 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
UserInfo userInfo = userInfoMapper.selectById(id);
return BeanCopyUtil.copyObject(userInfo, UserInfoDTO.class);
}
}

@ -8,4 +8,5 @@ import org.springframework.stereotype.Service;
@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {
}

Loading…
Cancel
Save