疯狂的狮子li
2021-09-26 125547f08f9123913b8ca704208fce7e99d011c1
Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev

 Conflicts:
 pom.xml
 ruoyi-common/src/main/java/com/ruoyi/common/utils/html/HTMLFilter.java
 ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
 ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
 ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
 ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java
 ruoyi-ui/src/views/monitor/server/index.vue
已修改3个文件
45 ■■■■ 文件已修改
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/tool/gen/editTable.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
@@ -557,7 +557,7 @@
    /** ${subTable.functionName}删除按钮操作 */
    handleDelete${subClassName}() {
      if (this.checked${subClassName}.length == 0) {
        this.msgError("请先选择要删除的${subTable.functionName}数据");
        this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
      } else {
        const ${subclassName}List = this.${subclassName}List;
        const checked${subClassName} = this.checked${subClassName};
ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java
@@ -25,7 +25,7 @@
/**
 * 登录校验方法
 *
 *
 * @author ruoyi
 */
@Component
@@ -48,7 +48,7 @@
    /**
     * 登录验证
     *
     *
     * @param username 用户名
     * @param password 密码
     * @param code 验证码
@@ -81,20 +81,20 @@
            }
            else
            {
                asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage(), request);
                AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage()));
                throw new ServiceException(e.getMessage());
            }
        }
        asyncService.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), request);
        LoginUser loginUser = (LoginUser) authentication.getPrincipal();
        recordLoginInfo(loginUser.getUser());
        recordLoginInfo(loginUser.getUserId());
        // 生成token
        return tokenService.createToken(loginUser);
    }
    /**
     * 校验验证码
     *
     *
     * @param username 用户名
     * @param code 验证码
     * @param uuid 唯一标识
@@ -116,12 +116,15 @@
    /**
     * 记录登录信息
     *
     * @param userId 用户ID
     */
    public void recordLoginInfo(SysUser user)
    public void recordLoginInfo(Long userId)
    {
        user.setLoginIp(ServletUtils.getClientIP());
        user.setLoginDate(DateUtils.getNowDate());
        user.setUpdateBy(user.getUserName());
        userService.updateUserProfile(user);
        SysUser sysUser = new SysUser();
        sysUser.setUserId(userId);
        sysUser.setLoginIp(IpUtils.getIpAddr(ServletUtils.getRequest()));
        sysUser.setLoginDate(DateUtils.getNowDate());
        userService.updateUserProfile(sysUser);
    }
}
ruoyi-ui/src/views/tool/gen/editTable.vue
@@ -4,8 +4,8 @@
      <el-tab-pane label="基本信息" name="basic">
        <basic-info-form ref="basicInfo" :info="info" />
      </el-tab-pane>
      <el-tab-pane label="字段信息" name="cloum">
        <el-table ref="dragTable" :data="cloumns" row-key="columnId" :max-height="tableHeight">
      <el-tab-pane label="字段信息" name="columnInfo">
        <el-table ref="dragTable" :data="columns" row-key="columnId" :max-height="tableHeight">
          <el-table-column label="序号" type="index" min-width="5%" class-name="allowDrag" />
          <el-table-column
            label="字段列名"
@@ -141,13 +141,13 @@
  data() {
    return {
      // 选中选项卡的 name
      activeName: "cloum",
      activeName: "columnInfo",
      // 表格的高度
      tableHeight: document.documentElement.scrollHeight - 245 + "px",
      // 表信息
      tables: [],
      // 表列信息
      cloumns: [],
      columns: [],
      // 字典信息
      dictOptions: [],
      // 菜单信息
@@ -161,7 +161,7 @@
    if (tableId) {
      // 获取表详细信息
      getGenTable(tableId).then(res => {
        this.cloumns = res.data.rows;
        this.columns = res.data.rows;
        this.info = res.data.info;
        this.tables = res.data.tables;
      });
@@ -184,7 +184,7 @@
        const validateResult = res.every(item => !!item);
        if (validateResult) {
          const genTable = Object.assign({}, basicForm.model, genForm.model);
          genTable.columns = this.cloumns;
          genTable.columns = this.columns;
          genTable.params = {
            treeCode: genTable.treeCode,
            treeName: genTable.treeName,
@@ -220,10 +220,10 @@
    const sortable = Sortable.create(el, {
      handle: ".allowDrag",
      onEnd: evt => {
        const targetRow = this.cloumns.splice(evt.oldIndex, 1)[0];
        this.cloumns.splice(evt.newIndex, 0, targetRow);
        for (let index in this.cloumns) {
          this.cloumns[index].sort = parseInt(index) + 1;
        const targetRow = this.columns.splice(evt.oldIndex, 1)[0];
        this.columns.splice(evt.newIndex, 0, targetRow);
        for (let index in this.columns) {
          this.columns[index].sort = parseInt(index) + 1;
        }
      }
    });