部门管理基础文件完成
parent
1f2ad8d98d
commit
b78590619a
|
@ -44,7 +44,7 @@ public class CodeGenerator {
|
|||
// dsc.setSchemaName("public");
|
||||
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
|
||||
dsc.setUsername("root");
|
||||
dsc.setPassword("123456");
|
||||
dsc.setPassword("root");
|
||||
mpg.setDataSource(dsc);
|
||||
|
||||
// 包配置
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package com.songpeng.sparchetype.system.controller.admin;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import com.songpeng.sparchetype.common.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author SongPeng
|
||||
* @since 2020-03-03
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/dept/sp-sys-department")
|
||||
public class SysDepartmentController extends BaseController {
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.songpeng.sparchetype.system.entity;
|
||||
|
||||
import com.songpeng.sparchetype.common.BaseEntity;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author SongPeng
|
||||
* @since 2020-03-03
|
||||
*/
|
||||
public class SysDepartment extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String parentId;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer sortNum;
|
||||
|
||||
/**
|
||||
* 逻辑删除:1 表示删除,0 表示未删除,2 表示禁用
|
||||
*/
|
||||
private String isDeleted;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.songpeng.sparchetype.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.songpeng.sparchetype.system.entity.SysDepartment;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author SongPeng
|
||||
* @since 2020-03-03
|
||||
*/
|
||||
public interface SysDepartmentMapper extends BaseMapper<SysDepartment> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.songpeng.sparchetype.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.songpeng.sparchetype.system.entity.SysDepartment;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author SongPeng
|
||||
* @since 2020-03-03
|
||||
*/
|
||||
public interface ISysDepartmentService extends IService<SysDepartment> {
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.songpeng.sparchetype.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.songpeng.sparchetype.system.entity.SysDepartment;
|
||||
import com.songpeng.sparchetype.system.mapper.SysDepartmentMapper;
|
||||
import com.songpeng.sparchetype.system.service.ISysDepartmentService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author SongPeng
|
||||
* @since 2020-03-03
|
||||
*/
|
||||
@Service
|
||||
public class SysDepartmentServiceImpl extends ServiceImpl<SysDepartmentMapper, SysDepartment> implements ISysDepartmentService {
|
||||
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
<appender-ref ref="stash" />
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<root>
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="stash"/>
|
||||
</root>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?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.songpeng.sparchetype.system.mapper.SysDepartmentMapper">
|
||||
|
||||
</mapper>
|
|
@ -27,6 +27,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 表格操作列 -->
|
||||
<script type="text/html" id="demoTreeTableBar1">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
|
||||
|
@ -131,5 +132,4 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -38,7 +38,7 @@
|
|||
<div class="layui-form-item">
|
||||
<label for="js-is-deleted" class="layui-form-label sp-required">状态
|
||||
</label>
|
||||
<div class="layui-input-inline" id="js-is-deleted">
|
||||
<div class="layui-input-block" id="js-is-deleted" style="width: 310px;">
|
||||
<input type="radio" name="deleted" value="0" title="正常" <#if result.deleted == "0" || !(result??)>checked</#if>>
|
||||
<input type="radio" name="deleted" value="1" title="已删除" <#if result.deleted == "1">checked</#if>>
|
||||
<input type="radio" name="deleted" value="2" title="已禁用" <#if result.deleted == "2">checked</#if>>
|
||||
|
@ -56,7 +56,6 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use(['form', 'util'], function () {
|
||||
var form = layui.form,
|
||||
|
@ -73,4 +72,5 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -37,7 +37,6 @@
|
|||
<table class="layui-hide" id="record-table" lay-filter="js-table-filter"></table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<!--表格头操作模板-->
|
||||
<script type="text/html" id="toolbar-top">
|
||||
|
@ -152,7 +151,7 @@
|
|||
if (obj.event === 'edit') {
|
||||
splayer.open({
|
||||
title: '编辑',
|
||||
area: ['90%', '90%'],
|
||||
area: ['800px', '400px'],
|
||||
// 请求url参数
|
||||
spWhere: {id: data.id},
|
||||
content: '${request.contextPath}/admin/sys/role/add-or-update-ui'
|
||||
|
@ -167,7 +166,7 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -192,7 +192,6 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use(['form', 'util'], function () {
|
||||
var form = layui.form,
|
||||
|
@ -219,4 +218,5 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -195,7 +195,6 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue