├── README.md
└── itstack-demo-frame-02
├── itstack-demo-frame-dcs-test
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── org
│ │ │ └── itstack
│ │ │ └── demo
│ │ │ └── controller
│ │ │ └── UserController.java
│ ├── resources
│ │ ├── logback.xml
│ │ ├── spring-config.xml
│ │ └── spring
│ │ │ ├── spring-config-dubbo-consumer.xml
│ │ │ └── spring-mvc.xml
│ └── webapp
│ │ ├── WEB-INF
│ │ └── web.xml
│ │ ├── index.html
│ │ ├── page
│ │ └── user
│ │ │ ├── js
│ │ │ └── user.js
│ │ │ └── user.html
│ │ ├── res
│ │ ├── api
│ │ │ ├── clear.json
│ │ │ ├── init.json
│ │ │ ├── menus.json
│ │ │ ├── table.json
│ │ │ ├── tableSelect.json
│ │ │ └── upload.json
│ │ ├── css
│ │ │ ├── layuimini.css
│ │ │ └── public.css
│ │ ├── images
│ │ │ ├── bg.jpg
│ │ │ ├── captcha.jpg
│ │ │ ├── donate_qrcode.png
│ │ │ ├── favicon.ico
│ │ │ ├── home.png
│ │ │ └── logo.png
│ │ ├── js
│ │ │ ├── lay-config.js
│ │ │ └── lay-module
│ │ │ │ ├── echarts
│ │ │ │ ├── echarts.js
│ │ │ │ └── echartsTheme.js
│ │ │ │ ├── iconPicker
│ │ │ │ └── iconPickerFa.js
│ │ │ │ ├── layuimini
│ │ │ │ └── layuimini.js
│ │ │ │ ├── step-lay
│ │ │ │ ├── step.css
│ │ │ │ └── step.js
│ │ │ │ ├── tableSelect
│ │ │ │ └── tableSelect.js
│ │ │ │ ├── treetable-lay
│ │ │ │ ├── treetable.css
│ │ │ │ └── treetable.js
│ │ │ │ └── wangEditor
│ │ │ │ ├── fonts
│ │ │ │ └── w-e-icon.woff
│ │ │ │ ├── wangEditor.css
│ │ │ │ ├── wangEditor.js
│ │ │ │ ├── wangEditor.min.css
│ │ │ │ ├── wangEditor.min.js
│ │ │ │ └── wangEditor.min.js.map
│ │ ├── lib
│ │ │ ├── font-awesome-4.7.0
│ │ │ │ ├── HELP-US-OUT.txt
│ │ │ │ ├── css
│ │ │ │ │ ├── font-awesome.css
│ │ │ │ │ └── font-awesome.min.css
│ │ │ │ ├── fonts
│ │ │ │ │ ├── FontAwesome.otf
│ │ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ │ ├── fontawesome-webfont.svg
│ │ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ │ ├── fontawesome-webfont.woff
│ │ │ │ │ └── fontawesome-webfont.woff2
│ │ │ │ ├── less
│ │ │ │ │ ├── animated.less
│ │ │ │ │ ├── bordered-pulled.less
│ │ │ │ │ ├── core.less
│ │ │ │ │ ├── fixed-width.less
│ │ │ │ │ ├── font-awesome.less
│ │ │ │ │ ├── icons.less
│ │ │ │ │ ├── larger.less
│ │ │ │ │ ├── list.less
│ │ │ │ │ ├── mixins.less
│ │ │ │ │ ├── path.less
│ │ │ │ │ ├── rotated-flipped.less
│ │ │ │ │ ├── screen-reader.less
│ │ │ │ │ ├── stacked.less
│ │ │ │ │ └── variables.less
│ │ │ │ └── scss
│ │ │ │ │ ├── _animated.scss
│ │ │ │ │ ├── _bordered-pulled.scss
│ │ │ │ │ ├── _core.scss
│ │ │ │ │ ├── _fixed-width.scss
│ │ │ │ │ ├── _icons.scss
│ │ │ │ │ ├── _larger.scss
│ │ │ │ │ ├── _list.scss
│ │ │ │ │ ├── _mixins.scss
│ │ │ │ │ ├── _path.scss
│ │ │ │ │ ├── _rotated-flipped.scss
│ │ │ │ │ ├── _screen-reader.scss
│ │ │ │ │ ├── _stacked.scss
│ │ │ │ │ ├── _variables.scss
│ │ │ │ │ └── font-awesome.scss
│ │ │ ├── jq-module
│ │ │ │ ├── jquery.particleground.min.js
│ │ │ │ ├── paigusu.min.js
│ │ │ │ └── zyupload
│ │ │ │ │ ├── zyupload-1.0.0.min.css
│ │ │ │ │ └── zyupload-1.0.0.min.js
│ │ │ ├── jquery-3.4.1
│ │ │ │ └── jquery-3.4.1.min.js
│ │ │ └── layui-v2.5.4
│ │ │ │ ├── css
│ │ │ │ ├── layui.css
│ │ │ │ ├── layui.mobile.css
│ │ │ │ └── modules
│ │ │ │ │ ├── code.css
│ │ │ │ │ ├── laydate
│ │ │ │ │ └── default
│ │ │ │ │ │ └── laydate.css
│ │ │ │ │ └── layer
│ │ │ │ │ └── default
│ │ │ │ │ ├── icon-ext.png
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── layer.css
│ │ │ │ │ ├── loading-0.gif
│ │ │ │ │ ├── loading-1.gif
│ │ │ │ │ └── loading-2.gif
│ │ │ │ ├── font
│ │ │ │ ├── iconfont.eot
│ │ │ │ ├── iconfont.svg
│ │ │ │ ├── iconfont.ttf
│ │ │ │ ├── iconfont.woff
│ │ │ │ └── iconfont.woff2
│ │ │ │ ├── images
│ │ │ │ └── face
│ │ │ │ │ ├── 0.gif
│ │ │ │ │ ├── 1.gif
│ │ │ │ │ ├── 10.gif
│ │ │ │ │ ├── 11.gif
│ │ │ │ │ ├── 12.gif
│ │ │ │ │ ├── 13.gif
│ │ │ │ │ ├── 14.gif
│ │ │ │ │ ├── 15.gif
│ │ │ │ │ ├── 16.gif
│ │ │ │ │ ├── 17.gif
│ │ │ │ │ ├── 18.gif
│ │ │ │ │ ├── 19.gif
│ │ │ │ │ ├── 2.gif
│ │ │ │ │ ├── 20.gif
│ │ │ │ │ ├── 21.gif
│ │ │ │ │ ├── 22.gif
│ │ │ │ │ ├── 23.gif
│ │ │ │ │ ├── 24.gif
│ │ │ │ │ ├── 25.gif
│ │ │ │ │ ├── 26.gif
│ │ │ │ │ ├── 27.gif
│ │ │ │ │ ├── 28.gif
│ │ │ │ │ ├── 29.gif
│ │ │ │ │ ├── 3.gif
│ │ │ │ │ ├── 30.gif
│ │ │ │ │ ├── 31.gif
│ │ │ │ │ ├── 32.gif
│ │ │ │ │ ├── 33.gif
│ │ │ │ │ ├── 34.gif
│ │ │ │ │ ├── 35.gif
│ │ │ │ │ ├── 36.gif
│ │ │ │ │ ├── 37.gif
│ │ │ │ │ ├── 38.gif
│ │ │ │ │ ├── 39.gif
│ │ │ │ │ ├── 4.gif
│ │ │ │ │ ├── 40.gif
│ │ │ │ │ ├── 41.gif
│ │ │ │ │ ├── 42.gif
│ │ │ │ │ ├── 43.gif
│ │ │ │ │ ├── 44.gif
│ │ │ │ │ ├── 45.gif
│ │ │ │ │ ├── 46.gif
│ │ │ │ │ ├── 47.gif
│ │ │ │ │ ├── 48.gif
│ │ │ │ │ ├── 49.gif
│ │ │ │ │ ├── 5.gif
│ │ │ │ │ ├── 50.gif
│ │ │ │ │ ├── 51.gif
│ │ │ │ │ ├── 52.gif
│ │ │ │ │ ├── 53.gif
│ │ │ │ │ ├── 54.gif
│ │ │ │ │ ├── 55.gif
│ │ │ │ │ ├── 56.gif
│ │ │ │ │ ├── 57.gif
│ │ │ │ │ ├── 58.gif
│ │ │ │ │ ├── 59.gif
│ │ │ │ │ ├── 6.gif
│ │ │ │ │ ├── 60.gif
│ │ │ │ │ ├── 61.gif
│ │ │ │ │ ├── 62.gif
│ │ │ │ │ ├── 63.gif
│ │ │ │ │ ├── 64.gif
│ │ │ │ │ ├── 65.gif
│ │ │ │ │ ├── 66.gif
│ │ │ │ │ ├── 67.gif
│ │ │ │ │ ├── 68.gif
│ │ │ │ │ ├── 69.gif
│ │ │ │ │ ├── 7.gif
│ │ │ │ │ ├── 70.gif
│ │ │ │ │ ├── 71.gif
│ │ │ │ │ ├── 8.gif
│ │ │ │ │ └── 9.gif
│ │ │ │ ├── lay
│ │ │ │ └── modules
│ │ │ │ │ ├── carousel.js
│ │ │ │ │ ├── code.js
│ │ │ │ │ ├── colorpicker.js
│ │ │ │ │ ├── element.js
│ │ │ │ │ ├── flow.js
│ │ │ │ │ ├── form.js
│ │ │ │ │ ├── jquery.js
│ │ │ │ │ ├── laydate.js
│ │ │ │ │ ├── layedit.js
│ │ │ │ │ ├── layer.js
│ │ │ │ │ ├── laypage.js
│ │ │ │ │ ├── laytpl.js
│ │ │ │ │ ├── mobile.js
│ │ │ │ │ ├── rate.js
│ │ │ │ │ ├── slider.js
│ │ │ │ │ ├── table.js
│ │ │ │ │ ├── transfer.js
│ │ │ │ │ ├── tree.js
│ │ │ │ │ ├── upload.js
│ │ │ │ │ └── util.js
│ │ │ │ ├── layui.all.js
│ │ │ │ └── layui.js
│ │ └── page
│ │ │ ├── 404.html
│ │ │ ├── button.html
│ │ │ ├── color-select.html
│ │ │ ├── editor.html
│ │ │ ├── form-step.html
│ │ │ ├── form.html
│ │ │ ├── icon-picker.html
│ │ │ ├── icon.html
│ │ │ ├── layer.html
│ │ │ ├── login-1.html
│ │ │ ├── login-2.html
│ │ │ ├── menu.html
│ │ │ ├── setting.html
│ │ │ ├── table-select.html
│ │ │ ├── upload.html
│ │ │ ├── user-password.html
│ │ │ ├── user-setting.html
│ │ │ ├── welcome-1.html
│ │ │ └── welcome.html
│ │ └── res_layui.html
│ └── test
│ └── java
│ └── org
│ └── itstack
│ └── demo
│ └── test
│ └── ApiTest.java
├── itstack-demo-frame-dcs
├── itstack-demo-frame-dcs-ddd
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── itstack
│ │ │ │ └── demo
│ │ │ │ ├── application
│ │ │ │ ├── UserService.java
│ │ │ │ └── task
│ │ │ │ │ └── UserTask.java
│ │ │ │ ├── domain
│ │ │ │ ├── model
│ │ │ │ │ ├── aggregates
│ │ │ │ │ │ └── UserInfoCollect.java
│ │ │ │ │ ├── req
│ │ │ │ │ │ └── UserReq.java
│ │ │ │ │ └── vo
│ │ │ │ │ │ └── UserInfo.java
│ │ │ │ ├── repostory
│ │ │ │ │ └── IUserRepository.java
│ │ │ │ └── service
│ │ │ │ │ └── UserServiceImpl.java
│ │ │ │ ├── infrastructure
│ │ │ │ ├── dao
│ │ │ │ │ └── IUserDao.java
│ │ │ │ ├── po
│ │ │ │ │ └── User.java
│ │ │ │ ├── repository
│ │ │ │ │ ├── UserRepository.java
│ │ │ │ │ ├── mysql
│ │ │ │ │ │ └── UserDBRepository.java
│ │ │ │ │ └── redis
│ │ │ │ │ │ └── UserRedisRepository.java
│ │ │ │ └── util
│ │ │ │ │ └── Redis.java
│ │ │ │ └── interfaces
│ │ │ │ ├── assembler
│ │ │ │ └── UserAssembler.java
│ │ │ │ └── facade
│ │ │ │ └── UserRpc.java
│ │ ├── resources
│ │ │ ├── logback.xml
│ │ │ ├── mapper
│ │ │ │ └── User_Mapper.xml
│ │ │ ├── mybatis-config.xml
│ │ │ ├── props
│ │ │ │ ├── config.properties
│ │ │ │ └── jdbc.properties
│ │ │ ├── spring-config.xml
│ │ │ └── spring
│ │ │ │ ├── spring-config-datasource.xml
│ │ │ │ ├── spring-config-dubbo-provider.xml
│ │ │ │ ├── spring-config-redis.xml
│ │ │ │ ├── spring-config-schedule-userTask.xml
│ │ │ │ └── spring-mvc.xml
│ │ └── webapp
│ │ │ └── WEB-INF
│ │ │ └── web.xml
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── itstack
│ │ └── demo
│ │ └── test
│ │ └── ApiTest.java
├── itstack-demo-frame-dcs-rpc
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── itstack
│ │ └── demo
│ │ └── rpc
│ │ ├── IUserRpc.java
│ │ ├── dto
│ │ └── UserDto.java
│ │ ├── req
│ │ └── UserReq.java
│ │ └── res
│ │ └── UserRes.java
└── pom.xml
└── itstack-demo-frame-parent
├── itstack-demo-frame-common
├── pom.xml
└── src
│ └── main
│ └── java
│ └── org
│ └── itstack
│ └── demo
│ └── frame
│ └── common
│ ├── constants
│ └── Constants.java
│ └── domain
│ ├── PageRequest.java
│ └── Result.java
└── pom.xml
/README.md:
--------------------------------------------------------------------------------
1 | # itstack-demo-frame
2 | itstack-demo-frame
3 |
--------------------------------------------------------------------------------
/itstack-demo-frame-02/itstack-demo-frame-dcs-test/src/main/java/org/itstack/demo/controller/UserController.java:
--------------------------------------------------------------------------------
1 | package org.itstack.demo.controller;
2 |
3 | import com.alibaba.fastjson.JSON;
4 | import org.itstack.demo.frame.common.domain.Result;
5 | import org.itstack.demo.rpc.IUserRpc;
6 | import org.itstack.demo.rpc.req.UserReq;
7 | import org.itstack.demo.rpc.res.UserRes;
8 | import org.slf4j.Logger;
9 | import org.slf4j.LoggerFactory;
10 | import org.springframework.stereotype.Controller;
11 | import org.springframework.web.bind.annotation.RequestMapping;
12 | import org.springframework.web.bind.annotation.RequestMethod;
13 | import org.springframework.web.bind.annotation.ResponseBody;
14 |
15 | import javax.annotation.Resource;
16 |
17 | /**
18 | * 微信公众号:bugstack虫洞栈 | 欢迎关注学习专题案例
19 | * 论坛:http://bugstack.cn
20 | * Create by 付政委 on @2019
21 | */
22 | @Controller
23 | @RequestMapping("/api/user/")
24 | public class UserController {
25 |
26 | private Logger logger = LoggerFactory.getLogger(UserController.class);
27 |
28 | @Resource
29 | private IUserRpc userRpc;
30 |
31 | @RequestMapping(path = "queryUserInfoList", method = RequestMethod.GET)
32 | @ResponseBody
33 | public UserRes queryUserInfoList(String json, String page, String limit) {
34 | try {
35 | logger.info("查询用户信息列表开始。json:{}", json);
36 | UserReq req = JSON.parseObject(json, UserReq.class);
37 | if (null == req) req = new UserReq();
38 | req.setPage(page, limit);
39 | UserRes userRes = userRpc.queryUserInfoList(req);
40 | logger.info("查询用户信息列表完成。userRes:{}", JSON.toJSONString(userRes));
41 | return userRes;
42 | } catch (Exception e) {
43 | logger.error("查询用户信息列表失败。json:{}", json, e);
44 | return new UserRes(Result.buildErrorResult());
45 | }
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/itstack-demo-frame-02/itstack-demo-frame-dcs-test/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
18 |
59 | | 用户ID | 60 |姓名 | 61 |年龄 | 62 |地址 | 63 |入学时间 | 64 |状态 | 65 |
---|
14 | 颜色选择器使用开源项目:paigusu17 | 18 | 27 | 28 |
15 | TableSelect 16 |
29 | $(function () { 30 | $('.paigusu').paigusu({ 31 | color: '#1926dc',//初始色 支持两种配置方案 32 | }, function (event, obj) { 33 | console.log(event); 34 | console.log(obj); 35 | $(event).css('color', '#' + obj.hex) 36 | }); 37 | }); 38 |39 |
17 | 富文本编辑器使用开源项目:wangEditor22 | 23 |
18 | 具体使用请参考下方官网,以下仅做示例,上传接口请改为实际后端接口
19 | 目前上传接口返回数据是写死在json里面的
20 | wangEditor 21 |
欢迎使用 wangEditor 富文本编辑器
25 |28 | var E = window.wangEditor; 29 | var editor = new E('#editor'); 30 | editor.customConfig.uploadImgServer = "../api/upload.json"; 31 | editor.customConfig.uploadFileName = 'image'; 32 | editor.customConfig.pasteFilterStyle = false; 33 | editor.customConfig.uploadImgMaxLength = 5; 34 | editor.customConfig.uploadImgHooks = { 35 | // 上传超时 36 | timeout: function (xhr, editor) { 37 | layer.msg('上传超时!') 38 | }, 39 | // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置 40 | customInsert: function (insertImg, result, editor) { 41 | console.log(result); 42 | if (result.code == 1) { 43 | var url = result.data.url; 44 | url.forEach(function (e) { 45 | insertImg(e); 46 | }) 47 | } else { 48 | layer.msg(result.msg); 49 | } 50 | } 51 | }; 52 | editor.customConfig.customAlert = function (info) { 53 | layer.msg(info); 54 | }; 55 | editor.create(); 56 |57 | 58 |
18 | fa图标选择器根据开源Layui-IconPicker插件修改而来。22 | 23 |
19 | 不同的参数的地方是,去掉了type参数,新增url参数,url参数为fa图标less/variables.less文件路径。
20 | Layui-IconPicker 21 |
40 | iconPickerFa.render({ 41 | // 选择器,推荐使用input 42 | elem: '#iconPicker', 43 | // fa 图标接口 44 | url: "/lib/font-awesome-4.7.0/less/variables.less", 45 | // 是否开启搜索:true/false,默认true 46 | search: true, 47 | // 是否开启分页:true/false,默认true 48 | page: true, 49 | // 每页显示数量,默认12 50 | limit: 12, 51 | // 点击回调 52 | click: function (data) { 53 | console.log(data); 54 | }, 55 | // 渲染成功后的回调 56 | success: function (d) { 57 | console.log(d); 58 | } 59 | }); 60 |61 | 62 |
14 | 上传组件使用开源项目:zyupload17 | 18 |
15 | zyupload 16 |
19 | // 初始化插件 20 | $("#zyupload").zyUpload({ 21 | width: "650px", // 宽度 22 | height: "400px", // 宽度 23 | itemWidth: "140px", // 文件项的宽度 24 | itemHeight: "115px", // 文件项的高度 25 | url: "api/upload", // 上传文件的路径 26 | fileType: ["jpg", "png", "txt", "js", "exe"],// 上传文件的类型 27 | fileSize: 51200000, // 上传文件的大小 28 | multiple: true, // 是否可以多个文件上传 29 | dragDrop: true, // 是否可以拖动上传文件 30 | tailor: true, // 是否可以裁剪图片 31 | del: true, // 是否可以删除文件 32 | finishDel: false, // 是否在上传文件完成后删除预览 33 | /* 外部获得的回调接口 */ 34 | onSelect: function (selectFiles, allFiles) { // 选择文件的回调方法 selectFile:当前选中的文件 allFiles:还没上传的全部文件 35 | console.info("当前选择了以下文件:"); 36 | console.info(selectFiles); 37 | }, 38 | onDelete: function (file, files) { // 删除一个文件的回调方法 file:当前删除的文件 files:删除之后的文件 39 | console.info("当前删除了此文件:"); 40 | console.info(file.name); 41 | }, 42 | onSuccess: function (file, response) { // 文件上传成功的回调方法 43 | console.info("此文件上传成功:"); 44 | console.info(file.name); 45 | console.info("此文件上传到服务器地址:"); 46 | console.info(response); 47 | $("#uploadInf").append("59 |上传成功,文件地址是:" + response + "
"); 48 | }, 49 | onFailure: function (file, response) { // 文件上传失败的回调方法 50 | console.info("此文件上传失败:"); 51 | console.info(file.name); 52 | }, 53 | onComplete: function (response) { // 上传完成的回调方法 54 | console.info("文件上传完成"); 55 | console.info(response); 56 | } 57 | }); 58 |