领导履职代码迁移

This commit is contained in:
马三炮 2025-05-16 18:38:06 +08:00
parent 7804bdf251
commit dc8461ceee
89 changed files with 520 additions and 964 deletions

View File

@ -8,7 +8,7 @@ import com.bonus.common.core.web.domain.BaseEntity;
/**
* 系统访问记录表 sys_logininfor
*
*
* @author bonus
*/
public class SysLogininfor extends BaseEntity
@ -23,6 +23,8 @@ public class SysLogininfor extends BaseEntity
@Excel(name = "用户账号")
private String userName;
@Excel(name = "用户名")
private String nickName;
/** 状态 0成功 1失败 */
@Excel(name = "状态", readConverterExp = "0=成功,1=失败")
private String status;
@ -31,6 +33,18 @@ public class SysLogininfor extends BaseEntity
@Excel(name = "地址")
private String ipaddr;
/** 登录地点 */
@Excel(name = "登录地点")
private String loginLocation;
/** 浏览器类型 */
@Excel(name = "浏览器")
private String browser;
/** 操作系统 */
@Excel(name = "操作系统")
private String os;
/** 描述 */
@Excel(name = "描述")
private String msg;
@ -40,6 +54,7 @@ public class SysLogininfor extends BaseEntity
@Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date accessTime;
public Long getInfoId()
{
return infoId;
@ -99,4 +114,36 @@ public class SysLogininfor extends BaseEntity
{
this.accessTime = accessTime;
}
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getLoginLocation() {
return loginLocation;
}
public void setLoginLocation(String loginLocation) {
this.loginLocation = loginLocation;
}
public String getBrowser() {
return browser;
}
public void setBrowser(String browser) {
this.browser = browser;
}
public String getOs() {
return os;
}
public void setOs(String os) {
this.os = os;
}
}

View File

@ -10,7 +10,7 @@ import javax.validation.constraints.Size;
/**
* 通知公告表 sys_notice
*
*
* @author bonus
*/
public class SysNotice extends BaseEntity
@ -31,6 +31,13 @@ public class SysNotice extends BaseEntity
/** 公告状态0正常 1关闭 */
private String status;
private Long userId; // 登录用户
private String isRead = "0"; // 是否已读 0 未读 1 已读
private String fileUrls; // 文件地址
private String showType = "1"; // 1所有人员可见2部分人员可见
private String receiveUserIds; // 接收人员ID
public Long getNoticeId()
{
@ -85,6 +92,46 @@ public class SysNotice extends BaseEntity
return status;
}
public String getIsRead() {
return isRead;
}
public void setIsRead(String isRead) {
this.isRead = isRead;
}
public String getFileUrls() {
return fileUrls;
}
public void setFileUrls(String fileUrls) {
this.fileUrls = fileUrls;
}
public String getShowType() {
return showType;
}
public void setShowType(String showType) {
this.showType = showType;
}
public String getReceiveUserIds() {
return receiveUserIds;
}
public void setReceiveUserIds(String receiveUserIds) {
this.receiveUserIds = receiveUserIds;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -9,7 +9,7 @@ import org.apache.ibatis.type.Alias;
/**
* 操作日志记录表 oper_log
*
*
* @author bonus
*/
@Alias("SysOperLog")
@ -21,6 +21,10 @@ public class SysOperLog extends BaseEntity
@Excel(name = "操作序号", cellType = ColumnType.NUMERIC)
private Long operId;
@Excel(name = "操作功能")
private String moduleName;
/** 操作模块 */
@Excel(name = "操作模块")
private String title;
@ -85,6 +89,26 @@ public class SysOperLog extends BaseEntity
@Excel(name = "消耗时间", suffix = "毫秒")
private Long costTime;
/** 操作地点 */
// @Excel(name = "操作地点")
private String operLocation;
public String getModuleName() {
return moduleName;
}
public void setModuleName(String moduleName) {
this.moduleName = moduleName;
}
public String getOperLocation() {
return operLocation;
}
public void setOperLocation(String operLocation) {
this.operLocation = operLocation;
}
public Long getOperId()
{
return operId;

View File

@ -48,6 +48,10 @@
<groupId>com.bonus</groupId>
<artifactId>bonus-common-security</artifactId>
</dependency>
<dependency>
<groupId>com.bonus</groupId>
<artifactId>bonus-common-redis</artifactId>
</dependency>
<!--加密依赖包-->
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
@ -112,6 +116,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<classifier>exec</classifier>
</configuration>
<executions>
<execution>
<goals>

View File

@ -1,5 +0,0 @@
package com.bonus.auth.form;
public enum LoginType {
PASSWORD, MOBILE
}

View File

@ -1,8 +1,11 @@
package com.bonus.common.core.utils.file;
import com.bonus.common.core.constant.HttpStatus;
import com.bonus.common.core.utils.StringUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
@ -316,4 +319,26 @@ public class FileUtils {
// 返回带前缀的 Base64 字符串
return prefix + base64Encoded;
}
public static String setResponseHeaderByUrl(HttpServletResponse response, String url) {
String safeFileName = com.bonus.common.core.utils.file.FileUtils.getName(url);
if (!StringUtils.hasText(safeFileName)) {
response.setStatus(HttpStatus.BAD_REQUEST);
return null;
}
try {
String encodedFileName = URLEncoder.encode(safeFileName, StandardCharsets.UTF_8.toString());
if (encodedFileName == null) {
response.setStatus(HttpStatus.BAD_REQUEST);
return null;
}
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + encodedFileName + "\"");
return encodedFileName;
} catch (UnsupportedEncodingException e) {
response.setStatus(HttpStatus.BAD_REQUEST);
return null;
}
}
}

View File

@ -1,79 +0,0 @@
package com.bonus.common.core.web.domain;
import java.util.ArrayList;
import java.util.List;
/**
* Tree基类
*
* @author bonus
*/
public class TreeEntity extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 父菜单名称 */
private String parentName;
/** 父菜单ID */
private Long parentId;
/** 显示顺序 */
private Integer orderNum;
/** 祖级列表 */
private String ancestors;
/** 子部门 */
private List<?> children = new ArrayList<>();
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
public Integer getOrderNum()
{
return orderNum;
}
public void setOrderNum(Integer orderNum)
{
this.orderNum = orderNum;
}
public String getAncestors()
{
return ancestors;
}
public void setAncestors(String ancestors)
{
this.ancestors = ancestors;
}
public List<?> getChildren()
{
return children;
}
public void setChildren(List<?> children)
{
this.children = children;
}
}

View File

@ -1,3 +1,4 @@
/*
package com.bonus.common.datasource.annotation;
import java.lang.annotation.Documented;
@ -7,11 +8,13 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.baomidou.dynamic.datasource.annotation.DS;
*/
/**
* 主库数据源
*
*
* @author bonus
*/
*//*
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@ -20,3 +23,4 @@ public @interface Master
{
}
*/

View File

@ -1,3 +1,4 @@
/*
package com.bonus.common.datasource.annotation;
import java.lang.annotation.Documented;
@ -7,11 +8,13 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.baomidou.dynamic.datasource.annotation.DS;
*/
/**
* 从库数据源
*
*
* @author bonus
*/
*//*
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@ -20,3 +23,4 @@ public @interface Slave
{
}
*/

View File

@ -119,6 +119,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<classifier>exec</classifier>
</configuration>
<executions>
<execution>
<goals>

View File

@ -99,7 +99,7 @@ public class OssServiceImpl implements ISysFileService {
}
OSSObject ossObject = ossObjectR.getData();
com.bonus.file.utils.FileUtils.setResponseHeaderByUrl(response, urlStr);
FileUtils.setResponseHeaderByUrl(response, urlStr);
try (InputStream inputStream = ossObject.getObjectContent();
OutputStream outputStream = response.getOutputStream()) {

View File

@ -48,7 +48,7 @@ public class FileDownloadUtils {
HttpURLConnection connection = (HttpURLConnection) urlNew.openConnection();
connection.setRequestMethod("GET");
com.bonus.file.utils.FileUtils.setResponseHeaderByUrl(response, urlStr);
FileUtils.setResponseHeaderByUrl(response, urlStr);
try {
int code = connection.getResponseCode();
InputStream inputStream = connection.getInputStream();
@ -93,7 +93,7 @@ public class FileDownloadUtils {
ftpClient.enterLocalPassiveMode();
ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
com.bonus.file.utils.FileUtils.setResponseHeaderByUrl(response, urlStr);
FileUtils.setResponseHeaderByUrl(response, urlStr);
try (InputStream inputStream = ftpClient.retrieveFileStream(remoteFilePath);
ServletOutputStream outputStream = response.getOutputStream()) {

View File

@ -1,39 +0,0 @@
package com.bonus.file.utils;
import com.bonus.common.core.constant.HttpStatus;
import com.bonus.common.core.utils.StringUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
public class FileUtils {
/**
* 获取文件名
*/
public static String setResponseHeaderByUrl(HttpServletResponse response, String url) {
String safeFileName = com.bonus.common.core.utils.file.FileUtils.getName(url);
if (!StringUtils.hasText(safeFileName)) {
response.setStatus(HttpStatus.BAD_REQUEST);
return null;
}
try {
String encodedFileName = URLEncoder.encode(safeFileName, StandardCharsets.UTF_8.toString());
if (encodedFileName == null) {
response.setStatus(HttpStatus.BAD_REQUEST);
return null;
}
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + encodedFileName + "\"");
return encodedFileName;
} catch (UnsupportedEncodingException e) {
response.setStatus(HttpStatus.BAD_REQUEST);
return null;
}
}
}

View File

@ -69,6 +69,10 @@
<artifactId>bonus-common-log</artifactId>
</dependency>
<dependency>
<groupId>com.bonus</groupId>
<artifactId>bonus-common-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@ -108,8 +112,17 @@
<groupId>com.bonus</groupId>
<artifactId>bonus-file</artifactId>
<version>${bonus.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>

View File

@ -1,5 +1,6 @@
package com.bonus.ldlz;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@ -8,7 +9,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 领导履职模块
*
*
* @author bonus
*/
/*@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class },scanBasePackages = {
@ -17,9 +18,11 @@ import org.springframework.scheduling.annotation.EnableScheduling;
"com.bonus.system.api",
"com.bonus.common.datasource.annotation",
"com.bonus.common.datascope",
"com.bonus.common.core",
})*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
@MapperScan("com.bonus.ldlz.mapper")
public class BonusLdlzApplication
{
public static void main(String[] args)

View File

@ -25,4 +25,7 @@ public class HandbookIndexVo {
@Excel(name = "问题数")
private Long problemNum;
private String secondContent;
private String firstContent;
}

View File

@ -62,7 +62,7 @@ public interface HandbookIndexMapper extends BaseMapper<HandbookIndex>
List<HandbookIndexVo>selectSecondIndexList(HandbookIndexBo bo);
Map<String,String> selectSecondAndParent(Long id);
HandbookIndexVo selectSecondAndParent(Long id);
/**
* 关联问题记录查询二级目录
*

View File

@ -195,7 +195,14 @@ public class HandbookIndexServiceImpl extends ServiceImpl<HandbookIndexMapper, H
*/
@Override
public Map<String,String> selectSecondAndParent(Long id) {
return handbookIndexMapper.selectSecondAndParent(id);
HandbookIndexVo handbookIndexVo = handbookIndexMapper.selectSecondAndParent(id);
Map<String,String> res = new HashMap<>();
res.put("firstName",handbookIndexVo.getFirstName());
res.put("secondName",handbookIndexVo.getSecondName());
res.put("secondContent",handbookIndexVo.getSecondContent());
res.put("firstContent",handbookIndexVo.getFirstContent());
return res;
}
/**
* 获取二级标题列表(是否存在问题)

View File

@ -1,4 +1,4 @@
package com.bonus.web.config;
package com.bonus.ldlz.web.config;
import com.bonus.common.core.utils.ServletUtils;
import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.common;
package com.bonus.ldlz.web.controller.common;
import com.bonus.common.core.constant.CacheConstants;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.common;
package com.bonus.ldlz.web.controller.common;
import com.bonus.common.core.constant.Constants;
import com.bonus.common.core.utils.StringUtils;
@ -7,7 +7,7 @@ import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.config.LdlzConfig;
import com.bonus.file.utils.FileUploadUtils;
import com.bonus.web.config.ServerConfig;
import com.bonus.ldlz.web.config.ServerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.monitor;
package com.bonus.ldlz.web.controller.monitor;
import com.bonus.common.core.constant.CacheConstants;
import com.bonus.common.core.utils.StringUtils;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.monitor;
package com.bonus.ldlz.web.controller.monitor;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.security.annotation.RequiresPermissions;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.monitor;
package com.bonus.ldlz.web.controller.monitor;
import com.bonus.auth.service.SysPasswordService;
import com.bonus.common.core.utils.poi.ExcelUtil;
@ -7,7 +7,7 @@ import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.system.domain.SysLogininfor;
import com.bonus.system.api.domain.SysLogininfor;
import com.bonus.system.service.ISysLogininforService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.monitor;
package com.bonus.ldlz.web.controller.monitor;
import com.bonus.common.core.utils.poi.ExcelUtil;
@ -7,7 +7,7 @@ import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.system.domain.SysOperLog;
import com.bonus.system.api.domain.SysOperLog;
import com.bonus.system.service.ISysOperLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.monitor;
package com.bonus.ldlz.web.controller.monitor;
import com.bonus.common.core.constant.CacheConstants;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.controller.BaseController;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.constant.UserConstants;
import com.bonus.common.core.utils.StringUtils;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.utils.StringUtils;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.controller.BaseController;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.config.LdlzConfig;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.auth.form.LoginBody;
import com.bonus.auth.service.SysLoginService;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.constant.UserConstants;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.web.controller.BaseController;
@ -10,7 +10,8 @@ import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.utils.SecurityUtils;
import com.bonus.ldlz.domain.SysNoticeViewLog;
import com.bonus.ldlz.service.ISysNoticeViewLogService;
import com.bonus.system.domain.SysNotice;
import com.bonus.system.api.domain.SysNotice;
import com.bonus.system.service.ISysNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.utils.poi.ExcelUtil;
@ -8,12 +8,14 @@ import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.utils.SecurityUtils;
import com.bonus.system.domain.SysPost;
import com.bonus.system.api.domain.SysPost;
import com.bonus.system.service.ISysPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@ -26,7 +28,7 @@ import java.util.List;
@RequestMapping("/system/post")
public class SysPostController extends BaseController
{
@Autowired
@Resource
private ISysPostService postService;
/**

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.utils.StringUtils;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.auth.form.RegisterBody;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.bonus.common.core.utils.StringUtils;
@ -11,8 +11,8 @@ import com.bonus.common.security.utils.SecurityUtils;
import com.bonus.system.api.domain.SysDept;
import com.bonus.system.api.domain.SysRole;
import com.bonus.system.api.domain.SysUser;
import com.bonus.system.api.domain.SysUserRole;
import com.bonus.system.api.model.LoginUser;
import com.bonus.system.domain.SysUserRole;
import com.bonus.system.service.ISysDeptService;
import com.bonus.system.service.ISysRoleService;
import com.bonus.system.service.ISysUserService;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.system;
package com.bonus.ldlz.web.controller.system;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.bonus.common.core.utils.StringUtils;

View File

@ -1,4 +1,4 @@
package com.bonus.web.controller.tool;
package com.bonus.ldlz.web.controller.tool;
import com.bonus.common.core.domain.R;
import com.bonus.common.core.utils.StringUtils;

View File

@ -109,7 +109,7 @@
order by i1.create_time desc,i1.sort desc
</select>
<select id="selectSecondAndParent" parameterType="Long"
resultType="HashMap">
resultType="com.bonus.ldlz.domain.vo.HandbookIndexVo">
select i.name as secondName,i2.name as firstName,i.content as secondContent,i2.content as firstContent
from handbook_index i left join handbook_index i2 on i2.id=i.p_id
<where>i.id=#{id}</where>

View File

@ -26,8 +26,8 @@
select id, record_id, index_id, type, remark, responsible_person, del_flag, create_time, update_time, create_by, update_by, zg_type, zg_img, img, zg_remark from ldlz_record_problem
</sql>
<select id="selectLdlzRecordProblemList" parameterType="com.bns.ldlz.domain.bo.LdlzRecordProblemBo"
resultType="com.bns.ldlz.domain.vo.LdlzRecordProblemVo">
<select id="selectLdlzRecordProblemList" parameterType="com.bonus.ldlz.domain.bo.LdlzRecordProblemBo"
resultType="com.bonus.ldlz.domain.vo.LdlzRecordProblemVo">
select rp.* , r.lat,r.lon,r.address,p.`name` as projectName,hi.name as handbookName,hi.type as handbookType,
u.nick_name
from ldlz_record_problem rp join ldlz_record r on r.id =rp.record_id
@ -57,7 +57,7 @@
</where>
order by rp .create_time desc
</select>
<select id="selectById" parameterType="Long" resultType="com.bns.ldlz.domain.vo.LdlzRecordProblemVo">
<select id="selectById" parameterType="Long" resultType="com.bonus.ldlz.domain.vo.LdlzRecordProblemVo">
select rp.* , r.lat,r.lon, r.address,p.`name` as projectName,hi.name as handbookName,hi.type as handbookType,
u.nick_name
from ldlz_record_problem rp join ldlz_record r on r.id =rp.record_id
@ -78,7 +78,7 @@
</where>
</select>
<select id="countProblem2" parameterType="ProblemCountBo" resultType="Long">
<select id="countProblem2" parameterType="com.bonus.ldlz.domain.bo.ProblemCountBo" resultType="Long">
select count(1) as num
from ldlz_record_problem rp
join ldlz_record r on r.id =rp.record_id
@ -93,7 +93,7 @@
</where>
</select>
<update id="updateZgById" parameterType="com.bns.ldlz.domain.LdlzRecordProblem">
<update id="updateZgById" parameterType="com.bonus.ldlz.domain.LdlzRecordProblem">
update ldlz_record_problem
<set>
<if test="zgImg != null and zgImg !=null">
@ -177,8 +177,8 @@
</where>
group by i.name order by num desc
</select>
<select id="selectProblemListByHandbook" parameterType="com.bns.ldlz.domain.bo.LdlzRecordProblemBo"
resultType="com.bns.ldlz.domain.vo.LdlzRecordProblemVo">
<select id="selectProblemListByHandbook" parameterType="com.bonus.ldlz.domain.bo.LdlzRecordProblemBo"
resultType="com.bonus.ldlz.domain.vo.LdlzRecordProblemVo">
select rp.* , r.lat,r.lon,r.address,p.`name` as projectName,hi.name as handbookName,hi.type as handbookType
,i2.name as firstName,i.name as secondName,
u.nick_name

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bns.ldlz.mapper.slave.BmProjectSlaveMapper">
<mapper namespace="com.bonus.ldlz.mapper.slave.BmProjectSlaveMapper">
<resultMap type="BmProject" id="BmProjectResult">
<resultMap type="com.bonus.ldlz.domain.BmProject" id="BmProjectResult">
<result property="ID" column="ID" />
<result property="projectId" column="project_id" />
<result property="name" column="name" />
@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="payWay" column="pay_way" />
<result property="openBankNumber" column="open_bank_number" />
<result property="accountBalance" column="account_balance" />
<result property="updateTime" column="update_time" />
<!-- <result property="updateTime" column="update_time" />-->
<result property="isActive" column="is_active" />
</resultMap>
@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select ID, project_id, name, abbreviation, pro_type, voltage_level, power_grid, company_id, registerAddressCode, origin, lon, lat, status, contractSigningDate, contractPrice, start_time, end_time, pro_leader, pro_leader_phone, isInsurance, security_payments, payment_type, payment_file, labourSpecialName, labourSpecialPhone, labourSpecialIdCard, payDate, project_manager, phone, manager_number, approachDate, board_file, fature_tags, bank_account, bank_name, open_bank_type, special_bank_type, pay_way, open_bank_number, account_balance, update_time, is_active from bm_project
</sql>
<select id="selectBmProjectList" parameterType="BmProject" resultMap="BmProjectResult">
<select id="selectBmProjectList" parameterType="com.bonus.ldlz.domain.BmProject" resultMap="BmProjectResult">
<include refid="selectBmProjectVo"/>
<where>
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>

View File

@ -0,0 +1,31 @@
package com.bonus.system;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
* 实名制模块
*
* @author bonus
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
public class BonusSysTemApplication
{
public static void main(String[] args)
{
SpringApplication.run(BonusSysTemApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 实名制模块启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
}
}

View File

@ -1,132 +0,0 @@
package com.bonus.system.domain;
import java.util.Date;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 系统访问记录表 sys_logininfor
*
* @author ldlv
*/
@Data
@EqualsAndHashCode(callSuper=false)
public class SysLogininfor extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
@Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC)
private Long infoId;
/** 用户账号 */
// @Excel(name = "用户账号")
private String userName;
@Excel(name = "用户名")
private String nickName;
/** 登录状态 0成功 1失败 */
@Excel(name = "登录状态", readConverterExp = "0=成功,1=失败")
private String status;
/** 登录IP地址 */
@Excel(name = "登录地址")
private String ipaddr;
/** 登录地点 */
@Excel(name = "登录地点")
private String loginLocation;
/** 浏览器类型 */
@Excel(name = "浏览器")
private String browser;
/** 操作系统 */
@Excel(name = "操作系统")
private String os;
/** 提示消息 */
@Excel(name = "提示消息")
private String msg;
/** 访问时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date loginTime;
public Long getInfoId() {
return infoId;
}
public void setInfoId(Long infoId) {
this.infoId = infoId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getIpaddr() {
return ipaddr;
}
public void setIpaddr(String ipaddr) {
this.ipaddr = ipaddr;
}
public String getLoginLocation() {
return loginLocation;
}
public void setLoginLocation(String loginLocation) {
this.loginLocation = loginLocation;
}
public String getBrowser() {
return browser;
}
public void setBrowser(String browser) {
this.browser = browser;
}
public String getOs() {
return os;
}
public void setOs(String os) {
this.os = os;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Date getLoginTime() {
return loginTime;
}
public void setLoginTime(Date loginTime) {
this.loginTime = loginTime;
}
}

View File

@ -1,104 +0,0 @@
package com.bonus.system.domain;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import com.bonus.common.core.web.domain.BaseEntity;
import com.bonus.common.core.xss.Xss;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 通知公告表 sys_notice
*
* @author ldlv
*/
@Data
@EqualsAndHashCode(callSuper=false)
public class SysNotice extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 公告ID */
private Long noticeId;
/** 公告标题 */
private String noticeTitle;
/** 公告类型1通知 2公告 */
private String noticeType;
/** 公告内容 */
private String noticeContent;
/** 公告状态0正常 1关闭 */
private String status;
private Long userId; // 登录用户
private String isRead = "0"; // 是否已读 0 未读 1 已读
private String fileUrls; // 文件地址
private String showType = "1"; // 1所有人员可见2部分人员可见
private String receiveUserIds; // 接收人员ID
public Long getNoticeId() {
return noticeId;
}
public void setNoticeId(Long noticeId) {
this.noticeId = noticeId;
}
public void setNoticeTitle(String noticeTitle) {
this.noticeTitle = noticeTitle;
}
@Xss(message = "公告标题不能包含脚本字符")
@NotBlank(message = "公告标题不能为空")
@Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
public String getNoticeTitle() {
return noticeTitle;
}
public void setNoticeType(String noticeType) {
this.noticeType = noticeType;
}
public String getNoticeType() {
return noticeType;
}
public void setNoticeContent(String noticeContent) {
this.noticeContent = noticeContent;
}
public String getNoticeContent() {
return noticeContent;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("noticeId", getNoticeId())
.append("noticeTitle", getNoticeTitle())
.append("noticeType", getNoticeType())
.append("noticeContent", getNoticeContent())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

View File

@ -1,278 +0,0 @@
package com.bonus.system.domain;
import java.util.Date;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 操作日志记录表 oper_log
*
* @author ldlv
*/
@Data
@EqualsAndHashCode(callSuper=false)
public class SysOperLog extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 日志主键 */
@Excel(name = "操作序号", cellType = Excel.ColumnType.NUMERIC)
private Long operId;
/** 操作模块 */
@Excel(name = "操作功能")
private String moduleName;
@Excel(name = "日志")
private String title;
/** 业务类型0其它 1新增 2修改 3删除 */
@Excel(name = "资源类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据")
private Integer businessType;
/** 业务类型数组 */
private Integer[] businessTypes;
/** 请求方法 */
// @Excel(name = "请求方法")
private String method;
/** 请求方式 */
// @Excel(name = "请求方式")
private String requestMethod;
/** 操作类别0其它 1后台用户 2手机端用户 */
// @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
private Integer operatorType;
/** 操作人员 */
@Excel(name = "用户名")
private String operName;
private Long operUserId;
/** 部门名称 */
// @Excel(name = "部门名称")
private String deptName;
/** 请求url */
// @Excel(name = "请求地址")
private String operUrl;
/** 操作地址 */
// @Excel(name = "操作地址")
private String operIp;
/** 操作地点 */
// @Excel(name = "操作地点")
private String operLocation;
/** 请求参数 */
// @Excel(name = "请求参数")
private String operParam;
/** 返回参数 */
// @Excel(name = "返回参数")
private String jsonResult;
/** 操作状态0正常 1异常 */
@Excel(name = "操作状态", readConverterExp = "0=正常,1=异常")
private Integer status;
/** 错误消息 */
@Excel(name = "错误消息")
private String errorMsg;
/** 操作时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date operTime;
/** 消耗时间 */
// @Excel(name = "消耗时间", suffix = "毫秒")
private Long costTime;
public Long getOperId()
{
return operId;
}
public void setOperId(Long operId)
{
this.operId = operId;
}
public String getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public Integer getBusinessType()
{
return businessType;
}
public void setBusinessType(Integer businessType)
{
this.businessType = businessType;
}
public Integer[] getBusinessTypes()
{
return businessTypes;
}
public void setBusinessTypes(Integer[] businessTypes)
{
this.businessTypes = businessTypes;
}
public String getMethod()
{
return method;
}
public void setMethod(String method)
{
this.method = method;
}
public String getRequestMethod()
{
return requestMethod;
}
public void setRequestMethod(String requestMethod)
{
this.requestMethod = requestMethod;
}
public Integer getOperatorType()
{
return operatorType;
}
public void setOperatorType(Integer operatorType)
{
this.operatorType = operatorType;
}
public String getOperName()
{
return operName;
}
public void setOperName(String operName)
{
this.operName = operName;
}
public String getDeptName()
{
return deptName;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
public String getOperUrl()
{
return operUrl;
}
public void setOperUrl(String operUrl)
{
this.operUrl = operUrl;
}
public String getOperIp()
{
return operIp;
}
public void setOperIp(String operIp)
{
this.operIp = operIp;
}
public String getOperLocation()
{
return operLocation;
}
public void setOperLocation(String operLocation)
{
this.operLocation = operLocation;
}
public String getOperParam()
{
return operParam;
}
public void setOperParam(String operParam)
{
this.operParam = operParam;
}
public String getJsonResult()
{
return jsonResult;
}
public void setJsonResult(String jsonResult)
{
this.jsonResult = jsonResult;
}
public Integer getStatus()
{
return status;
}
public void setStatus(Integer status)
{
this.status = status;
}
public String getErrorMsg()
{
return errorMsg;
}
public void setErrorMsg(String errorMsg)
{
this.errorMsg = errorMsg;
}
public Date getOperTime()
{
return operTime;
}
public void setOperTime(Date operTime)
{
this.operTime = operTime;
}
public Long getCostTime()
{
return costTime;
}
public void setCostTime(Long costTime)
{
this.costTime = costTime;
}
}

View File

@ -1,124 +0,0 @@
package com.bonus.system.domain;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 岗位表 sys_post
*
* @author ldlv
*/
public class SysPost extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 岗位序号 */
@Excel(name = "岗位序号", cellType = Excel.ColumnType.NUMERIC)
private Long postId;
/** 岗位编码 */
@Excel(name = "岗位编码")
private String postCode;
/** 岗位名称 */
@Excel(name = "岗位名称")
private String postName;
/** 岗位排序 */
@Excel(name = "岗位排序")
private Integer postSort;
/** 状态0正常 1停用 */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status;
/** 用户是否存在此岗位标识 默认不存在 */
private boolean flag = false;
public Long getPostId()
{
return postId;
}
public void setPostId(Long postId)
{
this.postId = postId;
}
@NotBlank(message = "岗位编码不能为空")
@Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符")
public String getPostCode()
{
return postCode;
}
public void setPostCode(String postCode)
{
this.postCode = postCode;
}
@NotBlank(message = "岗位名称不能为空")
@Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符")
public String getPostName()
{
return postName;
}
public void setPostName(String postName)
{
this.postName = postName;
}
@NotNull(message = "显示顺序不能为空")
public Integer getPostSort()
{
return postSort;
}
public void setPostSort(Integer postSort)
{
this.postSort = postSort;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public boolean isFlag()
{
return flag;
}
public void setFlag(boolean flag)
{
this.flag = flag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("postId", getPostId())
.append("postCode", getPostCode())
.append("postName", getPostName())
.append("postSort", getPostSort())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

View File

@ -1,46 +0,0 @@
package com.bonus.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 用户和角色关联 sys_user_role
*
* @author ldlv
*/
public class SysUserRole
{
/** 用户ID */
private Long userId;
/** 角色ID */
private Long roleId;
public Long getUserId()
{
return userId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getRoleId()
{
return roleId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("userId", getUserId())
.append("roleId", getRoleId())
.toString();
}
}

View File

@ -1,25 +1,27 @@
package com.bonus.system.mapper;
import com.bonus.system.api.domain.SysLogininfor;
import java.util.List;
import com.bonus.system.domain.SysLogininfor;
/**
* 系统访问日志情况信息 数据层
*
*
* @author ldlv
*/
public interface SysLogininforMapper
{
/**
* 新增系统登录日志
*
*
* @param logininfor 访问日志对象
*/
public void insertLogininfor(SysLogininfor logininfor);
/**
* 查询系统登录日志集合
*
*
* @param logininfor 访问日志对象
* @return 登录记录集合
*/
@ -27,7 +29,7 @@ public interface SysLogininforMapper
/**
* 批量删除系统登录日志
*
*
* @param infoIds 需要删除的登录日志ID
* @return 结果
*/
@ -35,7 +37,7 @@ public interface SysLogininforMapper
/**
* 清空系统登录日志
*
*
* @return 结果
*/
public int cleanLogininfor();

View File

@ -1,8 +1,10 @@
package com.bonus.system.mapper;
import com.bonus.system.api.domain.SysNotice;
import java.util.List;
import com.bonus.system.domain.SysNotice;
/**
* 通知公告表 数据层

View File

@ -1,25 +1,27 @@
package com.bonus.system.mapper;
import com.bonus.system.api.domain.SysOperLog;
import java.util.List;
import com.bonus.system.domain.SysOperLog;
/**
* 操作日志 数据层
*
*
* @author ldlv
*/
public interface SysOperLogMapper
{
/**
* 新增操作日志
*
*
* @param operLog 操作日志对象
*/
public void insertOperlog(SysOperLog operLog);
/**
* 查询系统操作日志集合
*
*
* @param operLog 操作日志对象
* @return 操作日志集合
*/
@ -27,7 +29,7 @@ public interface SysOperLogMapper
/**
* 批量删除系统操作日志
*
*
* @param operIds 需要删除的操作日志ID
* @return 结果
*/
@ -35,7 +37,7 @@ public interface SysOperLogMapper
/**
* 查询操作日志详细
*
*
* @param operId 操作ID
* @return 操作日志对象
*/

View File

@ -1,18 +1,19 @@
package com.bonus.system.mapper;
import com.bonus.system.api.domain.SysPost;
import java.util.List;
import com.bonus.system.domain.SysPost;
/**
* 岗位信息 数据层
*
*
* @author ldlv
*/
public interface SysPostMapper
{
/**
* 查询岗位数据集合
*
*
* @param post 岗位信息
* @return 岗位数据集合
*/
@ -20,14 +21,14 @@ public interface SysPostMapper
/**
* 查询所有岗位
*
*
* @return 岗位列表
*/
public List<SysPost> selectPostAll();
/**
* 通过岗位ID查询岗位信息
*
*
* @param postId 岗位ID
* @return 角色对象信息
*/
@ -35,7 +36,7 @@ public interface SysPostMapper
/**
* 根据用户ID获取岗位选择框列表
*
*
* @param userId 用户ID
* @return 选中岗位ID列表
*/
@ -43,7 +44,7 @@ public interface SysPostMapper
/**
* 查询用户所属岗位组
*
*
* @param userName 用户名
* @return 结果
*/
@ -51,7 +52,7 @@ public interface SysPostMapper
/**
* 删除岗位信息
*
*
* @param postId 岗位ID
* @return 结果
*/
@ -59,7 +60,7 @@ public interface SysPostMapper
/**
* 批量删除岗位信息
*
*
* @param postIds 需要删除的岗位ID
* @return 结果
*/
@ -67,7 +68,7 @@ public interface SysPostMapper
/**
* 修改岗位信息
*
*
* @param post 岗位信息
* @return 结果
*/
@ -75,7 +76,7 @@ public interface SysPostMapper
/**
* 新增岗位信息
*
*
* @param post 岗位信息
* @return 结果
*/
@ -83,7 +84,7 @@ public interface SysPostMapper
/**
* 校验岗位名称
*
*
* @param postName 岗位名称
* @return 结果
*/
@ -91,7 +92,7 @@ public interface SysPostMapper
/**
* 校验岗位编码
*
*
* @param postCode 岗位编码
* @return 结果
*/

View File

@ -1,19 +1,21 @@
package com.bonus.system.mapper;
import java.util.List;
import com.bonus.system.api.domain.SysUserRole;
import org.apache.ibatis.annotations.Param;
import com.bonus.system.domain.SysUserRole;
/**
* 用户与角色关联表 数据层
*
*
* @author ldlv
*/
public interface SysUserRoleMapper
{
/**
* 通过用户ID删除用户和角色关联
*
*
* @param userId 用户ID
* @return 结果
*/
@ -21,7 +23,7 @@ public interface SysUserRoleMapper
/**
* 批量删除用户和角色关联
*
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@ -29,7 +31,7 @@ public interface SysUserRoleMapper
/**
* 通过角色ID查询角色使用数量
*
*
* @param roleId 角色ID
* @return 结果
*/
@ -37,7 +39,7 @@ public interface SysUserRoleMapper
/**
* 批量新增用户角色信息
*
*
* @param userRoleList 用户角色列表
* @return 结果
*/
@ -45,7 +47,7 @@ public interface SysUserRoleMapper
/**
* 删除用户和角色关联信息
*
*
* @param userRole 用户和角色关联信息
* @return 结果
*/
@ -53,7 +55,7 @@ public interface SysUserRoleMapper
/**
* 批量取消授权用户角色
*
*
* @param roleId 角色ID
* @param userIds 需要删除的用户数据ID
* @return 结果

View File

@ -1,25 +1,26 @@
package com.bonus.system.service;
import com.bonus.system.api.domain.SysLogininfor;
import java.util.List;
import com.bonus.system.domain.SysLogininfor;
/**
* 系统访问日志情况信息 服务层
*
*
* @author ldlv
*/
public interface ISysLogininforService
{
/**
* 新增系统登录日志
*
*
* @param logininfor 访问日志对象
*/
public void insertLogininfor(SysLogininfor logininfor);
/**
* 查询系统登录日志集合
*
*
* @param logininfor 访问日志对象
* @return 登录记录集合
*/
@ -27,7 +28,7 @@ public interface ISysLogininforService
/**
* 批量删除系统登录日志
*
*
* @param infoIds 需要删除的登录日志ID
* @return 结果
*/

View File

@ -1,8 +1,9 @@
package com.bonus.system.service;
import com.bonus.system.api.domain.SysNotice;
import java.util.List;
import com.bonus.system.domain.SysNotice;
/**
* 公告 服务层

View File

@ -1,25 +1,27 @@
package com.bonus.system.service;
import com.bonus.system.api.domain.SysOperLog;
import java.util.List;
import com.bonus.system.domain.SysOperLog;
/**
* 操作日志 服务层
*
*
* @author ldlv
*/
public interface ISysOperLogService
{
/**
* 新增操作日志
*
*
* @param operLog 操作日志对象
*/
public void insertOperlog(SysOperLog operLog);
/**
* 查询系统操作日志集合
*
*
* @param operLog 操作日志对象
* @return 操作日志集合
*/
@ -27,7 +29,7 @@ public interface ISysOperLogService
/**
* 批量删除系统操作日志
*
*
* @param operIds 需要删除的操作日志ID
* @return 结果
*/
@ -35,7 +37,7 @@ public interface ISysOperLogService
/**
* 查询操作日志详细
*
*
* @param operId 操作ID
* @return 操作日志对象
*/

View File

@ -1,18 +1,20 @@
package com.bonus.system.service;
import com.bonus.system.api.domain.SysPost;
import java.util.List;
import com.bonus.system.domain.SysPost;
/**
* 岗位信息 服务层
*
*
* @author ldlv
*/
public interface ISysPostService
{
/**
* 查询岗位信息集合
*
*
* @param post 岗位信息
* @return 岗位列表
*/
@ -20,14 +22,14 @@ public interface ISysPostService
/**
* 查询所有岗位
*
*
* @return 岗位列表
*/
public List<SysPost> selectPostAll();
/**
* 通过岗位ID查询岗位信息
*
*
* @param postId 岗位ID
* @return 角色对象信息
*/
@ -35,7 +37,7 @@ public interface ISysPostService
/**
* 根据用户ID获取岗位选择框列表
*
*
* @param userId 用户ID
* @return 选中岗位ID列表
*/
@ -43,7 +45,7 @@ public interface ISysPostService
/**
* 校验岗位名称
*
*
* @param post 岗位信息
* @return 结果
*/
@ -51,7 +53,7 @@ public interface ISysPostService
/**
* 校验岗位编码
*
*
* @param post 岗位信息
* @return 结果
*/
@ -59,7 +61,7 @@ public interface ISysPostService
/**
* 通过岗位ID查询岗位使用数量
*
*
* @param postId 岗位ID
* @return 结果
*/
@ -67,7 +69,7 @@ public interface ISysPostService
/**
* 删除岗位信息
*
*
* @param postId 岗位ID
* @return 结果
*/
@ -75,7 +77,7 @@ public interface ISysPostService
/**
* 批量删除岗位信息
*
*
* @param postIds 需要删除的岗位ID
* @return 结果
*/
@ -83,7 +85,7 @@ public interface ISysPostService
/**
* 新增保存岗位信息
*
*
* @param post 岗位信息
* @return 结果
*/
@ -91,7 +93,7 @@ public interface ISysPostService
/**
* 修改保存岗位信息
*
*
* @param post 岗位信息
* @return 结果
*/

View File

@ -2,8 +2,9 @@ package com.bonus.system.service;
import java.util.List;
import java.util.Set;
import com.bonus.system.domain.SysUserRole;
import com.bonus.system.api.domain.SysRole;
import com.bonus.system.api.domain.SysUserRole;
/**
* 角色业务层

View File

@ -1,9 +1,10 @@
package com.bonus.system.service.impl;
import java.util.List;
import com.bonus.system.api.domain.SysLogininfor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.system.domain.SysLogininfor;
import com.bonus.system.mapper.SysLogininforMapper;
import com.bonus.system.service.ISysLogininforService;

View File

@ -2,9 +2,10 @@ package com.bonus.system.service.impl;
import java.util.List;
import com.bonus.system.api.domain.SysNotice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.system.domain.SysNotice;
import com.bonus.system.mapper.SysNoticeMapper;
import com.bonus.system.service.ISysNoticeService;

View File

@ -1,15 +1,16 @@
package com.bonus.system.service.impl;
import java.util.List;
import com.bonus.system.api.domain.SysOperLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.system.domain.SysOperLog;
import com.bonus.system.mapper.SysOperLogMapper;
import com.bonus.system.service.ISysOperLogService;
/**
* 操作日志 服务层处理
*
*
* @author ldlv
*/
@Service
@ -20,7 +21,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
/**
* 新增操作日志
*
*
* @param operLog 操作日志对象
*/
@Override
@ -31,7 +32,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
/**
* 查询系统操作日志集合
*
*
* @param operLog 操作日志对象
* @return 操作日志集合
*/
@ -43,7 +44,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
/**
* 批量删除系统操作日志
*
*
* @param operIds 需要删除的操作日志ID
* @return 结果
*/
@ -55,7 +56,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
/**
* 查询操作日志详细
*
*
* @param operId 操作ID
* @return 操作日志对象
*/

View File

@ -5,13 +5,14 @@ import java.util.List;
import com.bonus.common.core.constant.UserConstants;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.bonus.system.api.domain.SysPost;
import org.springframework.stereotype.Service;
import com.bonus.system.domain.SysPost;
import com.bonus.system.mapper.SysPostMapper;
import com.bonus.system.mapper.SysUserPostMapper;
import com.bonus.system.service.ISysPostService;
import javax.annotation.Resource;
/**
* 岗位信息 服务层处理
*
@ -20,10 +21,10 @@ import com.bonus.system.service.ISysPostService;
@Service
public class SysPostServiceImpl implements ISysPostService
{
@Autowired
@Resource
private SysPostMapper postMapper;
@Autowired
@Resource
private SysUserPostMapper userPostMapper;
/**

View File

@ -14,12 +14,12 @@ import com.bonus.common.datascope.annotation.DataScope;
import com.bonus.common.security.utils.SecurityUtils;
import com.bonus.system.api.domain.SysRole;
import com.bonus.system.api.domain.SysUser;
import com.bonus.system.api.domain.SysUserRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.bonus.system.domain.SysRoleDept;
import com.bonus.system.domain.SysRoleMenu;
import com.bonus.system.domain.SysUserRole;
import com.bonus.system.mapper.SysRoleDeptMapper;
import com.bonus.system.mapper.SysRoleMapper;
import com.bonus.system.mapper.SysRoleMenuMapper;

View File

@ -12,17 +12,17 @@ import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.core.utils.bean.BeanValidators;
import com.bonus.common.datascope.annotation.DataScope;
import com.bonus.common.security.utils.SecurityUtils;
import com.bonus.system.api.domain.SysPost;
import com.bonus.system.api.domain.SysRole;
import com.bonus.system.api.domain.SysUser;
import com.bonus.system.api.domain.SysUserRole;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import com.bonus.system.domain.SysPost;
import com.bonus.system.domain.SysUserPost;
import com.bonus.system.domain.SysUserRole;
import com.bonus.system.mapper.SysPostMapper;
import com.bonus.system.mapper.SysRoleMapper;
import com.bonus.system.mapper.SysUserMapper;
@ -147,7 +147,7 @@ public class SysUserServiceImpl implements ISysUserService {
*/
@Override
public String selectUserPostGroup(String userName) {
List<SysPost> list = postMapper.selectPostsByUserName(userName);
List< SysPost> list = postMapper.selectPostsByUserName(userName);
if (CollectionUtils.isEmpty(list)) {
return StringUtils.EMPTY;
}

View File

@ -0,0 +1,25 @@
# Tomcat
server:
port: 18088
# Spring
spring:
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: ca980e57-dbdd-436f-93e3-fef5aedb5357
username: nacos
password: nacos
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: ca980e57-dbdd-436f-93e3-fef5aedb5357
username: nacos
password: nacos
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

View File

@ -0,0 +1,17 @@
# Spring
spring:
application:
# 应用名称
name: bonus-system
profiles:
# 环境配置
active: dev
#加密组件
jasypt:
encryptor:
password: Encrypt
feign:
hystrix:
enabled: true

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/bonus-realname" />
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.bonus" level="info" />
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" />
<root level="info">
<appender-ref ref="console" />
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info" />
<appender-ref ref="file_error" />
</root>
</configuration>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.system.mapper.SysLogininforMapper">
<resultMap type="SysLogininfor" id="SysLogininforResult">
<resultMap type="com.bonus.system.api.domain.SysLogininfor" id="SysLogininforResult">
<id property="infoId" column="info_id" />
<result property="userName" column="user_name" />
<result property="nickName" column="nick_name" />
@ -14,15 +14,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="browser" column="browser" />
<result property="os" column="os" />
<result property="msg" column="msg" />
<result property="loginTime" column="login_time" />
<result property="accessTime" column="login_time" />
</resultMap>
<insert id="insertLogininfor" parameterType="SysLogininfor">
<insert id="insertLogininfor" parameterType="com.bonus.system.api.domain.SysLogininfor">
insert into sys_logininfor (user_name, nick_name, status, ipaddr, login_location, browser, os, msg, login_time)
values (#{userName},#{nickName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
</insert>
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
<select id="selectLogininforList" parameterType="com.bonus.system.api.domain.SysLogininfor" resultMap="SysLogininforResult">
select info_id, user_name, nick_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
<where>
<if test="ipaddr != null and ipaddr != ''">

View File

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.system.mapper.SysMenuMapper">
<resultMap type="SysMenu" id="SysMenuResult">
<resultMap type="com.bonus.system.api.domain.SysMenu" id="SysMenuResult">
<id property="menuId" column="menu_id" />
<result property="menuName" column="menu_name" />
<result property="parentName" column="parent_name" />
@ -32,7 +32,7 @@
from sys_menu
</sql>
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
<select id="selectMenuList" parameterType="com.bonus.system.api.domain.SysMenu" resultMap="SysMenuResult">
<include refid="selectMenuVo"/>
<where>
<if test="menuName != null and menuName != ''">
@ -54,7 +54,7 @@
order by m.parent_id, m.order_num
</select>
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
<select id="selectMenuListByUserId" parameterType="com.bonus.system.api.domain.SysMenu" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
@ -127,12 +127,12 @@
select count(1) from sys_menu where parent_id = #{menuId}
</select>
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
<select id="checkMenuNameUnique" parameterType="com.bonus.system.api.domain.SysMenu" resultMap="SysMenuResult">
<include refid="selectMenuVo"/>
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
</select>
<update id="updateMenu" parameterType="SysMenu">
<update id="updateMenu" parameterType="com.bonus.system.api.domain.SysMenu">
update sys_menu
<set>
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
@ -155,7 +155,7 @@
where menu_id = #{menuId}
</update>
<insert id="insertMenu" parameterType="SysMenu">
<insert id="insertMenu" parameterType="com.bonus.system.api.domain.SysMenu">
insert into sys_menu(
<if test="menuId != null and menuId != 0">menu_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.system.mapper.SysNoticeMapper">
<resultMap type="SysNotice" id="SysNoticeResult">
<resultMap type="com.bonus.system.api.domain.SysNotice" id="SysNoticeResult">
<result property="noticeId" column="notice_id" />
<result property="noticeTitle" column="notice_title" />
<result property="noticeType" column="notice_type" />
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where notice_id = #{noticeId}
</select>
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
<select id="selectNoticeList" parameterType="com.bonus.system.api.domain.SysNotice" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/>
<where>
<if test="noticeTitle != null and noticeTitle != ''">
@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectNoticeListByUser" parameterType="SysNotice" resultMap="SysNoticeResult">
<select id="selectNoticeListByUser" parameterType="com.bonus.system.api.domain.SysNotice" resultMap="SysNoticeResult">
select notice.notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content,
status, create_by, create_time, update_by, update_time, remark,log.user_id,show_type,receive_user_ids,file_urls,
case when log.user_id is null then 0 else 1 end as is_read
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by is_read, create_time desc
</select>
<select id="selectUnreadCount" parameterType="SysNotice" resultType="Integer">
<select id="selectUnreadCount" parameterType="com.bonus.system.api.domain.SysNotice" resultType="Integer">
select count(1)
from sys_notice notice
where notice.status = '0'
@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and not exists (select 1 from sys_notice_view_log where notice_id = notice.notice_id and user_id = #{userId})
</select>
<insert id="insertNotice" parameterType="SysNotice">
<insert id="insertNotice" parameterType="com.bonus.system.api.domain.SysNotice">
insert into sys_notice (
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
@ -103,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<update id="updateNotice" parameterType="SysNotice">
<update id="updateNotice" parameterType="com.bonus.system.api.domain.SysNotice">
update sys_notice
<set>
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.system.mapper.SysOperLogMapper">
<resultMap type="SysOperLog" id="SysOperLogResult">
<resultMap type="com.bonus.system.api.domain.SysOperLog" id="SysOperLogResult">
<id property="operId" column="oper_id" />
<result property="moduleName" column="module_name" />
<result property="title" column="title" />

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.system.mapper.SysPostMapper">
<resultMap type="com.bonus.system.domain.SysPost" id="SysPostResult">
<resultMap type="com.bonus.system.api.domain.SysPost" id="SysPostResult">
<id property="postId" column="post_id" />
<result property="postCode" column="post_code" />
<result property="postName" column="post_name" />
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_post
</sql>
<select id="selectPostList" parameterType="com.bonus.system.domain.SysPost" resultMap="SysPostResult">
<select id="selectPostList" parameterType="com.bonus.system.api.domain.SysPost" resultMap="SysPostResult">
<include refid="selectPostVo"/>
<where>
<if test="postCode != null and postCode != ''">
@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where post_code=#{postCode} limit 1
</select>
<update id="updatePost" parameterType="com.bonus.system.domain.SysPost">
<update id="updatePost" parameterType="com.bonus.system.api.domain.SysPost">
update sys_post
<set>
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where post_id = #{postId}
</update>
<insert id="insertPost" parameterType="com.bonus.system.domain.SysPost" useGeneratedKeys="true" keyProperty="postId">
<insert id="insertPost" parameterType="com.bonus.system.api.domain.SysPost" useGeneratedKeys="true" keyProperty="postId">
insert into sys_post(
<if test="postId != null and postId != 0">post_id,</if>
<if test="postCode != null and postCode != ''">post_code,</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.system.mapper.SysUserRoleMapper">
<resultMap type="com.bonus.system.domain.SysUserRole" id="SysUserRoleResult">
<resultMap type="com.bonus.system.api.domain.SysUserRole" id="SysUserRoleResult">
<result property="userId" column="user_id" />
<result property="roleId" column="role_id" />
</resultMap>
@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</insert>
<delete id="deleteUserRoleInfo" parameterType="com.bonus.system.domain.SysUserRole">
<delete id="deleteUserRoleInfo" parameterType="com.bonus.system.api.domain.SysUserRole">
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
</delete>

View File

@ -25,6 +25,12 @@
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.5</version>
</dependency>
<!-- MyBatis-Plus Generator -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.5.5</version>
</dependency>
<dependency>
<groupId>com.bonus</groupId>
<artifactId>bonus-auth</artifactId>

View File

@ -28,7 +28,7 @@
<kaptcha.version>2.3.3</kaptcha.version>
<pagehelper.boot.version>2.0.0</pagehelper.boot.version>
<druid.version>1.2.20</druid.version>
<dynamic-ds.version>4.2.0</dynamic-ds.version>
<dynamic-ds.version>3.6.1</dynamic-ds.version>
<commons.io.version>2.13.0</commons.io.version>
<velocity.version>2.3</velocity.version>
<fastjson.version>2.0.43</fastjson.version>