部门管理基础文件完成

pull/1/head
iamsongpeng 2020-03-03 15:50:38 +08:00
parent 1f2ad8d98d
commit b78590619a
13 changed files with 115 additions and 10 deletions

View File

@ -44,7 +44,7 @@ public class CodeGenerator {
// dsc.setSchemaName("public"); // dsc.setSchemaName("public");
dsc.setDriverName("com.mysql.cj.jdbc.Driver"); dsc.setDriverName("com.mysql.cj.jdbc.Driver");
dsc.setUsername("root"); dsc.setUsername("root");
dsc.setPassword("123456"); dsc.setPassword("root");
mpg.setDataSource(dsc); mpg.setDataSource(dsc);
// 包配置 // 包配置

View File

@ -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 {
}

View File

@ -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;
}

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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 {
}

View File

@ -20,7 +20,7 @@
<appender-ref ref="stash" /> <appender-ref ref="stash" />
</appender> </appender>
<root level="INFO"> <root>
<appender-ref ref="STDOUT"/> <appender-ref ref="STDOUT"/>
<appender-ref ref="stash"/> <appender-ref ref="stash"/>
</root> </root>

View File

@ -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>

View File

@ -27,6 +27,7 @@
</div> </div>
</div> </div>
</div> </div>
</body>
<!-- 表格操作列 --> <!-- 表格操作列 -->
<script type="text/html" id="demoTreeTableBar1"> <script type="text/html" id="demoTreeTableBar1">
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a> <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
@ -131,5 +132,4 @@
}); });
}); });
</script> </script>
</body>
</html> </html>

View File

@ -38,7 +38,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label for="js-is-deleted" class="layui-form-label sp-required">状态 <label for="js-is-deleted" class="layui-form-label sp-required">状态
</label> </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="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="1" title="已删除" <#if result.deleted == "1">checked</#if>>
<input type="radio" name="deleted" value="2" title="已禁用" <#if result.deleted == "2">checked</#if>> <input type="radio" name="deleted" value="2" title="已禁用" <#if result.deleted == "2">checked</#if>>
@ -56,7 +56,6 @@
</form> </form>
</div> </div>
</div> </div>
</body>
<script> <script>
layui.use(['form', 'util'], function () { layui.use(['form', 'util'], function () {
var form = layui.form, var form = layui.form,
@ -73,4 +72,5 @@
}); });
}); });
</script> </script>
</body>
</html> </html>

View File

@ -37,7 +37,6 @@
<table class="layui-hide" id="record-table" lay-filter="js-table-filter"></table> <table class="layui-hide" id="record-table" lay-filter="js-table-filter"></table>
</div> </div>
</div> </div>
</body>
<!--表格头操作模板--> <!--表格头操作模板-->
<script type="text/html" id="toolbar-top"> <script type="text/html" id="toolbar-top">
@ -152,7 +151,7 @@
if (obj.event === 'edit') { if (obj.event === 'edit') {
splayer.open({ splayer.open({
title: '编辑', title: '编辑',
area: ['90%', '90%'], area: ['800px', '400px'],
// 请求url参数 // 请求url参数
spWhere: {id: data.id}, spWhere: {id: data.id},
content: '${request.contextPath}/admin/sys/role/add-or-update-ui' content: '${request.contextPath}/admin/sys/role/add-or-update-ui'
@ -167,7 +166,7 @@
}); });
} }
}); });
}); });
</script> </script>
</body>
</html> </html>

View File

@ -192,7 +192,6 @@
</form> </form>
</div> </div>
</div> </div>
</body>
<script> <script>
layui.use(['form', 'util'], function () { layui.use(['form', 'util'], function () {
var form = layui.form, var form = layui.form,
@ -219,4 +218,5 @@
}); });
}); });
</script> </script>
</body>
</html> </html>

View File

@ -195,7 +195,6 @@
}); });
} }
}); });
}); });
</script> </script>
</body> </body>