├── README.md ├── family-tree-sea-ssr ├── .editorconfig ├── .eslintrc.js ├── .gitignore ├── README.md ├── app.html ├── assets │ ├── README.md │ ├── addft.png │ ├── backupstore.png │ ├── bamboo.jpg │ ├── bambooback.jpg │ ├── bambooback2.jpg │ ├── blur.jpg │ ├── brush.png │ ├── circle.png │ ├── clear.png │ ├── comment.png │ ├── delete20.png │ ├── demo.png │ ├── editbutton.png │ ├── emperor.jpg │ ├── enter.png │ ├── envelope.jpg │ ├── excel30.png │ ├── go-back-icon.png │ ├── inboxtitle.png │ ├── lifetitle.png │ ├── logo-black.png │ ├── logo.png │ ├── logo_local.png │ ├── logo_red.png │ ├── manicon.png │ ├── onlinesite.png │ ├── overlay_text.png │ ├── parchment-contact.png │ ├── parchment-home-big.png │ ├── parchment-home-tiny.png │ ├── parchment_block.jpg │ ├── partial_canvas.jpg │ ├── plus30.png │ ├── remove30.png │ ├── resetpos.png │ ├── screenshot.png │ ├── snapshot30.png │ ├── snapshottitle.png │ ├── square.png │ ├── tree.png │ ├── womanicon.png │ ├── xu.png │ ├── youjianrenwu.png │ ├── zanwu.jpg │ ├── zanwukuaizhao.png │ └── zhujianbeijing.jpg ├── common │ ├── http-commons.js │ └── state.js ├── components │ ├── AppLogo.vue │ ├── Header.vue │ └── README.md ├── css │ ├── bootstrap_overwrite.css │ └── d3-context-menu.css ├── layouts │ ├── README.md │ └── default.vue ├── middleware │ └── README.md ├── mixins │ ├── base.js │ ├── staticbase.js │ └── treeAlign.js ├── nuxt.config.js ├── package-lock.json ├── package.json ├── pages │ ├── README.md │ ├── about │ │ └── index.vue │ ├── contact │ │ └── index.vue │ ├── create-family-tree │ │ └── index.vue │ ├── familytree │ │ └── index.vue │ ├── familytreedetail │ │ └── _id.vue │ ├── index.vue │ ├── latestnews │ │ └── index.vue │ ├── login │ │ └── index.vue │ ├── notifications │ │ └── index.vue │ ├── person │ │ └── _id.vue │ ├── profile │ │ └── index.vue │ ├── regulation │ │ └── index.vue │ ├── reset-password-success │ │ └── index.vue │ ├── snapshot-summary │ │ └── index.vue │ └── working │ │ └── index.vue ├── plugins │ ├── README.md │ ├── element-ui.js │ ├── image-upload-profile.js │ ├── quill-editor.js │ ├── v-lazy-img.js │ └── vue-verify.js ├── static │ ├── README.md │ ├── favicon.ico │ └── imgs │ │ ├── back-home.jpg │ │ ├── backup.png │ │ ├── bianjishengping1.jpeg │ │ ├── bianjishengping2.jpeg │ │ ├── bianjixu.jpeg │ │ ├── blur.jpg │ │ ├── book.png │ │ ├── bookback.jpg │ │ ├── browser.png │ │ ├── buildrelation.jpeg │ │ ├── caocao.png │ │ ├── caocao_life.png │ │ ├── caocaojubu.png │ │ ├── circle.png │ │ ├── createFt1.jpeg │ │ ├── createFt2.jpeg │ │ ├── createandbuildrelation.jpeg │ │ ├── createandbuildrelation2.jpeg │ │ ├── createpersonnode.jpeg │ │ ├── deleterelation.jpeg │ │ ├── demo_xu.png │ │ ├── emperor.jpg │ │ ├── excel.jpeg │ │ ├── exportexcel.jpeg │ │ ├── exportimg.jpeg │ │ ├── favicon.ico │ │ ├── free.png │ │ ├── gege.png │ │ ├── girlfriend.png │ │ ├── gonggongpu.jpeg │ │ ├── gonggongpu2.jpeg │ │ ├── gonggongpu3.jpeg │ │ ├── guaiqiao.png │ │ ├── guanliyuan.png │ │ ├── guanxititle.png │ │ ├── hanshi.png │ │ ├── houzhou.png │ │ ├── huajinan.png │ │ ├── huajinv.png │ │ ├── huangdi.png │ │ ├── huanghou.png │ │ ├── intro_1.png │ │ ├── jinruxu.jpeg │ │ ├── kuaizhao.jpeg │ │ ├── liuche.png │ │ ├── llj.png │ │ ├── lock.png │ │ ├── logo.png │ │ ├── manicon.png │ │ ├── manicon_small.png │ │ ├── meinv2.png │ │ ├── menggumei.png │ │ ├── mingdi.png │ │ ├── mu.jpg │ │ ├── multijiapu.png │ │ ├── noimage.jpg │ │ ├── nvbing.png │ │ ├── nvhai.png │ │ ├── oldbook.jpg │ │ ├── oldbook_public.jpg │ │ ├── parchment-contact-tiny.png │ │ ├── privacy.png │ │ ├── qibing.png │ │ ├── qingdi.png │ │ ├── qipao.png │ │ ├── quanxian.jpeg │ │ ├── quanxian2.jpeg │ │ ├── quanxianguanli.jpeg │ │ ├── rahmen.png │ │ ├── shanchukuaizhao.jpeg │ │ ├── shaomin.png │ │ ├── shengping.jpeg │ │ ├── shibing.png │ │ ├── shuaige.png │ │ ├── shunv.png │ │ ├── shusheng.png │ │ ├── snapback.jpg │ │ ├── square.png │ │ ├── touxiangjiben.jpeg │ │ ├── weijiu.png │ │ ├── weixinshouqian.jpg │ │ ├── womanicon.png │ │ ├── womanicon2.png │ │ ├── xizhuangnan.png │ │ ├── yijiao.jpeg │ │ ├── yuan.png │ │ ├── zanwujiapu.png │ │ ├── zhifubaoshouqian.jpg │ │ ├── zhixing.png │ │ ├── zhujianweisuo.jpg │ │ └── zhuyuanzhang.png └── store │ └── README.md ├── family-tree-sea ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── family │ │ │ └── tree │ │ │ └── sea │ │ │ └── familytreesea │ │ │ ├── FamilyTreeSeaApplication.java │ │ │ ├── config │ │ │ ├── AppConfig.java │ │ │ ├── CustomAuthenticationProvider.java │ │ │ ├── DeleteResourceAfterDownload.java │ │ │ ├── DeleteResourceAfterDownloadAspect.java │ │ │ ├── FtConstant.java │ │ │ ├── PathConstants.java │ │ │ ├── PrivilegeConstant.java │ │ │ ├── RESTAuthenticationEntryPoint.java │ │ │ ├── RESTAuthenticationFailureHandler.java │ │ │ ├── RESTAuthenticationSuccessHandler.java │ │ │ ├── RequestFilter.java │ │ │ ├── SQLiteDialect.java │ │ │ └── WebSecurityConfig.java │ │ │ ├── controller │ │ │ ├── FamilyTreeController.java │ │ │ ├── PersonController.java │ │ │ ├── RegisterController.java │ │ │ ├── RelationController.java │ │ │ ├── ResourceController.java │ │ │ └── UserController.java │ │ │ ├── entity │ │ │ ├── AccessRight.java │ │ │ ├── FamilyTree.java │ │ │ ├── ImageUploadHistory.java │ │ │ ├── Person.java │ │ │ ├── Relationship.java │ │ │ ├── Role.java │ │ │ ├── Snapshot.java │ │ │ ├── SnapshotImageUpload.java │ │ │ ├── SnapshotPerson.java │ │ │ ├── SnapshotRelation.java │ │ │ └── User.java │ │ │ ├── model │ │ │ ├── FamilyResponse.java │ │ │ ├── FamilyTreeInfoVO.java │ │ │ ├── FamilyTreeVO.java │ │ │ ├── FamilyVOHolder.java │ │ │ ├── PaginationMultiTypeValuesHelper.java │ │ │ ├── PersonDetailVO.java │ │ │ ├── PersonInGraphVO.java │ │ │ ├── RelationExcelVO.java │ │ │ ├── RelationVO.java │ │ │ ├── SnapshotVO.java │ │ │ ├── UserSelectVO.java │ │ │ └── UserVO.java │ │ │ ├── repository │ │ │ └── rdbms │ │ │ │ ├── FamilyTreeRepository.java │ │ │ │ ├── ImageUploadHistoryRepository.java │ │ │ │ ├── PersonRepository.java │ │ │ │ ├── RelationshipRepository.java │ │ │ │ ├── RoleRepository.java │ │ │ │ ├── SnapshotImageUploadHistoryRepository.java │ │ │ │ ├── SnapshotPersonRepository.java │ │ │ │ ├── SnapshotRelationRepository.java │ │ │ │ ├── SnapshotRepository.java │ │ │ │ └── UserRepository.java │ │ │ ├── service │ │ │ ├── FamilyTreeService.java │ │ │ ├── ImageUploadHistoryService.java │ │ │ ├── PersonService.java │ │ │ ├── RelationshipService.java │ │ │ ├── RoleService.java │ │ │ ├── SnapshotService.java │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ │ ├── FamilyTreeServiceImpl.java │ │ │ │ ├── ImageUploadHistoryServiceImpl.java │ │ │ │ ├── PersonServiceImpl.java │ │ │ │ ├── RelationshipServiceImpl.java │ │ │ │ ├── RoleServiceImpl.java │ │ │ │ ├── SnapshotServiceImpl.java │ │ │ │ └── UserServiceImpl.java │ │ │ └── utils │ │ │ ├── LicenseUtil.java │ │ │ ├── SecurityUtil.java │ │ │ └── Util.java │ └── resources │ │ ├── application-dev.properties │ │ ├── application-prod.properties │ │ ├── application-qa.properties │ │ ├── application.properties │ │ ├── db │ │ └── changelog │ │ │ ├── liquibase-changeLog-prod.xml │ │ │ └── liquibase-changeLog.xml │ │ ├── publicKey │ │ ├── relation_type.properties │ │ ├── sql │ │ └── schema.sql │ │ └── static │ │ ├── .editorconfig │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── 200.html │ │ ├── README.md │ │ ├── favicon.ico │ │ ├── imgs │ │ ├── back-home.jpg │ │ ├── backup.png │ │ ├── bianjishengping1.jpeg │ │ ├── bianjishengping2.jpeg │ │ ├── bianjixu.jpeg │ │ ├── blur.jpg │ │ ├── book.png │ │ ├── bookback.jpg │ │ ├── browser.png │ │ ├── buildrelation.jpeg │ │ ├── caocao.png │ │ ├── caocao_life.png │ │ ├── caocaojubu.png │ │ ├── circle.png │ │ ├── createFt1.jpeg │ │ ├── createFt2.jpeg │ │ ├── createandbuildrelation.jpeg │ │ ├── createandbuildrelation2.jpeg │ │ ├── createpersonnode.jpeg │ │ ├── deleterelation.jpeg │ │ ├── demo_xu.png │ │ ├── emperor.jpg │ │ ├── excel.jpeg │ │ ├── exportexcel.jpeg │ │ ├── exportimg.jpeg │ │ ├── favicon.ico │ │ ├── free.png │ │ ├── gege.png │ │ ├── girlfriend.png │ │ ├── gonggongpu.jpeg │ │ ├── gonggongpu2.jpeg │ │ ├── gonggongpu3.jpeg │ │ ├── guaiqiao.png │ │ ├── guanliyuan.png │ │ ├── guanxititle.png │ │ ├── hanshi.png │ │ ├── houzhou.png │ │ ├── huajinan.png │ │ ├── huajinv.png │ │ ├── huangdi.png │ │ ├── huanghou.png │ │ ├── intro_1.png │ │ ├── jinruxu.jpeg │ │ ├── kuaizhao.jpeg │ │ ├── liuche.png │ │ ├── llj.png │ │ ├── lock.png │ │ ├── logo.png │ │ ├── manicon.png │ │ ├── manicon_small.png │ │ ├── meinv2.png │ │ ├── menggumei.png │ │ ├── mingdi.png │ │ ├── mu.jpg │ │ ├── multijiapu.png │ │ ├── noimage.jpg │ │ ├── nvbing.png │ │ ├── nvhai.png │ │ ├── oldbook.jpg │ │ ├── oldbook_public.jpg │ │ ├── parchment-contact-tiny.png │ │ ├── privacy.png │ │ ├── qibing.png │ │ ├── qingdi.png │ │ ├── qipao.png │ │ ├── quanxian.jpeg │ │ ├── quanxian2.jpeg │ │ ├── quanxianguanli.jpeg │ │ ├── rahmen.png │ │ ├── shanchukuaizhao.jpeg │ │ ├── shaomin.png │ │ ├── shengping.jpeg │ │ ├── shibing.png │ │ ├── shuaige.png │ │ ├── shunv.png │ │ ├── shusheng.png │ │ ├── snapback.jpg │ │ ├── square.png │ │ ├── touxiangjiben.jpeg │ │ ├── weijiu.png │ │ ├── weixinshouqian.jpg │ │ ├── womanicon.png │ │ ├── womanicon2.png │ │ ├── xizhuangnan.png │ │ ├── yijiao.jpeg │ │ ├── yuan.png │ │ ├── zanwujiapu.png │ │ ├── zhifubaoshouqian.jpg │ │ ├── zhixing.png │ │ ├── zhujianweisuo.jpg │ │ └── zhuyuanzhang.png │ │ └── index.html │ └── test │ └── java │ └── com │ └── family │ └── tree │ └── sea │ └── familytreesea │ ├── FamilyTreeSeaApplicationTests.java │ └── controller │ └── PersonControllerTest.java ├── forced3.jpg └── han.jpg /README.md: -------------------------------------------------------------------------------- 1 | ### 开发讨论请加QQ群:897619867 2 | 3 | 本代码只包含local private版,数据库使用无需安装的sqlite,网站版有更多完整的功能 4 | 5 | family-tree-sea-ssr是基于vue nuxt的前端代码 6 | 7 | family-tree-sea文件夹为基于springboot的java后台 8 | 9 | 家谱的数据结构并不复杂,逻辑上可以抽象成一种图,节点为人物,边为人物关系,关系粗略分为两类,一类是夸层级的亲子关系(如父子,父女,母子,母女),另一类为同层级的夫妻关系(其实如果要加上更多的也可以)。有了这两类关系,就可以完全地描述一个家谱人物关系。那么在数据库中表示只需要两张表就够了,一个person表,一个relation表 10 | person表的形式可以为(id, name, sex ...), relation表的形式可以为(id, from_person_id, to_person_id, relation_name) 11 | 12 | 这种存储方式可以很方便地查询到一个完整地家谱,当然也有关系型数据库固有的缺点,就是不好做单人的连续的层级遍历,例如找一个人祖上十八代,那一定是对应大量的table join, 不过我这里不考虑这个问题,只专注于如何表征一个完整的家谱,并能自动排版在前端展示,最终要达到的一个效果如图 13 | ![汉朝皇帝家谱](./han.jpg) 14 | 15 | 16 | 17 | 18 | 19 | 这张图在数据库层面就是按照如上描述存储的,然而前端要绘制成这样的树形结构则需要花一点点小功夫。 20 | 21 | 我这里使用d3的force directed graph进行绘制。d3的example图是这样的: 22 | ![d3样本](./forced3.jpg) 23 | 24 | 25 | 26 | 看起来是不是乱得一塌糊涂?如果你只按照上面的表关系建立好数据,然后直接用d3画图,结果也必然是这个样子。那如何把它变成看起来比较干净整洁的类似树形图呢?d3是没办法按照我们的要求自动排版的,原因很简单,我们的要求有三个,第一要分层级(父母在上子女在下),第二,线条交叉要尽量少,不要太杂乱无章,第三,树看起来比较平衡(例如不要很右边的父节点连到图最左边的子节点,难看的很),很显然,这种要求属于高度定制的要求,d3是不可能自动给你排的,那怎么做呢?我的思路是通过某种算法,确定图中每一个人物的坐标(x,y),使得满足上面的3个要求,则自然结果图能够整洁。是不是废话?待我细细说来。。。 27 | 28 | 第一步,计算层级。 29 | 30 | 思路如下,先定一个记录标准:最上层为1层,其子所在层为2,再往下一层为3,以此类推。那么在给定一个图之后,只要这个图是连通图,那么从一个节点沿着关系一定能走到任意其他节点,基于这个前提,我用一种想象中的染色法,想象图中所有节点一开始都是白色,然后选定任意一个节点开始,随意标记一个层级,例如10,染成红色,然后从该红色节点出发,沿着其所有关系递归遍历其他节点,遍历时,如果是向上走,则走到的节点层级减1,向下走,则走到的节点层级加1,同层走,则走到的节点层级相同,直到所有节点都变成红色。这样递归完成后,所有的层级都定下来了,但是由于初始节点的层级是随便取的,最终得到的结果可能是10,11,12,13。。这样的层次,只要再做个“归一”,即把最小的层级变成1(例如如果层级列表为(10,11,12),那么只要统一减去9,即可"归一"为(1,2,3))。 31 | 32 | 第二部:减少线条交织,自动调整层高 33 | 34 | 第一步做完以后,所有的节点都被分到了对应的层级,但仅仅这样画出来的图一定还是不好看,例如一对夫妻在同层级,但是如果一个放在图最左,一个放在图最右,中间还放了很多其他兄弟节点,那么这就很难看,亦或是A放在B的左边,然后A的后代确放在B的后代的右边,那么可想而知这里又会有很多不必要的线条交织,影响美观,所以要做到几件事,包括:1、把夫妻要并在一起放置,如果A和B是夫妻,C和D是夫妻,那么应该是ABCD这样的排布ok,但如果是ACDB这样就不行。2、如果甲和乙是亲兄弟,甲在乙的左边,那么甲的后代必须也在乙的左边,递归传下去。3,每层的层间距也不应固定,例如古代皇帝,有些有一百多个儿子,有些就一两个儿子,那么稍微想象,也能知道,画前者的层间距应该大于后者的层间距才好看,否则儿女多的人发散出去的线条会画得非常扁平。 35 | 36 | 37 | 38 | 第三步,树的平衡 39 | 40 | 这一步是基于前两步来做的,最终能够确定每个节点的列位置,如果说第一步确定了层位置,第二步粗粒度确定了列位置(排好了层级内每个节点的位序),那么这一步则是细粒度最终确定了列位置。根据实测,最终定了3个原则来唯一确定一个节点的列位置,第一,位序靠后的节点列坐标一定要大于位序靠前的列左边,例如某层内根据第二步确定好的位序为(A,B,C,D,E)则,B的列坐标一定大于A的列坐标,C的一定大于B的,以此类推。第二,一个节点的后代叶子节点数越多,它占领的该层的列空间就要越大,同时与下层的距离也要越大,每层和下一层的最终距离为该层所有节点的这种距离中的最大者。第三,一个节点的位置还受到其父节点的影响,父节点若有n个后代叶子节点,则本节点的列坐标不应该小于父节点的列坐标-n/2。根据这三个原则,就能确定唯一的节点位置。 41 | 42 | 具体的算法代码用到了大量的记账式递归(recursion+memoization),例如计算层级,计算某节点的后代叶子节点数,拆开来看都不算复杂,拼在一起会有点绕 43 | 44 | 所得结果的演示,已有网站成品:http://www.familytreesea.com/public-tree-detail/11 45 | 46 | 欢迎大家体验和使用 47 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_size = 2 6 | indent_style = space 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | browser: true, 5 | node: true 6 | }, 7 | parserOptions: { 8 | parser: 'babel-eslint' 9 | }, 10 | extends: [ 11 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 12 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 13 | 'plugin:vue/essential' 14 | ], 15 | // required to lint *.vue files 16 | plugins: [ 17 | 'vue' 18 | ], 19 | // add your custom rules here 20 | rules: {} 21 | } 22 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | 4 | # logs 5 | npm-debug.log 6 | 7 | # Nuxt build 8 | .nuxt 9 | 10 | # Nuxt generate 11 | dist 12 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/README.md: -------------------------------------------------------------------------------- 1 | # family-tree-sea-ssr 2 | 3 | > Nuxt.js project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | $ npm install # Or yarn install 10 | 11 | # serve with hot reload at localhost:3000 12 | $ npm run dev 13 | 14 | # build for production and launch server 15 | $ npm run build 16 | $ npm start 17 | 18 | # generate static project 19 | $ npm run generate 20 | ``` 21 | 22 | For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js). 23 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ HEAD }} 6 | 7 | 8 | {{ APP }} 9 | 10 | 11 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/README.md: -------------------------------------------------------------------------------- 1 | # ASSETS 2 | 3 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. 4 | 5 | More information about the usage of this directory in the documentation: 6 | https://nuxtjs.org/guide/assets#webpacked 7 | 8 | **This directory is not required, you can delete it if you don't want to use it.** 9 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/addft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/addft.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/backupstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/backupstore.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/bamboo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/bamboo.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/bambooback.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/bambooback.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/bambooback2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/bambooback2.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/blur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/blur.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/brush.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/circle.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/clear.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/comment.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/delete20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/delete20.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/demo.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/editbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/editbutton.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/emperor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/emperor.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/enter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/enter.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/envelope.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/envelope.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/excel30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/excel30.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/go-back-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/go-back-icon.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/inboxtitle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/inboxtitle.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/lifetitle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/lifetitle.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/logo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/logo-black.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/logo.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/logo_local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/logo_local.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/logo_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/logo_red.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/manicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/manicon.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/onlinesite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/onlinesite.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/overlay_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/overlay_text.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/parchment-contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/parchment-contact.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/parchment-home-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/parchment-home-big.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/parchment-home-tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/parchment-home-tiny.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/parchment_block.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/parchment_block.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/partial_canvas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/partial_canvas.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/plus30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/plus30.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/remove30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/remove30.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/resetpos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/resetpos.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/screenshot.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/snapshot30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/snapshot30.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/snapshottitle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/snapshottitle.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/square.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/tree.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/womanicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/womanicon.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/xu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/xu.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/youjianrenwu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/youjianrenwu.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/zanwu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/zanwu.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/zanwukuaizhao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/zanwukuaizhao.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/assets/zhujianbeijing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/assets/zhujianbeijing.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/common/http-commons.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | export const AXIOS = axios.create({ 4 | // baseURL: 'http://www.fengchang.cc/money', 5 | baseURL: 'http://localhost:8865', 6 | //baseURL: '', 7 | withCredentials: true 8 | }) 9 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/common/state.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'state', 3 | data () { 4 | return { 5 | currentFt: '', 6 | ftName: '' 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/components/AppLogo.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 80 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/components/README.md: -------------------------------------------------------------------------------- 1 | # COMPONENTS 2 | 3 | The components directory contains your Vue.js Components. 4 | Nuxt.js doesn't supercharge these components. 5 | 6 | **This directory is not required, you can delete it if you don't want to use it.** 7 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/css/bootstrap_overwrite.css: -------------------------------------------------------------------------------- 1 | .dropdown-menu.dropdown-menu-right.show{ 2 | background-color: gray; 3 | } 4 | .dropdown-item{ 5 | color: white; 6 | } 7 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/css/d3-context-menu.css: -------------------------------------------------------------------------------- 1 | .d3-context-menu { 2 | position: absolute; 3 | display: none; 4 | background-color: #f2f2f2; 5 | border-radius: 4px; 6 | 7 | font-family: Arial, sans-serif; 8 | font-size: 14px; 9 | min-width: 150px; 10 | border: 1px solid #d4d4d4; 11 | 12 | z-index:1200; 13 | } 14 | 15 | .d3-context-menu ul { 16 | list-style-type: none; 17 | margin: 4px 0px; 18 | padding: 0px; 19 | cursor: default; 20 | } 21 | 22 | .d3-context-menu ul li { 23 | padding: 4px 16px; 24 | } 25 | 26 | .d3-context-menu ul li:hover { 27 | background-color: #4677f8; 28 | color: #fefefe; 29 | } 30 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/layouts/README.md: -------------------------------------------------------------------------------- 1 | # LAYOUTS 2 | 3 | This directory contains your Application Layouts. 4 | 5 | More information about the usage of this directory in the documentation: 6 | https://nuxtjs.org/guide/views#layouts 7 | 8 | **This directory is not required, you can delete it if you don't want to use it.** 9 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 18 | 19 | 20 | 87 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/middleware/README.md: -------------------------------------------------------------------------------- 1 | # MIDDLEWARE 2 | 3 | This directory contains your Application Middleware. 4 | The middleware lets you define custom function to be ran before rendering a page or a group of pages (layouts). 5 | 6 | More information about the usage of this directory in the documentation: 7 | https://nuxtjs.org/guide/routing#middleware 8 | 9 | **This directory is not required, you can delete it if you don't want to use it.** 10 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/mixins/base.js: -------------------------------------------------------------------------------- 1 | export default{ 2 | data () { 3 | return { 4 | man_select: 'shusheng.png', 5 | woman_select: 'nvhai.png', 6 | manicons: [ 7 | { 8 | id:'shusheng.png', 9 | name:'书生' 10 | },{ 11 | id:'xizhuangnan.png', 12 | name:'西装男' 13 | },{ 14 | id:'shibing.png', 15 | name:'军人' 16 | },{ 17 | id:'shuaige.png', 18 | name:'帅哥' 19 | }, 20 | { 21 | id:'qingdi.png', 22 | name:'清帝' 23 | }, 24 | { 25 | id:'mingdi.png', 26 | name:'明帝' 27 | }, 28 | { 29 | id:'qibing.png', 30 | name:'骑兵' 31 | }, 32 | { 33 | id:'huangdi.png', 34 | name:'皇帝' 35 | }, 36 | { 37 | id:'huajinan.png', 38 | name:'滑稽男' 39 | }, 40 | { 41 | id:'shaomin.png', 42 | name:'少民' 43 | },{ 44 | id:'llj.png', 45 | name:'现代男' 46 | },{ 47 | id:'square.png', 48 | name:'方' 49 | } 50 | ], 51 | womanicons:[ 52 | { 53 | id:'nvhai.png', 54 | name:'女孩' 55 | },{ 56 | id:'nvbing.png', 57 | name:'女兵' 58 | },{ 59 | id:'shunv.png', 60 | name:'淑女' 61 | },{ 62 | id:'menggumei.png', 63 | name:'蒙古妹' 64 | },{ 65 | id:'gege.png', 66 | name:'格格' 67 | },{ 68 | id:'hanshi.png', 69 | name:'韩国美女' 70 | },{ 71 | id:'zhixing.png', 72 | name:'知性美女' 73 | },{ 74 | id:'girlfriend.png', 75 | name:'女友' 76 | },{ 77 | id:'huanghou.png', 78 | name:'皇后' 79 | },{ 80 | id:'huajinv.png', 81 | name:'滑稽女' 82 | },{ 83 | id:'qipao.png', 84 | name:'旗袍女' 85 | },{ 86 | id:'weijiu.png', 87 | name:'日系美女' 88 | },{ 89 | id:'meinv2.png', 90 | name:'美女回眸' 91 | },{ 92 | id:'circle.png', 93 | name:'圆' 94 | } 95 | ] 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/mixins/staticbase.js: -------------------------------------------------------------------------------- 1 | import {AXIOS} from '~/common/http-commons' 2 | export default{ 3 | data (){ 4 | return { 5 | staticbaseknown: false 6 | } 7 | 8 | }, 9 | methods: { 10 | getStaticBase(){ 11 | AXIOS.get('/resource').then(response =>{ 12 | console.log("------"); 13 | console.log(response.data); 14 | this.static_base = response.data.static; 15 | this.rest_base = response.data.rest; 16 | this.staticbaseknown = true; 17 | }).catch(e=>{ 18 | this.static_base = '.'; 19 | this.rest_base = '.'; 20 | this.staticbaseknown = true; 21 | }) 22 | }, 23 | checkLicense(){ 24 | AXIOS.get('/api/v1/user/license-check').then(response => { 25 | if(response.data.ok==true){ 26 | // do nothing 27 | this.blockingLicenseWindow = false; 28 | }else{ 29 | // pop up license window 30 | this.blockingLicenseWindow = true; 31 | } 32 | }).catch(e => { 33 | this.$router.push('login') 34 | }) 35 | }, 36 | getOnlineLicense(){ 37 | window.location.href = 'http://www.familytreesea.com/license'; 38 | }, 39 | updateLicense(){ 40 | AXIOS.post('/api/v1/user/license-update',{ 41 | license_code: this.licenseCode 42 | }).then(response=>{ 43 | if(response.data.ok==true){ 44 | this.$notify({ 45 | title: '成功', 46 | type: 'success', 47 | message: response.data.message 48 | }); 49 | this.checkLicense(); 50 | }else{ 51 | this.$notify.error({ 52 | title: '错误', 53 | message: response.data.message 54 | }); 55 | } 56 | }).catch(e=>{ 57 | this.$notify.error({ 58 | title: '错误', 59 | message: '未知错误' 60 | }); 61 | }) 62 | }, 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/nuxt.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack'); 2 | module.exports = { 3 | /* 4 | ** Headers of the page 5 | */ 6 | mode: 'spa', 7 | head: { 8 | title: '家谱海,免费可视化在线数字家谱', 9 | meta: [ 10 | { charset: 'utf-8' }, 11 | { name: 'viewport', content: 'width=device-width, initial-scale=1' }, 12 | { hid: 'Keywords', name: 'Keywords', content: '家谱海,免费可视化在线数字家谱' }, 13 | { hid: 'Description', name: 'Description', content: '家谱世系图构建,多人协作,隐私保护,安全备份,方便导出,历史名人家谱图文知识共享,免费极简'} 14 | ], 15 | link: [ 16 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } 17 | ] 18 | }, 19 | plugins: ['~/plugins/v-lazy-img','~/plugins/element-ui',{ src: "~/plugins/quill-editor", ssr: false }, 20 | { src: "~/plugins/image-upload-profile", ssr: false }, 21 | { src: "~/plugins/vue-verify", ssr: false } 22 | ], 23 | /* 24 | ** Customize the progress bar color 25 | */ 26 | loading: { color: '#3B8070' }, 27 | router: { mode: 'hash' }, 28 | /* 29 | ** Build configuration 30 | */ 31 | 32 | modules: [ 33 | 'bootstrap-vue/nuxt' 34 | ], 35 | build: { 36 | plugins: [ 37 | new webpack.ProvidePlugin({ 38 | 'window.Quill': 'quill/dist/quill.js', 39 | 'Quill': 'quill/dist/quill.js' 40 | }) 41 | ], 42 | 43 | vendor: ['~/plugins/v-lazy-img','~/plugins/element-ui'], 44 | /* 45 | ** Run ESLint on save 46 | */ 47 | extend (config, { isDev, isClient }) { 48 | if (isDev && isClient) { 49 | config.module.rules.push({ 50 | enforce: 'pre', 51 | test: /\.(js|vue)$/, 52 | loader: 'eslint-loader', 53 | exclude: /(node_modules)/ 54 | }), 55 | config.devtool = 'eval-source-map' 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "family-tree-sea-ssr", 3 | "version": "1.0.0", 4 | "description": "Nuxt.js project", 5 | "author": "fengchang ", 6 | "private": true, 7 | "config": { 8 | "nuxt": { 9 | "host": "0.0.0.0", 10 | "port": "8077" 11 | } 12 | }, 13 | "scripts": { 14 | "dev": "nuxt", 15 | "build": "npm run lint && nuxt build && npm start", 16 | "start": "nuxt start", 17 | "generate": "nuxt generate", 18 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", 19 | "precommit": "npm run lint" 20 | }, 21 | "dependencies": { 22 | "axios": "^0.18.0", 23 | "bootstrap-vue": "^2.0.0-rc.9", 24 | "canvas-toBlob": "^1.0.0", 25 | "d3": "^4.13.0", 26 | "element-ui": "^2.3.7", 27 | "file-saver": "^1.3.3", 28 | "jquery": "^3.3.1", 29 | "nuxt": "^1.4.0", 30 | "quill-image-drop-module": "^1.0.3", 31 | "quill-image-resize-module": "^3.0.0", 32 | "sweetalert": "^2.1.0", 33 | "v-lazy-img": "^0.1.0", 34 | "vue-cute-timeline": "^1.2.4", 35 | "vue-image-crop-upload": "^2.2.3", 36 | "vue-lodash": "^2.0.0", 37 | "vue-verify-plugin": "^2.0.2", 38 | "vue2-editor": "^2.6.6" 39 | }, 40 | "devDependencies": { 41 | "babel-eslint": "^8.2.1", 42 | "eslint": "^4.15.0", 43 | "eslint-friendly-formatter": "^3.0.0", 44 | "eslint-loader": "^1.7.1", 45 | "eslint-plugin-vue": "^4.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/pages/README.md: -------------------------------------------------------------------------------- 1 | # PAGES 2 | 3 | This directory contains your Application Views and Routes. 4 | The framework reads all the .vue files inside this directory and creates the router of your application. 5 | 6 | More information about the usage of this directory in the documentation: 7 | https://nuxtjs.org/guide/routing 8 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/pages/about/index.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 40 | 41 | 42 | 78 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/pages/contact/index.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 41 | 42 | 43 | 114 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/pages/create-family-tree/index.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 108 | 109 | 110 | 143 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/pages/latestnews/index.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 44 | 45 | 46 | 79 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/pages/notifications/index.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 77 | 78 | 79 | 121 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/pages/reset-password-success/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 38 | 39 | 40 | 62 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/plugins/README.md: -------------------------------------------------------------------------------- 1 | # PLUGINS 2 | 3 | This directory contains your Javascript plugins that you want to run before instantiating the root vue.js application. 4 | 5 | More information about the usage of this directory in the documentation: 6 | https://nuxtjs.org/guide/plugins 7 | 8 | **This directory is not required, you can delete it if you don't want to use it.** 9 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/plugins/element-ui.js: -------------------------------------------------------------------------------- 1 | import ElementUI from 'element-ui'; 2 | import 'element-ui/lib/theme-chalk/index.css'; 3 | import Vue from 'vue'; 4 | 5 | Vue.use(ElementUI); 6 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/plugins/image-upload-profile.js: -------------------------------------------------------------------------------- 1 | import myUpload from 'vue-image-crop-upload'; 2 | import Vue from 'vue' 3 | Vue.component('my-upload', myUpload) 4 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/plugins/quill-editor.js: -------------------------------------------------------------------------------- 1 | import { VueEditor, Quill } from "vue2-editor"; 2 | import { ImageDrop } from 'quill-image-drop-module' 3 | import ImageResize from 'quill-image-resize-module'; 4 | import Vue from 'vue'; 5 | Quill.register('modules/imageDrop', ImageDrop) 6 | Quill.register('modules/imageResize', ImageResize) 7 | Vue.component('VueEditor', VueEditor) 8 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/plugins/v-lazy-img.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import LazyImg from 'v-lazy-img' 3 | 4 | Vue.use(LazyImg) 5 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/plugins/vue-verify.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import verify from "vue-verify-plugin"; 3 | Vue.use(verify); 4 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/README.md: -------------------------------------------------------------------------------- 1 | # STATIC 2 | 3 | This directory contains your static files. 4 | Each file inside this directory is mapped to /. 5 | 6 | Example: /static/robots.txt is mapped as /robots.txt. 7 | 8 | More information about the usage of this directory in the documentation: 9 | https://nuxtjs.org/guide/assets#static 10 | 11 | **This directory is not required, you can delete it if you don't want to use it.** 12 | -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/favicon.ico -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/back-home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/back-home.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/backup.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/bianjishengping1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/bianjishengping1.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/bianjishengping2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/bianjishengping2.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/bianjixu.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/bianjixu.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/blur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/blur.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/book.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/bookback.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/bookback.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/browser.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/buildrelation.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/buildrelation.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/caocao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/caocao.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/caocao_life.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/caocao_life.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/caocaojubu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/caocaojubu.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/circle.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/createFt1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/createFt1.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/createFt2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/createFt2.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/createandbuildrelation.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/createandbuildrelation.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/createandbuildrelation2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/createandbuildrelation2.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/createpersonnode.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/createpersonnode.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/deleterelation.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/deleterelation.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/demo_xu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/demo_xu.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/emperor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/emperor.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/excel.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/excel.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/exportexcel.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/exportexcel.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/exportimg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/exportimg.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/favicon.ico -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/free.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/free.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/gege.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/gege.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/girlfriend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/girlfriend.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/gonggongpu.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/gonggongpu.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/gonggongpu2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/gonggongpu2.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/gonggongpu3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/gonggongpu3.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/guaiqiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/guaiqiao.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/guanliyuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/guanliyuan.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/guanxititle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/guanxititle.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/hanshi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/hanshi.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/houzhou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/houzhou.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/huajinan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/huajinan.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/huajinv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/huajinv.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/huangdi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/huangdi.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/huanghou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/huanghou.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/intro_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/intro_1.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/jinruxu.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/jinruxu.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/kuaizhao.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/kuaizhao.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/liuche.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/liuche.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/llj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/llj.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/lock.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/logo.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/manicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/manicon.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/manicon_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/manicon_small.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/meinv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/meinv2.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/menggumei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/menggumei.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/mingdi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/mingdi.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/mu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/mu.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/multijiapu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/multijiapu.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/noimage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/noimage.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/nvbing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/nvbing.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/nvhai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/nvhai.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/oldbook.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/oldbook.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/oldbook_public.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/oldbook_public.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/parchment-contact-tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/parchment-contact-tiny.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/privacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/privacy.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/qibing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/qibing.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/qingdi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/qingdi.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/qipao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/qipao.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/quanxian.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/quanxian.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/quanxian2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/quanxian2.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/quanxianguanli.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/quanxianguanli.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/rahmen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/rahmen.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/shanchukuaizhao.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/shanchukuaizhao.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/shaomin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/shaomin.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/shengping.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/shengping.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/shibing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/shibing.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/shuaige.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/shuaige.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/shunv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/shunv.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/shusheng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/shusheng.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/snapback.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/snapback.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/square.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/touxiangjiben.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/touxiangjiben.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/weijiu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/weijiu.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/weixinshouqian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/weixinshouqian.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/womanicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/womanicon.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/womanicon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/womanicon2.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/xizhuangnan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/xizhuangnan.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/yijiao.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/yijiao.jpeg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/yuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/yuan.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/zanwujiapu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/zanwujiapu.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/zhifubaoshouqian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/zhifubaoshouqian.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/zhixing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/zhixing.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/zhujianweisuo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/zhujianweisuo.jpg -------------------------------------------------------------------------------- /family-tree-sea-ssr/static/imgs/zhuyuanzhang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea-ssr/static/imgs/zhuyuanzhang.png -------------------------------------------------------------------------------- /family-tree-sea-ssr/store/README.md: -------------------------------------------------------------------------------- 1 | # STORE 2 | 3 | This directory contains your Vuex Store files. 4 | Vuex Store option is implemented in the Nuxt.js framework. 5 | Creating a index.js file in this directory activate the option in the framework automatically. 6 | 7 | More information about the usage of this directory in the documentation: 8 | https://nuxtjs.org/guide/vuex-store 9 | 10 | **This directory is not required, you can delete it if you don't want to use it.** 11 | -------------------------------------------------------------------------------- /family-tree-sea/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | 12 | ### IntelliJ IDEA ### 13 | .idea 14 | *.iws 15 | *.iml 16 | *.ipr 17 | 18 | ### NetBeans ### 19 | nbproject/private/ 20 | build/ 21 | nbbuild/ 22 | dist/ 23 | nbdist/ 24 | .nb-gradle/ -------------------------------------------------------------------------------- /family-tree-sea/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /family-tree-sea/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip 2 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/FamilyTreeSeaApplication.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import java.io.IOException; 8 | 9 | @SpringBootApplication 10 | public class FamilyTreeSeaApplication { 11 | 12 | private static final Logger LOG = LoggerFactory.getLogger(FamilyTreeSeaApplication.class); 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(FamilyTreeSeaApplication.class, args); 16 | openHomePage(); 17 | } 18 | 19 | private static void openHomePage() { 20 | String url = "http://localhost:8865"; 21 | Runtime rt = Runtime.getRuntime(); 22 | String os = System.getProperty("os.name").toLowerCase(); 23 | 24 | 25 | if(os.indexOf("win") >= 0){ 26 | // is windows 27 | try { 28 | rt.exec("rundll32 url.dll,FileProtocolHandler " + url); 29 | } catch (IOException e) { 30 | LOG.error("Failed to launch browser on windows:"+e.getMessage()); 31 | } 32 | }else if(os.indexOf("mac") >= 0){ 33 | // is mac 34 | try { 35 | rt.exec("open " + url); 36 | } catch (IOException e) { 37 | LOG.error("Failed to launch browser on mac"+e.getMessage()); 38 | } 39 | }else if(os.indexOf("nix") >=0 || os.indexOf("nux") >=0){ 40 | // is linux 41 | String[] browsers = { "epiphany", "firefox", "mozilla", "konqueror", 42 | "netscape", "opera", "links", "lynx" }; 43 | 44 | StringBuffer cmd = new StringBuffer(); 45 | for (int i = 0; i < browsers.length; i++){ 46 | if(i == 0){ 47 | cmd.append(String.format( "%s \"%s\"", browsers[i], url)); 48 | } 49 | else{ 50 | cmd.append(String.format(" || %s \"%s\"", browsers[i], url)); 51 | } 52 | } 53 | try { 54 | rt.exec(new String[] { "sh", "-c", cmd.toString() }); 55 | } catch (IOException e) { 56 | LOG.error("Failed to launch browser on linux"+e.getMessage()); 57 | } 58 | }else{ 59 | LOG.error("Unknown system platform"); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/AppConfig.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | import com.google.common.collect.ImmutableMap; 4 | import com.google.common.collect.Maps; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.core.io.ClassPathResource; 8 | import org.springframework.core.io.support.EncodedResource; 9 | import org.springframework.core.io.support.PropertiesLoaderUtils; 10 | 11 | import java.io.IOException; 12 | import java.util.Properties; 13 | @Configuration 14 | public class AppConfig { 15 | @Bean 16 | public ImmutableMap relationMap(){ 17 | ImmutableMap experienceLevelMap = null; 18 | EncodedResource encodedResource = new EncodedResource(new ClassPathResource("relation_type.properties"), "UTF-8"); 19 | try { 20 | Properties prop = PropertiesLoaderUtils.loadProperties(encodedResource); 21 | experienceLevelMap = Maps.fromProperties(prop); 22 | } catch (IOException e) { 23 | e.printStackTrace(); 24 | } 25 | return experienceLevelMap; 26 | } 27 | } -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/CustomAuthenticationProvider.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | import com.family.tree.sea.familytreesea.entity.User; 4 | import com.family.tree.sea.familytreesea.service.UserService; 5 | import com.family.tree.sea.familytreesea.utils.SecurityUtil; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.security.authentication.AuthenticationProvider; 8 | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; 9 | import org.springframework.security.core.Authentication; 10 | import org.springframework.security.core.AuthenticationException; 11 | import org.springframework.stereotype.Component; 12 | 13 | import java.security.NoSuchAlgorithmException; 14 | import java.security.spec.InvalidKeySpecException; 15 | import java.util.ArrayList; 16 | import java.util.Date; 17 | 18 | @Component 19 | public class CustomAuthenticationProvider implements AuthenticationProvider { 20 | 21 | @Autowired 22 | private UserService userService; 23 | 24 | private boolean correctUserNameAndPassword(String username, String password){ 25 | User user = getUserByPhoneOrEmail(username); 26 | 27 | String passwordInDB = user.getPassword(); 28 | String encryptedPassword=null; 29 | try { 30 | encryptedPassword = SecurityUtil.generateStorngPasswordHash(password, user.getSalt()); 31 | } catch (NoSuchAlgorithmException e) { 32 | e.printStackTrace(); 33 | return false; 34 | } catch (InvalidKeySpecException e) { 35 | e.printStackTrace(); 36 | return false; 37 | } 38 | 39 | if(encryptedPassword.equals(passwordInDB)){ 40 | return true; 41 | }else{ 42 | return false; 43 | } 44 | } 45 | 46 | private User getUserByPhoneOrEmail(String entityName){ 47 | User userByPhone = userService.findByPhone(entityName); 48 | User userByEmail = userService.findByEmail(entityName); 49 | User user = null; 50 | if(userByPhone!=null){ 51 | user = userByPhone; 52 | }else{ 53 | user = userByEmail; 54 | } 55 | return user; 56 | } 57 | 58 | @Override 59 | public Authentication authenticate(Authentication authentication) throws AuthenticationException{ 60 | String name = authentication.getName(); 61 | String password = authentication.getCredentials().toString(); 62 | if(correctUserNameAndPassword(name, password)){ 63 | User user = getUserByPhoneOrEmail(name); 64 | return new UsernamePasswordAuthenticationToken(user.getUsername(), password, new ArrayList<>()); 65 | }else{ 66 | return null; 67 | } 68 | } 69 | 70 | @Override 71 | public boolean supports(Class authentication) { 72 | return authentication.equals(UsernamePasswordAuthenticationToken.class); 73 | } 74 | } -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/DeleteResourceAfterDownload.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * @author xiefengchang 10 | * this annotation requires that if parameter has HttpServletRequest, it must be the first argument 11 | */ 12 | @Target(ElementType.METHOD) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface DeleteResourceAfterDownload { 15 | } -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/DeleteResourceAfterDownloadAspect.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | import org.apache.tomcat.util.http.fileupload.FileUtils; 4 | import org.aspectj.lang.JoinPoint; 5 | import org.aspectj.lang.annotation.AfterReturning; 6 | import org.aspectj.lang.annotation.Aspect; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.stereotype.Component; 10 | 11 | import java.io.File; 12 | 13 | /** 14 | * @author xiefengchang 15 | */ 16 | @Aspect 17 | @Component 18 | public class DeleteResourceAfterDownloadAspect { 19 | private static final Logger LOG = LoggerFactory.getLogger(DeleteResourceAfterDownloadAspect.class); 20 | 21 | @AfterReturning(pointcut = "execution(* com.family.tree.sea.familytreesea.controller.FamilyTreeController.download(String)) && @annotation(DeleteResourceAfterDownload)") 22 | public void deleteResourceAfterDownloadAfter(JoinPoint joinPoint ) throws Throwable { 23 | File file = new File((String)joinPoint.getArgs()[0]); 24 | FileUtils.deleteDirectory(new File(file.getParent())); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/FtConstant.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | public class FtConstant { 4 | public static String ADMIN_REQUEST_IN_REQUEST_STATUS = "in_request"; 5 | public static String ADMIN_REQUEST_REJECTED_STATUS = "rejected"; 6 | public static String ADMIN_REQUEST_APPROVED_STATUS = "approved"; 7 | 8 | public static String ADMIN="admin"; 9 | public static String VIEWER="viewer"; 10 | } 11 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/PathConstants.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | public class PathConstants { 4 | public static final String USER="/api/v1/user"; 5 | public static final String PUBLICUSER="/api/public/user"; 6 | public static final String PUBLICCOMMENT="/api/public/comment"; 7 | public static final String PRIVILEGE="/api/v1/privilege"; 8 | public static final String RELATION="/api/v1/relation"; 9 | public static final String RESOURCE="/resource"; 10 | public static final String PERSON="/api/v1/person"; 11 | public static final String REGISTER="/register"; 12 | public static final String FORGET_PASS="/forget-password"; 13 | public static final String MONITOR="/monitor"; 14 | public static final String FAMILYTREE="/api/v1/familytree"; 15 | public static final String COMMENT="/api/v1/comment"; 16 | public static final String PUBLICFAMILYTREE="/api/public/familytree"; 17 | } 18 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/PrivilegeConstant.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | public class PrivilegeConstant { 4 | public static final String FAMILY_TREE="family_tree"; 5 | public static final String VIEWER="viewer"; 6 | public static final String ADMIN="admin"; 7 | public static final String CREATOR="creator"; 8 | } 9 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/RESTAuthenticationEntryPoint.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | import org.springframework.security.core.AuthenticationException; 4 | import org.springframework.security.web.AuthenticationEntryPoint; 5 | import org.springframework.stereotype.Component; 6 | 7 | import javax.servlet.ServletException; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import java.io.IOException; 11 | 12 | @Component 13 | public class RESTAuthenticationEntryPoint implements AuthenticationEntryPoint { 14 | 15 | @Override 16 | public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) 17 | throws IOException, ServletException { 18 | 19 | response.sendError(HttpServletResponse.SC_UNAUTHORIZED); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/RESTAuthenticationFailureHandler.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | import org.springframework.security.core.AuthenticationException; 4 | import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; 5 | import org.springframework.stereotype.Component; 6 | 7 | import javax.servlet.ServletException; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import java.io.IOException; 11 | 12 | @Component 13 | public class RESTAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { 14 | 15 | @Override 16 | public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, 17 | AuthenticationException exception) throws IOException, ServletException { 18 | 19 | super.onAuthenticationFailure(request, response, exception); 20 | } 21 | } -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/RESTAuthenticationSuccessHandler.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | 4 | import org.springframework.security.core.Authentication; 5 | import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler; 6 | import org.springframework.stereotype.Component; 7 | 8 | import javax.servlet.ServletException; 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | import java.io.IOException; 12 | 13 | @Component 14 | public class RESTAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler { 15 | 16 | @Override 17 | public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, 18 | Authentication authentication) throws IOException, ServletException { 19 | 20 | clearAuthenticationAttributes(request); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/RequestFilter.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.core.Ordered; 5 | import org.springframework.core.annotation.Order; 6 | import org.springframework.core.env.Environment; 7 | import org.springframework.stereotype.Component; 8 | 9 | import javax.servlet.*; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import java.io.IOException; 13 | 14 | 15 | /** 16 | * Servlet Filter implementation class CORSFilter 17 | */ 18 | // Enable it for Servlet 3.x implementations 19 | /* @ WebFilter(asyncSupported = true, urlPatterns = { "/*" }) */ 20 | @Component 21 | @Order(Ordered.HIGHEST_PRECEDENCE) 22 | public class RequestFilter implements Filter { 23 | 24 | @Autowired 25 | private Environment env; 26 | 27 | /** 28 | * Default constructor. 29 | */ 30 | public RequestFilter() { 31 | // TODO Auto-generated constructor stub 32 | } 33 | 34 | /** 35 | * @see Filter#destroy() 36 | */ 37 | @Override 38 | public void destroy() { 39 | // TODO Auto-generated method stub 40 | } 41 | 42 | /** 43 | * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain) 44 | */ 45 | @Override 46 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain) 47 | throws IOException, ServletException { 48 | 49 | HttpServletRequest request = (HttpServletRequest) servletRequest; 50 | System.out.println("CORSFilter HTTP Request: " + request.getMethod()); 51 | 52 | String originBase = env.getProperty("origin.base"); 53 | 54 | // Authorize (allow) all domains to consume the content 55 | ((HttpServletResponse) servletResponse).addHeader("Access-Control-Allow-Origin", originBase); 56 | ((HttpServletResponse) servletResponse).addHeader("Access-Control-Allow-Methods","GET, OPTIONS, HEAD, PUT, POST, DELETE"); 57 | ((HttpServletResponse) servletResponse).addHeader("Access-Control-Allow-Headers","authorization, Access-Control-Allow-Origin, content-type, hash-referer, x-auth-token, cache-control, " + 58 | "access-control-request-headers,access-control-request-method,accept,origin,authorization,x-requested-with"); 59 | ((HttpServletResponse) servletResponse).addHeader("Access-Control-Allow-Credentials","true"); 60 | ((HttpServletResponse) servletResponse).addHeader("Access-Control-Expose-Headers","Access-Control-Allow-Origin"); 61 | HttpServletResponse resp = (HttpServletResponse) servletResponse; 62 | 63 | // For HTTP OPTIONS verb/method reply with ACCEPTED status code -- per CORS handshake 64 | if (request.getMethod().equals("OPTIONS")) { 65 | resp.setStatus(HttpServletResponse.SC_ACCEPTED); 66 | return; 67 | } 68 | 69 | // pass the request along the filter chain 70 | chain.doFilter(request, servletResponse); 71 | } 72 | 73 | /** 74 | * @see Filter#init(FilterConfig) 75 | */ 76 | @Override 77 | public void init(FilterConfig fConfig) throws ServletException { 78 | // TODO Auto-generated method stub 79 | } 80 | 81 | } -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/config/WebSecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.config; 2 | 3 | import com.allanditzel.springframework.security.web.csrf.CsrfTokenResponseHeaderBindingFilter; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; 7 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 8 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; 9 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 10 | import org.springframework.security.web.csrf.CsrfFilter; 11 | 12 | @Configuration 13 | @EnableWebSecurity 14 | public class WebSecurityConfig extends WebSecurityConfigurerAdapter { 15 | @Autowired 16 | private RESTAuthenticationEntryPoint authenticationEntryPoint; 17 | @Autowired 18 | private RESTAuthenticationFailureHandler authenticationFailureHandler; 19 | @Autowired 20 | private RESTAuthenticationSuccessHandler authenticationSuccessHandler; 21 | @Autowired 22 | private CustomAuthenticationProvider authProvider; 23 | @Override 24 | protected void configure(AuthenticationManagerBuilder builder) throws Exception { 25 | builder.authenticationProvider(authProvider); 26 | } 27 | 28 | @Override 29 | protected void configure(HttpSecurity http) throws Exception { 30 | http.csrf().disable().authorizeRequests().antMatchers("/api/v1/**").authenticated(); 31 | http.exceptionHandling().authenticationEntryPoint(authenticationEntryPoint); 32 | http.formLogin().successHandler(authenticationSuccessHandler); 33 | http.formLogin().failureHandler(authenticationFailureHandler); 34 | http.logout().logoutSuccessUrl("/#/login"); 35 | 36 | // CSRF tokens handling 37 | http.addFilterAfter(new CsrfTokenResponseHeaderBindingFilter(), CsrfFilter.class); 38 | } 39 | } -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/controller/RegisterController.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.controller; 2 | 3 | import com.family.tree.sea.familytreesea.config.PathConstants; 4 | import com.family.tree.sea.familytreesea.entity.Role; 5 | import com.family.tree.sea.familytreesea.entity.User; 6 | import com.family.tree.sea.familytreesea.service.RoleService; 7 | import com.family.tree.sea.familytreesea.service.UserService; 8 | import com.family.tree.sea.familytreesea.utils.SecurityUtil; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.context.ApplicationListener; 13 | import org.springframework.context.event.ContextRefreshedEvent; 14 | import org.springframework.web.bind.annotation.*; 15 | import java.security.NoSuchAlgorithmException; 16 | import java.security.spec.InvalidKeySpecException; 17 | import java.util.Date; 18 | import java.util.HashSet; 19 | import java.util.Set; 20 | 21 | @RestController 22 | @RequestMapping(PathConstants.REGISTER) 23 | public class RegisterController implements ApplicationListener { 24 | private static final Logger LOG = LoggerFactory.getLogger(RegisterController.class); 25 | 26 | @Autowired 27 | private RoleService roleService; 28 | 29 | @Autowired 30 | private UserService userService; 31 | 32 | @Override 33 | public void onApplicationEvent(final ContextRefreshedEvent event) { 34 | // do whatever you need here 35 | try { 36 | this.initReg(); 37 | } catch (InvalidKeySpecException e) { 38 | LOG.error("===Init reg failed..."); 39 | e.printStackTrace(); 40 | } catch (NoSuchAlgorithmException e) { 41 | LOG.error("===Init reg failed..."); 42 | e.printStackTrace(); 43 | } 44 | } 45 | 46 | public void initReg() throws InvalidKeySpecException, NoSuchAlgorithmException { 47 | System.out.println(SecurityUtil.generateStorngPasswordHash("admin","OrZCA2rdc1j2ZoX5")); 48 | User user = new User(); 49 | 50 | if(userService.findByUsername("admin@admin.com")!=null){ 51 | // do nothing 52 | LOG.error("User already exists"); 53 | }else{ 54 | user.setSalt("OrZCA2rdc1j2ZoX5"); 55 | user.setUsername("admin@admin.com"); 56 | user.setPhone("18516123752"); 57 | user.setNickname("admin"); 58 | user.setEmail("admin@admin.com"); 59 | user.setRegisterDate(new Date()); 60 | user.setPassword(SecurityUtil.generateStorngPasswordHash("admin","OrZCA2rdc1j2ZoX5")); 61 | Set roles = new HashSet<>(); 62 | Role role = roleService.findById(2L); 63 | roles.add(role); 64 | user.setRoles(roles); 65 | // default to 3 66 | user.setLicenseCode("ebCEW0X2LeorXLu07raP31FyF+UsopReCTZMg+JKsJWZdZ5EQ9BEGckZkvvLdy/KtEuvMJMS0+2s+q8KqKEuCHeXgPL/fZQamMzzoL1SqMkRvrETWBRttFl95Z/hIxz38V8/g5DPvT70+XVlEzzB/MKAYGLsXtT9J8WmU12WDlE="); 67 | userService.save(user); 68 | } 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/controller/ResourceController.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.controller; 2 | 3 | import com.family.tree.sea.familytreesea.config.PathConstants; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.core.env.Environment; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestMethod; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | import java.util.HashMap; 11 | import java.util.Map; 12 | 13 | @RestController 14 | @RequestMapping(PathConstants.RESOURCE) 15 | public class ResourceController { 16 | 17 | @Autowired 18 | private Environment env; 19 | 20 | @RequestMapping(method = RequestMethod.GET) 21 | public Map getStaticResourceBase(){ 22 | String staticBase = env.getProperty("static.base"); 23 | String restBase = env.getProperty("family.service.base"); 24 | 25 | Map ret = new HashMap<>(); 26 | ret.put("static", staticBase); 27 | ret.put("rest", restBase); 28 | return ret; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/AccessRight.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name="ft_access_right") 11 | @Getter 12 | @Setter 13 | @NoArgsConstructor 14 | public class AccessRight { 15 | @Id 16 | @GeneratedValue(strategy = GenerationType.AUTO) 17 | private Long id; 18 | 19 | @ManyToOne 20 | @JoinColumn(name="user_id", referencedColumnName = "id") 21 | private User user; 22 | 23 | @Column(name = "entity_type") 24 | private String entityType; 25 | 26 | @Column(name = "entity_id") 27 | private Long entityId; 28 | 29 | @Column(name = "access_right") 30 | private String accessRight; 31 | } 32 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/FamilyTree.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | import javax.persistence.*; 8 | import java.util.Date; 9 | 10 | @Entity 11 | @Table(name="ft_tree") 12 | @Getter 13 | @Setter 14 | @NoArgsConstructor 15 | public class FamilyTree { 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.AUTO) 18 | private Long id; 19 | 20 | @Column(name = "name") 21 | private String name; 22 | 23 | @Column(name="description") 24 | private String description; 25 | 26 | @ManyToOne 27 | @JoinColumn(name="created_by", referencedColumnName = "id") 28 | private User createdBy; 29 | 30 | @Temporal(TemporalType.TIMESTAMP) 31 | @Column(name = "created_on") 32 | private Date createdOn; 33 | } 34 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/ImageUploadHistory.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | import javax.persistence.*; 8 | import java.util.Date; 9 | 10 | @Entity 11 | @Table(name="ft_img_upload_history") 12 | @Getter 13 | @Setter 14 | @NoArgsConstructor 15 | public class ImageUploadHistory { 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.AUTO) 18 | private Long id; 19 | 20 | @ManyToOne 21 | @JoinColumn(name="upload_by", referencedColumnName = "id") 22 | private User uploadBy; 23 | 24 | @ManyToOne 25 | @JoinColumn(name="person_id", referencedColumnName = "id") 26 | private Person person; 27 | 28 | @Column(name = "obj_key") 29 | private String key; 30 | 31 | @Temporal(TemporalType.TIMESTAMP) 32 | @Column(name="upload_time") 33 | private Date uploadTime; 34 | 35 | public ImageUploadHistory(User uploadBy, Person person, String key, Date uploadTime) { 36 | this.uploadBy = uploadBy; 37 | this.person = person; 38 | this.key = key; 39 | this.uploadTime = uploadTime; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/Person.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | import org.apache.commons.lang3.builder.EqualsBuilder; 7 | import org.apache.commons.lang3.builder.HashCodeBuilder; 8 | 9 | import javax.persistence.*; 10 | import java.util.Date; 11 | 12 | @Entity 13 | @Table(name="ft_person") 14 | @Getter 15 | @Setter 16 | @NoArgsConstructor 17 | public class Person { 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.AUTO) 20 | private Long id; 21 | 22 | @Column(name = "name") 23 | private String name; 24 | 25 | @Column(name = "sex") 26 | private Integer sex; 27 | 28 | @ManyToOne 29 | @JoinColumn(name = "family_tree_id", referencedColumnName = "id") 30 | private FamilyTree familyTree; 31 | 32 | @Column(name = "life_description") 33 | private String lifeDescription; 34 | 35 | @Column(name = "short_description") 36 | private String shortDescription; 37 | 38 | @Column(name = "born") 39 | private String born; 40 | 41 | @Column(name = "death") 42 | private String death; 43 | 44 | @Column(name = "profile_img_path") 45 | private String profileImagePath; 46 | 47 | @Column(name = "address") 48 | private String address; 49 | 50 | @Column(name = "phone") 51 | private String phone; 52 | 53 | @Column(name="zibei") 54 | private String zibei; 55 | 56 | @Column(name="rank") 57 | private Integer rank; 58 | 59 | public Person(String name, Integer sex, FamilyTree familyTree, String lifeDescription, String shortDescription, String born, String death, String profileImagePath, String address, String phone, String zibei, Integer rank) { 60 | this.name = name; 61 | this.sex = sex; 62 | this.familyTree = familyTree; 63 | this.lifeDescription = lifeDescription; 64 | this.shortDescription = shortDescription; 65 | this.born = born; 66 | this.death = death; 67 | this.profileImagePath = profileImagePath; 68 | this.address = address; 69 | this.phone = phone; 70 | this.zibei = zibei; 71 | this.rank = rank; 72 | } 73 | 74 | @Override 75 | public boolean equals(Object o) { 76 | if (this == o) return true; 77 | 78 | if (o == null || getClass() != o.getClass()) return false; 79 | 80 | Person person = (Person) o; 81 | 82 | return new EqualsBuilder() 83 | .append(id, person.id) 84 | .append(name, person.name) 85 | .append(sex, person.sex) 86 | .append(familyTree, person.familyTree) 87 | .append(lifeDescription, person.lifeDescription) 88 | .append(shortDescription, person.shortDescription) 89 | .append(born, person.born) 90 | .append(death, person.death) 91 | .append(profileImagePath, person.profileImagePath) 92 | .append(address, person.address) 93 | .append(phone, person.phone) 94 | .append(zibei, person.zibei) 95 | .append(rank, person.rank) 96 | .isEquals(); 97 | } 98 | 99 | @Override 100 | public int hashCode() { 101 | return new HashCodeBuilder(17, 37) 102 | .append(id) 103 | .append(name) 104 | .append(sex) 105 | .append(familyTree) 106 | .append(lifeDescription) 107 | .append(shortDescription) 108 | .append(born) 109 | .append(death) 110 | .append(profileImagePath) 111 | .append(address) 112 | .append(phone) 113 | .append(zibei) 114 | .append(rank) 115 | .toHashCode(); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/Relationship.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name="ft_relationship") 11 | @Getter 12 | @Setter 13 | @NoArgsConstructor 14 | public class Relationship { 15 | @Id 16 | @GeneratedValue(strategy = GenerationType.AUTO) 17 | private Long id; 18 | 19 | @ManyToOne 20 | @JoinColumn(name = "family_tree_id", referencedColumnName = "id") 21 | private FamilyTree familyTree; 22 | 23 | @ManyToOne 24 | @JoinColumn(name = "from_person_id", referencedColumnName = "id") 25 | private Person fromPerson; 26 | 27 | 28 | @ManyToOne 29 | @JoinColumn(name = "to_person_id", referencedColumnName = "id") 30 | private Person toPerson; 31 | 32 | @Column(name = "type") 33 | private String type; 34 | 35 | @Column(name = "higher") 36 | private Integer higher; 37 | 38 | public Relationship(FamilyTree familyTree, Person fromPerson, Person toPerson, String type, Integer higher) { 39 | this.familyTree = familyTree; 40 | this.fromPerson = fromPerson; 41 | this.toPerson = toPerson; 42 | this.type = type; 43 | this.higher = higher; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/Role.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import javax.persistence.*; 4 | import java.util.Set; 5 | 6 | @Entity 7 | @Table(name = "ft_role") 8 | public class Role { 9 | private Long id; 10 | private String name; 11 | private Set users; 12 | 13 | @Id 14 | @GeneratedValue(strategy = GenerationType.AUTO) 15 | public Long getId() { 16 | return id; 17 | } 18 | 19 | public void setId(Long id) { 20 | this.id = id; 21 | } 22 | 23 | public String getName() { 24 | return name; 25 | } 26 | 27 | public void setName(String name) { 28 | this.name = name; 29 | } 30 | 31 | @ManyToMany(mappedBy = "roles") 32 | public Set getUsers() { 33 | return users; 34 | } 35 | 36 | public void setUsers(Set users) { 37 | this.users = users; 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/Snapshot.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | import javax.persistence.*; 8 | import java.util.Date; 9 | 10 | @Entity 11 | @Table(name="ft_snapshot") 12 | @Getter 13 | @Setter 14 | @NoArgsConstructor 15 | public class Snapshot { 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.AUTO) 18 | private Long id; 19 | 20 | @Column(name = "name") 21 | private String name; 22 | 23 | @Column(name = "origin_ft_name") 24 | private String originFtName; 25 | 26 | @Column(name = "origin_ft_id") 27 | private Long originFtId; 28 | 29 | @ManyToOne 30 | @JoinColumn(name="created_by", referencedColumnName = "id") 31 | private User createdBy; 32 | 33 | @Temporal(TemporalType.TIMESTAMP) 34 | @Column(name="created_time") 35 | private Date createdTime; 36 | } 37 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/SnapshotImageUpload.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | import javax.persistence.*; 8 | import java.util.Date; 9 | 10 | @Entity 11 | @Table(name="ft_snapshot_image_upload") 12 | @Getter 13 | @Setter 14 | @NoArgsConstructor 15 | public class SnapshotImageUpload { 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.AUTO) 18 | private Long id; 19 | 20 | @ManyToOne 21 | @JoinColumn(name="snapshot_id", referencedColumnName = "id") 22 | private Snapshot snapshot; 23 | 24 | @ManyToOne 25 | @JoinColumn(name="upload_by", referencedColumnName = "id") 26 | private User uploadBy; 27 | 28 | @Column(name = "person_id") 29 | private Long personId; 30 | 31 | @Column(name = "obj_key") 32 | private String objKey; 33 | 34 | @Temporal(TemporalType.TIMESTAMP) 35 | @Column(name="upload_time") 36 | private Date uploadTime; 37 | 38 | public SnapshotImageUpload(Snapshot snapshot, User uploadBy, Long personId, String objKey, Date uploadTime) { 39 | this.snapshot = snapshot; 40 | this.uploadBy = uploadBy; 41 | this.personId = personId; 42 | this.objKey = objKey; 43 | this.uploadTime = uploadTime; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/SnapshotPerson.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name="ft_snapshot_person") 11 | @Getter 12 | @Setter 13 | @NoArgsConstructor 14 | public class SnapshotPerson { 15 | @Id 16 | @GeneratedValue(strategy = GenerationType.AUTO) 17 | private Long id; 18 | 19 | @ManyToOne 20 | @JoinColumn(name="snapshot_id", referencedColumnName = "id") 21 | private Snapshot snapshot; 22 | 23 | @Column(name = "person_id") 24 | private Long personId; 25 | 26 | @Column(name = "name") 27 | private String name; 28 | 29 | @Column(name = "sex") 30 | private Integer sex; 31 | 32 | @Column(name = "life_description") 33 | private String lifeDescription; 34 | 35 | @Column(name = "born") 36 | private String born; 37 | 38 | @Column(name = "death") 39 | private String death; 40 | 41 | @Column(name = "profile_img_path") 42 | private String profileImagePath; 43 | 44 | @Column(name = "address") 45 | private String address; 46 | 47 | @Column(name = "phone") 48 | private String phone; 49 | 50 | @Column(name="zibei") 51 | private String zibei; 52 | 53 | @Column(name="rank") 54 | private Integer rank; 55 | 56 | @Column(name = "short_description") 57 | private String shortDescription; 58 | 59 | public SnapshotPerson(Snapshot snapshot, Long personId, String name, Integer sex, String lifeDescription, String born, String death, String profileImagePath, String address, String phone, String shortDescription, String zibei, Integer rank) { 60 | this.snapshot = snapshot; 61 | this.personId = personId; 62 | this.name = name; 63 | this.sex = sex; 64 | this.lifeDescription = lifeDescription; 65 | this.born = born; 66 | this.death = death; 67 | this.profileImagePath = profileImagePath; 68 | this.address = address; 69 | this.phone = phone; 70 | this.shortDescription = shortDescription; 71 | this.zibei = zibei; 72 | this.rank = rank; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/SnapshotRelation.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name="ft_snapshot_relation") 11 | @Getter 12 | @Setter 13 | @NoArgsConstructor 14 | public class SnapshotRelation { 15 | @Id 16 | @GeneratedValue(strategy = GenerationType.AUTO) 17 | private Long id; 18 | 19 | @ManyToOne 20 | @JoinColumn(name="snapshot_id", referencedColumnName = "id") 21 | private Snapshot snapshot; 22 | 23 | @Column(name = "from_person_id") 24 | private Long fromPersonId; 25 | 26 | @Column(name = "to_person_id") 27 | private Long toPersonId; 28 | 29 | @Column(name = "type") 30 | private String type; 31 | 32 | @Column(name = "higher") 33 | private Integer higher; 34 | 35 | public SnapshotRelation(Snapshot snapshot, Long fromPersonId, Long toPersonId, String type, Integer higher) { 36 | this.snapshot = snapshot; 37 | this.fromPersonId = fromPersonId; 38 | this.toPersonId = toPersonId; 39 | this.type = type; 40 | this.higher = higher; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.entity; 2 | 3 | import com.family.tree.sea.familytreesea.utils.LicenseUtil; 4 | import lombok.Getter; 5 | import lombok.NoArgsConstructor; 6 | import lombok.Setter; 7 | import javax.persistence.*; 8 | import java.util.Date; 9 | import java.util.Map; 10 | import java.util.Objects; 11 | import java.util.Set; 12 | 13 | @Entity 14 | @Table(name="ft_user") 15 | @Getter 16 | @Setter 17 | @NoArgsConstructor 18 | public class User { 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.AUTO) 21 | private Long id; 22 | 23 | @Column(name="username", columnDefinition = "VARCHAR(200)") 24 | private String username; 25 | 26 | @Column(name="nickname", columnDefinition = "VARCHAR(200)") 27 | private String nickname; 28 | 29 | @Column(name="email", columnDefinition = "VARCHAR(100)") 30 | private String email; 31 | 32 | @Column(name="salt", columnDefinition = "VARCHAR(100)") 33 | private String salt; 34 | 35 | @Column(name="phone", columnDefinition = "VARCHAR(45)") 36 | private String phone; 37 | 38 | @Column(name="password", columnDefinition = "VARCHAR(200)") 39 | private String password; 40 | 41 | @Transient 42 | private String passwordConfirm; 43 | 44 | @ManyToMany 45 | @JoinTable(name = "ft_user_role", joinColumns = @JoinColumn(name = "user_id"), inverseJoinColumns = @JoinColumn(name = "role_id")) 46 | private Set roles; 47 | 48 | @Column(name = "license_code") 49 | private String licenseCode; 50 | 51 | @Column(name = "register_date") 52 | @Temporal(TemporalType.TIMESTAMP) 53 | private Date registerDate; 54 | 55 | @Override 56 | public boolean equals(Object o) { 57 | if (this == o) return true; 58 | if (o == null || getClass() != o.getClass()) return false; 59 | User user = (User) o; 60 | return Objects.equals(id, user.id) && 61 | Objects.equals(username, user.username) && 62 | Objects.equals(nickname, user.nickname) && 63 | Objects.equals(email, user.email) && 64 | Objects.equals(salt, user.salt) && 65 | Objects.equals(phone, user.phone) && 66 | Objects.equals(password, user.password) && 67 | Objects.equals(passwordConfirm, user.passwordConfirm) && 68 | Objects.equals(roles, user.roles) && 69 | Objects.equals(licenseCode, user.licenseCode) && 70 | Objects.equals(registerDate, user.registerDate); 71 | } 72 | 73 | @Override 74 | public int hashCode() { 75 | return Objects.hash(id, username, nickname, email, salt, phone, password, passwordConfirm, roles, licenseCode, registerDate); 76 | } 77 | 78 | public int getMaxFamilyCountFromLicenseCode(LicenseUtil licenseUtil, String licenseCode){ 79 | Map licenseContent = licenseUtil.parseLicenseCode(licenseCode); 80 | if(licenseContent.containsKey("max_family_count")){ 81 | return Integer.valueOf(licenseContent.get("max_family_count")); 82 | }else{ 83 | return 0; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/FamilyResponse.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class FamilyResponse { 11 | private Boolean ok; 12 | private String message; 13 | private Object data; 14 | } 15 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/FamilyTreeInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | @Getter 7 | @Setter 8 | @NoArgsConstructor 9 | public class FamilyTreeInfoVO { 10 | private Long id; 11 | private String name; 12 | private String description; 13 | private String createdBy; 14 | 15 | public FamilyTreeInfoVO(Long id, String name, String description, String createdBy) { 16 | this.id = id; 17 | this.name = name; 18 | this.description = description; 19 | this.createdBy = createdBy; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/FamilyTreeVO.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | 4 | import com.family.tree.sea.familytreesea.config.PrivilegeConstant; 5 | import lombok.Getter; 6 | import lombok.NoArgsConstructor; 7 | import lombok.Setter; 8 | 9 | @Getter 10 | @Setter 11 | @NoArgsConstructor 12 | public class FamilyTreeVO { 13 | private Long id; 14 | private String name; 15 | private String accessRight; 16 | 17 | public FamilyTreeVO(Long id, String name) { 18 | this.id = id; 19 | this.name = name; 20 | this.accessRight = PrivilegeConstant.ADMIN; 21 | } 22 | 23 | public FamilyTreeVO(Long id, String name, String accessRight) { 24 | this.id = id; 25 | this.name = name; 26 | this.accessRight = accessRight; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/FamilyVOHolder.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | 4 | import lombok.Getter; 5 | import lombok.NoArgsConstructor; 6 | import lombok.Setter; 7 | 8 | @Getter 9 | @Setter 10 | @NoArgsConstructor 11 | public class FamilyVOHolder { 12 | private String groupLabel; 13 | private Object groupData; 14 | } 15 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/PaginationMultiTypeValuesHelper.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class PaginationMultiTypeValuesHelper { 11 | private Integer count; 12 | private Integer page; 13 | private Object results; 14 | private Long total; 15 | } 16 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/PersonDetailVO.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class PersonDetailVO { 11 | private Long id; 12 | private Long familyTreeId; 13 | private String name; 14 | private Integer sex; 15 | private String born; 16 | private String death; 17 | private String lifeDescription; 18 | private String profileImgPath; 19 | private String address; 20 | private String phone; 21 | private String shortDesc; 22 | private String zibei; 23 | private Integer rank; 24 | 25 | 26 | public PersonDetailVO(Long id, Long familyTreeId, String name, Integer sex, String born, String death, String lifeDescription, String profileImgPath, String address, String phone, String shortDesc, String zibei, Integer rank) { 27 | this.id = id; 28 | this.familyTreeId = familyTreeId; 29 | this.name = name; 30 | this.sex = sex; 31 | this.born = born; 32 | this.death = death; 33 | this.lifeDescription = lifeDescription; 34 | this.profileImgPath = profileImgPath; 35 | this.address = address; 36 | this.phone = phone; 37 | this.shortDesc = shortDesc; 38 | this.zibei = zibei; 39 | this.rank = rank; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/PersonInGraphVO.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class PersonInGraphVO { 11 | private Long id; 12 | private String name; 13 | private Integer sex; 14 | private Integer level; 15 | private Integer leafDescendantCount; 16 | private Integer directDescendantCount; 17 | private Integer rank; 18 | 19 | 20 | public PersonInGraphVO(Long id, String name, Integer sex) { 21 | this.id = id; 22 | this.name = name; 23 | this.sex = sex; 24 | this.level = 0; 25 | this.leafDescendantCount = 0; 26 | this.directDescendantCount = 0; 27 | this.rank = 0; 28 | } 29 | 30 | public PersonInGraphVO(Long id, String name, Integer sex, Integer rank) { 31 | this.id = id; 32 | this.name = name; 33 | this.sex = sex; 34 | this.level = 0; 35 | this.leafDescendantCount = 0; 36 | this.directDescendantCount = 0; 37 | this.rank = rank; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/RelationExcelVO.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class RelationExcelVO { 11 | private String fromPersonName; 12 | private String toPersonName; 13 | private String type; 14 | 15 | public RelationExcelVO(String fromPersonName, String toPersonName, String type) { 16 | this.fromPersonName = fromPersonName; 17 | this.toPersonName = toPersonName; 18 | this.type = type; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/RelationVO.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class RelationVO { 11 | private Long id; 12 | private Long source; 13 | private Long target; 14 | private String type; 15 | private Integer higher; 16 | 17 | public RelationVO(Long id, Long source, Long target, String type, Integer higher) { 18 | this.id = id; 19 | this.source = source; 20 | this.target = target; 21 | this.type = type; 22 | this.higher = higher; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/SnapshotVO.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class SnapshotVO { 11 | private Long id; 12 | 13 | private String name; 14 | 15 | private String createdTime; 16 | 17 | private String originFtName; 18 | 19 | public SnapshotVO(Long id, String name, String createdTime, String originFtName) { 20 | this.id = id; 21 | this.name = name; 22 | this.createdTime = createdTime; 23 | this.originFtName = originFtName; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/UserSelectVO.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class UserSelectVO { 11 | private Long id; 12 | private String nickname; 13 | private String profilePath; 14 | 15 | public UserSelectVO(Long id, String nickname, String profilePath) { 16 | this.id = id; 17 | this.nickname = nickname; 18 | this.profilePath = profilePath; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/model/UserVO.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.model; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class UserVO { 11 | private Long id; 12 | private String nickName; 13 | private String phone; 14 | private String email; 15 | private String profileImage; 16 | 17 | public UserVO(Long id, String nickName, String phone, String email, String profileImage) { 18 | this.id = id; 19 | this.nickName = nickName; 20 | this.phone = phone; 21 | this.email = email; 22 | this.profileImage = profileImage; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/FamilyTreeRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.FamilyTree; 4 | import com.family.tree.sea.familytreesea.entity.User; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.stereotype.Repository; 7 | 8 | import java.util.Collection; 9 | import java.util.List; 10 | 11 | @Repository 12 | public interface FamilyTreeRepository extends JpaRepository { 13 | Long countByCreatedBy(User user); 14 | 15 | List findByCreatedBy(User user); 16 | List findByCreatedByAndName(User user, String name); 17 | 18 | List findByIdIn(Collection ids); 19 | } 20 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/ImageUploadHistoryRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.ImageUploadHistory; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.query.Param; 7 | 8 | import java.util.List; 9 | 10 | public interface ImageUploadHistoryRepository extends JpaRepository { 11 | List findByPersonId(Long personId); 12 | 13 | void deleteByPersonId(Long personId); 14 | 15 | void deleteByPersonIdIn(List personIds); 16 | 17 | int countByKey(String key); 18 | 19 | @Query(value = "select i from ImageUploadHistory i where i.person.familyTree.id=:familyTreeId") 20 | List findByFamilyTreeId(@Param("familyTreeId")Long familyTreeId); 21 | } 22 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.Person; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.query.Param; 7 | 8 | import java.util.List; 9 | 10 | public interface PersonRepository extends JpaRepository { 11 | List findByFamilyTreeId(Long treeId); 12 | 13 | void deleteByFamilyTreeId(Long id); 14 | 15 | @Query(value = "select id from Person where familyTree.id=:familyTreeId") 16 | List findPersonIdsByFamilyTreeId(@Param("familyTreeId") Long familyTreeId); 17 | 18 | int countByProfileImagePath(String key); 19 | } 20 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/RelationshipRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.Relationship; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.query.Param; 7 | import org.springframework.stereotype.Repository; 8 | 9 | import java.util.List; 10 | 11 | @Repository 12 | public interface RelationshipRepository extends JpaRepository { 13 | Relationship findByFromPersonIdAndToPersonId(Long fromPersonId, Long toPersonId); 14 | 15 | List findByFromPersonIdInAndToPersonIdIn(List fromPersonIds, List toPersonIds); 16 | 17 | List findByFamilyTreeId(Long familyTreeId); 18 | 19 | @Query(value = "select r from Relationship r where familyTree.id=:familyTreeId and fromPerson.id=:personId or toPerson.id=:personId") 20 | List findByFamilyTreeIdAndPersonId(@Param("familyTreeId") Long familyTreeId, @Param("personId") Long personId); 21 | 22 | void deleteByFromPersonId(Long id); 23 | 24 | void deleteByFromPersonIdAndToPersonId(Long fromId, Long toId); 25 | 26 | void deleteByToPersonId(Long id); 27 | 28 | void deleteByFamilyTreeId(Long id); 29 | } 30 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/RoleRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.Role; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface RoleRepository extends JpaRepository { 9 | } 10 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/SnapshotImageUploadHistoryRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.SnapshotImageUpload; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface SnapshotImageUploadHistoryRepository extends JpaRepository { 9 | int countByObjKey(String key); 10 | List findBySnapshotId(Long snapshotId); 11 | void deleteBySnapshotId(Long id); 12 | } 13 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/SnapshotPersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.SnapshotPerson; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | @Repository 10 | public interface SnapshotPersonRepository extends JpaRepository { 11 | int countByProfileImagePath(String key); 12 | List findBySnapshotId(Long snapshotId); 13 | void deleteBySnapshotId(Long id); 14 | } 15 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/SnapshotRelationRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.SnapshotRelation; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | @Repository 10 | public interface SnapshotRelationRepository extends JpaRepository { 11 | List findBySnapshotId(Long snapshotId); 12 | void deleteBySnapshotId(Long id); 13 | } 14 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/SnapshotRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.Snapshot; 4 | import com.family.tree.sea.familytreesea.entity.User; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.Query; 7 | import org.springframework.data.repository.query.Param; 8 | import org.springframework.stereotype.Repository; 9 | 10 | import java.util.List; 11 | 12 | @Repository 13 | public interface SnapshotRepository extends JpaRepository { 14 | int countByOriginFtId(Long familyTreeId); 15 | Snapshot findByCreatedByAndName(User user, String snapshotName); 16 | @Query(value = "select s from Snapshot s where s.createdBy=:user order by s.createdTime desc") 17 | List findByCreatedByOrderByCreatedTimeDesc(@Param("user")User user); 18 | 19 | List findByOriginFtId(Long id); 20 | } 21 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/repository/rdbms/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.repository.rdbms; 2 | 3 | import com.family.tree.sea.familytreesea.entity.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | @Repository 10 | public interface UserRepository extends JpaRepository { 11 | User findById(Long id); 12 | 13 | User findByUsername(String userName); 14 | User findByEmail(String email); 15 | User findByPhone(String phone); 16 | 17 | User findByUsernameAndPassword(String username, String password); 18 | 19 | List findFirst10ByPhoneLikeAndUsernameNot(String phone, String username); 20 | User findByPhoneAndUsernameNot(String phone, String username); 21 | User findByEmailAndUsernameNot(String email, String username); 22 | List findFirst10ByEmailLikeAndUsernameNot(String email, String username); 23 | List findFirst10ByNicknameLikeAndUsernameNot(String nickname, String username); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/FamilyTreeService.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service; 2 | 3 | import com.family.tree.sea.familytreesea.entity.FamilyTree; 4 | import com.family.tree.sea.familytreesea.entity.User; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface FamilyTreeService { 10 | Long countFamilyTreeCreatedByUser(User user); 11 | 12 | FamilyTree findFamilyTreeById(Long id); 13 | List findFamilyTreeByIds(List ids); 14 | 15 | Long save(FamilyTree familyTree); 16 | 17 | List findFamilyTreesByUser(User user); 18 | 19 | void deleteById(Long id); 20 | 21 | Map loadFtData(Long familyTreeId); 22 | Map loadFtDataPartial(Long familyTreeId, Long personId); 23 | 24 | List findByUserAndFamilyTreeName(User user, String familyTreeName); 25 | } 26 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/ImageUploadHistoryService.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service; 2 | 3 | import com.family.tree.sea.familytreesea.entity.ImageUploadHistory; 4 | 5 | import java.util.List; 6 | 7 | public interface ImageUploadHistoryService { 8 | void save(ImageUploadHistory history); 9 | void save(List history); 10 | 11 | List findByPersonId(Long personId); 12 | 13 | void deleteByPersonId(Long personId); 14 | void deleteByPersonIds(List personId); 15 | int countByObjKey(String key); 16 | 17 | List findImageUploadHistoryByFamilyTreeId(Long familyTreeId); 18 | } 19 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service; 2 | 3 | import com.family.tree.sea.familytreesea.entity.Person; 4 | import com.family.tree.sea.familytreesea.model.PersonDetailVO; 5 | import com.family.tree.sea.familytreesea.model.PersonInGraphVO; 6 | 7 | import java.util.List; 8 | 9 | public interface PersonService { 10 | Long save(Person person); 11 | 12 | void save(List person); 13 | 14 | Person findOne(Long id); 15 | 16 | List getNodesByFamilyId(Long familyTreeId); 17 | 18 | List findPeopleDetailsByFamilyTreeId(Long familyTreeId); 19 | 20 | void deleteByPersonId(Long id); 21 | 22 | void deleteByFamilyTreeId(Long id); 23 | 24 | List findPersonIdsByFamilyTreeId(Long familyTreeId); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/RelationshipService.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service; 2 | 3 | import com.family.tree.sea.familytreesea.entity.Relationship; 4 | import com.family.tree.sea.familytreesea.model.PersonInGraphVO; 5 | import com.family.tree.sea.familytreesea.model.RelationExcelVO; 6 | import com.family.tree.sea.familytreesea.model.RelationVO; 7 | 8 | import java.util.List; 9 | 10 | public interface RelationshipService { 11 | Long save(Relationship relationship); 12 | void save(List relationships); 13 | 14 | Relationship findRelationByFromPersonAndToPerson(Long fromId, Long toId); 15 | 16 | List findRelationsByFamilyTreeId(Long familyTreeId); 17 | List getLinksByFamilyTreeIdAndPersonId(Long familyTreeId, Long personId); 18 | 19 | /** 20 | * 21 | * @param familyTreeId 22 | * @param personId 23 | * @return return list of nodes containing the specific person Id, and all the IDs that has relation with this person, only id, name, sex properties are returned because those are what the graph need 24 | */ 25 | List getNodesByFamilyIdAndPersonId(Long familyTreeId, Long personId); 26 | 27 | List findRelationExcelByFamilyTreeId(Long familyTreeId); 28 | 29 | void deleteRelationByFromPersonId(Long personId); 30 | void deleteRelationByFromPersonIdAndToPersonId(Long srcId, Long targetId); 31 | 32 | /** 33 | * find all relations among given nodes 34 | * @param personIds 35 | * @return 36 | */ 37 | List findRelationAmongNodes(List personIds); 38 | 39 | void deleteRelationByToPersonId(Long personId); 40 | void deleteRelationByFamilyTreeId(Long id); 41 | } 42 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/RoleService.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service; 2 | 3 | import com.family.tree.sea.familytreesea.entity.Role; 4 | 5 | public interface RoleService { 6 | Role findById(Long id); 7 | } 8 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/SnapshotService.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service; 2 | 3 | import com.family.tree.sea.familytreesea.entity.*; 4 | 5 | import java.util.List; 6 | 7 | public interface SnapshotService { 8 | Snapshot save(Snapshot snapshot); 9 | void save(List snapshots); 10 | List saveSnapshotPeople(List snapshotPeople); 11 | List saveSnapshotRelation(List snapshotRelations); 12 | List saveImageUploadHitory(List snapshotImageUploads); 13 | int countSnapshots4FamilyTree(Long familyTreeId); 14 | Snapshot findByUserAndSnapshotName(User user, String snapshotName); 15 | List findPersonBySnapshotId(Long snapshotId); 16 | List findRelationsBySnapshotId(Long snapshotId); 17 | List findImageUploadsBySnapshotId(Long snapshotId); 18 | List findByUser(User user); 19 | Snapshot findOne(Long id); 20 | void deleteSnapshotRelationById(Long id); 21 | void deleteSnapshotImageUploadById(Long id); 22 | void deleteSnapshotPersonById(Long id); 23 | void deleteById(Long id); 24 | } 25 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service; 2 | 3 | 4 | import com.family.tree.sea.familytreesea.entity.User; 5 | 6 | public interface UserService { 7 | 8 | User findByUsername(String username); 9 | 10 | User findByEmail(String email); 11 | 12 | User findByPhone(String phone); 13 | 14 | User findUserByPhoneExcludeMe(String phone, String me); 15 | User findUserByEmailExcludeMe(String phone, String me); 16 | 17 | String generateUserProfileUrlByUsername(String username, String style, String defaultImg); 18 | Long save(User user); 19 | 20 | Long count(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/impl/ImageUploadHistoryServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service.impl; 2 | 3 | import com.family.tree.sea.familytreesea.entity.ImageUploadHistory; 4 | import com.family.tree.sea.familytreesea.repository.rdbms.ImageUploadHistoryRepository; 5 | import com.family.tree.sea.familytreesea.service.ImageUploadHistoryService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import javax.transaction.Transactional; 10 | import java.util.List; 11 | 12 | @Service 13 | public class ImageUploadHistoryServiceImpl implements ImageUploadHistoryService { 14 | @Autowired 15 | private ImageUploadHistoryRepository imageUploadHistoryRepository; 16 | 17 | @Override 18 | @Transactional 19 | public void save(ImageUploadHistory history){ 20 | imageUploadHistoryRepository.save(history); 21 | 22 | } 23 | 24 | @Override 25 | @Transactional 26 | public void save(List history){ 27 | imageUploadHistoryRepository.save(history); 28 | } 29 | 30 | @Override 31 | public List findByPersonId(Long personId){ 32 | return imageUploadHistoryRepository.findByPersonId(personId); 33 | } 34 | 35 | @Override 36 | public void deleteByPersonId(Long personId){ 37 | imageUploadHistoryRepository.deleteByPersonId(personId); 38 | } 39 | 40 | @Override 41 | public void deleteByPersonIds(List personIds){ 42 | imageUploadHistoryRepository.deleteByPersonIdIn(personIds); 43 | } 44 | 45 | @Override 46 | public int countByObjKey(String key){ 47 | return imageUploadHistoryRepository.countByKey(key); 48 | } 49 | 50 | @Override 51 | public List findImageUploadHistoryByFamilyTreeId(Long familyTreeId){ 52 | return imageUploadHistoryRepository.findByFamilyTreeId(familyTreeId); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/impl/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service.impl; 2 | 3 | import com.family.tree.sea.familytreesea.entity.Person; 4 | import com.family.tree.sea.familytreesea.model.PersonDetailVO; 5 | import com.family.tree.sea.familytreesea.model.PersonInGraphVO; 6 | import com.family.tree.sea.familytreesea.repository.rdbms.PersonRepository; 7 | import com.family.tree.sea.familytreesea.service.ImageUploadHistoryService; 8 | import com.family.tree.sea.familytreesea.service.PersonService; 9 | import com.family.tree.sea.familytreesea.service.SnapshotService; 10 | import org.slf4j.Logger; 11 | import org.slf4j.LoggerFactory; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | 15 | import java.util.List; 16 | import java.util.stream.Collectors; 17 | 18 | @Service 19 | public class PersonServiceImpl implements PersonService { 20 | private static final Logger LOG = LoggerFactory.getLogger(PersonServiceImpl.class); 21 | 22 | @Autowired 23 | private SnapshotService snapshotService; 24 | 25 | @Autowired 26 | private PersonRepository personRepository; 27 | 28 | @Autowired 29 | private ImageUploadHistoryService imageUploadHistoryService; 30 | 31 | @Override 32 | public Long save(Person person){ 33 | personRepository.save(person); 34 | return person.getId(); 35 | } 36 | 37 | @Override 38 | public void save(List person){ 39 | personRepository.save(person); 40 | } 41 | 42 | @Override 43 | public Person findOne(Long id){ 44 | return personRepository.findOne(id); 45 | } 46 | 47 | 48 | @Override 49 | public List getNodesByFamilyId(Long familyTreeId){ 50 | List people = personRepository.findByFamilyTreeId(familyTreeId); 51 | return people.stream().map(r->{return new PersonInGraphVO(r.getId(), r.getName(), r.getSex(), r.getRank());}).collect(Collectors.toList()); 52 | } 53 | 54 | 55 | @Override 56 | public List findPeopleDetailsByFamilyTreeId(Long familyTreeId){ 57 | List people = personRepository.findByFamilyTreeId(familyTreeId); 58 | return people.stream().map(r->{return new PersonDetailVO(r.getId(), r.getFamilyTree().getId(), 59 | r.getName(), r.getSex(), r.getBorn(), r.getDeath(), 60 | r.getLifeDescription(), r.getProfileImagePath(), r.getAddress(), r.getPhone(), 61 | r.getShortDescription(), r.getZibei(), r.getRank());}).collect(Collectors.toList()); 62 | } 63 | 64 | @Override 65 | public void deleteByPersonId(Long id){ 66 | personRepository.delete(id); 67 | } 68 | 69 | @Override 70 | public void deleteByFamilyTreeId(Long id){ 71 | personRepository.deleteByFamilyTreeId(id); 72 | } 73 | 74 | @Override 75 | public List findPersonIdsByFamilyTreeId(Long familyTreeId){ 76 | return personRepository.findPersonIdsByFamilyTreeId(familyTreeId); 77 | } 78 | 79 | 80 | 81 | } -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/impl/RoleServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service.impl; 2 | 3 | import com.family.tree.sea.familytreesea.entity.Role; 4 | import com.family.tree.sea.familytreesea.repository.rdbms.RoleRepository; 5 | import com.family.tree.sea.familytreesea.service.RoleService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | @Service 10 | public class RoleServiceImpl implements RoleService { 11 | @Autowired 12 | private RoleRepository roleRepository; 13 | 14 | @Override 15 | public Role findById(Long id){ 16 | return roleRepository.findOne(id); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/impl/SnapshotServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service.impl; 2 | 3 | import com.family.tree.sea.familytreesea.entity.*; 4 | import com.family.tree.sea.familytreesea.repository.rdbms.SnapshotImageUploadHistoryRepository; 5 | import com.family.tree.sea.familytreesea.repository.rdbms.SnapshotPersonRepository; 6 | import com.family.tree.sea.familytreesea.repository.rdbms.SnapshotRelationRepository; 7 | import com.family.tree.sea.familytreesea.repository.rdbms.SnapshotRepository; 8 | import com.family.tree.sea.familytreesea.service.SnapshotService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | 14 | @Service 15 | public class SnapshotServiceImpl implements SnapshotService { 16 | @Autowired 17 | private SnapshotRepository snapshotRepository; 18 | 19 | @Autowired 20 | private SnapshotPersonRepository snapshotPersonRepository; 21 | 22 | @Autowired 23 | private SnapshotImageUploadHistoryRepository snapshotImageUploadHistoryRepository; 24 | 25 | @Autowired 26 | private SnapshotRelationRepository snapshotRelationRepository; 27 | 28 | @Override 29 | public Snapshot save(Snapshot snapshot) { 30 | return snapshotRepository.save(snapshot); 31 | } 32 | 33 | @Override 34 | public void save(List snapshots){ 35 | snapshotRepository.save(snapshots); 36 | } 37 | 38 | @Override 39 | public List saveSnapshotPeople(List snapshotPeople){ 40 | return snapshotPersonRepository.save(snapshotPeople); 41 | } 42 | 43 | @Override 44 | public List saveSnapshotRelation(List snapshotRelations){ 45 | return snapshotRelationRepository.save(snapshotRelations); 46 | } 47 | 48 | @Override 49 | public List saveImageUploadHitory(List snapshotImageUploads){ 50 | return snapshotImageUploadHistoryRepository.save(snapshotImageUploads); 51 | } 52 | 53 | @Override 54 | public int countSnapshots4FamilyTree(Long familyTreeId){ 55 | return snapshotRepository.countByOriginFtId(familyTreeId); 56 | } 57 | 58 | @Override 59 | public Snapshot findByUserAndSnapshotName(User user, String snapshotName){ 60 | return snapshotRepository.findByCreatedByAndName(user, snapshotName); 61 | } 62 | 63 | 64 | @Override 65 | public List findPersonBySnapshotId(Long snapshotId){ 66 | return snapshotPersonRepository.findBySnapshotId(snapshotId); 67 | } 68 | 69 | @Override 70 | public List findRelationsBySnapshotId(Long snapshotId){ 71 | return snapshotRelationRepository.findBySnapshotId(snapshotId); 72 | } 73 | 74 | @Override 75 | public List findImageUploadsBySnapshotId(Long snapshotId){ 76 | return snapshotImageUploadHistoryRepository.findBySnapshotId(snapshotId); 77 | } 78 | 79 | @Override 80 | public List findByUser(User user){ 81 | return snapshotRepository.findByCreatedByOrderByCreatedTimeDesc(user); 82 | } 83 | 84 | @Override 85 | public Snapshot findOne(Long id){ 86 | return snapshotRepository.findOne(id); 87 | } 88 | 89 | @Override 90 | public void deleteSnapshotRelationById(Long id){ 91 | snapshotRelationRepository.deleteBySnapshotId(id); 92 | } 93 | 94 | @Override 95 | public void deleteSnapshotImageUploadById(Long id){ 96 | snapshotImageUploadHistoryRepository.deleteBySnapshotId(id); 97 | } 98 | 99 | @Override 100 | public void deleteSnapshotPersonById(Long id){ 101 | snapshotPersonRepository.deleteBySnapshotId(id); 102 | } 103 | 104 | @Override 105 | public void deleteById(Long id){ 106 | snapshotRepository.delete(id); 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.service.impl; 2 | 3 | 4 | import com.family.tree.sea.familytreesea.entity.User; 5 | import com.family.tree.sea.familytreesea.repository.rdbms.UserRepository; 6 | import com.family.tree.sea.familytreesea.service.UserService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.core.env.Environment; 9 | import org.springframework.stereotype.Service; 10 | 11 | @Service 12 | public class UserServiceImpl implements UserService { 13 | 14 | @Autowired 15 | private UserRepository userRepository; 16 | 17 | @Autowired 18 | private Environment env; 19 | 20 | @Override 21 | public User findByUsername(String username){ 22 | return userRepository.findByUsername(username); 23 | } 24 | 25 | 26 | @Override 27 | public User findByPhone(String phone){ 28 | return userRepository.findByPhone(phone); 29 | } 30 | 31 | @Override 32 | public User findByEmail(String email){ 33 | return userRepository.findByEmail(email); 34 | } 35 | 36 | @Override 37 | public User findUserByPhoneExcludeMe(String phone, String me){ 38 | return userRepository.findByPhoneAndUsernameNot(phone, me); 39 | } 40 | 41 | @Override 42 | public User findUserByEmailExcludeMe(String email, String me){ 43 | return userRepository.findByEmailAndUsernameNot(email, me); 44 | } 45 | 46 | @Override 47 | public String generateUserProfileUrlByUsername(String username, String style, String defaultImg){ 48 | String result = ""; 49 | return result; 50 | } 51 | 52 | 53 | @Override 54 | public Long save(User user){ 55 | User u = userRepository.save(user); 56 | return u.getId(); 57 | } 58 | 59 | @Override 60 | public Long count(){ 61 | return userRepository.count(); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/utils/LicenseUtil.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.utils; 2 | 3 | import org.apache.commons.codec.binary.Base64; 4 | import org.apache.commons.io.IOUtils; 5 | import org.springframework.core.io.ClassPathResource; 6 | import org.springframework.stereotype.Component; 7 | 8 | import javax.crypto.BadPaddingException; 9 | import javax.crypto.Cipher; 10 | import javax.crypto.IllegalBlockSizeException; 11 | import javax.crypto.NoSuchPaddingException; 12 | import java.io.InputStream; 13 | import java.io.UnsupportedEncodingException; 14 | import java.security.InvalidKeyException; 15 | import java.security.KeyFactory; 16 | import java.security.NoSuchAlgorithmException; 17 | import java.security.PublicKey; 18 | import java.security.spec.X509EncodedKeySpec; 19 | import java.util.HashMap; 20 | import java.util.Map; 21 | 22 | @Component 23 | public class LicenseUtil { 24 | 25 | private Cipher cipher=null; 26 | 27 | public void initCipher() throws NoSuchPaddingException, NoSuchAlgorithmException { 28 | if(cipher==null){ 29 | this.cipher = Cipher.getInstance("RSA"); 30 | } 31 | } 32 | 33 | public PublicKey getPublic() throws Exception { 34 | System.out.println("===before read public Key..."); 35 | InputStream is = new ClassPathResource("publicKey").getInputStream(); 36 | byte[] keyBytes = IOUtils.toByteArray(is); 37 | X509EncodedKeySpec spec = new X509EncodedKeySpec(keyBytes); 38 | KeyFactory kf = KeyFactory.getInstance("RSA"); 39 | return kf.generatePublic(spec); 40 | } 41 | 42 | public final String PUBLIC_SIGN = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCLzDT8VG3Fzd+nT5dgGOjlJDe/41sE+XDJJNh/WH8jVji0sP4j5Bem6M21baBF529kYOnEnW3ZwBw/HPs4bX5hiiG5deUGCk+vQIEhiUjqsIKkNzEZSh8LWq51G8cnGZ31Hprfpyi+rh6XbQAx9GB4j2sCmgavA0ipFvydveYK3QIDAQAB"; 43 | 44 | public String decryptText(String msg, PublicKey key) throws InvalidKeyException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException { 45 | initCipher(); 46 | this.cipher.init(Cipher.DECRYPT_MODE, key); 47 | return new String(cipher.doFinal(Base64.decodeBase64(msg)), "UTF-8"); 48 | } 49 | 50 | private Map parseMingwen(String mingwen){ 51 | Map result = new HashMap<>(); 52 | 53 | String[] lines = mingwen.split("\n"); 54 | for(String line: lines){ 55 | String[] lineArr = line.split("\t"); 56 | if(lineArr.length!=2){ 57 | throw new RuntimeException("This license is invalid..."); 58 | }else{ 59 | String key = lineArr[0]; 60 | String value = lineArr[1]; 61 | result.put(key,value); 62 | } 63 | } 64 | if(!result.containsKey("max_family_count") || !result.containsKey("start_date") || !result.containsKey("end_date") || !result.containsKey("username") ){ 65 | throw new RuntimeException("license not containing the required keys(max_family_count, start_date, end_date, username)"); 66 | } 67 | 68 | return result; 69 | } 70 | 71 | public Map parseLicenseCode(String licenseCode){ 72 | try { 73 | PublicKey publicKey = this.getPublic(); 74 | 75 | System.out.println("===Public key is:"); 76 | System.out.println(publicKey); 77 | System.out.println("....."); 78 | 79 | byte[] baseBytes = publicKey.getEncoded(); 80 | 81 | String base64encodedString = Base64.encodeBase64String(baseBytes); 82 | System.out.println("===show sign:"); 83 | System.out.println(base64encodedString); 84 | if(PUBLIC_SIGN.equals(base64encodedString)){ 85 | // legal public key, do the parse 86 | String mingwen = decryptText(licenseCode, publicKey); 87 | return parseMingwen(mingwen); 88 | }else{ 89 | throw new RuntimeException("Illegal public key..."); 90 | } 91 | } catch (Exception e) { 92 | throw new RuntimeException("Illegal license code..."); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/utils/SecurityUtil.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.utils; 2 | 3 | import javax.crypto.SecretKeyFactory; 4 | import javax.crypto.spec.PBEKeySpec; 5 | import java.math.BigInteger; 6 | import java.security.NoSuchAlgorithmException; 7 | import java.security.spec.InvalidKeySpecException; 8 | 9 | public class SecurityUtil { 10 | public static String generateStorngPasswordHash(String password,String salt) throws NoSuchAlgorithmException, InvalidKeySpecException 11 | { 12 | int iterations = 1000; 13 | char[] chars = password.toCharArray(); 14 | byte[] saltByte = salt.getBytes(); 15 | 16 | PBEKeySpec spec = new PBEKeySpec(chars, saltByte, iterations, 64 * 8); 17 | SecretKeyFactory skf = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1"); 18 | byte[] hash = skf.generateSecret(spec).getEncoded(); 19 | return iterations + ":" + toHex(saltByte) + ":" + toHex(hash); 20 | } 21 | 22 | private static String toHex(byte[] array) throws NoSuchAlgorithmException 23 | { 24 | BigInteger bi = new BigInteger(1, array); 25 | String hex = bi.toString(16); 26 | int paddingLength = (array.length * 2) - hex.length(); 27 | if(paddingLength > 0) 28 | { 29 | return String.format("%0" +paddingLength + "d", 0) + hex; 30 | }else{ 31 | return hex; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/java/com/family/tree/sea/familytreesea/utils/Util.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea.utils; 2 | 3 | import org.springframework.security.authentication.AnonymousAuthenticationToken; 4 | import org.springframework.security.core.Authentication; 5 | import org.springframework.security.core.context.SecurityContextHolder; 6 | 7 | import java.io.IOException; 8 | import java.net.HttpURLConnection; 9 | import java.net.MalformedURLException; 10 | import java.net.URL; 11 | 12 | public class Util { 13 | public static String currentUserName(){ 14 | Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); 15 | if (!(authentication instanceof AnonymousAuthenticationToken)) { 16 | String currentUserName = authentication.getName(); 17 | return currentUserName; 18 | }else{ 19 | return null; 20 | } 21 | } 22 | 23 | public static String trunc(String src, int limit) { 24 | return src.substring( 0, Math.min(src.length(), limit)); 25 | } 26 | 27 | 28 | public static boolean checkURLExist(String url){ 29 | URL u = null; 30 | try { 31 | u = new URL( url); 32 | HttpURLConnection huc = ( HttpURLConnection ) u.openConnection (); 33 | huc.setRequestMethod ("GET"); //OR huc.setRequestMethod ("HEAD"); 34 | huc.connect () ; 35 | int code = huc.getResponseCode() ; 36 | if(200==code){ 37 | return true; 38 | } 39 | return false; 40 | } catch (MalformedURLException e) { 41 | e.printStackTrace(); 42 | return false; 43 | } catch (IOException e) { 44 | e.printStackTrace(); 45 | return false; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.driver-class-name=org.sqlite.JDBC 2 | server.port=8865 3 | spring.datasource.url=jdbc:sqlite:/Users/xiefengchang/test/s/ftdata 4 | spring.datasource.username=root 5 | spring.datasource.password=root 6 | # 7 | spring.datasource.initialization-mode=always 8 | spring.datasource.schema=classpath:sql/schema.sql 9 | 10 | spring.jpa.database-platform=com.family.tree.sea.familytreesea.config.SQLiteDialect 11 | spring.jpa.hibernate.ddl-auto=none 12 | spring.jpa.show-sql=true 13 | 14 | 15 | spring.datasource.tomcat.max-wait=20000 16 | spring.datasource.tomcat.max-active=50 17 | spring.datasource.tomcat.max-idle=20 18 | spring.datasource.tomcat.min-idle=15 19 | 20 | spring.jpa.properties.hibernate.dialect=com.family.tree.sea.familytreesea.config.SQLiteDialect 21 | spring.h2.console.enabled=true 22 | spring.jpa.properties.hibernate.id.new_generator_mappings = false 23 | spring.jpa.properties.hibernate.format_sql = true 24 | 25 | logging.level.org.hibernate=ERROR 26 | logging.level.org.hibernate.SQL=DEBUG 27 | logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE 28 | 29 | server.session.timeout=1000 30 | 31 | liquibase.change-log=classpath:/db/changelog/liquibase-changeLog.xml 32 | liquibase.enabled=true 33 | liquibase.check-change-log-location=true 34 | 35 | spring.http.multipart.max-file-size=2048KB 36 | spring.http.multipart.max-request-size=2048KB 37 | 38 | spring.mvc.favicon.enabled = false 39 | 40 | static.base=http://localhost:8865 41 | 42 | origin.base=http://localhost:8865 43 | 44 | family.service.base=http://localhost:8865 45 | 46 | excel.tmpdir=/Users/xiefengchang/test/s/tmp 47 | data.static.imagefolder=/Users/xiefengchang/test/s/staticimgs 48 | spring.resources.static-locations=file:/Users/xiefengchang/test/s/staticimgs,classpath:static -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.driver-class-name=org.sqlite.JDBC 2 | server.port=8865 3 | spring.datasource.url=jdbc:sqlite:./data/ftdata 4 | spring.datasource.username=root 5 | spring.datasource.password=root 6 | # 7 | spring.datasource.initialization-mode=always 8 | spring.datasource.schema=classpath:sql/schema.sql 9 | 10 | spring.jpa.database-platform=com.family.tree.sea.familytreesea.config.SQLiteDialect 11 | spring.jpa.hibernate.ddl-auto=none 12 | spring.jpa.show-sql=true 13 | 14 | 15 | spring.datasource.tomcat.max-wait=20000 16 | spring.datasource.tomcat.max-active=50 17 | spring.datasource.tomcat.max-idle=20 18 | spring.datasource.tomcat.min-idle=15 19 | 20 | spring.jpa.properties.hibernate.dialect=com.family.tree.sea.familytreesea.config.SQLiteDialect 21 | spring.h2.console.enabled=true 22 | spring.jpa.properties.hibernate.id.new_generator_mappings = false 23 | spring.jpa.properties.hibernate.format_sql = true 24 | 25 | logging.level.org.hibernate=ERROR 26 | logging.level.org.hibernate.SQL=DEBUG 27 | logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE 28 | 29 | server.session.timeout=1000 30 | 31 | liquibase.change-log=classpath:/db/changelog/liquibase-changeLog-prod.xml 32 | liquibase.enabled=true 33 | liquibase.check-change-log-location=true 34 | 35 | spring.http.multipart.max-file-size=2048KB 36 | spring.http.multipart.max-request-size=2048KB 37 | 38 | spring.mvc.favicon.enabled = false 39 | 40 | static.base=http://localhost:8865 41 | 42 | origin.base=http://localhost:8865 43 | 44 | family.service.base=http://localhost:8865 45 | 46 | excel.tmpdir=./data/tmp 47 | data.static.imagefolder=./data/staticimgs 48 | spring.resources.static-locations=file:./data/staticimgs,classpath:static -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/application-qa.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.driver-class-name=org.sqlite.JDBC 2 | server.port=8865 3 | spring.datasource.url=jdbc:sqlite:/Users/xiefengchang/test/s/ftdata 4 | spring.datasource.username=root 5 | spring.datasource.password=root 6 | # 7 | spring.datasource.initialization-mode=always 8 | spring.datasource.schema=classpath:sql/schema.sql 9 | 10 | spring.jpa.database-platform=com.family.tree.sea.familytreesea.config.SQLiteDialect 11 | spring.jpa.hibernate.ddl-auto=none 12 | spring.jpa.show-sql=true 13 | 14 | 15 | spring.datasource.tomcat.max-wait=20000 16 | spring.datasource.tomcat.max-active=50 17 | spring.datasource.tomcat.max-idle=20 18 | spring.datasource.tomcat.min-idle=15 19 | 20 | spring.jpa.properties.hibernate.dialect=com.family.tree.sea.familytreesea.config.SQLiteDialect 21 | spring.h2.console.enabled=true 22 | spring.jpa.properties.hibernate.id.new_generator_mappings = false 23 | spring.jpa.properties.hibernate.format_sql = true 24 | 25 | logging.level.org.hibernate=ERROR 26 | logging.level.org.hibernate.SQL=DEBUG 27 | logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE 28 | 29 | server.session.timeout=1000 30 | 31 | liquibase.change-log=classpath:/db/changelog/liquibase-changeLog.xml 32 | liquibase.enabled=true 33 | liquibase.check-change-log-location=true 34 | 35 | spring.http.multipart.max-file-size=2048KB 36 | spring.http.multipart.max-request-size=2048KB 37 | 38 | spring.mvc.favicon.enabled = false 39 | 40 | static.base=http://localhost:8865 41 | 42 | origin.base=http://localhost:8865 43 | 44 | family.service.base=http://localhost:8865 45 | 46 | excel.tmpdir=/Users/xiefengchang/test/s/tmp 47 | data.static.imagefolder=/Users/xiefengchang/test/s/staticimgs 48 | spring.resources.static-locations=file:/Users/xiefengchang/test/s/staticimgs,classpath:static/dist -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.profiles.active=dev -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/db/changelog/liquibase-changeLog-prod.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/db/changelog/liquibase-changeLog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/publicKey: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/publicKey -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/relation_type.properties: -------------------------------------------------------------------------------- 1 | 1=父 2 | 2=母 3 | 3=夫 4 | 4=妻 5 | 5=子 6 | 6=女 7 | 7=妾 -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_size = 2 6 | indent_style = space 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | browser: true, 5 | node: true 6 | }, 7 | parserOptions: { 8 | parser: 'babel-eslint' 9 | }, 10 | extends: [ 11 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 12 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 13 | 'plugin:vue/essential' 14 | ], 15 | // required to lint *.vue files 16 | plugins: [ 17 | 'vue' 18 | ], 19 | // add your custom rules here 20 | rules: {} 21 | } 22 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | 4 | # logs 5 | npm-debug.log 6 | 7 | # Nuxt build 8 | .nuxt 9 | 10 | # Nuxt generate 11 | dist 12 | 13 | _nuxt 14 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/.nojekyll -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/200.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 家谱海,免费可视化在线数字家谱 6 | 7 | 8 |
9 | 10 | 11 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/README.md: -------------------------------------------------------------------------------- 1 | # STATIC 2 | 3 | This directory contains your static files. 4 | Each file inside this directory is mapped to /. 5 | 6 | Example: /static/robots.txt is mapped as /robots.txt. 7 | 8 | More information about the usage of this directory in the documentation: 9 | https://nuxtjs.org/guide/assets#static 10 | 11 | **This directory is not required, you can delete it if you don't want to use it.** 12 | -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/back-home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/back-home.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/backup.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/bianjishengping1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/bianjishengping1.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/bianjishengping2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/bianjishengping2.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/bianjixu.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/bianjixu.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/blur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/blur.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/book.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/bookback.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/bookback.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/browser.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/buildrelation.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/buildrelation.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/caocao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/caocao.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/caocao_life.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/caocao_life.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/caocaojubu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/caocaojubu.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/circle.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/createFt1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/createFt1.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/createFt2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/createFt2.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/createandbuildrelation.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/createandbuildrelation.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/createandbuildrelation2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/createandbuildrelation2.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/createpersonnode.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/createpersonnode.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/deleterelation.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/deleterelation.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/demo_xu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/demo_xu.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/emperor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/emperor.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/excel.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/excel.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/exportexcel.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/exportexcel.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/exportimg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/exportimg.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/favicon.ico -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/free.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/free.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/gege.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/gege.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/girlfriend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/girlfriend.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/gonggongpu.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/gonggongpu.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/gonggongpu2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/gonggongpu2.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/gonggongpu3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/gonggongpu3.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/guaiqiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/guaiqiao.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/guanliyuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/guanliyuan.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/guanxititle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/guanxititle.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/hanshi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/hanshi.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/houzhou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/houzhou.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/huajinan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/huajinan.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/huajinv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/huajinv.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/huangdi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/huangdi.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/huanghou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/huanghou.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/intro_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/intro_1.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/jinruxu.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/jinruxu.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/kuaizhao.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/kuaizhao.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/liuche.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/liuche.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/llj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/llj.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/lock.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/logo.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/manicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/manicon.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/manicon_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/manicon_small.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/meinv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/meinv2.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/menggumei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/menggumei.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/mingdi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/mingdi.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/mu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/mu.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/multijiapu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/multijiapu.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/noimage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/noimage.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/nvbing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/nvbing.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/nvhai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/nvhai.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/oldbook.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/oldbook.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/oldbook_public.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/oldbook_public.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/parchment-contact-tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/parchment-contact-tiny.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/privacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/privacy.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/qibing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/qibing.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/qingdi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/qingdi.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/qipao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/qipao.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/quanxian.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/quanxian.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/quanxian2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/quanxian2.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/quanxianguanli.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/quanxianguanli.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/rahmen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/rahmen.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/shanchukuaizhao.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/shanchukuaizhao.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/shaomin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/shaomin.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/shengping.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/shengping.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/shibing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/shibing.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/shuaige.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/shuaige.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/shunv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/shunv.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/shusheng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/shusheng.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/snapback.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/snapback.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/square.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/touxiangjiben.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/touxiangjiben.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/weijiu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/weijiu.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/weixinshouqian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/weixinshouqian.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/womanicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/womanicon.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/womanicon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/womanicon2.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/xizhuangnan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/xizhuangnan.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/yijiao.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/yijiao.jpeg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/yuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/yuan.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/zanwujiapu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/zanwujiapu.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/zhifubaoshouqian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/zhifubaoshouqian.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/zhixing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/zhixing.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/zhujianweisuo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/zhujianweisuo.jpg -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/imgs/zhuyuanzhang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/family-tree-sea/src/main/resources/static/imgs/zhuyuanzhang.png -------------------------------------------------------------------------------- /family-tree-sea/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 家谱海,免费可视化在线数字家谱 6 | 7 | 8 |
9 | 10 | 11 | -------------------------------------------------------------------------------- /family-tree-sea/src/test/java/com/family/tree/sea/familytreesea/FamilyTreeSeaApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.family.tree.sea.familytreesea; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class FamilyTreeSeaApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /forced3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/forced3.jpg -------------------------------------------------------------------------------- /han.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fengchangfight/familytreesea/bb8cf438e94172692947fc33c0dcc25b1b6b4317/han.jpg --------------------------------------------------------------------------------