no commit message
This commit is contained in:
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>1.0.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>ruoyi</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<url>http://www.ruoyi.vip</url>
|
||||||
|
@ -14,8 +14,8 @@ public class RuoYiApplication
|
|||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
//System.setProperty("spring.devtools.restart.enabled", "false");
|
||||||
SpringApplication.run(RuoYiApplication.class, args);
|
SpringApplication.run(RuoYiApplication.class, args);
|
||||||
System.out.println("系统启动成功");
|
System.out.println("系统启动成功" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
package com.ruoyi.common.utils;
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
import java.awt.Color;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.Font;
|
import java.awt.*;
|
||||||
import java.awt.Graphics;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.awt.RenderingHints;
|
|
||||||
import java.awt.geom.AffineTransform;
|
import java.awt.geom.AffineTransform;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -12,7 +9,6 @@ import java.io.OutputStream;
|
|||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码工具类
|
* 验证码工具类
|
||||||
@ -23,7 +19,7 @@ public class VerifyCodeUtils
|
|||||||
{
|
{
|
||||||
// 使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符
|
// 使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符
|
||||||
// public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ";
|
// public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ";
|
||||||
public static final String VERIFY_CODES = "123456789";
|
public static final String VERIFY_CODES = "68";
|
||||||
|
|
||||||
private static Random random = new SecureRandom();
|
private static Random random = new SecureRandom();
|
||||||
|
|
||||||
|
@ -97,13 +97,15 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|||||||
"/**/*.css",
|
"/**/*.css",
|
||||||
"/**/*.js"
|
"/**/*.js"
|
||||||
).permitAll()
|
).permitAll()
|
||||||
.antMatchers("/profile/**").anonymous()
|
|
||||||
.antMatchers("/common/download**").anonymous()
|
|
||||||
.antMatchers("/swagger-ui.html").anonymous()
|
.antMatchers("/swagger-ui.html").anonymous()
|
||||||
.antMatchers("/swagger-resources/**").anonymous()
|
.antMatchers("/swagger-resources/**").anonymous()
|
||||||
|
.antMatchers("/profile/**").anonymous()
|
||||||
|
.antMatchers("/common/download**").anonymous()
|
||||||
.antMatchers("/webjars/**").anonymous()
|
.antMatchers("/webjars/**").anonymous()
|
||||||
.antMatchers("/*/api-docs").anonymous()
|
.antMatchers("/*/api-docs").anonymous()
|
||||||
.antMatchers("/druid/**").anonymous()
|
.antMatchers("/druid/**").anonymous()
|
||||||
|
.antMatchers("/test/user/**").anonymous()
|
||||||
|
.antMatchers("/mr/**").anonymous()
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
.and()
|
.and()
|
||||||
|
@ -1,24 +1,21 @@
|
|||||||
package com.ruoyi.framework.config;
|
package com.ruoyi.framework.config;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import springfox.documentation.builders.ApiInfoBuilder;
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
import springfox.documentation.builders.PathSelectors;
|
import springfox.documentation.builders.PathSelectors;
|
||||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
import springfox.documentation.service.ApiInfo;
|
import springfox.documentation.service.*;
|
||||||
import springfox.documentation.service.ApiKey;
|
|
||||||
import springfox.documentation.service.AuthorizationScope;
|
|
||||||
import springfox.documentation.service.Contact;
|
|
||||||
import springfox.documentation.service.SecurityReference;
|
|
||||||
import springfox.documentation.spi.DocumentationType;
|
import springfox.documentation.spi.DocumentationType;
|
||||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||||
import springfox.documentation.spring.web.plugins.Docket;
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger2的接口配置
|
* Swagger2的接口配置
|
||||||
*
|
*
|
||||||
@ -39,7 +36,7 @@ public class SwaggerConfig
|
|||||||
public Docket createRestApi()
|
public Docket createRestApi()
|
||||||
{
|
{
|
||||||
return new Docket(DocumentationType.SWAGGER_2)
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
.pathMapping("/dev-api")
|
.pathMapping(DEV_PRD())
|
||||||
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
||||||
.apiInfo(apiInfo())
|
.apiInfo(apiInfo())
|
||||||
// 设置哪些接口暴露给Swagger展示
|
// 设置哪些接口暴露给Swagger展示
|
||||||
@ -103,11 +100,21 @@ public class SwaggerConfig
|
|||||||
// 设置标题
|
// 设置标题
|
||||||
.title("标题:明仁管理系统_接口文档")
|
.title("标题:明仁管理系统_接口文档")
|
||||||
// 描述
|
// 描述
|
||||||
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
.description("描述:明仁管理系统_接口文档系统对外接口")
|
||||||
// 作者信息
|
// 作者信息
|
||||||
.contact(new Contact(ruoyiConfig.getName(), null, null))
|
.contact(new Contact(ruoyiConfig.getName(), "http://erp.jzmryy.com", ""))
|
||||||
// 版本
|
// 版本
|
||||||
.version("版本号:" + ruoyiConfig.getVersion())
|
.version("版本号:" + ruoyiConfig.getVersion())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是测试生产环境
|
||||||
|
*/
|
||||||
|
private String DEV_PRD()
|
||||||
|
{
|
||||||
|
String str = System.getProperty("os.name").toLowerCase().contains("windows 10") ? "/dev-api" : "";
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package com.ruoyi.framework.web.domain;
|
package com.ruoyi.framework.web.domain;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import com.ruoyi.common.constant.HttpStatus;
|
import com.ruoyi.common.constant.HttpStatus;
|
||||||
|
import com.ruoyi.common.utils.MessageUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作消息提醒
|
* 操作消息提醒
|
||||||
*
|
*
|
||||||
@ -13,6 +15,8 @@ public class AjaxResult extends HashMap<String, Object>
|
|||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 状态码 */
|
/** 状态码 */
|
||||||
public static final String CODE_TAG = "code";
|
public static final String CODE_TAG = "code";
|
||||||
|
|
||||||
@ -65,7 +69,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||||||
*/
|
*/
|
||||||
public static AjaxResult success()
|
public static AjaxResult success()
|
||||||
{
|
{
|
||||||
return AjaxResult.success("操作成功");
|
return AjaxResult.success(MessageUtils.message("api.success.msg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,7 +79,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||||||
*/
|
*/
|
||||||
public static AjaxResult success(Object data)
|
public static AjaxResult success(Object data)
|
||||||
{
|
{
|
||||||
return AjaxResult.success("操作成功", data);
|
return AjaxResult.success(MessageUtils.message("api.success.msg"), data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -108,7 +112,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||||||
*/
|
*/
|
||||||
public static AjaxResult error()
|
public static AjaxResult error()
|
||||||
{
|
{
|
||||||
return AjaxResult.error("操作失败");
|
return AjaxResult.error(MessageUtils.message("api.error.msg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
package com.ruoyi.project.mr.api;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.enums.UserStatus;
|
||||||
|
import com.ruoyi.common.utils.MessageUtils;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.framework.web.controller.BaseController;
|
||||||
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.project.system.domain.SysUser;
|
||||||
|
import com.ruoyi.project.system.service.ISysUserService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* swagger 基础信息方法
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Api(tags = "基础信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mr/base")
|
||||||
|
public class MRBaseController extends BaseController {
|
||||||
|
// 令牌秘钥
|
||||||
|
@Value("${token.apiSecret}")
|
||||||
|
private String apiSecret;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService userService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "判断登陆", notes = "根据账号密码判断是否存在")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "name", value = "用户名", dataType = "string", paramType = "query", example = "admin"),
|
||||||
|
@ApiImplicitParam(name = "password", value = "密码", dataType = "string", paramType = "query", example = "123456")})
|
||||||
|
@GetMapping("/login")
|
||||||
|
public AjaxResult getUser(@RequestHeader(value = "signature", required = false) String secret, String name, String password) {
|
||||||
|
if (StringUtils.isEmpty(secret)) {
|
||||||
|
return AjaxResult.error(400, MessageUtils.message("api.error.msg"));
|
||||||
|
} else if (!apiSecret.equals(secret)) {
|
||||||
|
return AjaxResult.error(400, MessageUtils.message("api.error.msg"));
|
||||||
|
}
|
||||||
|
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(name))) {
|
||||||
|
SysUser user = userService.selectUserByUserName(name);
|
||||||
|
if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
|
||||||
|
return AjaxResult.error(400, MessageUtils.message("user.password.delete"));
|
||||||
|
} else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
|
||||||
|
return AjaxResult.error(400, MessageUtils.message("user.blocked"));
|
||||||
|
} else if (!SecurityUtils.matchesPassword(password,user.getPassword())) {
|
||||||
|
return AjaxResult.error(400, MessageUtils.message("user.not.exists"));
|
||||||
|
} else {
|
||||||
|
return AjaxResult.success(user);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error(MessageUtils.message("user.not.exists"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,99 @@
|
|||||||
|
package com.ruoyi.project.mr.base.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.IdUtils;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||||
|
import com.ruoyi.framework.web.controller.BaseController;
|
||||||
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCalendar;
|
||||||
|
import com.ruoyi.project.mr.base.service.IBaseCalendarService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历Controller
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/base/calendar")
|
||||||
|
public class BaseCalendarController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IBaseCalendarService baseCalendarService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendar:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(BaseCalendar baseCalendar)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<BaseCalendar> list = baseCalendarService.selectBaseCalendarList(baseCalendar);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出考勤日历列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendar:export')")
|
||||||
|
@Log(title = "考勤日历", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult export(BaseCalendar baseCalendar)
|
||||||
|
{
|
||||||
|
List<BaseCalendar> list = baseCalendarService.selectBaseCalendarList(baseCalendar);
|
||||||
|
ExcelUtil<BaseCalendar> util = new ExcelUtil<BaseCalendar>(BaseCalendar.class);
|
||||||
|
return util.exportExcel(list, "calendar");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取考勤日历详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendar:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(baseCalendarService.selectBaseCalendarById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤日历
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendar:add')")
|
||||||
|
@Log(title = "考勤日历", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody BaseCalendar baseCalendar)
|
||||||
|
{
|
||||||
|
baseCalendar.setId(IdUtils.fastUUID());
|
||||||
|
return toAjax(baseCalendarService.insertBaseCalendar(baseCalendar));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤日历
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendar:edit')")
|
||||||
|
@Log(title = "考勤日历", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody BaseCalendar baseCalendar)
|
||||||
|
{
|
||||||
|
return toAjax(baseCalendarService.updateBaseCalendar(baseCalendar));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤日历
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendar:remove')")
|
||||||
|
@Log(title = "考勤日历", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable String[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(baseCalendarService.deleteBaseCalendarByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
package com.ruoyi.project.mr.base.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||||
|
import com.ruoyi.framework.web.controller.BaseController;
|
||||||
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCalendarItem;
|
||||||
|
import com.ruoyi.project.mr.base.service.IBaseCalendarItemService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历明细Controller
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/base/calendarItem")
|
||||||
|
public class BaseCalendarItemController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IBaseCalendarItemService baseCalendarItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历明细列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendarItem:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(BaseCalendarItem baseCalendarItem)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<BaseCalendarItem> list = baseCalendarItemService.selectBaseCalendarItemList(baseCalendarItem);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出考勤日历明细列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendarItem:export')")
|
||||||
|
@Log(title = "考勤日历明细", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult export(BaseCalendarItem baseCalendarItem)
|
||||||
|
{
|
||||||
|
List<BaseCalendarItem> list = baseCalendarItemService.selectBaseCalendarItemList(baseCalendarItem);
|
||||||
|
ExcelUtil<BaseCalendarItem> util = new ExcelUtil<BaseCalendarItem>(BaseCalendarItem.class);
|
||||||
|
return util.exportExcel(list, "calendarItem");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取考勤日历明细详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendarItem:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(baseCalendarItemService.selectBaseCalendarItemById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤日历明细
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendarItem:add')")
|
||||||
|
@Log(title = "考勤日历明细", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody BaseCalendarItem baseCalendarItem)
|
||||||
|
{
|
||||||
|
return toAjax(baseCalendarItemService.insertBaseCalendarItem(baseCalendarItem));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤日历明细
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendarItem:edit')")
|
||||||
|
@Log(title = "考勤日历明细", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody BaseCalendarItem baseCalendarItem)
|
||||||
|
{
|
||||||
|
return toAjax(baseCalendarItemService.updateBaseCalendarItem(baseCalendarItem));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤日历明细
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:calendarItem:remove')")
|
||||||
|
@Log(title = "考勤日历明细", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable String[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(baseCalendarItemService.deleteBaseCalendarItemByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
package com.ruoyi.project.mr.base.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.IdUtils;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||||
|
import com.ruoyi.framework.web.controller.BaseController;
|
||||||
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCompany;
|
||||||
|
import com.ruoyi.project.mr.base.service.IBaseCompanyService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司管理Controller
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-04
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/base/company")
|
||||||
|
public class BaseCompanyController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IBaseCompanyService baseCompanyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公司管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:company:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(BaseCompany baseCompany)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<BaseCompany> list = baseCompanyService.selectBaseCompanyList(baseCompany);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出公司管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:company:export')")
|
||||||
|
@Log(title = "公司管理", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult export(BaseCompany baseCompany)
|
||||||
|
{
|
||||||
|
List<BaseCompany> list = baseCompanyService.selectBaseCompanyList(baseCompany);
|
||||||
|
ExcelUtil<BaseCompany> util = new ExcelUtil<BaseCompany>(BaseCompany.class);
|
||||||
|
return util.exportExcel(list, "公司信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取公司管理详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:company:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(baseCompanyService.selectBaseCompanyById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增公司管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:company:add')")
|
||||||
|
@Log(title = "公司管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody BaseCompany baseCompany)
|
||||||
|
{
|
||||||
|
baseCompany.setId(IdUtils.fastUUID());
|
||||||
|
return toAjax(baseCompanyService.insertBaseCompany(baseCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改公司管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:company:edit')")
|
||||||
|
@Log(title = "公司管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody BaseCompany baseCompany)
|
||||||
|
{
|
||||||
|
return toAjax(baseCompanyService.updateBaseCompany(baseCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除公司管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:company:remove')")
|
||||||
|
@Log(title = "公司管理", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable String[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(baseCompanyService.deleteBaseCompanyByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态修改
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:company:edit')")
|
||||||
|
@Log(title = "公司管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/changeEnabled")
|
||||||
|
public AjaxResult changeEnabled(@RequestBody BaseCompany baseCompany)
|
||||||
|
{
|
||||||
|
baseCompany.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
return toAjax(baseCompanyService.updateBaseCompanyEnabled(baseCompany));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
package com.ruoyi.project.mr.base.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||||
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历对象 base_calendar
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
public class BaseCalendar extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** UUID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 日历代码 */
|
||||||
|
@Excel(name = "日历代码")
|
||||||
|
private String codeid;
|
||||||
|
|
||||||
|
/** 日历简称 */
|
||||||
|
@Excel(name = "日历简称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 状态(0正常 1停用) */
|
||||||
|
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||||
|
private String enabled;
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setCodeid(String codeid)
|
||||||
|
{
|
||||||
|
this.codeid = codeid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodeid()
|
||||||
|
{
|
||||||
|
return codeid;
|
||||||
|
}
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setEnabled(String enabled)
|
||||||
|
{
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnabled()
|
||||||
|
{
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("codeid", getCodeid())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("enabled", getEnabled())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package com.ruoyi.project.mr.base.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||||
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历明细对象 base_calendar_item
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
public class BaseCalendarItem extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** UUID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 日历id */
|
||||||
|
@Excel(name = "日历id")
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
|
/** 状态(Y正常 N休息) */
|
||||||
|
@Excel(name = "状态", readConverterExp = "Y=正常,N=休息")
|
||||||
|
private String work;
|
||||||
|
|
||||||
|
/** 上班时间 */
|
||||||
|
@Excel(name = "上班时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date workDay;
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setParentId(String parentId)
|
||||||
|
{
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParentId()
|
||||||
|
{
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
public void setWork(String work)
|
||||||
|
{
|
||||||
|
this.work = work;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWork()
|
||||||
|
{
|
||||||
|
return work;
|
||||||
|
}
|
||||||
|
public void setWorkDay(Date workDay)
|
||||||
|
{
|
||||||
|
this.workDay = workDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getWorkDay()
|
||||||
|
{
|
||||||
|
return workDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("parentId", getParentId())
|
||||||
|
.append("work", getWork())
|
||||||
|
.append("workDay", getWorkDay())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
package com.ruoyi.project.mr.base.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||||
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司管理对象 base_company
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-04
|
||||||
|
*/
|
||||||
|
public class BaseCompany extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** UUID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 排序 */
|
||||||
|
@Excel(name = "排序")
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
/** 公司代码 */
|
||||||
|
@Excel(name = "公司代码")
|
||||||
|
private String codeid;
|
||||||
|
|
||||||
|
/** 公司简称 */
|
||||||
|
@Excel(name = "公司简称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 状态(0正常 1停用) */
|
||||||
|
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||||
|
private String enabled;
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setSort(Long sort)
|
||||||
|
{
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSort()
|
||||||
|
{
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
public void setCodeid(String codeid)
|
||||||
|
{
|
||||||
|
this.codeid = codeid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodeid()
|
||||||
|
{
|
||||||
|
return codeid;
|
||||||
|
}
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setEnabled(String enabled)
|
||||||
|
{
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnabled()
|
||||||
|
{
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("sort", getSort())
|
||||||
|
.append("codeid", getCodeid())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("enabled", getEnabled())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.project.mr.base.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCalendarItem;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历明细Mapper接口
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
public interface BaseCalendarItemMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询考勤日历明细
|
||||||
|
*
|
||||||
|
* @param id 考勤日历明细ID
|
||||||
|
* @return 考勤日历明细
|
||||||
|
*/
|
||||||
|
public BaseCalendarItem selectBaseCalendarItemById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历明细列表
|
||||||
|
*
|
||||||
|
* @param baseCalendarItem 考勤日历明细
|
||||||
|
* @return 考勤日历明细集合
|
||||||
|
*/
|
||||||
|
public List<BaseCalendarItem> selectBaseCalendarItemList(BaseCalendarItem baseCalendarItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤日历明细
|
||||||
|
*
|
||||||
|
* @param baseCalendarItem 考勤日历明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseCalendarItem(BaseCalendarItem baseCalendarItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤日历明细
|
||||||
|
*
|
||||||
|
* @param baseCalendarItem 考勤日历明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseCalendarItem(BaseCalendarItem baseCalendarItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤日历明细
|
||||||
|
*
|
||||||
|
* @param id 考勤日历明细ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCalendarItemById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤日历明细
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCalendarItemByIds(String[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.project.mr.base.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCalendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历Mapper接口
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
public interface BaseCalendarMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询考勤日历
|
||||||
|
*
|
||||||
|
* @param id 考勤日历ID
|
||||||
|
* @return 考勤日历
|
||||||
|
*/
|
||||||
|
public BaseCalendar selectBaseCalendarById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历列表
|
||||||
|
*
|
||||||
|
* @param baseCalendar 考勤日历
|
||||||
|
* @return 考勤日历集合
|
||||||
|
*/
|
||||||
|
public List<BaseCalendar> selectBaseCalendarList(BaseCalendar baseCalendar);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤日历
|
||||||
|
*
|
||||||
|
* @param baseCalendar 考勤日历
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseCalendar(BaseCalendar baseCalendar);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤日历
|
||||||
|
*
|
||||||
|
* @param baseCalendar 考勤日历
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseCalendar(BaseCalendar baseCalendar);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤日历
|
||||||
|
*
|
||||||
|
* @param id 考勤日历ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCalendarById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤日历
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCalendarByIds(String[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.project.mr.base.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCompany;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司管理Mapper接口
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-04
|
||||||
|
*/
|
||||||
|
public interface BaseCompanyMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询公司管理
|
||||||
|
*
|
||||||
|
* @param id 公司管理ID
|
||||||
|
* @return 公司管理
|
||||||
|
*/
|
||||||
|
public BaseCompany selectBaseCompanyById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公司管理列表
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司管理
|
||||||
|
* @return 公司管理集合
|
||||||
|
*/
|
||||||
|
public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增公司管理
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseCompany(BaseCompany baseCompany);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改公司管理
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseCompany(BaseCompany baseCompany);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除公司管理
|
||||||
|
*
|
||||||
|
* @param id 公司管理ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCompanyById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除公司管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCompanyByIds(String[] ids);
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.project.mr.base.service;
|
||||||
|
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCalendarItem;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历明细Service接口
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
public interface IBaseCalendarItemService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询考勤日历明细
|
||||||
|
*
|
||||||
|
* @param id 考勤日历明细ID
|
||||||
|
* @return 考勤日历明细
|
||||||
|
*/
|
||||||
|
public BaseCalendarItem selectBaseCalendarItemById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历明细列表
|
||||||
|
*
|
||||||
|
* @param baseCalendarItem 考勤日历明细
|
||||||
|
* @return 考勤日历明细集合
|
||||||
|
*/
|
||||||
|
public List<BaseCalendarItem> selectBaseCalendarItemList(BaseCalendarItem baseCalendarItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤日历明细
|
||||||
|
*
|
||||||
|
* @param baseCalendarItem 考勤日历明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseCalendarItem(BaseCalendarItem baseCalendarItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤日历明细
|
||||||
|
*
|
||||||
|
* @param baseCalendarItem 考勤日历明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseCalendarItem(BaseCalendarItem baseCalendarItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤日历明细
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的考勤日历明细ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCalendarItemByIds(String[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤日历明细信息
|
||||||
|
*
|
||||||
|
* @param id 考勤日历明细ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCalendarItemById(String id);
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.project.mr.base.service;
|
||||||
|
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCalendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历Service接口
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
public interface IBaseCalendarService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询考勤日历
|
||||||
|
*
|
||||||
|
* @param id 考勤日历ID
|
||||||
|
* @return 考勤日历
|
||||||
|
*/
|
||||||
|
public BaseCalendar selectBaseCalendarById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历列表
|
||||||
|
*
|
||||||
|
* @param baseCalendar 考勤日历
|
||||||
|
* @return 考勤日历集合
|
||||||
|
*/
|
||||||
|
public List<BaseCalendar> selectBaseCalendarList(BaseCalendar baseCalendar);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤日历
|
||||||
|
*
|
||||||
|
* @param baseCalendar 考勤日历
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseCalendar(BaseCalendar baseCalendar);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤日历
|
||||||
|
*
|
||||||
|
* @param baseCalendar 考勤日历
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseCalendar(BaseCalendar baseCalendar);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤日历
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的考勤日历ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCalendarByIds(String[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤日历信息
|
||||||
|
*
|
||||||
|
* @param id 考勤日历ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCalendarById(String id);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.ruoyi.project.mr.base.service;
|
||||||
|
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCompany;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司管理Service接口
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-04
|
||||||
|
*/
|
||||||
|
public interface IBaseCompanyService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询公司管理
|
||||||
|
*
|
||||||
|
* @param id 公司管理ID
|
||||||
|
* @return 公司管理
|
||||||
|
*/
|
||||||
|
public BaseCompany selectBaseCompanyById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公司管理列表
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司管理
|
||||||
|
* @return 公司管理集合
|
||||||
|
*/
|
||||||
|
public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增公司管理
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseCompany(BaseCompany baseCompany);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改公司管理
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseCompany(BaseCompany baseCompany);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除公司管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的公司管理ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCompanyByIds(String[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除公司管理信息
|
||||||
|
*
|
||||||
|
* @param id 公司管理ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseCompanyById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改公司状态
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseCompanyEnabled(BaseCompany baseCompany);
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
package com.ruoyi.project.mr.base.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCalendarItem;
|
||||||
|
import com.ruoyi.project.mr.base.mapper.BaseCalendarItemMapper;
|
||||||
|
import com.ruoyi.project.mr.base.service.IBaseCalendarItemService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历明细Service业务层处理
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BaseCalendarItemServiceImpl implements IBaseCalendarItemService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BaseCalendarItemMapper baseCalendarItemMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历明细
|
||||||
|
*
|
||||||
|
* @param id 考勤日历明细ID
|
||||||
|
* @return 考勤日历明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BaseCalendarItem selectBaseCalendarItemById(String id)
|
||||||
|
{
|
||||||
|
return baseCalendarItemMapper.selectBaseCalendarItemById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历明细列表
|
||||||
|
*
|
||||||
|
* @param baseCalendarItem 考勤日历明细
|
||||||
|
* @return 考勤日历明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BaseCalendarItem> selectBaseCalendarItemList(BaseCalendarItem baseCalendarItem)
|
||||||
|
{
|
||||||
|
return baseCalendarItemMapper.selectBaseCalendarItemList(baseCalendarItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤日历明细
|
||||||
|
*
|
||||||
|
* @param baseCalendarItem 考勤日历明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBaseCalendarItem(BaseCalendarItem baseCalendarItem)
|
||||||
|
{
|
||||||
|
baseCalendarItem.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return baseCalendarItemMapper.insertBaseCalendarItem(baseCalendarItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤日历明细
|
||||||
|
*
|
||||||
|
* @param baseCalendarItem 考勤日历明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBaseCalendarItem(BaseCalendarItem baseCalendarItem)
|
||||||
|
{
|
||||||
|
baseCalendarItem.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return baseCalendarItemMapper.updateBaseCalendarItem(baseCalendarItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤日历明细
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的考勤日历明细ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseCalendarItemByIds(String[] ids)
|
||||||
|
{
|
||||||
|
return baseCalendarItemMapper.deleteBaseCalendarItemByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤日历明细信息
|
||||||
|
*
|
||||||
|
* @param id 考勤日历明细ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseCalendarItemById(String id)
|
||||||
|
{
|
||||||
|
return baseCalendarItemMapper.deleteBaseCalendarItemById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
package com.ruoyi.project.mr.base.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCalendar;
|
||||||
|
import com.ruoyi.project.mr.base.mapper.BaseCalendarMapper;
|
||||||
|
import com.ruoyi.project.mr.base.service.IBaseCalendarService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤日历Service业务层处理
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BaseCalendarServiceImpl implements IBaseCalendarService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BaseCalendarMapper baseCalendarMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历
|
||||||
|
*
|
||||||
|
* @param id 考勤日历ID
|
||||||
|
* @return 考勤日历
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BaseCalendar selectBaseCalendarById(String id)
|
||||||
|
{
|
||||||
|
return baseCalendarMapper.selectBaseCalendarById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤日历列表
|
||||||
|
*
|
||||||
|
* @param baseCalendar 考勤日历
|
||||||
|
* @return 考勤日历
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BaseCalendar> selectBaseCalendarList(BaseCalendar baseCalendar)
|
||||||
|
{
|
||||||
|
return baseCalendarMapper.selectBaseCalendarList(baseCalendar);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤日历
|
||||||
|
*
|
||||||
|
* @param baseCalendar 考勤日历
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBaseCalendar(BaseCalendar baseCalendar)
|
||||||
|
{
|
||||||
|
baseCalendar.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return baseCalendarMapper.insertBaseCalendar(baseCalendar);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤日历
|
||||||
|
*
|
||||||
|
* @param baseCalendar 考勤日历
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBaseCalendar(BaseCalendar baseCalendar)
|
||||||
|
{
|
||||||
|
baseCalendar.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return baseCalendarMapper.updateBaseCalendar(baseCalendar);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤日历
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的考勤日历ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseCalendarByIds(String[] ids)
|
||||||
|
{
|
||||||
|
return baseCalendarMapper.deleteBaseCalendarByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤日历信息
|
||||||
|
*
|
||||||
|
* @param id 考勤日历ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseCalendarById(String id)
|
||||||
|
{
|
||||||
|
return baseCalendarMapper.deleteBaseCalendarById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,110 @@
|
|||||||
|
package com.ruoyi.project.mr.base.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.project.mr.base.domain.BaseCompany;
|
||||||
|
import com.ruoyi.project.mr.base.mapper.BaseCompanyMapper;
|
||||||
|
import com.ruoyi.project.mr.base.service.IBaseCompanyService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司管理Service业务层处理
|
||||||
|
*
|
||||||
|
* @author mr
|
||||||
|
* @date 2020-01-04
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BaseCompanyServiceImpl implements IBaseCompanyService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BaseCompanyMapper baseCompanyMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公司管理
|
||||||
|
*
|
||||||
|
* @param id 公司管理ID
|
||||||
|
* @return 公司管理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BaseCompany selectBaseCompanyById(String id)
|
||||||
|
{
|
||||||
|
return baseCompanyMapper.selectBaseCompanyById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公司管理列表
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司管理
|
||||||
|
* @return 公司管理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany)
|
||||||
|
{
|
||||||
|
return baseCompanyMapper.selectBaseCompanyList(baseCompany);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增公司管理
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBaseCompany(BaseCompany baseCompany)
|
||||||
|
{
|
||||||
|
baseCompany.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return baseCompanyMapper.insertBaseCompany(baseCompany);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改公司管理
|
||||||
|
*
|
||||||
|
* @param baseCompany 公司管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBaseCompany(BaseCompany baseCompany)
|
||||||
|
{
|
||||||
|
baseCompany.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return baseCompanyMapper.updateBaseCompany(baseCompany);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除公司管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的公司管理ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseCompanyByIds(String[] ids)
|
||||||
|
{
|
||||||
|
return baseCompanyMapper.deleteBaseCompanyByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除公司管理信息
|
||||||
|
*
|
||||||
|
* @param id 公司管理ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseCompanyById(String id)
|
||||||
|
{
|
||||||
|
return baseCompanyMapper.deleteBaseCompanyById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户状态
|
||||||
|
*
|
||||||
|
* @param baseCompany 用户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBaseCompanyEnabled(BaseCompany baseCompany)
|
||||||
|
{
|
||||||
|
return baseCompanyMapper.updateBaseCompany(baseCompany);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,24 +1,15 @@
|
|||||||
package com.ruoyi.project.tool.swagger;
|
package com.ruoyi.project.tool.swagger;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.framework.web.controller.BaseController;
|
||||||
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.framework.web.controller.BaseController;
|
|
||||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* swagger 用户测试方法
|
* swagger 用户测试方法
|
||||||
|
79
ruoyi/src/main/resources/application-dev.yml
Normal file
79
ruoyi/src/main/resources/application-dev.yml
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
# 数据源配置
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
druid:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://101.200.41.149:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
# 从库数据源
|
||||||
|
slave:
|
||||||
|
# 从数据源开关/默认关闭
|
||||||
|
enabled: false
|
||||||
|
url:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
# 初始连接数
|
||||||
|
initialSize: 5
|
||||||
|
# 最小连接池数量
|
||||||
|
minIdle: 10
|
||||||
|
# 最大连接池数量
|
||||||
|
maxActive: 20
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
maxWait: 60000
|
||||||
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||||
|
minEvictableIdleTimeMillis: 300000
|
||||||
|
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||||
|
maxEvictableIdleTimeMillis: 900000
|
||||||
|
# 配置检测连接是否有效
|
||||||
|
validationQuery: SELECT 1 FROM DUAL
|
||||||
|
testWhileIdle: true
|
||||||
|
testOnBorrow: false
|
||||||
|
testOnReturn: false
|
||||||
|
webStatFilter:
|
||||||
|
enabled: true
|
||||||
|
statViewServlet:
|
||||||
|
enabled: true
|
||||||
|
# 设置白名单,不填则允许所有访问
|
||||||
|
allow:
|
||||||
|
url-pattern: /druid/*
|
||||||
|
# 控制台管理用户名和密码
|
||||||
|
login-username:
|
||||||
|
login-password:
|
||||||
|
filter:
|
||||||
|
stat:
|
||||||
|
enabled: true
|
||||||
|
# 慢SQL记录
|
||||||
|
log-slow-sql: true
|
||||||
|
slow-sql-millis: 1000
|
||||||
|
merge-sql: true
|
||||||
|
wall:
|
||||||
|
config:
|
||||||
|
multi-statement-allow: true
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# Redis数据库索引(默认为0)
|
||||||
|
database: 13
|
||||||
|
# 地址
|
||||||
|
host: localhost
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6379
|
||||||
|
# Redis服务器连接密码(默认为空)
|
||||||
|
password: jzmryy007
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait:
|
@ -6,9 +6,9 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://101.200.41.149:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://locahost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: MRyyserver2019
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
@ -55,3 +55,25 @@ spring:
|
|||||||
wall:
|
wall:
|
||||||
config:
|
config:
|
||||||
multi-statement-allow: true
|
multi-statement-allow: true
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# Redis数据库索引(默认为0)
|
||||||
|
database: 10
|
||||||
|
# 地址
|
||||||
|
host: localhost
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6379
|
||||||
|
# Redis服务器连接密码(默认为空)
|
||||||
|
password: MRyyredis2019
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
# 项目相关配置
|
# 项目相关配置
|
||||||
ruoyi:
|
ruoyi:
|
||||||
# 名称
|
# 名称
|
||||||
name: RuoYi
|
name: mr
|
||||||
# 版本
|
# 版本
|
||||||
version: 2.0.0
|
version: 1.0.0
|
||||||
# 版权年份
|
# 版权年份
|
||||||
copyrightYear: 2019
|
copyrightYear: 2020
|
||||||
# 实例演示开关
|
# 实例演示开关
|
||||||
demoEnabled: true
|
demoEnabled: false
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
profile: D:/ruoyi/uploadPath
|
profile: C:/ruoyi/uploadPath
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: true
|
addressEnabled: true
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ spring:
|
|||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
basename: i18n/messages
|
basename: i18n/messages
|
||||||
profiles:
|
profiles:
|
||||||
active: druid
|
active: dev
|
||||||
# 文件上传
|
# 文件上传
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
@ -55,31 +55,14 @@ spring:
|
|||||||
restart:
|
restart:
|
||||||
# 热部署开关
|
# 热部署开关
|
||||||
enabled: true
|
enabled: true
|
||||||
# redis 配置
|
|
||||||
redis:
|
|
||||||
# 地址
|
|
||||||
host: localhost
|
|
||||||
# 端口,默认为6379
|
|
||||||
port: 6379
|
|
||||||
# 连接超时时间
|
|
||||||
timeout: 10s
|
|
||||||
lettuce:
|
|
||||||
pool:
|
|
||||||
# 连接池中的最小空闲连接
|
|
||||||
min-idle: 0
|
|
||||||
# 连接池中的最大空闲连接
|
|
||||||
max-idle: 8
|
|
||||||
# 连接池的最大数据库连接数
|
|
||||||
max-active: 8
|
|
||||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
|
||||||
max-wait: -1ms
|
|
||||||
|
|
||||||
# token配置
|
# token配置
|
||||||
token:
|
token:
|
||||||
# 令牌自定义标识
|
# 令牌自定义标识
|
||||||
header: Authorization
|
header: Authorization
|
||||||
# 令牌秘钥
|
# 令牌秘钥
|
||||||
secret: abcdefghijklmnopqrstuvwxyz
|
secret: mrcrm
|
||||||
|
# API令牌秘钥
|
||||||
|
apiSecret: MRyyApi2019
|
||||||
# 令牌有效期(默认30分钟)
|
# 令牌有效期(默认30分钟)
|
||||||
expireTime: 30
|
expireTime: 30
|
||||||
|
|
||||||
@ -106,14 +89,14 @@ xss:
|
|||||||
# 排除链接(多个用逗号分隔)
|
# 排除链接(多个用逗号分隔)
|
||||||
excludes: /system/notice/*
|
excludes: /system/notice/*
|
||||||
# 匹配链接
|
# 匹配链接
|
||||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
urlPatterns: /system/*,/monitor/*,/tool/*,/base/*
|
||||||
|
|
||||||
# 代码生成
|
# 代码生成
|
||||||
gen:
|
gen:
|
||||||
# 作者
|
# 作者
|
||||||
author: ruoyi
|
author: mr
|
||||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||||
packageName: com.ruoyi.project.system
|
packageName: com.ruoyi.project.mr.base
|
||||||
# 自动去除表前缀,默认是true
|
# 自动去除表前缀,默认是true
|
||||||
autoRemovePre: false
|
autoRemovePre: false
|
||||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||||
|
@ -34,3 +34,7 @@ no.update.permission=您没有修改数据的权限,请联系管理员添加
|
|||||||
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
||||||
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
||||||
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
||||||
|
|
||||||
|
#API消息
|
||||||
|
api.success.msg=请求(或处理)成功
|
||||||
|
api.error.msg=请求参数不完整或不正确
|
||||||
|
@ -0,0 +1,82 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.project.mr.base.mapper.BaseCalendarItemMapper">
|
||||||
|
|
||||||
|
<resultMap type="BaseCalendarItem" id="BaseCalendarItemResult">
|
||||||
|
<result property="id" column="ID" />
|
||||||
|
<result property="parentId" column="parent_id" />
|
||||||
|
<result property="work" column="work" />
|
||||||
|
<result property="workDay" column="work_day" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBaseCalendarItemVo">
|
||||||
|
select ID, parent_id, work, work_day, create_by, create_time, update_by, update_time from base_calendar_item
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectBaseCalendarItemList" parameterType="BaseCalendarItem" resultMap="BaseCalendarItemResult">
|
||||||
|
<include refid="selectBaseCalendarItemVo"/>
|
||||||
|
<where>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBaseCalendarItemById" parameterType="String" resultMap="BaseCalendarItemResult">
|
||||||
|
<include refid="selectBaseCalendarItemVo"/>
|
||||||
|
where ID = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBaseCalendarItem" parameterType="BaseCalendarItem">
|
||||||
|
insert into base_calendar_item
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''">ID,</if>
|
||||||
|
<if test="parentId != null and parentId != ''">parent_id,</if>
|
||||||
|
<if test="work != null and work != ''">work,</if>
|
||||||
|
<if test="workDay != null ">work_day,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||||
|
<if test="updateTime != null ">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''">#{id},</if>
|
||||||
|
<if test="parentId != null and parentId != ''">#{parentId},</if>
|
||||||
|
<if test="work != null and work != ''">#{work},</if>
|
||||||
|
<if test="workDay != null ">#{workDay},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null ">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBaseCalendarItem" parameterType="BaseCalendarItem">
|
||||||
|
update base_calendar_item
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="parentId != null and parentId != ''">parent_id = #{parentId},</if>
|
||||||
|
<if test="work != null and work != ''">work = #{work},</if>
|
||||||
|
<if test="workDay != null ">work_day = #{workDay},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where ID = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBaseCalendarItemById" parameterType="String">
|
||||||
|
delete from base_calendar_item where ID = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBaseCalendarItemByIds" parameterType="String">
|
||||||
|
delete from base_calendar_item where ID in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
88
ruoyi/src/main/resources/mybatis/base/BaseCalendarMapper.xml
Normal file
88
ruoyi/src/main/resources/mybatis/base/BaseCalendarMapper.xml
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.project.mr.base.mapper.BaseCalendarMapper">
|
||||||
|
|
||||||
|
<resultMap type="BaseCalendar" id="BaseCalendarResult">
|
||||||
|
<result property="id" column="ID" />
|
||||||
|
<result property="codeid" column="CodeID" />
|
||||||
|
<result property="name" column="Name" />
|
||||||
|
<result property="enabled" column="Enabled" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBaseCalendarVo">
|
||||||
|
select ID, CodeID, Name, Enabled, create_by, create_time, update_by, update_time, remark from base_calendar
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectBaseCalendarList" parameterType="BaseCalendar" resultMap="BaseCalendarResult">
|
||||||
|
<include refid="selectBaseCalendarVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''"> and Name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="enabled != null and enabled != ''"> and Enabled = #{enabled}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBaseCalendarById" parameterType="String" resultMap="BaseCalendarResult">
|
||||||
|
<include refid="selectBaseCalendarVo"/>
|
||||||
|
where ID = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBaseCalendar" parameterType="BaseCalendar">
|
||||||
|
insert into base_calendar
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''">ID,</if>
|
||||||
|
<if test="codeid != null and codeid != ''">CodeID,</if>
|
||||||
|
<if test="name != null and name != ''">Name,</if>
|
||||||
|
<if test="enabled != null and enabled != ''">Enabled,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||||
|
<if test="updateTime != null ">update_time,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''">#{id},</if>
|
||||||
|
<if test="codeid != null and codeid != ''">#{codeid},</if>
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="enabled != null and enabled != ''">#{enabled},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null ">#{updateTime},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBaseCalendar" parameterType="BaseCalendar">
|
||||||
|
update base_calendar
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="codeid != null and codeid != ''">CodeID = #{codeid},</if>
|
||||||
|
<if test="name != null and name != ''">Name = #{name},</if>
|
||||||
|
<if test="enabled != null and enabled != ''">Enabled = #{enabled},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||||
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where ID = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBaseCalendarById" parameterType="String">
|
||||||
|
delete from base_calendar where ID = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBaseCalendarByIds" parameterType="String">
|
||||||
|
delete from base_calendar where ID in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
@ -2,7 +2,7 @@
|
|||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.project.mr.mapper.BaseCompanyMapper">
|
<mapper namespace="com.ruoyi.project.mr.base.mapper.BaseCompanyMapper">
|
||||||
|
|
||||||
<resultMap type="BaseCompany" id="BaseCompanyResult">
|
<resultMap type="BaseCompany" id="BaseCompanyResult">
|
||||||
<result property="id" column="ID" />
|
<result property="id" column="ID" />
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
-- 菜单 SQL
|
-- 菜单 SQL
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||||
values('${functionName}', '3', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 'C', '0', '${permissionPrefix}:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '${functionName}菜单');
|
values('${functionName}', '3', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 'C', '0', '${permissionPrefix}:list', '#', 'admin', now(), '${functionName}菜单');
|
||||||
|
|
||||||
-- 按钮父菜单ID
|
-- 按钮父菜单ID
|
||||||
SELECT @parentId := LAST_INSERT_ID();
|
SELECT @parentId := LAST_INSERT_ID();
|
||||||
|
|
||||||
-- 按钮 SQL
|
-- 按钮 SQL
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||||
values('${functionName}查询', @parentId, '1', '#', '', 1, 'F', '0', '${permissionPrefix}:query', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
values('${functionName}查询', @parentId, '1', '#', '', 1, 'F', '0', '${permissionPrefix}:query', '#', 'admin', now(), '${functionName}查询');
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||||
values('${functionName}新增', @parentId, '2', '#', '', 1, 'F', '0', '${permissionPrefix}:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
values('${functionName}新增', @parentId, '2', '#', '', 1, 'F', '0', '${permissionPrefix}:add', '#', 'admin', now(), '${functionName}新增');
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||||
values('${functionName}修改', @parentId, '3', '#', '', 1, 'F', '0', '${permissionPrefix}:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
values('${functionName}修改', @parentId, '3', '#', '', 1, 'F', '0', '${permissionPrefix}:edit', '#', 'admin', now(), '${functionName}修改');
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||||
values('${functionName}删除', @parentId, '4', '#', '', 1, 'F', '0', '${permissionPrefix}:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
values('${functionName}删除', @parentId, '4', '#', '', 1, 'F', '0', '${permissionPrefix}:remove', '#', 'admin', now(), '${functionName}删除');
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||||
values('${functionName}导出', @parentId, '5', '#', '', 1, 'F', '0', '${permissionPrefix}:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
values('${functionName}导出', @parentId, '5', '#', '', 1, 'F', '0', '${permissionPrefix}:export', '#', 'admin', now(), '${functionName}导出');
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" stripe border fit highlight-current-row :data="${businessName}List" @selection-change="handleSelectionChange" @sort-change='tableSortChange'>
|
<el-table v-loading="loading" stripe border fit highlight-current-row :data="${businessName}List" @selection-change="handleSelectionChange" @sort-change='tableSortChange' @row-dblclick="handleUpdate">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="行号" width="80" align="center">
|
<el-table-column label="行号" width="80" align="center">
|
||||||
<template slot-scope="scope">{{scope.$index + 1}}</template>
|
<template slot-scope="scope">{{scope.$index + 1}}</template>
|
||||||
@ -127,15 +127,17 @@
|
|||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
plain
|
||||||
type="text"
|
size="small"
|
||||||
|
type="primary"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
plain
|
||||||
type="text"
|
size="small"
|
||||||
|
type="primary"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||||
|
Reference in New Issue
Block a user