【log】整理登录日志业务

pull/3/head
fengshuonan 2021-02-08 17:51:16 +08:00
parent 9432ae22aa
commit 105821c1f4
36 changed files with 102 additions and 769 deletions

View File

@ -1,3 +1,27 @@
/*
* Copyright [2020-2030] [https://www.stylefeng.cn]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GunsAPACHE LICENSE 2.0使
*
* 1.LICENSE
* 2.Guns
* 3.
* 4. https://gitee.com/stylefeng/guns
* 5. https://gitee.com/stylefeng/guns
* 6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.rule.constants; package cn.stylefeng.roses.kernel.rule.constants;
/** /**

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.rule.enums; package cn.stylefeng.roses.kernel.rule.enums;
import lombok.Getter; import lombok.Getter;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.rule.exception.base; package cn.stylefeng.roses.kernel.rule.exception.base;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum; import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.config.modular.entity; package cn.stylefeng.roses.kernel.config.modular.entity;
import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity; import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.config.modular.service; package cn.stylefeng.roses.kernel.config.modular.service;
import cn.stylefeng.roses.kernel.config.modular.entity.SysConfig; import cn.stylefeng.roses.kernel.config.modular.entity.SysConfig;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.sms.modular.enums; package cn.stylefeng.roses.kernel.sms.modular.enums;
import lombok.Getter; import lombok.Getter;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.sms.modular.enums; package cn.stylefeng.roses.kernel.sms.modular.enums;
import lombok.Getter; import lombok.Getter;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.timer.api.enums; package cn.stylefeng.roses.kernel.timer.api.enums;
import lombok.Getter; import lombok.Getter;

View File

@ -11,7 +11,7 @@ import cn.stylefeng.roses.kernel.system.pojo.SysLoginLogRequest;
public interface LoginLogServiceApi { public interface LoginLogServiceApi {
/** /**
* *
* *
* @param sysLoginLogRequest * @param sysLoginLogRequest
* @author chenjinlong * @author chenjinlong
@ -20,7 +20,7 @@ public interface LoginLogServiceApi {
void add(SysLoginLogRequest sysLoginLogRequest); void add(SysLoginLogRequest sysLoginLogRequest);
/** /**
* *
* *
* @param userId id * @param userId id
* @author chenjinlong * @author chenjinlong
@ -29,7 +29,7 @@ public interface LoginLogServiceApi {
void loginSuccess(Long userId); void loginSuccess(Long userId);
/** /**
* *
* *
* @param userId id * @param userId id
* @param llgMessage * @param llgMessage
@ -39,7 +39,7 @@ public interface LoginLogServiceApi {
void loginFail(Long userId, String llgMessage); void loginFail(Long userId, String llgMessage);
/** /**
* * 退
* *
* @param userId id * @param userId id
* @author chenjinlong * @author chenjinlong
@ -48,7 +48,7 @@ public interface LoginLogServiceApi {
void loginOutSuccess(Long userId); void loginOutSuccess(Long userId);
/** /**
* * 退
* *
* @param userId id * @param userId id
* @author chenjinlong * @author chenjinlong
@ -57,10 +57,11 @@ public interface LoginLogServiceApi {
void loginOutFail(Long userId); void loginOutFail(Long userId);
/** /**
* *
* *
* @author chenjinlong * @author chenjinlong
* @date 2021/1/13 10:55 * @date 2021/1/13 10:55
*/ */
void deleteAll(); void deleteAll();
} }

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.system.exception.enums; package cn.stylefeng.roses.kernel.system.exception.enums;
import cn.stylefeng.roses.kernel.rule.constants.RuleConstants; import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.system.exception.enums; package cn.stylefeng.roses.kernel.system.exception.enums;
import cn.stylefeng.roses.kernel.rule.constants.RuleConstants; import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.system.exception.enums; package cn.stylefeng.roses.kernel.system.exception.enums;
import cn.stylefeng.roses.kernel.rule.constants.RuleConstants; import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;

View File

@ -1,28 +1,4 @@
/* package cn.stylefeng.roses.kernel.system.exception.enums.app;
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.system.exception.enums;
import cn.stylefeng.roses.kernel.rule.constants.RuleConstants; import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum; import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;

View File

@ -0,0 +1,37 @@
package cn.stylefeng.roses.kernel.system.exception.enums.log;
import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import cn.stylefeng.roses.kernel.system.constants.SystemConstants;
import lombok.Getter;
/**
*
*
* @author fengshuonan
* @date 2021/2/8 17:45
*/
@Getter
public enum LogExceptionEnum implements AbstractExceptionEnum {
/**
*
*/
LOG_NOT_EXIST(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + SystemConstants.SYSTEM_EXCEPTION_STEP_CODE + "21", "日志不存在");
/**
*
*/
private final String errorCode;
/**
*
*/
private final String userTip;
LogExceptionEnum(String errorCode, String userTip) {
this.errorCode = errorCode;
this.userTip = userTip;
}
}

View File

@ -1,32 +1,7 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.system.pojo.role.request; package cn.stylefeng.roses.kernel.system.pojo.role.request;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest; import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.roses.kernel.validator.validators.unique.TableUniqueValue; import cn.stylefeng.roses.kernel.validator.validators.unique.TableUniqueValue;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -1,34 +1,6 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.system.pojo.role.response; package cn.stylefeng.roses.kernel.system.pojo.role.response;
import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity; import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
/** /**

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.app.modular.mapper; package cn.stylefeng.roses.kernel.app.modular.mapper;
import cn.stylefeng.roses.kernel.app.modular.entity.SysApp; import cn.stylefeng.roses.kernel.app.modular.entity.SysApp;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.app.modular.service; package cn.stylefeng.roses.kernel.app.modular.service;
import cn.stylefeng.roses.kernel.app.modular.entity.SysApp; import cn.stylefeng.roses.kernel.app.modular.entity.SysApp;

View File

@ -15,7 +15,7 @@ import cn.stylefeng.roses.kernel.rule.pojo.dict.SimpleDict;
import cn.stylefeng.roses.kernel.system.AppServiceApi; import cn.stylefeng.roses.kernel.system.AppServiceApi;
import cn.stylefeng.roses.kernel.system.MenuServiceApi; import cn.stylefeng.roses.kernel.system.MenuServiceApi;
import cn.stylefeng.roses.kernel.system.exception.SystemModularException; import cn.stylefeng.roses.kernel.system.exception.SystemModularException;
import cn.stylefeng.roses.kernel.system.exception.enums.AppExceptionEnum; import cn.stylefeng.roses.kernel.system.exception.enums.app.AppExceptionEnum;
import cn.stylefeng.roses.kernel.system.pojo.app.SysAppRequest; import cn.stylefeng.roses.kernel.system.pojo.app.SysAppRequest;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;

View File

@ -24,7 +24,6 @@ public class SysLoginLogController {
@Resource @Resource
private SysLoginLogService sysLoginLogService; private SysLoginLogService sysLoginLogService;
/** /**
* *
* *
@ -37,7 +36,6 @@ public class SysLoginLogController {
return new SuccessResponseData(); return new SuccessResponseData();
} }
/** /**
* *
* *
@ -57,8 +55,7 @@ public class SysLoginLogController {
*/ */
@GetResource(name = "分页查询登录日志", path = "/loginLog/page") @GetResource(name = "分页查询登录日志", path = "/loginLog/page")
public ResponseData page(SysLoginLogRequest sysLoginLogRequest) { public ResponseData page(SysLoginLogRequest sysLoginLogRequest) {
return new SuccessResponseData(sysLoginLogService.page(sysLoginLogRequest)); return new SuccessResponseData(sysLoginLogService.findPage(sysLoginLogRequest));
} }
} }

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.loginlog.modular.mapper; package cn.stylefeng.roses.kernel.loginlog.modular.mapper;
import cn.stylefeng.roses.kernel.loginlog.modular.entity.SysLoginLog; import cn.stylefeng.roses.kernel.loginlog.modular.entity.SysLoginLog;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.loginlog.modular.service; package cn.stylefeng.roses.kernel.loginlog.modular.service;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult; import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
@ -38,7 +14,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface SysLoginLogService extends IService<SysLoginLog>, LoginLogServiceApi { public interface SysLoginLogService extends IService<SysLoginLog>, LoginLogServiceApi {
/** /**
* *
* *
@ -48,7 +23,6 @@ public interface SysLoginLogService extends IService<SysLoginLog>, LoginLogServi
*/ */
void del(SysLoginLogRequest sysLoginLogRequest); void del(SysLoginLogRequest sysLoginLogRequest);
/** /**
* *
* *
@ -65,7 +39,6 @@ public interface SysLoginLogService extends IService<SysLoginLog>, LoginLogServi
* @author chenjinlong * @author chenjinlong
* @date 2021/1/13 10:57 * @date 2021/1/13 10:57
*/ */
PageResult<SysLoginLog> page(SysLoginLogRequest sysLoginLogRequest); PageResult<SysLoginLog> findPage(SysLoginLogRequest sysLoginLogRequest);
} }

View File

@ -12,7 +12,7 @@ import cn.stylefeng.roses.kernel.loginlog.modular.mapper.SysLoginLogMapper;
import cn.stylefeng.roses.kernel.loginlog.modular.service.SysLoginLogService; import cn.stylefeng.roses.kernel.loginlog.modular.service.SysLoginLogService;
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException; import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
import cn.stylefeng.roses.kernel.rule.util.HttpServletUtil; import cn.stylefeng.roses.kernel.rule.util.HttpServletUtil;
import cn.stylefeng.roses.kernel.system.exception.enums.AppExceptionEnum; import cn.stylefeng.roses.kernel.system.exception.enums.log.LogExceptionEnum;
import cn.stylefeng.roses.kernel.system.pojo.SysLoginLogRequest; import cn.stylefeng.roses.kernel.system.pojo.SysLoginLogRequest;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -28,6 +28,26 @@ import org.springframework.stereotype.Service;
@Service @Service
public class SysLoginLogServiceImpl extends ServiceImpl<SysLoginLogMapper, SysLoginLog> implements SysLoginLogService { public class SysLoginLogServiceImpl extends ServiceImpl<SysLoginLogMapper, SysLoginLog> implements SysLoginLogService {
@Override
public void del(SysLoginLogRequest sysLoginLogRequest) {
SysLoginLog sysLoginLog = this.querySysLoginLogById(sysLoginLogRequest);
this.removeById(sysLoginLog.getLlgId());
}
@Override
public SysLoginLog detail(SysLoginLogRequest sysLoginLogRequest) {
LambdaQueryWrapper<SysLoginLog> queryWrapper = this.createWrapper(sysLoginLogRequest);
return this.getOne(queryWrapper, false);
}
@Override
public PageResult<SysLoginLog> findPage(SysLoginLogRequest sysLoginLogRequest) {
LambdaQueryWrapper<SysLoginLog> wrapper = createWrapper(sysLoginLogRequest);
wrapper.orderByDesc(SysLoginLog::getCreateTime);
Page<SysLoginLog> page = this.page(PageFactory.defaultPage(), wrapper);
return PageResultFactory.createPageResult(page);
}
@Override @Override
public void add(SysLoginLogRequest sysLoginLogRequest) { public void add(SysLoginLogRequest sysLoginLogRequest) {
SysLoginLog sysLoginLog = new SysLoginLog(); SysLoginLog sysLoginLog = new SysLoginLog();
@ -84,26 +104,6 @@ public class SysLoginLogServiceImpl extends ServiceImpl<SysLoginLogMapper, SysLo
this.remove(null); this.remove(null);
} }
@Override
public void del(SysLoginLogRequest sysLoginLogRequest) {
SysLoginLog sysLoginLog = this.querySysLoginLogById(sysLoginLogRequest);
this.removeById(sysLoginLog.getLlgId());
}
@Override
public SysLoginLog detail(SysLoginLogRequest sysLoginLogRequest) {
LambdaQueryWrapper<SysLoginLog> queryWrapper = this.createWrapper(sysLoginLogRequest);
return this.getOne(queryWrapper, false);
}
@Override
public PageResult<SysLoginLog> page(SysLoginLogRequest sysLoginLogRequest) {
LambdaQueryWrapper<SysLoginLog> wrapper = createWrapper(sysLoginLogRequest);
wrapper.orderByDesc(SysLoginLog::getCreateTime);
Page<SysLoginLog> page = this.page(PageFactory.defaultPage(), wrapper);
return PageResultFactory.createPageResult(page);
}
/** /**
* *
* *
@ -113,7 +113,7 @@ public class SysLoginLogServiceImpl extends ServiceImpl<SysLoginLogMapper, SysLo
private SysLoginLog querySysLoginLogById(SysLoginLogRequest sysLoginLogRequest) { private SysLoginLog querySysLoginLogById(SysLoginLogRequest sysLoginLogRequest) {
SysLoginLog sysLoginLog = this.getById(sysLoginLogRequest.getLlgId()); SysLoginLog sysLoginLog = this.getById(sysLoginLogRequest.getLlgId());
if (ObjectUtil.isNull(sysLoginLog)) { if (ObjectUtil.isNull(sysLoginLog)) {
throw new ServiceException(AppExceptionEnum.APP_NOT_EXIST); throw new ServiceException(LogExceptionEnum.LOG_NOT_EXIST);
} }
return sysLoginLog; return sysLoginLog;
} }
@ -127,6 +127,10 @@ public class SysLoginLogServiceImpl extends ServiceImpl<SysLoginLogMapper, SysLo
private LambdaQueryWrapper<SysLoginLog> createWrapper(SysLoginLogRequest sysLoginLogRequest) { private LambdaQueryWrapper<SysLoginLog> createWrapper(SysLoginLogRequest sysLoginLogRequest) {
LambdaQueryWrapper<SysLoginLog> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SysLoginLog> queryWrapper = new LambdaQueryWrapper<>();
if (ObjectUtil.isEmpty(sysLoginLogRequest)) {
return queryWrapper;
}
// SQL条件拼接 // SQL条件拼接
queryWrapper.eq(StrUtil.isNotBlank(sysLoginLogRequest.getLlgName()), SysLoginLog::getLlgName, sysLoginLogRequest.getLlgName()); queryWrapper.eq(StrUtil.isNotBlank(sysLoginLogRequest.getLlgName()), SysLoginLog::getLlgName, sysLoginLogRequest.getLlgName());
queryWrapper.ge(StrUtil.isNotBlank(sysLoginLogRequest.getBeginTime()), SysLoginLog::getCreateTime, sysLoginLogRequest.getBeginTime()); queryWrapper.ge(StrUtil.isNotBlank(sysLoginLogRequest.getBeginTime()), SysLoginLog::getCreateTime, sysLoginLogRequest.getBeginTime());

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.menu.modular.service; package cn.stylefeng.roses.kernel.menu.modular.service;
import cn.stylefeng.roses.kernel.menu.modular.entity.SysMenu; import cn.stylefeng.roses.kernel.menu.modular.entity.SysMenu;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.menu.modular.service.impl; package cn.stylefeng.roses.kernel.menu.modular.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.entity; package cn.stylefeng.roses.kernel.role.modular.entity;
import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity; import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.entity; package cn.stylefeng.roses.kernel.role.modular.entity;
import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity; import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.entity; package cn.stylefeng.roses.kernel.role.modular.entity;
import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity; import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.mapper; package cn.stylefeng.roses.kernel.role.modular.mapper;
import cn.stylefeng.roses.kernel.role.modular.entity.SysRoleDataScope; import cn.stylefeng.roses.kernel.role.modular.entity.SysRoleDataScope;

View File

@ -1,31 +1,7 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.mapper; package cn.stylefeng.roses.kernel.role.modular.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.roses.kernel.role.modular.entity.SysRole; import cn.stylefeng.roses.kernel.role.modular.entity.SysRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
* mapper * mapper

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.mapper; package cn.stylefeng.roses.kernel.role.modular.mapper;
import cn.stylefeng.roses.kernel.role.modular.entity.SysRoleResource; import cn.stylefeng.roses.kernel.role.modular.entity.SysRoleResource;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.service; package cn.stylefeng.roses.kernel.role.modular.service;
import cn.stylefeng.roses.kernel.role.modular.entity.SysRoleResource; import cn.stylefeng.roses.kernel.role.modular.entity.SysRoleResource;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.service; package cn.stylefeng.roses.kernel.role.modular.service;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult; import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.service.impl; package cn.stylefeng.roses.kernel.role.modular.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;

View File

@ -1,30 +1,5 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.service.impl; package cn.stylefeng.roses.kernel.role.modular.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.stylefeng.roses.kernel.role.modular.entity.SysRoleResource; import cn.stylefeng.roses.kernel.role.modular.entity.SysRoleResource;
import cn.stylefeng.roses.kernel.role.modular.mapper.SysRoleResourceMapper; import cn.stylefeng.roses.kernel.role.modular.mapper.SysRoleResourceMapper;
import cn.stylefeng.roses.kernel.role.modular.service.SysRoleResourceService; import cn.stylefeng.roses.kernel.role.modular.service.SysRoleResourceService;
@ -47,7 +22,6 @@ import java.util.List;
public class SysRoleResourceServiceImpl extends ServiceImpl<SysRoleResourceMapper, SysRoleResource> implements SysRoleResourceService { public class SysRoleResourceServiceImpl extends ServiceImpl<SysRoleResourceMapper, SysRoleResource> implements SysRoleResourceService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void grantResource(SysRoleRequest sysRoleRequest) { public void grantResource(SysRoleRequest sysRoleRequest) {

View File

@ -1,27 +1,3 @@
/*
Copyright [2020] [https://www.stylefeng.cn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GunsAPACHE LICENSE 2.0使
1.LICENSE
2.Guns
3.
4. https://gitee.com/stylefeng/guns-separation
5. https://gitee.com/stylefeng/guns-separation
6.Guns https://www.stylefeng.cn
*/
package cn.stylefeng.roses.kernel.role.modular.service.impl; package cn.stylefeng.roses.kernel.role.modular.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;