|
@@ -98,18 +98,14 @@ public class SysServiceServiceImpl implements ISysServiceService {
|
|
|
* @param bo 服务列表
|
|
* @param bo 服务列表
|
|
|
* @return 是否新增成功
|
|
* @return 是否新增成功
|
|
|
*/
|
|
*/
|
|
|
- @CacheEvict(cacheNames = CacheNames.SYS_SERVICE, key = "'all'")
|
|
|
|
|
|
|
+ @CacheEvict(cacheNames = CacheNames.SYS_SERVICE, key = "'all'", beforeInvocation = true)
|
|
|
@Override
|
|
@Override
|
|
|
- public SysServiceVo insertByBo(SysServiceBo bo) {
|
|
|
|
|
|
|
+ public boolean insertByBo(SysServiceBo bo) {
|
|
|
SysService add = MapstructUtils.convert(bo, SysService.class);
|
|
SysService add = MapstructUtils.convert(bo, SysService.class);
|
|
|
add.setIntroduction(new String(Base64.getDecoder().decode(bo.getIntroduction()), StandardCharsets.UTF_8));
|
|
add.setIntroduction(new String(Base64.getDecoder().decode(bo.getIntroduction()), StandardCharsets.UTF_8));
|
|
|
add.setOrderInstruction(new String(Base64.getDecoder().decode(bo.getOrderInstruction()), StandardCharsets.UTF_8));
|
|
add.setOrderInstruction(new String(Base64.getDecoder().decode(bo.getOrderInstruction()), StandardCharsets.UTF_8));
|
|
|
validEntityBeforeSave(add);
|
|
validEntityBeforeSave(add);
|
|
|
- boolean flag = baseMapper.insert(add) > 0;
|
|
|
|
|
- if (flag) {
|
|
|
|
|
- bo.setId(add.getId());
|
|
|
|
|
- }
|
|
|
|
|
- return baseMapper.selectVoById(bo.getId());
|
|
|
|
|
|
|
+ return baseMapper.insert(add) > 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -118,16 +114,14 @@ public class SysServiceServiceImpl implements ISysServiceService {
|
|
|
* @param bo 服务列表
|
|
* @param bo 服务列表
|
|
|
* @return 是否修改成功
|
|
* @return 是否修改成功
|
|
|
*/
|
|
*/
|
|
|
- @CacheEvict(cacheNames = CacheNames.SYS_SERVICE, key = "'all'")
|
|
|
|
|
|
|
+ @CacheEvict(cacheNames = CacheNames.SYS_SERVICE, key = "'all'", beforeInvocation = true)
|
|
|
@Override
|
|
@Override
|
|
|
- public SysServiceVo updateByBo(SysServiceBo bo) {
|
|
|
|
|
|
|
+ public boolean updateByBo(SysServiceBo bo) {
|
|
|
SysService update = MapstructUtils.convert(bo, SysService.class);
|
|
SysService update = MapstructUtils.convert(bo, SysService.class);
|
|
|
update.setIntroduction(new String(Base64.getDecoder().decode(bo.getIntroduction()), StandardCharsets.UTF_8));
|
|
update.setIntroduction(new String(Base64.getDecoder().decode(bo.getIntroduction()), StandardCharsets.UTF_8));
|
|
|
update.setOrderInstruction(new String(Base64.getDecoder().decode(bo.getOrderInstruction()), StandardCharsets.UTF_8));
|
|
update.setOrderInstruction(new String(Base64.getDecoder().decode(bo.getOrderInstruction()), StandardCharsets.UTF_8));
|
|
|
validEntityBeforeSave(update);
|
|
validEntityBeforeSave(update);
|
|
|
- boolean flag = baseMapper.updateById(update) > 0;
|
|
|
|
|
- if (flag) {}
|
|
|
|
|
- return baseMapper.selectVoById(bo.getId());
|
|
|
|
|
|
|
+ return baseMapper.updateById(update) > 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -144,7 +138,7 @@ public class SysServiceServiceImpl implements ISysServiceService {
|
|
|
* @param isValid 是否进行有效性校验
|
|
* @param isValid 是否进行有效性校验
|
|
|
* @return 是否删除成功
|
|
* @return 是否删除成功
|
|
|
*/
|
|
*/
|
|
|
- @CacheEvict(cacheNames = CacheNames.SYS_SERVICE, key = "'all'")
|
|
|
|
|
|
|
+ @CacheEvict(cacheNames = CacheNames.SYS_SERVICE, key = "'all'", beforeInvocation = true)
|
|
|
@Override
|
|
@Override
|
|
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
|
if(isValid){
|
|
if(isValid){
|