init
3
.gitattributes
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*.js linguist-language=java
|
||||||
|
*.css linguist-language=java
|
||||||
|
*.html linguist-language=java
|
55
.gitignore
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
.DS_Store
|
||||||
|
/*backup/
|
||||||
|
#/.idea
|
||||||
|
/*/target/
|
||||||
|
/*/*.iml
|
||||||
|
# Editor directories and files
|
||||||
|
#*.idea
|
||||||
|
*.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
target/
|
||||||
|
pom.xml.tag
|
||||||
|
pom.xml.releaseBackup
|
||||||
|
pom.xml.versionsBackup
|
||||||
|
pom.xml.next
|
||||||
|
release.properties
|
||||||
|
dependency-reduced-pom.xml
|
||||||
|
buildNumber.properties
|
||||||
|
.mvn/timing.properties
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
#.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
nbproject/private/
|
||||||
|
build/
|
||||||
|
nbbuild/
|
||||||
|
dist/
|
||||||
|
nbdist/
|
||||||
|
.nb-gradle/
|
||||||
|
.idea
|
||||||
|
.mvn
|
||||||
|
*.idea
|
||||||
|
/.idea
|
||||||
|
node_modules
|
||||||
|
target
|
||||||
|
logs
|
||||||
|
docs
|
||||||
|
docker
|
||||||
|
jars
|
17
CONTRIBUTING.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
## Contributing to alldata
|
||||||
|
|
||||||
|
*Before opening a pull request*, review the
|
||||||
|
[Contributing to AllData guide](https://github.com/alldatacenter/alldata/blob/master/CONTRIBUTING.md).
|
||||||
|
It lists steps that are required before creating a PR. In particular, consider:
|
||||||
|
|
||||||
|
- Is the change important and ready enough to ask the community to spend time reviewing?
|
||||||
|
- Have you searched for existing, related JIRAs and pull requests?
|
||||||
|
- Is this a new feature that can stand alone as a third party project?
|
||||||
|
- Is the change being proposed clearly explained and motivated?
|
||||||
|
|
||||||
|
When you contribute code, you affirm that the contribution is your original work and that you
|
||||||
|
license the work to the project under the project's open source license. Whether or not you
|
||||||
|
state this explicitly, by submitting any copyrighted material via pull request, email, or
|
||||||
|
other means you agree to license the material under the project's open source license and
|
||||||
|
warrant that you have the legal authority to do so.
|
||||||
|
|
661
LICENSE
Normal file
@ -0,0 +1,661 @@
|
|||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU Affero General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works, specifically designed to ensure
|
||||||
|
cooperation with the community in the case of network server software.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
our General Public Licenses are intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
Developers that use our General Public Licenses protect your rights
|
||||||
|
with two steps: (1) assert copyright on the software, and (2) offer
|
||||||
|
you this License which gives you legal permission to copy, distribute
|
||||||
|
and/or modify the software.
|
||||||
|
|
||||||
|
A secondary benefit of defending all users' freedom is that
|
||||||
|
improvements made in alternate versions of the program, if they
|
||||||
|
receive widespread use, become available for other developers to
|
||||||
|
incorporate. Many developers of free software are heartened and
|
||||||
|
encouraged by the resulting cooperation. However, in the case of
|
||||||
|
software used on network servers, this result may fail to come about.
|
||||||
|
The GNU General Public License permits making a modified version and
|
||||||
|
letting the public access it on a server without ever releasing its
|
||||||
|
source code to the public.
|
||||||
|
|
||||||
|
The GNU Affero General Public License is designed specifically to
|
||||||
|
ensure that, in such cases, the modified source code becomes available
|
||||||
|
to the community. It requires the operator of a network server to
|
||||||
|
provide the source code of the modified version running there to the
|
||||||
|
users of that server. Therefore, public use of a modified version, on
|
||||||
|
a publicly accessible server, gives the public access to the source
|
||||||
|
code of the modified version.
|
||||||
|
|
||||||
|
An older license, called the Affero General Public License and
|
||||||
|
published by Affero, was designed to accomplish similar goals. This is
|
||||||
|
a different license, not a version of the Affero GPL, but Affero has
|
||||||
|
released a new version of the Affero GPL which permits relicensing under
|
||||||
|
this license.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, if you modify the
|
||||||
|
Program, your modified version must prominently offer all users
|
||||||
|
interacting with it remotely through a computer network (if your version
|
||||||
|
supports such interaction) an opportunity to receive the Corresponding
|
||||||
|
Source of your version by providing access to the Corresponding Source
|
||||||
|
from a network server at no charge, through some standard or customary
|
||||||
|
means of facilitating copying of software. This Corresponding Source
|
||||||
|
shall include the Corresponding Source for any work covered by version 3
|
||||||
|
of the GNU General Public License that is incorporated pursuant to the
|
||||||
|
following paragraph.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the work with which it is combined will remain governed by version
|
||||||
|
3 of the GNU General Public License.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU Affero General Public License from time to time. Such new versions
|
||||||
|
will be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU Affero General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU Affero General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU Affero General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published
|
||||||
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
9
LICENSING.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
The source code of alldata is covered by the following dual licenses:
|
||||||
|
|
||||||
|
(1) AGPL 3.0: https://www.gnu.org/licenses/agpl-3.0.en.html
|
||||||
|
|
||||||
|
You can choose AGPL to use alldata.
|
||||||
|
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
All contributions to the alldata are subject to this LICENSING file.
|
336
README.md
@ -0,0 +1,336 @@
|
|||||||
|
# 可定义数据中台
|
||||||
|
|
||||||
|
## [官方文档](https://alldata.readthedocs.io/) | [安装文档](https://github.com/alldatacenter/alldata/blob/master/install.md)
|
||||||
|
|
||||||
|
## 一、AllData体验版
|
||||||
|
|
||||||
|
> 体验版地址:Test账号只有数据质量,体验更多功能可选参加会员通道
|
||||||
|
>
|
||||||
|
> 成为会员:享受会员权益,详情查看Github主页文档
|
||||||
|
>
|
||||||
|
> 地址:http://122.51.43.143/dashboard
|
||||||
|
>
|
||||||
|
> 账号:test/123456
|
||||||
|
|
||||||
|
## 二、 官方网站
|
||||||
|
> 官方文档:https://alldata.readthedocs.io
|
||||||
|
>
|
||||||
|
> 部署教程:https://github.com/alldatacenter/alldata/blob/master/install.md
|
||||||
|
>
|
||||||
|
> 教程文档:https://github.com/alldatacenter/alldata/blob/master/dts_quickstart.md
|
||||||
|
> 教程文档2: https://github.com/alldatacenter/alldata/blob/master/bi_quickstart.md
|
||||||
|
|
||||||
|
## 三、会员通道-商业版【可选参加】
|
||||||
|
> 【腾讯文档】2023-大数据中台AllData会员通道
|
||||||
|
>
|
||||||
|
> https://docs.qq.com/sheet/DVFd6WXJLUHJ3eEZ1
|
||||||
|
|
||||||
|
## github
|
||||||
|
|
||||||
|
[](https://starchart.cc/alldatacenter/alldata)
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<a href="https://github.com/alldatacenter/github-readme-stats">
|
||||||
|
<img width="1215" align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=alldatacenter&repo=alldata" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
## 体验版
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/204965509-fc13050b-ebe8-4bd5-8882-69e1af0a8367.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## 可定义数据中台
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/235920344-fbf3c9d2-6239-4c73-aa9c-77a72773780e.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 首页
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456470-6fd4e3c8-e5b7-48f9-bf3a-83975f78654c.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456480-d23d6df9-65f0-45f8-8d02-b1a448fcf0cc.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据集成
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071504-c0e2b3ca-e3c2-4d70-8213-55c7316465ff.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071513-61997f31-12c4-464b-897d-bb60f0095ee9.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071519-35651c39-38c9-4746-ba18-c110a672e48f.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071527-d2af118c-ea4e-49f7-8435-c2b9ab8039cc.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071530-408d3001-0596-440c-93da-60d50aaacebe.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071537-4c0c2b38-dbfa-46a1-850e-4b73d5ca4236.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071539-f6b95712-4a32-481c-b719-f56c7542888c.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071544-43c5136d-091d-4602-b6de-ef528f39095c.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071554-1bc698f3-41d4-4fc5-ac74-a419ffede30e.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071565-1634a747-0f60-4dcd-a294-90d80d59cdc7.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据质量
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457313-aac5a92e-3780-4b81-99f3-de6ea1b32f79.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457303-9272dd14-6602-4f32-ab26-ea2c4b9e7c55.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据标准
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457469-8183b633-ace2-48ed-91ac-9d1c114e7e67.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457478-8ddf5083-5bad-4b27-90b9-14bebf7615f6.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457492-9c90f9a6-2a56-47ce-9042-00e2c5c662ec.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 元数据管理
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456662-be27764e-f2a1-46a1-97fb-4689a93a42a9.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456676-9c66e22b-393c-4757-a22f-2aa1604bef51.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456683-36436d97-76fc-4a0d-b4b7-e0090a6a2575.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456694-06a042cf-cad6-4bf5-ae41-8f1fad46c642.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456700-76a54b9f-e806-4ca7-b1d3-d0a9fa383de1.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456710-c004ac4a-5f67-45f2-9cbf-67b855a55c34.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456722-4f468872-2ada-4ad8-a56e-69c63f9b7e31.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456740-12c5298d-c72f-46ec-88ec-c680efbb592f.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据资产
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457692-c9c1a763-b0e5-4afe-abe7-623203ab6231.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457706-872b49b5-9ec5-4ad3-beb1-535fbd88dde3.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## 数据市场
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457844-e1a3ebbe-5a7c-43c4-8317-2bf066c5deed.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457858-37307d6b-41a1-4475-8d69-d7bcc38f6f10.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457862-415bdb7f-784e-4db9-9e54-eb83ea7a581f.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457872-6cbb24e0-82e1-47de-b3f8-200cdb47b90f.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457882-77fc873b-c340-47f1-b41c-9b2d5e73ff4d.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据比对
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816803-ca89bdd2-bce6-499d-8dbf-0522ed07ba86.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816815-89864618-f786-47ff-ae31-4fd8c662130b.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816833-7bf1202b-9a9a-48cd-9523-d329ad92cf69.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816849-5563f3c1-32f3-4ab8-ae1a-7919c65fd656.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816860-72f06760-94cd-497f-a623-7bb378d8077f.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816915-d45771bb-de17-4e3c-88ae-183d1aa28a1b.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234817116-dc4bca8e-e8ac-4efa-a2a0-d91ce9eb56e8.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## BI报表
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458114-48ab43b4-437d-4b7e-9eb3-d49b1da1b762.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458126-d5367210-fd82-4190-bf71-b99c6fc3176e.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458133-39ad2515-4447-4f6d-a9c7-e353d70c628d.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458143-5c771b96-6888-48e1-9e1c-265efee62b30.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458149-b658b9ea-c6df-4a7d-884c-d02f42aadb3e.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 流程编排
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458401-9244442e-c66d-4ebe-8a81-e989bedb1415.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458415-ec02039f-73d0-4513-b613-5aa931c9b294.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## 系统监控
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458501-7493df22-026b-402d-80dd-03c4b9bd8224.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458517-45eb4fd4-ccc1-4a37-8a0d-4403301bbc55.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458525-639b90bf-ffc3-439e-ba74-b9e9ce2f1323.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458535-2fea5b2c-b478-4192-a303-f377de0cd9b1.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## 运维管理
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458729-f6517a7e-ad37-4ce1-94d8-e2a2b41de7b9.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458745-5455a74e-706a-4498-af4a-39454f743cd6.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458756-9db88ca2-848d-4461-a4da-5ca149288779.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458765-f6be2c35-d870-4952-a79c-bb26ebaac6e7.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458778-4f2e1b46-d532-4411-b104-8288fcb97ad7.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData AI Studio 社区版
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/211255550-2d58eb94-42ce-411c-9487-9f2e499e565a.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData Studio 社区版
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/210299541-b9f4d344-30ba-4fc9-a083-390129f7da1e.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData社区商业计划图
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188898972-d78bcbb6-eb30-420d-b5e1-7168aa340555.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData社区项目业务流程图
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188899006-aba25703-f8fa-42b6-b59f-2573ee2b27fc.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData社区项目树状图
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188898939-bfba6cbc-c7b0-40c4-becd-27152d5daa90.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 全站式AllData产品路线图
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/179927878-ff9c487e-0d30-49d5-bc88-6482646d90a8.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## AllData社区开发规划
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188899033-948583a4-841b-4233-ad61-bbc45c936ca1.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
### 数据中台建设方法论
|
||||||
|
|
||||||
|
> 确定数据中台的目标和范围: 在开始构建数据中台之前, 需要明确数据中台的目标和范围, 例如数据中台的主要功能, 应用场景, 覆盖范围等
|
||||||
|
>
|
||||||
|
> 收集数据源: 根据定义的目标和范围, 收集相关的数据源这些数据源可以包括内部和外部的结构化和非结构化数据, 实时数据, 历史数据等
|
||||||
|
>
|
||||||
|
> 数据预处理: 对收集到的数据进行预处理, 包括数据清洗, 归一化, 去重, 脱敏等操作, 以确保数据的准确性, 一致性和安全性
|
||||||
|
>
|
||||||
|
> 数据建模和集成: 对预处理的数据进行建模和集成, 包括定义数据模型, 设计数据流程, 数据映射和转换等操作, 以确保数据的结构和语义一致性
|
||||||
|
>
|
||||||
|
> 数据存储和管理: 将集成的数据存储在数据仓库或数据湖中, 并实现数据的管理, 备份和恢复
|
||||||
|
>
|
||||||
|
> 数据治理和质量管理: 实现数据质量监控, 数据血缘追溯, 数据安全保障, 合规性检查等数据治理和质量管理功能, 以保证数据的高质量和可信性
|
||||||
|
>
|
||||||
|
> 数据分析和应用: 基于数据中台, 实现数据分析和应用, 如数据挖掘, 数据可视化, 机器学习等, 以提高数据的价值和应用效果
|
||||||
|
>
|
||||||
|
> 持续优化和创新: 数据中台的建设是一个持续迭代的过程, 需要不断进行优化和创新, 以适应不断变化的数据需求和业务场景
|
||||||
|
>
|
||||||
|
> 需要注意的是, 数据中台建设需要依赖于先进的技术和方法, 如云计算, 大数据, 人工智能, 数据湖等
|
||||||
|
>
|
||||||
|
> 同时, 数据中台建设还需要依赖于跨部门的协同和配合, 以确保数据的一致性和可用性
|
||||||
|
|
||||||
|
|
||||||
|
## 数字化转型
|
||||||
|
>
|
||||||
|
> 数字化转型是指将传统企业在信息化, 网络化, 智能化, 数据化等技术的支撑下, 对业务, 组织, 文化, 价值创造, 利益分配等方面进行全面的革新和升级,
|
||||||
|
>
|
||||||
|
> 以适应市场, 技术, 用户等环境的变化数字化转型的目标是实现企业从传统生产经营方式向数字化经营模式的转变, 提高企业的效率, 创新能力, 市场竞争力和盈利能力
|
||||||
|
>
|
||||||
|
> 数字化转型方法论可以概括为以下几个方面:
|
||||||
|
>
|
||||||
|
> 确定数字化转型的战略目标和方向, 明确数字化转型的意义和价值, 为数字化转型的实施提供方向和支撑
|
||||||
|
>
|
||||||
|
> 分析业务过程, 识别业务痛点和机会, 确定数字化转型的重点领域和项目, 以提高效率, 创新能力和用户体验为导向
|
||||||
|
>
|
||||||
|
> 优化组织结构和流程, 建立数字化组织架构和工作流程, 激发组织创新和员工动力, 提高业务效率和创新能力
|
||||||
|
>
|
||||||
|
> 采用先进的信息技术和数据技术, 例如云计算, 大数据, 人工智能, 物联网等, 为数字化转型提供技术支持
|
||||||
|
>
|
||||||
|
> 建立数字化文化, 通过数字化营销, 数字化服务, 数字化协同等方式, 提升品牌价值, 用户满意度和市场影响力
|
||||||
|
>
|
||||||
|
> 实施数字化监管, 建立数字化安全, 合规和风险控制体系, 确保数字化转型的合法性, 合规性和可持续性
|
||||||
|
>
|
||||||
|
> 数字化转型是一个复杂的过程, 需要综合运用战略, 组织, 技术, 文化, 监管等多方面的手段和方法, 才能取得成功
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/171598215-0914f665-9950-476c-97ff-e7e07aa10eaf.png">
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/171598333-d14ff53f-3af3-481c-9f60-4f891a535b5c.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## Community
|
||||||
|
|
||||||
|
> 加入微信群: https://docs.qq.com/doc/DVHlkSEtvVXVCdEFo
|
27
bi_quickstart.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#### (BI模块配置流程)
|
||||||
|
|
||||||
|
##### 根据官方部署文档,部署项目https://github.com/alldatacenter/alldata/blob/master/install.md
|
||||||
|
|
||||||
|
###### 部署可能会遇到的问题:
|
||||||
|
|
||||||
|
1. 在修改完配置文件后应该在alldata根目录进行打包,而不是单独模块打包,这样有些模块,无法打包成功
|
||||||
|
|
||||||
|
2. 切记认真查阅部署文档
|
||||||
|
|
||||||
|
##### 部署成功之后,点击BI模块点击修改操作进入修改界面,alldata-metadata-service模块会报错
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
该模块爆的应该是数据库的错误,其实主要是因为该项目提供的数据库只有studio,缺少了foodmart2和robot数据库
|
||||||
|
|
||||||
|
1:我们只需要新建这两个数据库并且把数据导入即可以下为数据库连接,https://gitee.com/zrxjava/srt-data/tree/master/db可以自己下载导入,我会把数据库文件放在项目根目录
|
||||||
|
|
||||||
|
2:在数据库中新建完这两个数据库之后,主要查看studio数据库中metadata_source表中的db_schema字段注意该字段的数据,端口和用户名,密码是否和foodmart2库和robot库相匹配,并且注意数据库的访问权限
|
||||||
|
|
||||||
|
##### 数据库补充完毕,就可以愉快的使用bi功能了
|
||||||
|

|
||||||
|
|
||||||
|

|
0
document/.gitkeep
Normal file
23
document/.readthedocs.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# .readthedocs.yaml
|
||||||
|
# Read the Docs configuration file
|
||||||
|
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||||
|
|
||||||
|
# Required
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
# Set the version of Python and other tools you might need
|
||||||
|
build:
|
||||||
|
os: ubuntu-22.04
|
||||||
|
tools:
|
||||||
|
python: "3.7"
|
||||||
|
|
||||||
|
# Build documentation in the docs/ directory with Sphinx
|
||||||
|
sphinx:
|
||||||
|
builder: html
|
||||||
|
configuration: document/source/conf.py
|
||||||
|
|
||||||
|
# We recommend specifying your dependencies to enable reproducible builds:
|
||||||
|
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
||||||
|
python:
|
||||||
|
install:
|
||||||
|
- requirements: document/source/requirements.txt
|
20
document/Makefile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Minimal makefile for Sphinx documentation
|
||||||
|
#
|
||||||
|
|
||||||
|
# You can set these variables from the command line, and also
|
||||||
|
# from the environment for the first two.
|
||||||
|
SPHINXOPTS ?=
|
||||||
|
SPHINXBUILD ?= sphinx-build
|
||||||
|
SOURCEDIR = source
|
||||||
|
BUILDDIR = build
|
||||||
|
|
||||||
|
# Put it first so that "make" without argument is like "make help".
|
||||||
|
help:
|
||||||
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
.PHONY: help Makefile
|
||||||
|
|
||||||
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
|
%: Makefile
|
||||||
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
32
document/README.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Document For AllData
|
||||||
|
|
||||||
|
## build document
|
||||||
|
> 1 pip3 install -U Sphinx
|
||||||
|
>
|
||||||
|
> 2 install dependency
|
||||||
|
>
|
||||||
|
```markdown
|
||||||
|
pip3 install sphinx-autobuild
|
||||||
|
pip3 install sphinx_rtd_theme
|
||||||
|
pip3 install --upgrade myst-parser
|
||||||
|
pip3 install sphinx_markdown_tables
|
||||||
|
```
|
||||||
|
> 3 配置mac(mac单独配置)
|
||||||
|
```markdown
|
||||||
|
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
|
||||||
|
source ~/.bash_profile
|
||||||
|
```
|
||||||
|
> 4 brew install sphinx-doc
|
||||||
|
>
|
||||||
|
> 5 echo 'export PATH="/opt/homebrew/opt/sphinx-doc/libexec/bin:$PATH"' >> ~/.zshrc
|
||||||
|
>
|
||||||
|
> 6 sphinx-build --version 查看version
|
||||||
|
>
|
||||||
|
> 7 python3.10 -m pip install --upgrade pip
|
||||||
|
>
|
||||||
|
> 8 pip3 install --upgrade myst-parser && pip3 install sphinxawesome_theme
|
||||||
|
>
|
||||||
|
> 9 make html
|
||||||
|
>
|
||||||
|
> 10 双击访问本地alldata/document/build/html/index.html
|
||||||
|
>
|
35
document/make.bat
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
|
||||||
|
REM Command file for Sphinx documentation
|
||||||
|
|
||||||
|
if "%SPHINXBUILD%" == "" (
|
||||||
|
set SPHINXBUILD=sphinx-build
|
||||||
|
)
|
||||||
|
set SOURCEDIR=source
|
||||||
|
set BUILDDIR=build
|
||||||
|
|
||||||
|
%SPHINXBUILD% >NUL 2>NUL
|
||||||
|
if errorlevel 9009 (
|
||||||
|
echo.
|
||||||
|
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||||
|
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||||
|
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||||
|
echo.may add the Sphinx directory to PATH.
|
||||||
|
echo.
|
||||||
|
echo.If you don't have Sphinx installed, grab it from
|
||||||
|
echo.https://www.sphinx-doc.org/
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%1" == "" goto help
|
||||||
|
|
||||||
|
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:help
|
||||||
|
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||||
|
|
||||||
|
:end
|
||||||
|
popd
|
336
document/source/README.md
Normal file
@ -0,0 +1,336 @@
|
|||||||
|
# 可定义数据中台
|
||||||
|
|
||||||
|
## [官方文档](https://alldata.readthedocs.io/) | [安装文档](https://github.com/alldatacenter/alldata/blob/master/install.md)
|
||||||
|
|
||||||
|
## 一、AllData体验版
|
||||||
|
|
||||||
|
> 体验版地址:Test账号只有数据质量,体验更多功能可选参加会员通道
|
||||||
|
>
|
||||||
|
> 成为会员:享受会员权益,详情查看Github主页文档
|
||||||
|
>
|
||||||
|
> 地址:http://122.51.43.143/dashboard
|
||||||
|
>
|
||||||
|
> 账号:test/123456
|
||||||
|
|
||||||
|
## 二、 官方网站
|
||||||
|
> 官方文档:https://alldata.readthedocs.io
|
||||||
|
>
|
||||||
|
> 部署教程:https://github.com/alldatacenter/alldata/blob/master/install.md
|
||||||
|
>
|
||||||
|
> 教程文档:https://github.com/alldatacenter/alldata/blob/master/dts_quickstart.md
|
||||||
|
> 教程文档2: https://github.com/alldatacenter/alldata/blob/master/bi_quickstart.md
|
||||||
|
|
||||||
|
## 三、会员通道-商业版【可选参加】
|
||||||
|
> 【腾讯文档】2023-大数据中台AllData会员通道
|
||||||
|
>
|
||||||
|
> https://docs.qq.com/sheet/DVFd6WXJLUHJ3eEZ1
|
||||||
|
|
||||||
|
## github
|
||||||
|
|
||||||
|
[](https://starchart.cc/alldatacenter/alldata)
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<a href="https://github.com/alldatacenter/github-readme-stats">
|
||||||
|
<img width="1215" align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=alldatacenter&repo=alldata" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
## 体验版
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/204965509-fc13050b-ebe8-4bd5-8882-69e1af0a8367.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## 可定义数据中台
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/235920344-fbf3c9d2-6239-4c73-aa9c-77a72773780e.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 首页
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456470-6fd4e3c8-e5b7-48f9-bf3a-83975f78654c.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456480-d23d6df9-65f0-45f8-8d02-b1a448fcf0cc.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据集成
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071504-c0e2b3ca-e3c2-4d70-8213-55c7316465ff.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071513-61997f31-12c4-464b-897d-bb60f0095ee9.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071519-35651c39-38c9-4746-ba18-c110a672e48f.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071527-d2af118c-ea4e-49f7-8435-c2b9ab8039cc.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071530-408d3001-0596-440c-93da-60d50aaacebe.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071537-4c0c2b38-dbfa-46a1-850e-4b73d5ca4236.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071539-f6b95712-4a32-481c-b719-f56c7542888c.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071544-43c5136d-091d-4602-b6de-ef528f39095c.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071554-1bc698f3-41d4-4fc5-ac74-a419ffede30e.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/206071565-1634a747-0f60-4dcd-a294-90d80d59cdc7.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据质量
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457313-aac5a92e-3780-4b81-99f3-de6ea1b32f79.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457303-9272dd14-6602-4f32-ab26-ea2c4b9e7c55.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据标准
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457469-8183b633-ace2-48ed-91ac-9d1c114e7e67.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457478-8ddf5083-5bad-4b27-90b9-14bebf7615f6.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457492-9c90f9a6-2a56-47ce-9042-00e2c5c662ec.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 元数据管理
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456662-be27764e-f2a1-46a1-97fb-4689a93a42a9.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456676-9c66e22b-393c-4757-a22f-2aa1604bef51.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456683-36436d97-76fc-4a0d-b4b7-e0090a6a2575.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456694-06a042cf-cad6-4bf5-ae41-8f1fad46c642.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456700-76a54b9f-e806-4ca7-b1d3-d0a9fa383de1.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456710-c004ac4a-5f67-45f2-9cbf-67b855a55c34.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456722-4f468872-2ada-4ad8-a56e-69c63f9b7e31.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227456740-12c5298d-c72f-46ec-88ec-c680efbb592f.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据资产
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457692-c9c1a763-b0e5-4afe-abe7-623203ab6231.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457706-872b49b5-9ec5-4ad3-beb1-535fbd88dde3.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## 数据市场
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457844-e1a3ebbe-5a7c-43c4-8317-2bf066c5deed.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457858-37307d6b-41a1-4475-8d69-d7bcc38f6f10.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457862-415bdb7f-784e-4db9-9e54-eb83ea7a581f.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457872-6cbb24e0-82e1-47de-b3f8-200cdb47b90f.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227457882-77fc873b-c340-47f1-b41c-9b2d5e73ff4d.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 数据比对
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816803-ca89bdd2-bce6-499d-8dbf-0522ed07ba86.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816815-89864618-f786-47ff-ae31-4fd8c662130b.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816833-7bf1202b-9a9a-48cd-9523-d329ad92cf69.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816849-5563f3c1-32f3-4ab8-ae1a-7919c65fd656.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816860-72f06760-94cd-497f-a623-7bb378d8077f.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234816915-d45771bb-de17-4e3c-88ae-183d1aa28a1b.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/234817116-dc4bca8e-e8ac-4efa-a2a0-d91ce9eb56e8.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## BI报表
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458114-48ab43b4-437d-4b7e-9eb3-d49b1da1b762.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458126-d5367210-fd82-4190-bf71-b99c6fc3176e.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458133-39ad2515-4447-4f6d-a9c7-e353d70c628d.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458143-5c771b96-6888-48e1-9e1c-265efee62b30.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458149-b658b9ea-c6df-4a7d-884c-d02f42aadb3e.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 流程编排
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458401-9244442e-c66d-4ebe-8a81-e989bedb1415.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458415-ec02039f-73d0-4513-b613-5aa931c9b294.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## 系统监控
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458501-7493df22-026b-402d-80dd-03c4b9bd8224.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458517-45eb4fd4-ccc1-4a37-8a0d-4403301bbc55.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458525-639b90bf-ffc3-439e-ba74-b9e9ce2f1323.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458535-2fea5b2c-b478-4192-a303-f377de0cd9b1.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## 运维管理
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458729-f6517a7e-ad37-4ce1-94d8-e2a2b41de7b9.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458745-5455a74e-706a-4498-af4a-39454f743cd6.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458756-9db88ca2-848d-4461-a4da-5ca149288779.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458765-f6be2c35-d870-4952-a79c-bb26ebaac6e7.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/227458778-4f2e1b46-d532-4411-b104-8288fcb97ad7.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData AI Studio 社区版
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/211255550-2d58eb94-42ce-411c-9487-9f2e499e565a.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData Studio 社区版
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/210299541-b9f4d344-30ba-4fc9-a083-390129f7da1e.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData社区商业计划图
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188898972-d78bcbb6-eb30-420d-b5e1-7168aa340555.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData社区项目业务流程图
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188899006-aba25703-f8fa-42b6-b59f-2573ee2b27fc.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## AllData社区项目树状图
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188898939-bfba6cbc-c7b0-40c4-becd-27152d5daa90.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 全站式AllData产品路线图
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/179927878-ff9c487e-0d30-49d5-bc88-6482646d90a8.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
## AllData社区开发规划
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188899033-948583a4-841b-4233-ad61-bbc45c936ca1.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
### 数据中台建设方法论
|
||||||
|
|
||||||
|
> 确定数据中台的目标和范围: 在开始构建数据中台之前, 需要明确数据中台的目标和范围, 例如数据中台的主要功能, 应用场景, 覆盖范围等
|
||||||
|
>
|
||||||
|
> 收集数据源: 根据定义的目标和范围, 收集相关的数据源这些数据源可以包括内部和外部的结构化和非结构化数据, 实时数据, 历史数据等
|
||||||
|
>
|
||||||
|
> 数据预处理: 对收集到的数据进行预处理, 包括数据清洗, 归一化, 去重, 脱敏等操作, 以确保数据的准确性, 一致性和安全性
|
||||||
|
>
|
||||||
|
> 数据建模和集成: 对预处理的数据进行建模和集成, 包括定义数据模型, 设计数据流程, 数据映射和转换等操作, 以确保数据的结构和语义一致性
|
||||||
|
>
|
||||||
|
> 数据存储和管理: 将集成的数据存储在数据仓库或数据湖中, 并实现数据的管理, 备份和恢复
|
||||||
|
>
|
||||||
|
> 数据治理和质量管理: 实现数据质量监控, 数据血缘追溯, 数据安全保障, 合规性检查等数据治理和质量管理功能, 以保证数据的高质量和可信性
|
||||||
|
>
|
||||||
|
> 数据分析和应用: 基于数据中台, 实现数据分析和应用, 如数据挖掘, 数据可视化, 机器学习等, 以提高数据的价值和应用效果
|
||||||
|
>
|
||||||
|
> 持续优化和创新: 数据中台的建设是一个持续迭代的过程, 需要不断进行优化和创新, 以适应不断变化的数据需求和业务场景
|
||||||
|
>
|
||||||
|
> 需要注意的是, 数据中台建设需要依赖于先进的技术和方法, 如云计算, 大数据, 人工智能, 数据湖等
|
||||||
|
>
|
||||||
|
> 同时, 数据中台建设还需要依赖于跨部门的协同和配合, 以确保数据的一致性和可用性
|
||||||
|
|
||||||
|
|
||||||
|
## 数字化转型
|
||||||
|
>
|
||||||
|
> 数字化转型是指将传统企业在信息化, 网络化, 智能化, 数据化等技术的支撑下, 对业务, 组织, 文化, 价值创造, 利益分配等方面进行全面的革新和升级,
|
||||||
|
>
|
||||||
|
> 以适应市场, 技术, 用户等环境的变化数字化转型的目标是实现企业从传统生产经营方式向数字化经营模式的转变, 提高企业的效率, 创新能力, 市场竞争力和盈利能力
|
||||||
|
>
|
||||||
|
> 数字化转型方法论可以概括为以下几个方面:
|
||||||
|
>
|
||||||
|
> 确定数字化转型的战略目标和方向, 明确数字化转型的意义和价值, 为数字化转型的实施提供方向和支撑
|
||||||
|
>
|
||||||
|
> 分析业务过程, 识别业务痛点和机会, 确定数字化转型的重点领域和项目, 以提高效率, 创新能力和用户体验为导向
|
||||||
|
>
|
||||||
|
> 优化组织结构和流程, 建立数字化组织架构和工作流程, 激发组织创新和员工动力, 提高业务效率和创新能力
|
||||||
|
>
|
||||||
|
> 采用先进的信息技术和数据技术, 例如云计算, 大数据, 人工智能, 物联网等, 为数字化转型提供技术支持
|
||||||
|
>
|
||||||
|
> 建立数字化文化, 通过数字化营销, 数字化服务, 数字化协同等方式, 提升品牌价值, 用户满意度和市场影响力
|
||||||
|
>
|
||||||
|
> 实施数字化监管, 建立数字化安全, 合规和风险控制体系, 确保数字化转型的合法性, 合规性和可持续性
|
||||||
|
>
|
||||||
|
> 数字化转型是一个复杂的过程, 需要综合运用战略, 组织, 技术, 文化, 监管等多方面的手段和方法, 才能取得成功
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/171598215-0914f665-9950-476c-97ff-e7e07aa10eaf.png">
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/171598333-d14ff53f-3af3-481c-9f60-4f891a535b5c.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## Community
|
||||||
|
|
||||||
|
> 加入微信群: https://docs.qq.com/doc/DVHlkSEtvVXVCdEFo
|
28
document/source/conf.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Configuration file for the Sphinx documentation builder.
|
||||||
|
#
|
||||||
|
# For the full list of built-in configuration values, see the documentation:
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||||
|
|
||||||
|
# -- Project information -----------------------------------------------------
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||||
|
|
||||||
|
project = 'AllData'
|
||||||
|
copyright = '2023, AllDataDC'
|
||||||
|
author = 'AllDataDC'
|
||||||
|
release = '0.4.x'
|
||||||
|
|
||||||
|
# -- General configuration ---------------------------------------------------
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||||
|
|
||||||
|
extensions = ['myst_parser']
|
||||||
|
|
||||||
|
templates_path = ['_templates']
|
||||||
|
exclude_patterns = []
|
||||||
|
|
||||||
|
language = 'zh_CN'
|
||||||
|
|
||||||
|
# -- Options for HTML output -------------------------------------------------
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||||
|
|
||||||
|
html_theme = 'sphinxawesome_theme'
|
||||||
|
html_static_path = ['_static']
|
24
document/source/donate/README.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# 会员通道
|
||||||
|
|
||||||
|
## 一、AllData体验版
|
||||||
|
|
||||||
|
> 体验版地址:Test账号只有数据质量,体验更多功能可选参加会员通道
|
||||||
|
>
|
||||||
|
> 成为会员:享受会员权益,详情查看Github主页文档
|
||||||
|
>
|
||||||
|
> 地址:http://122.51.43.143/dashboard
|
||||||
|
>
|
||||||
|
> 账号:test/123456
|
||||||
|
|
||||||
|
## 二、 官方网站
|
||||||
|
> 官方文档:https://alldata.readthedocs.io
|
||||||
|
>
|
||||||
|
> 部署教程:https://github.com/alldatacenter/alldata/blob/master/install.md
|
||||||
|
>
|
||||||
|
> 教程文档:https://github.com/alldatacenter/alldata/blob/master/studio/modules/service-data-dts-parent/DTS_QuickStart.md
|
||||||
|
|
||||||
|
## 三、会员通道-商业版【可选参加】
|
||||||
|
> 【腾讯文档】2023-大数据中台AllData会员通道
|
||||||
|
>
|
||||||
|
> https://docs.qq.com/sheet/DVFd6WXJLUHJ3eEZ1
|
||||||
|
|
7
document/source/donate/index.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
募捐活动
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
README
|
16
document/source/index.rst
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
.. alldata documentation master file, created by
|
||||||
|
sphinx-quickstart on Wed Jan 11 16:02:11 2023.
|
||||||
|
You can adapt this file completely to your liking, but it should at least
|
||||||
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
|
可定义数据中台
|
||||||
|
===================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
README
|
||||||
|
quickstart/index
|
||||||
|
studio/index
|
||||||
|
wiki/index
|
||||||
|
donate/index
|
7
document/source/quickstart/index.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
快速上手
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
../README
|
6
document/source/requirements.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
sphinxawesome-theme==3.3.7
|
||||||
|
urllib3==1.26.15
|
||||||
|
sphinx==5.3.0
|
||||||
|
sphinx_rtd_theme==1.1.1
|
||||||
|
readthedocs-sphinx-search==0.1.1
|
||||||
|
myst-parser==1.0.0
|
7
document/source/studio/index.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
数据中台
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
../README
|
0
document/source/wiki/.gitkeep
Normal file
0
document/source/wiki/alldata/.gitkeep
Normal file
146
document/source/wiki/alldata/README.md
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
# 2023年度社区分享
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
AllData开源社区 ✖️ Datavines ✖️ 跑象科技 Meetup
|
||||||
|
主要介绍AllData产品的技术及其应用场景,
|
||||||
|
同时我们会邀请业内同行做嘉宾分享,让参与者有机会与嘉宾和其他社区成员互动。
|
||||||
|
后续我们会继续分享AllData数字化上游生态和下游支撑平台的专题分享。
|
||||||
|
```
|
||||||
|
|
||||||
|
## 01 分享嘉宾介绍
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/ccf3deb0-fe5e-4384-bf92-a0d8b1416e5f">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/36547083-18bf-4af0-9f26-b939c1699296">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/7b89e6bb-7c46-408e-a308-50e307f0cbc8">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 02 AllData分享
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/32e793dc-7d17-466f-b6aa-7aa23367484c">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/acdc09aa-d704-472e-86d5-892e5e1474ed">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/16d9add0-d772-4785-a671-3c1e9c5f4b2f">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/1bb0cc1d-8ad1-4239-acac-8b59eab1824a">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/1f98910b-a672-4ee0-a277-db68dec5161a">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/4c1b82d3-3582-4896-b0eb-b450ad74cb77">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/0afafffe-49cd-44dc-a4bd-f65296db68d8">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 03 Datavines分享
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/868a41df-87c5-4fd5-a6c5-add7c2797b0f">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/70baf309-519d-42b4-a14e-cb8df7be29ee">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/23fb0238-94f6-4f7d-985d-048d6c182580">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/8243a579-4d6a-414e-94ea-4fbf6493282c">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/a951f8e8-18a5-4c1a-bc18-26c40de8e2d9">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/044cd7aa-b82c-4556-9ecc-715c28a9ed2d">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/a04eae39-f932-4dfd-8c9e-1983ee977fa6">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 04 Datart分享
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/aed13016-9991-4a0a-96c5-d584e055a2e0">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/f3f8e701-68e6-420b-bc0b-cd6e676ccd08">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/19e1bc0a-ccb9-4958-a94a-bb714d0f4f5b">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/deace393-1a88-41f7-91ea-691f5c908780">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/15fcd3fc-eb5f-4df7-9755-dd195e9e2349">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/7eee3cb7-dfc3-4b7f-91a6-dad5cf901aa5">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/108bd71f-412a-44ec-af46-0daf93414fa6">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 05 Apache StreamPark作者分享
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/b6f6a95d-a56b-4f0f-adf7-705c23a7056b">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
StreamPark作者王华杰给AllData社区带来了较多问题较多的分享
|
||||||
|
|
||||||
|
问题一:如何建设一款社区&&商业成功的开源平台
|
||||||
|
|
||||||
|
回答:从可用版本,到好用版本,到可规模化,真正解决客户场景的问题,让客户用在实际场景。
|
||||||
|
|
||||||
|
问题二:如何用一句话定义AllData
|
||||||
|
|
||||||
|
回答:一站式的数据中台,提供能力开放的数据中台。
|
||||||
|
|
||||||
|
问题三:有没有哪一块是AllData的核心优势,能在客户选型阶段必定会拿出来对比竞争的核心功能?比较拔尖出类拔萃的功能
|
||||||
|
|
||||||
|
回答:AllData社区目前的功能正在集成阶段,后续会出更多贯穿场景的闭环功能。
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
7
document/source/wiki/alldata/index.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
alldata
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
README
|
0
document/source/wiki/dinky/.gitkeep
Normal file
93
document/source/wiki/dinky/README.md
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
# AllData社区与Dinky社区分享
|
||||||
|
|
||||||
|
### AllData社区发起人邀请Dinky的作者文末aiwenmo对AllData社区建设进行分享和宝贵建议
|
||||||
|
### Dlink为Apache Flink而生,让Flink SQL尽享丝般顺滑,致力于实时计算平台的构建
|
||||||
|
### Dinky项目:https://github.com/DataLinkDC/dlink
|
||||||
|
### AllData项目:https://github.com/alldatacenter/alldata
|
||||||
|
### 感谢社区成员@yg9538的会议纪要
|
||||||
|
- **第一:如何激发社区对用户来参与到项目的建设,一起推动项目的发展?**
|
||||||
|
- **第二:完成整个项目的基本功能路线,流程是如何的?**
|
||||||
|
|
||||||
|
**我首先回答第二个问题。首先AllData用到的技术栈包括我们所设想的整个流程是非常全面丰富的。但然,凡事都是有利有弊的,技术栈的全面会导致各个技术功能点实现复杂度增高。**
|
||||||
|
|
||||||
|
### 2.1 最小MVP
|
||||||
|
|
||||||
|
**对于第一个问题,其实跟第二个问题是非常有关系的。当我们具备了一个可使用的一个MVP最小可行性产品时候,用户将产品用在测试或者生产实践将会给项目带来极大的益处**
|
||||||
|
**最大的好处是用户将会主动参与到我们那个项目的推动中。比如说项目的在实践中进行的测试和提出的ISSUE作为项目经验必不可少,其次用户在实际生产中遇到的二开需求,对于我们整个项目提升也是有极大的帮助。**
|
||||||
|
|
||||||
|
### 2.2 门户与KM知识库
|
||||||
|
|
||||||
|
**当然就是除了有一个最小可行性产品门户和知识库也必不可少,门户可以对整个项目进行一个详细的介绍。比如我们要进行部署的话我们可以进行搜索,百度上也会提供许多文档。但是百度的文档质量参差不齐,非常影响用户的体验。**
|
||||||
|
|
||||||
|
**我看到AllData有提到三个概念我是非常赞同的:**
|
||||||
|
|
||||||
|
- **重设计**
|
||||||
|
- **轻编码**
|
||||||
|
- **中度测试**
|
||||||
|
|
||||||
|
**对于社区来说,我们可以总结自己的经验形成文档放在社区中。**
|
||||||
|
|
||||||
|
### 2.3 用户分类
|
||||||
|
|
||||||
|
**然后第三点,因为项目前期用户是较少,在前期用户对项目的发展至关重要。这就不仅需我们仔细的聆听用户的需求,用户的反馈,还要积极的为用户来进行解答,一般用户会划分为两大类:**
|
||||||
|
|
||||||
|
- **有完整的技术经验——较少数**
|
||||||
|
- **无完整的技术经验——占多数**
|
||||||
|
|
||||||
|
**第一种用户是自身具备一定的技术栈,一定的能力。**
|
||||||
|
|
||||||
|
**第二种用户是作为项目经理或技术他引入该开源项目来作为解决方案的**
|
||||||
|
|
||||||
|
**门户网站和知识库至关重要,它可以帮助客户进行部署。所以问题点就是如何教导用户会用我们的产品。**
|
||||||
|
|
||||||
|
### 2.4 工作推动
|
||||||
|
|
||||||
|
**然后,就是进行一个分工推这方面。如果作为一个领导者要去领导我们的协作者去完成一件事情的时候,首先要达到一个统一的共识才可以,然后如何如何来达到这个统一的共识呢**
|
||||||
|
|
||||||
|
#### 2.4.1 获得认可
|
||||||
|
|
||||||
|
**首先就得需要认可你的方案**,认可你的思路。
|
||||||
|
|
||||||
|
#### 2.4.2 产品定位
|
||||||
|
|
||||||
|
**就是说你不要让用户上生产的时候就把你所有的功能都要上去,而是可以用你几块核心功能就可以完成一个产品。**
|
||||||
|
|
||||||
|
### 2.5 技术选型
|
||||||
|
|
||||||
|
#### 2.5.1 大数据平台选型
|
||||||
|
|
||||||
|
基于这些平台,你可以独立完整的跑起一个MVP。这样不仅仅能享受到社区福利也可以获得用户的认可
|
||||||
|
|
||||||
|
#### 2.5.2 MLOPS平台选型
|
||||||
|
|
||||||
|
|
||||||
|
#### 2.5.3 CI/CD
|
||||||
|
|
||||||
|
**CI/CD那一块我认为就比较独立了。这些也是有现成的项目,然后我们要做的其实就是调研好现成的项目。然后把它集成进来。**
|
||||||
|
|
||||||
|
### 2.6 需求场景
|
||||||
|
|
||||||
|
**我个人对AllData的定位是一个把很多开源的项目平台统一管理、集成起来,提供一个能力开放的平台**
|
||||||
|
|
||||||
|
#### 2.6.1 定义场景
|
||||||
|
|
||||||
|
**一般离线开发都是需要开发需求。**
|
||||||
|
|
||||||
|
### 2.7 其他要求
|
||||||
|
|
||||||
|
#### 2.7.1 文档要求
|
||||||
|
|
||||||
|
**第一,文档永远没有交流重要,文档的规范可以放松,但是交流是最主要的。**
|
||||||
|
|
||||||
|
#### 2.7.2 设计逻辑
|
||||||
|
|
||||||
|
**第二就是设计。先是高层级设计,再是具体细节设计。**
|
||||||
|
|
||||||
|
**这具体如何实现呢?例如我们如何去把数据开发平台、调度平台、管理平台关联?首先就需要把他们打通,作为一个底层Base先把他们真正的打通起来。然后让他们可以再以流一个流程化的方式来跑起来。**
|
||||||
|
|
||||||
|
**建议总结:**
|
||||||
|
|
||||||
|
- **压缩技术栈**
|
||||||
|
- **理念转变为团队思想**
|
||||||
|
- **多于其他社区沟通,达到互帮互助引流的效果**
|
||||||
|
|
7
document/source/wiki/dinky/index.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
dinky
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
README
|
BIN
document/source/wiki/evolution/Business.png
Normal file
After Width: | Height: | Size: 107 KiB |
BIN
document/source/wiki/evolution/BusinessProcess.png
Normal file
After Width: | Height: | Size: 202 KiB |
48
document/source/wiki/evolution/CHANGELOG
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# PLATFORM FOR BDP 科学护城河
|
||||||
|
|
||||||
|
# Version1
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
|
||||||
|
1、美团Logan埋点
|
||||||
|
|
||||||
|
2、采集中心代码编写
|
||||||
|
|
||||||
|
3、维护kafka集群
|
||||||
|
|
||||||
|
4、日志消费系统
|
||||||
|
|
||||||
|
5、爬虫采集系统
|
||||||
|
|
||||||
|
6、ETL清洗入ES, HBase
|
||||||
|
|
||||||
|
7、电商分析
|
||||||
|
|
||||||
|
8、上线demo
|
||||||
|
```
|
||||||
|
|
||||||
|
# Version2
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
|
||||||
|
1、BUSINESS FOR ALL DATA PLATFORM 商业项目
|
||||||
|
|
||||||
|
2、BUSINESS FOR ALL DATA PLATFORM 计算引擎
|
||||||
|
|
||||||
|
3、DEVOPS FOR ALL DATA PLATFORM 运维引擎
|
||||||
|
|
||||||
|
4、DATA GOVERN FOR ALL DATA PLATFORM 数据治理引擎
|
||||||
|
|
||||||
|
5、DATA Integrate FOR ALL DATA PLATFORM 数据集成引擎
|
||||||
|
|
||||||
|
6、AI FOR ALL DATA PLATFORM 人工智能引擎
|
||||||
|
|
||||||
|
7、DATA ODS FOR ALL DATA PLATFORM 数据采集引擎
|
||||||
|
|
||||||
|
8、OLAP FOR ALL DATA PLATFORM OLAP查询引擎
|
||||||
|
|
||||||
|
9、OPTIMIZE FOR ALL DATA PLATFORM 性能优化引擎
|
||||||
|
|
||||||
|
10、DATABASES FOR ALL DATA PLATFORM 分布式存储引擎
|
||||||
|
|
||||||
|
```
|
BIN
document/source/wiki/evolution/CommunityEdition.png
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
document/source/wiki/evolution/CustomScene.png
Normal file
After Width: | Height: | Size: 202 KiB |
BIN
document/source/wiki/evolution/Doris.png
Normal file
After Width: | Height: | Size: 138 KiB |
BIN
document/source/wiki/evolution/Overview.png
Normal file
After Width: | Height: | Size: 475 KiB |
59
document/source/wiki/evolution/README.md
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# 未来规划
|
||||||
|
|
||||||
|
## 1、 AllData总述
|
||||||
|
>
|
||||||
|
> 一个基础平台基于Docker拉起20+种开源组件的启停,第二个是数据平台的产品
|
||||||
|
>
|
||||||
|
## 2、组件维护与升级
|
||||||
|
>
|
||||||
|
> 由于Apache很多开源项目发展节奏较快,目前暂时没有很好的版本切换的能力,维护不同组件的版本比较困难
|
||||||
|
>
|
||||||
|
## 3、定期升级维护最新的组件版本
|
||||||
|
>
|
||||||
|
> 并对已进行二次开发的组件进行适配升级到组件新版本,保证平滑兼容升级
|
||||||
|
>
|
||||||
|
## 4、apache社区组件版本
|
||||||
|
>
|
||||||
|
> DataSphereStudio: 1.1.0
|
||||||
|
>
|
||||||
|
> docker: 3.0.0.0-SNAPSHOT
|
||||||
|
>
|
||||||
|
> Dolphinscheduler: 3.0.0
|
||||||
|
>
|
||||||
|
> Atlas: 3.0.0-SNAPSHOT
|
||||||
|
>
|
||||||
|
> Griffin: 0.7.0-SNAPSHOT
|
||||||
|
>
|
||||||
|
> Kong: 3.0.0
|
||||||
|
>
|
||||||
|
> Flinkcdc: 2.3 RELEASE
|
||||||
|
>
|
||||||
|
> Flinkx: 1.12-SNAPSHOT
|
||||||
|
>
|
||||||
|
> Kylin: 4.0.2
|
||||||
|
>
|
||||||
|
> Presto: 0.276.2
|
||||||
|
>
|
||||||
|
> Hudi: v0.12.0
|
||||||
|
>
|
||||||
|
> Iceberg: v0.13.1
|
||||||
|
>
|
||||||
|
> Dlink: 0.6.7
|
||||||
|
>
|
||||||
|
> Linkis: 1.2.0
|
||||||
|
>
|
||||||
|
> Streamis: 0.2.0
|
||||||
|
>
|
||||||
|
> Doris: 1.0-SNAPSHOT
|
||||||
|
>
|
||||||
|
> DataX: X-version
|
||||||
|
>
|
||||||
|
> Backend: v1.2-SNAPSHOT
|
||||||
|
>
|
||||||
|
> Rancher: 2.6.7
|
||||||
|
>
|
||||||
|
> SREWorks: X-version
|
||||||
|
>
|
||||||
|
> Cube-Studio: X-version
|
||||||
|
>
|
||||||
|
> GraphScope: 0.17.0
|
BIN
document/source/wiki/evolution/RecommendSystem.png
Normal file
After Width: | Height: | Size: 389 KiB |
BIN
document/source/wiki/evolution/RoadMap.png
Normal file
After Width: | Height: | Size: 278 KiB |
BIN
document/source/wiki/evolution/TimeTravel.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
document/source/wiki/evolution/TreeMap.png
Normal file
After Width: | Height: | Size: 230 KiB |
BIN
document/source/wiki/evolution/ai-studio.png
Normal file
After Width: | Height: | Size: 63 KiB |
7
document/source/wiki/evolution/index.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
evolution
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
README
|
3
document/source/wiki/hudi/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Hudi性能测试报告
|
||||||
|
|
||||||
|
> https://docs.qq.com/doc/DVFlVUExWd3Jva2ZK
|
7
document/source/wiki/hudi/index.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
hudi
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
README
|
10
document/source/wiki/index.rst
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
社区分享
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
alldata/index
|
||||||
|
dinky/index
|
||||||
|
hudi/index
|
||||||
|
evolution/index
|
155
dts_quickstart.md
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
# 数据集成单任务配置(使用datax)
|
||||||
|
|
||||||
|
**1、安装datax**
|
||||||
|
|
||||||
|
安装参考[linux安装dataX-CSDN博客](https://blog.csdn.net/hzp666/article/details/127350768)
|
||||||
|
|
||||||
|
**2、配置datax同步mysql**
|
||||||
|
> 配置mysql隔离级别,进入mysql终端
|
||||||
|
>
|
||||||
|
> SET GLOBAL transaction_isolation='READ-COMMITTED';
|
||||||
|
|
||||||
|
配置数据源
|
||||||
|
|
||||||
|
jdbc:mysql://16gmaster:33060/studio?useUnicode=true&characterEncoding=utf8&useLocalSessionState=true
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/f1390cfe-078e-40a5-980a-009ac0d3a2ac">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/6dac7341-230d-423b-8b15-16d418240b83">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
配置执行器
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/925f40ee-2730-4c5e-b8e8-ccdac295d562">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
配置任务模版
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/6ec02640-046a-49f4-a9ef-05754c878c2a">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
配置单任务
|
||||||
|
|
||||||
|
按步骤选择数据抽取库,数据合并库,映射字段,构建datax的可执行json文件,选择任务模版,点击下一步任务就创建完成了,可以在任务详情里查看
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/3139101f-0cba-4e44-a82f-62f19cf7dfa1">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/3e0b4250-1200-4f2f-9ed3-8fde2cc4b8f4">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/1a9cc66e-9951-41e3-89af-77e830b77ad0">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/7488c7ee-311f-446f-b35c-07091e1aba8d">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
最后可以运行的json文件
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"job": {
|
||||||
|
"setting": {
|
||||||
|
"speed": {
|
||||||
|
"channel": 1,
|
||||||
|
"bytes": 0
|
||||||
|
},
|
||||||
|
"errorLimit": {
|
||||||
|
"record": 100
|
||||||
|
},
|
||||||
|
"restore": {
|
||||||
|
"maxRowNumForCheckpoint": 0,
|
||||||
|
"isRestore": false,
|
||||||
|
"restoreColumnName": "",
|
||||||
|
"restoreColumnIndex": 0
|
||||||
|
},
|
||||||
|
"log": {
|
||||||
|
"isLogger": false,
|
||||||
|
"level": "debug",
|
||||||
|
"path": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content": [{
|
||||||
|
"reader": {
|
||||||
|
"name": "mysqlreader",
|
||||||
|
"parameter": {
|
||||||
|
"username": "root",
|
||||||
|
"password": "123456",
|
||||||
|
"column": [
|
||||||
|
"menu_id",
|
||||||
|
"pid",
|
||||||
|
"sub_count",
|
||||||
|
"type",
|
||||||
|
"title",
|
||||||
|
"name",
|
||||||
|
"component",
|
||||||
|
"menu_sort",
|
||||||
|
"icon",
|
||||||
|
"path",
|
||||||
|
"i_frame",
|
||||||
|
"cache",
|
||||||
|
"hidden",
|
||||||
|
"permission",
|
||||||
|
"create_by",
|
||||||
|
"update_by",
|
||||||
|
"create_time",
|
||||||
|
"update_time"
|
||||||
|
],
|
||||||
|
"splitPk": "",
|
||||||
|
"connection": [{
|
||||||
|
"table": [
|
||||||
|
"sys_menu_source"
|
||||||
|
],
|
||||||
|
"jdbcUrl": [
|
||||||
|
"jdbc:mysql://16gmaster:33060/studio?useUnicode=true&characterEncoding=utf8&useLocalSessionState=true"
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"writer": {
|
||||||
|
"name": "mysqlwriter",
|
||||||
|
"parameter": {
|
||||||
|
"username": "root",
|
||||||
|
"password": "123456",
|
||||||
|
"writeMode": "insert",
|
||||||
|
"column": [
|
||||||
|
"menu_id",
|
||||||
|
"pid",
|
||||||
|
"sub_count",
|
||||||
|
"type",
|
||||||
|
"title",
|
||||||
|
"name",
|
||||||
|
"component",
|
||||||
|
"menu_sort",
|
||||||
|
"icon",
|
||||||
|
"path",
|
||||||
|
"i_frame",
|
||||||
|
"cache",
|
||||||
|
"hidden",
|
||||||
|
"permission",
|
||||||
|
"create_by",
|
||||||
|
"update_by",
|
||||||
|
"create_time",
|
||||||
|
"update_time"
|
||||||
|
],
|
||||||
|
"connection": [{
|
||||||
|
"table": [
|
||||||
|
"sys_menu_target"
|
||||||
|
],
|
||||||
|
"jdbcUrl": "jdbc:mysql://16gmaster:33060/studio?useUnicode=true&characterEncoding=utf8&useLocalSessionState=true"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
436
install.md
Normal file
@ -0,0 +1,436 @@
|
|||||||
|
## 部署指南
|
||||||
|
|
||||||
|
### 1、后端结构
|
||||||
|
|
||||||
|
```
|
||||||
|
├── studio
|
||||||
|
│ ├── config(配置中心,必须启动)
|
||||||
|
│ ├── eureka(注册中心,必须启动)
|
||||||
|
│ ├── gateway(网关,必须启动)
|
||||||
|
│ ├── install(脚本目录,数据库脚本必须)
|
||||||
|
│ │ ├── 16gdata
|
||||||
|
│ │ ├── 16gmaster
|
||||||
|
│ │ │ ├──studio
|
||||||
|
│ │ │ │ ├──studio-0.x.x.sql
|
||||||
|
│ ├── modules(各模块目录)
|
||||||
|
│ │ ├── codegen-service-parent(代码生成模块,可选启动)
|
||||||
|
│ │ ├── data-market-service-parent(数据集市模块,可选启动)
|
||||||
|
│ │ ├── data-masterdata-service-parent(主数据服务模块,可选启动)
|
||||||
|
│ │ ├── data-metadata-service-parent(元数据管理模块,可选启动)
|
||||||
|
│ │ ├── data-quality-service-parent(数据质量模块,可选启动)
|
||||||
|
│ │ ├── data-standard-service-parent(数据标准模块,可选启动)
|
||||||
|
│ │ ├── data-system-service-parent
|
||||||
|
│ │ ├── data-visual-service-parent(数据可视化模块,可选启动)
|
||||||
|
│ │ ├── email-service-parent(邮件管理模块,可选启动)
|
||||||
|
│ │ ├── file-service-parent(文件管理模块,可选启动)
|
||||||
|
│ │ ├── quartz-service-parent(定时任务模块,可选启动)
|
||||||
|
│ │ ├── service-data-dts-parent(数据集成模块,可选启动)
|
||||||
|
│ │ ├── system-service-parent(系统管理模块,必须启动)
|
||||||
|
│ │ └── workflow-service-parent(工作流模块,可选启动)
|
||||||
|
│ ├── pom.xml
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2、前端结构
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
│ ── micro-ui
|
||||||
|
├── public // 公共文件
|
||||||
|
│ ├── favicon.ico // favicon图标
|
||||||
|
│ ├── index.html // html模板
|
||||||
|
│ └── robots.txt //爬虫协议
|
||||||
|
├── src // 源代码
|
||||||
|
│ ├── App.vue
|
||||||
|
│ ├── api // 所有请求
|
||||||
|
│ ├── assets// 主题 字体等静态资源
|
||||||
|
│ ├── components // 全局公用组件
|
||||||
|
│ ├── directive // 全局指令
|
||||||
|
│ ├── filters
|
||||||
|
│ ├── icons
|
||||||
|
│ ├── layout // 布局
|
||||||
|
│ ├── main.js // 入口 加载组件 初始化等
|
||||||
|
│ ├── mixins
|
||||||
|
│ ├── router // 路由
|
||||||
|
│ ├── settings.js // 系统配置
|
||||||
|
│ ├── store // 全局 store管理
|
||||||
|
│ ├── styles // 样式
|
||||||
|
│ ├── utils // 全局公用方法
|
||||||
|
│ ├── vendor
|
||||||
|
│ └── views // view页面
|
||||||
|
│ ├── components
|
||||||
|
│ ├── dashboard
|
||||||
|
│ ├── dts
|
||||||
|
│ ├── features
|
||||||
|
│ ├── generator
|
||||||
|
│ ├── govern
|
||||||
|
│ ├── home.vue
|
||||||
|
│ ├── lakehouse
|
||||||
|
│ ├── login.vue
|
||||||
|
│ ├── market
|
||||||
|
│ ├── masterdata
|
||||||
|
│ ├── metadata
|
||||||
|
│ ├── mnt
|
||||||
|
│ ├── monitor
|
||||||
|
│ ├── nested
|
||||||
|
│ ├── quality
|
||||||
|
│ ├── standard
|
||||||
|
│ ├── system
|
||||||
|
│ ├── tools
|
||||||
|
│ ├── visual
|
||||||
|
│ └── workflow
|
||||||
|
└── vue.config.js
|
||||||
|
├── package.json
|
||||||
|
├── plopfile.js
|
||||||
|
├── postcss.config.js
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### 3、准备工作
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
JDK >= 1.8
|
||||||
|
Mysql >= 5.7.0 (推荐5.7及以上版本)
|
||||||
|
Redis >= 3.0
|
||||||
|
Maven >= 3.0
|
||||||
|
Node >= 10.15.3
|
||||||
|
RabbitMQ >= 3.0.x
|
||||||
|
```
|
||||||
|
> 使用Mysql 8的用户注意导入数据时的编码格式问题
|
||||||
|
|
||||||
|
### 4、本地启动/运行系统
|
||||||
|
|
||||||
|
> 首先确保启动rabbitmq,mysql,redis已经启动
|
||||||
|
|
||||||
|
#### 4.1 后端运行
|
||||||
|
|
||||||
|
1、前往GitHub项目页面(https://github.com/alldatacenter/alldata)
|
||||||
|
推荐使用版本控制方式下载解压到工作目录或IDEA直接从VCS获取项目代码,便于同步最新社区版改动, alldata/studio/为项目前后端存放路径。
|
||||||
|
|
||||||
|
2、项目导入到IDEA后,会自动加载Maven依赖包,初次加载会比较慢(根据自身网络情况而定)
|
||||||
|
|
||||||
|
3、创建数据库studio:到 `factory/studio/install/sql`目录下sql数据脚本,把` studio.sql`和`studio-v0.x.x.sql`导入本地或线上Mysql数据库
|
||||||
|
|
||||||
|
4、导入BI sql, 参考alldata/bi_quickstart.md
|
||||||
|
|
||||||
|
5、修改该文件 `alldata/studio/config/src/main/resources/config/application-common-dev.yml`的rabbitmq,mysql,redis为自己的服务
|
||||||
|
|
||||||
|
6、打开运行基础模块(启动没有先后顺序)
|
||||||
|
|
||||||
|
```
|
||||||
|
DataxEurekaApplication.java(注册中心模块 必须)
|
||||||
|
DataxConfigApplication.java(配置中心模块 必须)
|
||||||
|
DataxGatewayApplication.java(网关模块 必须)
|
||||||
|
SystemServiceApplication.java(系统模块 必须,不启动无法登录)
|
||||||
|
```
|
||||||
|
其他模块可根据需求,自行决定启动
|
||||||
|
|
||||||
|
5.1 启动Eurake项目
|
||||||
|
|
||||||
|
1. 找到factory/studio/eureka/src/main/java/cn/datax/eureka/DataxEurekaApplication.java 运行启动
|
||||||
|
|
||||||
|
2. 浏览器访问 http://localhost:8610/,看到以下页面表示启动成功
|
||||||
|
|
||||||
|
5.2 启动Config项目
|
||||||
|
1. 修改bootstrap.yml文件,本地运行时eureka配置处,改成localhost
|
||||||
|
2. 找到factory/studio/config/src/main/java/cn/datax/config/DataxConfigApplication.java,运行启动
|
||||||
|
|
||||||
|
5.3 启动Gateway项目
|
||||||
|
1. 修改bootstrap.yml文件,本地运行时eureka配置处,改成localhost
|
||||||
|
|
||||||
|
2. 找到factory/studio/gateway/src/main/java/cn/datax/gateway/DataxGatewayApplication.java,启动项目
|
||||||
|
|
||||||
|
3. 启动完后,可以在Eureka中发现刚才启动的服务
|
||||||
|
|
||||||
|
5.4 启动SystemService项目,本地运行时eureka配置处,改成localhost。及其他项目同理。
|
||||||
|
|
||||||
|
|
||||||
|
#### 4.2 前端运行
|
||||||
|
```
|
||||||
|
cd alldata/studio/micro-ui
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
启动成功,会自动弹出浏览器登录页
|
||||||
|
|
||||||
|
|
||||||
|
#### 注意目前视频能看到的功能都已开源,若发现“数据集成”菜单没有.
|
||||||
|
#### 可只导入factory/studio/install/sql下的studio.sql + studio-v0.x.x + 数据集成。
|
||||||
|
#### 其他菜单若发现没有的话,也可自行配置,具体参考 https://github.com/alldatacenter/alldata/issues/489
|
||||||
|
|
||||||
|
|
||||||
|
#### 4.3 启动SystemService项目,本地运行时eureka配置处,改成localhost。及其他项目同理。
|
||||||
|
```
|
||||||
|
系统管理 - system-service-parent ~ system-service ~ SystemServiceApplication
|
||||||
|
数据集成 - service-data-dts-parent ~ service-data-dts ~ DataDtsServiceApplication
|
||||||
|
元数据管理 - data-metadata-service-parent ~ data-metadata-service ~ DataxMetadataApplication
|
||||||
|
元数据管理 - data-metadata-service-parent ~ data-metadata-service-console ~ DataxConsoleApplication
|
||||||
|
数据标准 - data-standard-service-parent ~ data-standard-service ~ DataxStandardApplication
|
||||||
|
数据质量 - data-quality-service-parent ~ data-quality-service ~ DataxQualityApplication
|
||||||
|
数据资产 - data-masterdata-service-parent ~ data-masterdata-service ~ DataxMasterdataApplication
|
||||||
|
数据市场 - data-market-service-parent ~ data-market-service ~ DataxMarketApplication
|
||||||
|
数据市场 - data-market-service-parent ~ data-market-service-integration ~ DataxIntegrationApplication
|
||||||
|
数据市场 - data-market-service-parent ~ data-market-service-mapping ~ DataxMappingApplication
|
||||||
|
数据对比 - data-compare-service-parent ~ data-compare-service ~ DataCompareApplication
|
||||||
|
BI报表 - data-visual-service-parent ~ data-visual-service ~ DataxVisualApplication
|
||||||
|
流程编排 - workflow-service-parent ~ workflow-service ~ DataxWorkflowApplication
|
||||||
|
系统监控 - system-service-parent ~ system-service ~ SystemServiceApplication
|
||||||
|
批量/定时任务 - quartz-service-parent ~ quartz-service ~ DataxQuartzApplication
|
||||||
|
代码生成 - codegen-service-parent ~ codegen-service ~ DataxCodeGenApplication
|
||||||
|
邮件服务 - email-service-parent ~ email-service ~ DataxMailApplication
|
||||||
|
文件服务 - file-service-parent ~ file-service ~ DataxFileApplication
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5、服务器集群部署
|
||||||
|
| 16gmaster | port | ip |
|
||||||
|
|--------------------------|------| -------------- |
|
||||||
|
| system-service | 8000 | 16gmaster |
|
||||||
|
| data-market-service | 8822 | 16gmaster |
|
||||||
|
| service-data-integration | 8824 | 16gmaster |
|
||||||
|
| data-metadata-service | 8820 | 16gmaster |
|
||||||
|
| data-system-service | 8810 | 16gmaster |
|
||||||
|
| service-data-dts | 9536 | 16gmaster |
|
||||||
|
| config | 8611 | 16gmaster |
|
||||||
|
|
||||||
|
| 16gslave | port | ip |
|
||||||
|
|-------------------------------| ---- | -------------- |
|
||||||
|
| eureka | 8610 | 16gslave |
|
||||||
|
| service-workflow | 8814 | 16gslave |
|
||||||
|
| data-metadata-service-console | 8821 | 16gslave |
|
||||||
|
| service-data-mapping | 8823 | 16gslave |
|
||||||
|
| data-masterdata-service | 8828 | 16gslave |
|
||||||
|
| data-quality-service | 8826 | 16gslave |
|
||||||
|
|
||||||
|
| 16gdata | port | ip |
|
||||||
|
|-----------------------| ---- | -------------- |
|
||||||
|
| data-standard-service | 8825 | 16gdata |
|
||||||
|
| data-visual-service | 8827 | 16gdata |
|
||||||
|
| email-service | 8812 | 16gdata |
|
||||||
|
| file-service | 8811 | 16gdata |
|
||||||
|
| quartz-service | 8813 | 16gdata |
|
||||||
|
| gateway | 9538 | 16gslave |
|
||||||
|
|
||||||
|
|
||||||
|
### 6、部署方式
|
||||||
|
|
||||||
|
> 数据库版本为 **mysql5.7** 及以上版本
|
||||||
|
#### 1、`studio`数据库初始化
|
||||||
|
>
|
||||||
|
> 1.1 source install/sql/studio.sql
|
||||||
|
> 1.2 source install/sql/studio-v0.x.x.sql
|
||||||
|
> 1.3 导入BI sql, 参考alldata/bi_quickstart.md
|
||||||
|
|
||||||
|
#### 2、修改 **config** 配置中心
|
||||||
|
|
||||||
|
> **config** 文件夹下的配置文件, 修改 **redis**, **mysql** 和 **rabbitmq** 的配置信息
|
||||||
|
>
|
||||||
|
#### 3、项目根目录下执行
|
||||||
|
```
|
||||||
|
1、缺失aspose-words,要手动安装到本地仓库
|
||||||
|
2、cd alldata/studio/common
|
||||||
|
3、安装命令:windows使用git bash执行, mac直接执行以下命令
|
||||||
|
4、mvn install:install-file -Dfile=aspose-words-20.3.jar -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=20.3 -Dpackaging=jar
|
||||||
|
5、安装成功重新刷新依赖,重新打包
|
||||||
|
```
|
||||||
|
> cd alldata/studio/common
|
||||||
|
> mvn install:install-file -Dfile=/alldata/studio/common/aspose-words-20.3.jar -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=20.3 -Dpackaging=jar
|
||||||
|
> mvn clean install -DskipTests && mvn clean package -DskipTests
|
||||||
|
> 获取安装包build/studio-release-0.4.x.tar.gz
|
||||||
|
>
|
||||||
|
> 上传服务器解压
|
||||||
|
>
|
||||||
|
#### 4、部署`stuido`[后端]
|
||||||
|
#### 单节点启动[All In One]
|
||||||
|
|
||||||
|
> 1、启动eureka on `16gslave`
|
||||||
|
>
|
||||||
|
> 2、启动config on `16gmaster`
|
||||||
|
>
|
||||||
|
> 3、启动gateway on `16gdata`
|
||||||
|
>
|
||||||
|
> 4、启动其他Jar
|
||||||
|
|
||||||
|
#### 5、三节点启动[16gmaster, 16gslave, 16gdata]
|
||||||
|
> 1. 单独启动 eureka on `16gslave`
|
||||||
|
>
|
||||||
|
> 2. 单独启动config on `16gmaster`
|
||||||
|
>
|
||||||
|
> 3. 单独启动gateway on `16gdata`
|
||||||
|
>
|
||||||
|
> 4. 启动`16gslave`, sh start16gslave.sh
|
||||||
|
>
|
||||||
|
> 5. 启动`16gdata`, sh start16gdata.sh
|
||||||
|
>
|
||||||
|
> 6. 启动`16gmaster`, sh start16gmaster.sh
|
||||||
|
|
||||||
|
#### 6、部署`studio`[前端]:
|
||||||
|
#### 前端部署
|
||||||
|
|
||||||
|
#### 安装依赖
|
||||||
|
|
||||||
|
> 依次安装:
|
||||||
|
> nvm install v10.15.3 && nvm use v10.15.3
|
||||||
|
|
||||||
|
> npm install -g @vue/cli
|
||||||
|
|
||||||
|
> npm install script-loader
|
||||||
|
|
||||||
|
> npm install jsonlint
|
||||||
|
|
||||||
|
> npm install vue2-jsoneditor
|
||||||
|
|
||||||
|
> npm install
|
||||||
|
|
||||||
|
> npm run build:prod [生产]
|
||||||
|
>
|
||||||
|
> 生产环境启动前端micro-ui项目, 需要[配置nginx]
|
||||||
|
```markdown
|
||||||
|
# For more information on configuration, see:
|
||||||
|
# * Official English Documentation: http://nginx.org/en/docs/
|
||||||
|
# * Official Russian Documentation: http://nginx.org/ru/docs/
|
||||||
|
|
||||||
|
user nginx;
|
||||||
|
worker_processes auto;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
|
||||||
|
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
|
||||||
|
include /usr/share/nginx/modules/*.conf;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
types_hash_max_size 4096;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
||||||
|
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
||||||
|
# for more information.
|
||||||
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name 16gmaster;
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
add_header Access-Control-Allow-Headers X-Requested-With;
|
||||||
|
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
|
||||||
|
location / {
|
||||||
|
root /studio/micro-ui/dist;
|
||||||
|
index index.html;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
location /api/ {
|
||||||
|
proxy_pass http://16gdata:9538/;
|
||||||
|
proxy_set_header Host $proxy_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
> 测试环境启动前端micro-ui项目
|
||||||
|
>
|
||||||
|
> npm run dev [测试]
|
||||||
|
>
|
||||||
|
> 访问`studio`页面
|
||||||
|
>
|
||||||
|
> curl http://localhost:8013
|
||||||
|
>
|
||||||
|
> 用户名:admin 密码:123456
|
||||||
|
|
||||||
|
### 7、数据集成配置教程
|
||||||
|
|
||||||
|
> 先找到用户管理-菜单管理, 新增【数据集成】目录
|
||||||
|
>
|
||||||
|
> 新增【数据集成】下面的菜单, 菜单各项按如下配置输入, 之后进入角色管理
|
||||||
|
>
|
||||||
|
> 配置admin账号的目录数据权限, 选中刚才新增的数据集成目录及里面的菜单, 刷新或重新登录即可访问【数据集成】
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/9457212/233446739-41ea4501-bb09-4eb2-86de-21c168784564.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/9457212/233446763-cbb15105-b209-4b8f-b3f2-c41b5a607dd9.png">
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/9457212/233447516-c952efd0-f8e2-4181-8608-1f513f9c0e93.png">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
### 8、常见问题
|
||||||
|
```
|
||||||
|
前置 -
|
||||||
|
1、启动前是删除了pom.xml;
|
||||||
|
2、本地是V16版本的nodejs;
|
||||||
|
|
||||||
|
运行 -
|
||||||
|
1、启动后端相关服务;
|
||||||
|
2、启动前端npm run dev,报错:
|
||||||
|
multi ./node modules/.pnpm/webpack-dev-server3.1.3 webpack04.28.4/node modules/webpack-dev-server/clienthtp://192.168.0.118:8013/sockjs-node(webpack)/hot/dev-server.js ./src/main.js
|
||||||
|
Module not found: Error: Can't resolvebabel-loader'in D: workspaceldatacenter workspacelscit-datacenter-ui
|
||||||
|
|
||||||
|
原因 -
|
||||||
|
前端UI对应nodejs版本是v10.15.3 , 需要切换版本,为开发方便,一遍采用nvm进行管理
|
||||||
|
1、卸载nodejs;
|
||||||
|
2、安装nvm - https://www.jianshu.com/p/13c0b3ca7c71
|
||||||
|
3、安装v10.15.3版本: nvm install v10.15.3
|
||||||
|
4、根据实际切换版本:nvm use v10.15.3
|
||||||
|
5、安装依赖:npm install
|
||||||
|
6、启动前端:npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
前置 -
|
||||||
|
1、数据集成教程
|
||||||
|
|
||||||
|
运行 -
|
||||||
|
1、数据集成教程
|
||||||
|
|
||||||
|
原因 -
|
||||||
|
1、教程
|
||||||
|
https://github.com/alldatacenter/alldata/blob/master/studio/modules/service-data-dts-parent/DTS_QuickStart.md
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
前置 -
|
||||||
|
1、数据集成教程
|
||||||
|
|
||||||
|
运行 -
|
||||||
|
1、数据集成教程
|
||||||
|
|
||||||
|
原因 -
|
||||||
|
1、教程
|
||||||
|
2、依赖datax,安装datax: https://blog.csdn.net/qq_18896247/article/details/123127487
|
||||||
|
3、https://github.com/alldatacenter/alldata/blob/master/studio/modules/service-data-dts-parent/DTS_QuickStart.md
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
前置 -
|
||||||
|
1、元数据数据库文档下载
|
||||||
|
|
||||||
|
运行 -
|
||||||
|
1、元数据数据库文档下载,依赖报错
|
||||||
|
|
||||||
|
原因 -
|
||||||
|
1、缺失aspose-words,要手动安装到本地仓库
|
||||||
|
2、cd alldata/studio/common
|
||||||
|
3、安装命令:windows使用git bash执行, mac直接执行以下命令
|
||||||
|
4、mvn install:install-file -Dfile=aspose-words-20.3.jar -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=20.3 -Dpackaging=jar
|
||||||
|
5、安装成功重新刷新依赖,重新打包
|
||||||
|
```
|
77
pom.xml
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.2.6.RELEASE</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>com.platform</groupId>
|
||||||
|
<artifactId>alldata</artifactId>
|
||||||
|
<version>0.4.x</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>AllData</name>
|
||||||
|
<url>https://github.com/alldatacenter/alldata</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>studio</module>
|
||||||
|
</modules>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.11</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>alldata-release-${project.version}</finalName>
|
||||||
|
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</plugin>
|
||||||
|
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>3.0.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.22.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>3.2.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
|
<version>2.5.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
|
8
studio/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
### IDEA ###
|
||||||
|
.idea/*
|
||||||
|
*.iml
|
||||||
|
*/target/*
|
||||||
|
*/*.iml
|
||||||
|
/.gradle/
|
||||||
|
application.pid
|
||||||
|
spy.log
|
0
studio/.gitkeep
Normal file
40
studio/assembly/pom.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>studio</artifactId>
|
||||||
|
<groupId>com.platform</groupId>
|
||||||
|
<version>0.4.x</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>assembly</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<finalName>${project.parent.artifactId}-release-${project.version}</finalName>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/package.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<outputDirectory>${project.parent.basedir}/build/</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
424
studio/assembly/src/main/assembly/package.xml
Normal file
@ -0,0 +1,424 @@
|
|||||||
|
<assembly>
|
||||||
|
<id>${project.version}</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>tar.gz</format>
|
||||||
|
</formats>
|
||||||
|
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/install/16gmaster</directory>
|
||||||
|
<outputDirectory>./16gmaster</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/install/sql</directory>
|
||||||
|
<outputDirectory>./sql</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/install/16gslave</directory>
|
||||||
|
<outputDirectory>./16gslave</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/install/16gdata</directory>
|
||||||
|
<outputDirectory>./16gdata</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/install</directory>
|
||||||
|
<outputDirectory>./</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>README.md</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/config/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/config</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/config/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/config</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/eureka/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/eureka</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/eureka/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/eureka</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/gateway/target</directory>
|
||||||
|
<outputDirectory>./16gdata/gateway</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/gateway/target/classes</directory>
|
||||||
|
<outputDirectory>./16gdata/gateway</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-market-service-parent/data-market-service-integration/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-market-service-integration</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-market-service-parent/data-market-service-integration/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-market-service-integration</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-compare-service-parent/data-compare-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-compare-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-compare-service-parent/data-compare-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-compare-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-cluster-service-parent/data-cluster-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-cluster-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-cluster-service-parent/data-cluster-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-cluster-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-system-service-parent/data-system-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-system-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-system-service-parent/data-system-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-system-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/service-data-dts-parent/service-data-dts/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/service-data-dts</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/service-data-dts-parent/service-data-dts/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/service-data-dts</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/system-service-parent/system-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/system-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/system-service-parent/system-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/system-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-market-service-parent/data-market-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-market-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-market-service-parent/data-market-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-market-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-market-service-parent/data-market-service-mapping/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-market-service-mapping</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-market-service-parent/data-market-service-mapping/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-market-service-mapping</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-masterdata-service-parent/data-masterdata-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-masterdata-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-masterdata-service-parent/data-masterdata-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-masterdata-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-metadata-service-parent/data-metadata-service-console/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-metadata-service-console</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-metadata-service-parent/data-metadata-service-console/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-metadata-service-console</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-metadata-service-parent/data-metadata-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-metadata-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-metadata-service-parent/data-metadata-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gmaster/data-metadata-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-quality-service-parent/data-quality-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-quality-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-quality-service-parent/data-quality-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/data-quality-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-standard-service-parent/data-standard-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/data-standard-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-standard-service-parent/data-standard-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/data-standard-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-visual-service-parent/data-visual-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/data-visual-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/data-visual-service-parent/data-visual-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/data-visual-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/quartz-service-parent/quartz-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/quartz-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/quartz-service-parent/quartz-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/quartz-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/workflow-service-parent/workflow-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/workflow-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/workflow-service-parent/workflow-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gslave/workflow-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/email-service-parent/email-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/email-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/email-service-parent/email-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/email-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/file-service-parent/file-service/target
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/file-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/modules/file-service-parent/file-service/target/classes
|
||||||
|
</directory>
|
||||||
|
<outputDirectory>./16gdata/file-service</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>bootstrap.yml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.parent.basedir}/ui</directory>
|
||||||
|
<outputDirectory>./16gmaster/ui</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
73
studio/box/pom.xml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>studio</artifactId>
|
||||||
|
<groupId>com.platform</groupId>
|
||||||
|
<version>0.4.x</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>box</artifactId>
|
||||||
|
<name>box</name>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<mail.version>1.4.7</mail.version>
|
||||||
|
<qiniu.version>7.9.3</qiniu.version>
|
||||||
|
<alipay.version>4.22.57.ALL</alipay.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- 同时需要common模块和logging模块只需要引入logging模块即可 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.platform</groupId>
|
||||||
|
<artifactId>logging</artifactId>
|
||||||
|
<version>0.4.x</version>
|
||||||
|
</dependency>
|
||||||
|
<!--Spring boot Web容器-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!--邮件依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.mail</groupId>
|
||||||
|
<artifactId>mail</artifactId>
|
||||||
|
<version>${mail.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--七牛云存储-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.qiniu</groupId>
|
||||||
|
<artifactId>qiniu-java-sdk</artifactId>
|
||||||
|
<version>${qiniu.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>${fastjson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--支付宝依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alipay.sdk</groupId>
|
||||||
|
<artifactId>alipay-sdk-java</artifactId>
|
||||||
|
<version>${alipay.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--Spring boot Web容器-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.platform</groupId>
|
||||||
|
<artifactId>common-mybatis</artifactId>
|
||||||
|
<version>0.4.x</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
package com.platform.config;
|
||||||
|
|
||||||
|
import org.springframework.boot.web.servlet.MultipartConfigFactory;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import javax.servlet.MultipartConfigElement;
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @date 2023-01-27
|
||||||
|
* @author AllDataDC
|
||||||
|
* https://blog.csdn.net/llibin1024530411/article/details/79474953
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class MultipartConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件上传临时路径
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
MultipartConfigElement multipartConfigElement() {
|
||||||
|
MultipartConfigFactory factory = new MultipartConfigFactory();
|
||||||
|
String location = System.getProperty("user.home") + "/.studio/file/tmp";
|
||||||
|
File tmpFile = new File(location);
|
||||||
|
if (!tmpFile.exists()) {
|
||||||
|
if (!tmpFile.mkdirs()) {
|
||||||
|
System.out.println("create was not successful.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
factory.setLocation(location);
|
||||||
|
return factory.createMultipartConfig();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
|
||||||
|
package com.platform.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.persistence.*;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝配置类
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@Table(name = "tool_alipay_config")
|
||||||
|
public class AlipayConfig implements Serializable {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "config_id")
|
||||||
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "应用ID")
|
||||||
|
private String appId;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "商户私钥")
|
||||||
|
private String privateKey;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "支付宝公钥")
|
||||||
|
private String publicKey;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "签名方式")
|
||||||
|
private String signType="RSA2";
|
||||||
|
|
||||||
|
@Column(name = "gateway_url")
|
||||||
|
@ApiModelProperty(value = "支付宝开放安全地址", hidden = true)
|
||||||
|
private String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "编码", hidden = true)
|
||||||
|
private String charset= "utf-8";
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "异步通知地址")
|
||||||
|
private String notifyUrl;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "订单完成后返回的页面")
|
||||||
|
private String returnUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String format="JSON";
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "商户号")
|
||||||
|
private String sysServiceProviderId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
package com.platform.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.persistence.*;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件配置类,数据存覆盖式存入数据存
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Data
|
||||||
|
@Table(name = "tool_email_config")
|
||||||
|
public class EmailConfig implements Serializable {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "config_id")
|
||||||
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "邮件服务器SMTP地址")
|
||||||
|
private String host;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "邮件服务器 SMTP 端口")
|
||||||
|
private String port;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "发件者用户名")
|
||||||
|
private String user;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "密码")
|
||||||
|
private String pass;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "收件人")
|
||||||
|
private String fromUser;
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
|
||||||
|
package com.platform.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.*;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.bean.copier.CopyOptions;
|
||||||
|
import com.platform.base.BaseEntity;
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@Table(name="tool_local_storage")
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class LocalStorage extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "storage_id")
|
||||||
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "真实文件名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "文件名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "后缀")
|
||||||
|
private String suffix;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "路径")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "大小")
|
||||||
|
private String size;
|
||||||
|
|
||||||
|
public LocalStorage(String realName,String name, String suffix, String path, String type, String size) {
|
||||||
|
this.realName = realName;
|
||||||
|
this.name = name;
|
||||||
|
this.suffix = suffix;
|
||||||
|
this.path = path;
|
||||||
|
this.type = type;
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void copy(LocalStorage source){
|
||||||
|
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
package com.platform.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.persistence.*;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 七牛云对象存储配置类
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@Table(name = "tool_qiniu_config")
|
||||||
|
public class QiniuConfig implements Serializable {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "config_id")
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "accessKey")
|
||||||
|
private String accessKey;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "secretKey")
|
||||||
|
private String secretKey;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "存储空间名称作为唯一的 Bucket 识别符")
|
||||||
|
private String bucket;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone表示与机房的对应关系
|
||||||
|
* 华东 Zone.zone0()
|
||||||
|
* 华北 Zone.zone1()
|
||||||
|
* 华南 Zone.zone2()
|
||||||
|
* 北美 Zone.zoneNa0()
|
||||||
|
* 东南亚 Zone.zoneAs0()
|
||||||
|
*/
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "Zone表示与机房的对应关系")
|
||||||
|
private String zone;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "外链域名,可自定义,需在七牛云绑定")
|
||||||
|
private String host;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "空间类型:公开/私有")
|
||||||
|
private String type = "公开";
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
package com.platform.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.hibernate.annotations.UpdateTimestamp;
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传成功后,存储结果
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@Table(name = "tool_qiniu_content")
|
||||||
|
public class QiniuContent implements Serializable {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "content_id")
|
||||||
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "name")
|
||||||
|
@ApiModelProperty(value = "文件名")
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "空间名")
|
||||||
|
private String bucket;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "大小")
|
||||||
|
private String size;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "文件地址")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "文件类型")
|
||||||
|
private String suffix;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "空间类型:公开/私有")
|
||||||
|
private String type = "公开";
|
||||||
|
|
||||||
|
@UpdateTimestamp
|
||||||
|
@ApiModelProperty(value = "创建或更新时间")
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
}
|
30
studio/box/src/main/java/com/platform/domain/vo/EmailVo.java
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
package com.platform.domain.vo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送邮件时,接收参数的类
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27 12:02:14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class EmailVo {
|
||||||
|
|
||||||
|
/** 收件人,支持多个收件人 */
|
||||||
|
@NotEmpty
|
||||||
|
private List<String> tos;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private String subject;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private String content;
|
||||||
|
}
|
49
studio/box/src/main/java/com/platform/domain/vo/TradeVo.java
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
package com.platform.domain.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.sql.Date;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易详情,按需应该存入数据库,这里存入数据库,仅供临时测试
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TradeVo {
|
||||||
|
|
||||||
|
/** (必填)商品描述 */
|
||||||
|
@NotBlank
|
||||||
|
private String body;
|
||||||
|
|
||||||
|
/** (必填)商品名称 */
|
||||||
|
@NotBlank
|
||||||
|
private String subject;
|
||||||
|
|
||||||
|
/** (必填)商户订单号,应该由后台生成 */
|
||||||
|
@ApiModelProperty(hidden = true)
|
||||||
|
private String outTradeNo;
|
||||||
|
|
||||||
|
/** (必填)第三方订单号 */
|
||||||
|
@ApiModelProperty(hidden = true)
|
||||||
|
private String tradeNo;
|
||||||
|
|
||||||
|
/** (必填)价格 */
|
||||||
|
@NotBlank
|
||||||
|
private String totalAmount;
|
||||||
|
|
||||||
|
/** 订单状态,已支付,未支付,作废 */
|
||||||
|
@ApiModelProperty(hidden = true)
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
/** 创建时间,存入数据库时需要 */
|
||||||
|
@ApiModelProperty(hidden = true)
|
||||||
|
private Timestamp createTime;
|
||||||
|
|
||||||
|
/** 作废时间,存入数据库时需要 */
|
||||||
|
@ApiModelProperty(hidden = true)
|
||||||
|
private Date cancelTime;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
package com.platform.repository;
|
||||||
|
|
||||||
|
import com.platform.domain.AlipayConfig;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public interface AliPayRepository extends JpaRepository<AlipayConfig,Long> {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
package com.platform.repository;
|
||||||
|
|
||||||
|
import com.platform.domain.EmailConfig;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public interface EmailRepository extends JpaRepository<EmailConfig,Long> {
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
package com.platform.repository;
|
||||||
|
|
||||||
|
import com.platform.domain.LocalStorage;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public interface LocalStorageRepository extends JpaRepository<LocalStorage, Long>, JpaSpecificationExecutor<LocalStorage> {
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
package com.platform.repository;
|
||||||
|
|
||||||
|
import com.platform.domain.QiniuConfig;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public interface QiNiuConfigRepository extends JpaRepository<QiniuConfig,Long> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑类型
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
@Modifying
|
||||||
|
@Query(value = "update QiniuConfig set type = ?1")
|
||||||
|
void update(String type);
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
package com.platform.repository;
|
||||||
|
|
||||||
|
import com.platform.domain.QiniuContent;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public interface QiniuContentRepository extends JpaRepository<QiniuContent,Long>, JpaSpecificationExecutor<QiniuContent> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据key查询
|
||||||
|
* @param key 文件名
|
||||||
|
* @return QiniuContent
|
||||||
|
*/
|
||||||
|
QiniuContent findByKey(String key);
|
||||||
|
}
|
121
studio/box/src/main/java/com/platform/rest/AliPayController.java
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
|
||||||
|
package com.platform.rest;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.platform.annotation.rest.AnonymousAccess;
|
||||||
|
import com.platform.annotation.Log;
|
||||||
|
import com.platform.annotation.rest.AnonymousGetMapping;
|
||||||
|
import com.platform.domain.vo.TradeVo;
|
||||||
|
import com.platform.domain.AlipayConfig;
|
||||||
|
import com.platform.utils.AliPayStatusEnum;
|
||||||
|
import com.platform.utils.AlipayUtils;
|
||||||
|
import com.platform.service.AliPayService;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/api/aliPay")
|
||||||
|
@Api(tags = "工具:支付宝管理")
|
||||||
|
public class AliPayController {
|
||||||
|
|
||||||
|
private final AlipayUtils alipayUtils;
|
||||||
|
private final AliPayService alipayService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
public ResponseEntity<AlipayConfig> queryAliConfig() {
|
||||||
|
return new ResponseEntity<>(alipayService.find(), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("配置支付宝")
|
||||||
|
@ApiOperation("配置支付宝")
|
||||||
|
@PutMapping
|
||||||
|
public ResponseEntity<Object> updateAliPayConfig(@Validated @RequestBody AlipayConfig alipayConfig) {
|
||||||
|
alipayService.config(alipayConfig);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("支付宝PC网页支付")
|
||||||
|
@ApiOperation("PC网页支付")
|
||||||
|
@PostMapping(value = "/toPayAsPC")
|
||||||
|
public ResponseEntity<String> toPayAsPc(@Validated @RequestBody TradeVo trade) throws Exception {
|
||||||
|
AlipayConfig aliPay = alipayService.find();
|
||||||
|
trade.setOutTradeNo(alipayUtils.getOrderCode());
|
||||||
|
String payUrl = alipayService.toPayAsPc(aliPay, trade);
|
||||||
|
return ResponseEntity.ok(payUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("支付宝手机网页支付")
|
||||||
|
@ApiOperation("手机网页支付")
|
||||||
|
@PostMapping(value = "/toPayAsWeb")
|
||||||
|
public ResponseEntity<String> toPayAsWeb(@Validated @RequestBody TradeVo trade) throws Exception {
|
||||||
|
AlipayConfig alipay = alipayService.find();
|
||||||
|
trade.setOutTradeNo(alipayUtils.getOrderCode());
|
||||||
|
String payUrl = alipayService.toPayAsWeb(alipay, trade);
|
||||||
|
return ResponseEntity.ok(payUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiIgnore
|
||||||
|
@AnonymousGetMapping("/return")
|
||||||
|
@ApiOperation("支付之后跳转的链接")
|
||||||
|
public ResponseEntity<String> returnPage(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
AlipayConfig alipay = alipayService.find();
|
||||||
|
response.setContentType("text/html;charset=" + alipay.getCharset());
|
||||||
|
//内容验签,防止黑客篡改参数
|
||||||
|
if (alipayUtils.rsaCheck(request, alipay)) {
|
||||||
|
//商户订单号
|
||||||
|
String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||||
|
//支付宝交易号
|
||||||
|
String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||||
|
System.out.println("商户订单号" + outTradeNo + " " + "第三方交易号" + tradeNo);
|
||||||
|
|
||||||
|
// 根据业务需要返回数据,这里统一返回OK
|
||||||
|
return new ResponseEntity<>("payment successful", HttpStatus.OK);
|
||||||
|
} else {
|
||||||
|
// 根据业务需要返回数据
|
||||||
|
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiIgnore
|
||||||
|
@RequestMapping("/notify")
|
||||||
|
@AnonymousAccess
|
||||||
|
@ApiOperation("支付异步通知(要公网访问),接收异步通知,检查通知内容app_id、out_trade_no、total_amount是否与请求中的一致,根据trade_status进行后续业务处理")
|
||||||
|
public ResponseEntity<Object> notify(HttpServletRequest request) {
|
||||||
|
AlipayConfig alipay = alipayService.find();
|
||||||
|
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||||
|
//内容验签,防止黑客篡改参数
|
||||||
|
if (alipayUtils.rsaCheck(request, alipay)) {
|
||||||
|
//交易状态
|
||||||
|
String tradeStatus = new String(request.getParameter("trade_status").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||||
|
// 商户订单号
|
||||||
|
String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||||
|
//支付宝交易号
|
||||||
|
String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||||
|
//付款金额
|
||||||
|
String totalAmount = new String(request.getParameter("total_amount").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||||
|
//验证
|
||||||
|
if (tradeStatus.equals(AliPayStatusEnum.SUCCESS.getValue()) || tradeStatus.equals(AliPayStatusEnum.FINISHED.getValue())) {
|
||||||
|
// 验证通过后应该根据业务需要处理订单
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
package com.platform.rest;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import com.platform.annotation.Log;
|
||||||
|
import com.platform.domain.vo.EmailVo;
|
||||||
|
import com.platform.domain.EmailConfig;
|
||||||
|
import com.platform.service.EmailService;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送邮件
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27 6:55:53
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("api/email")
|
||||||
|
@Api(tags = "工具:邮件管理")
|
||||||
|
public class EmailController {
|
||||||
|
|
||||||
|
private final EmailService emailService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
public ResponseEntity<Object> queryEmailConfig(){
|
||||||
|
return new ResponseEntity<>(emailService.find(),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("配置邮件")
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation("配置邮件")
|
||||||
|
public ResponseEntity<Object> updateEmailConfig(@Validated @RequestBody EmailConfig emailConfig) throws Exception {
|
||||||
|
emailService.config(emailConfig,emailService.find());
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("发送邮件")
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation("发送邮件")
|
||||||
|
public ResponseEntity<Object> sendEmail(@Validated @RequestBody EmailVo emailVo){
|
||||||
|
emailService.send(emailVo,emailService.find());
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
|
||||||
|
package com.platform.rest;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import com.platform.annotation.Log;
|
||||||
|
import com.platform.domain.LocalStorage;
|
||||||
|
import com.platform.exception.BadRequestException;
|
||||||
|
import com.platform.service.LocalStorageService;
|
||||||
|
import com.platform.service.dto.LocalStorageQueryCriteria;
|
||||||
|
import com.platform.utils.FileUtil;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "工具:本地存储管理")
|
||||||
|
@RequestMapping("/api/localStorage")
|
||||||
|
public class LocalStorageController {
|
||||||
|
|
||||||
|
private final LocalStorageService localStorageService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@ApiOperation("查询文件")
|
||||||
|
@PreAuthorize("@el.check('storage:list')")
|
||||||
|
public ResponseEntity<Object> queryFile(LocalStorageQueryCriteria criteria, Pageable pageable){
|
||||||
|
return new ResponseEntity<>(localStorageService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("导出数据")
|
||||||
|
@GetMapping(value = "/download")
|
||||||
|
@PreAuthorize("@el.check('storage:list')")
|
||||||
|
public void exportFile(HttpServletResponse response, LocalStorageQueryCriteria criteria) throws IOException {
|
||||||
|
localStorageService.download(localStorageService.queryAll(criteria), response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation("上传文件")
|
||||||
|
@PreAuthorize("@el.check('storage:add')")
|
||||||
|
public ResponseEntity<Object> createFile(@RequestParam String name, @RequestParam("file") MultipartFile file){
|
||||||
|
localStorageService.create(name, file);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("上传图片")
|
||||||
|
@PostMapping("/pictures")
|
||||||
|
public ResponseEntity<Object> uploadPicture(@RequestParam MultipartFile file){
|
||||||
|
// 判断文件是否为图片
|
||||||
|
String suffix = FileUtil.getExtensionName(file.getOriginalFilename());
|
||||||
|
if(!FileUtil.IMAGE.equals(FileUtil.getFileType(suffix))){
|
||||||
|
throw new BadRequestException("只能上传图片");
|
||||||
|
}
|
||||||
|
LocalStorage localStorage = localStorageService.create(null, file);
|
||||||
|
return new ResponseEntity<>(localStorage, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改文件")
|
||||||
|
@ApiOperation("修改文件")
|
||||||
|
@PreAuthorize("@el.check('storage:edit')")
|
||||||
|
public ResponseEntity<Object> updateFile(@Validated @RequestBody LocalStorage resources){
|
||||||
|
localStorageService.update(resources);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除文件")
|
||||||
|
@DeleteMapping
|
||||||
|
@ApiOperation("多选删除")
|
||||||
|
public ResponseEntity<Object> deleteFile(@RequestBody Long[] ids) {
|
||||||
|
localStorageService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
108
studio/box/src/main/java/com/platform/rest/QiniuController.java
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
|
||||||
|
package com.platform.rest;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.platform.annotation.Log;
|
||||||
|
import com.platform.domain.QiniuConfig;
|
||||||
|
import com.platform.domain.QiniuContent;
|
||||||
|
import com.platform.service.dto.QiniuQueryCriteria;
|
||||||
|
import com.platform.service.QiNiuService;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送邮件
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27 6:55:53
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/api/qiNiuContent")
|
||||||
|
@Api(tags = "工具:七牛云存储管理")
|
||||||
|
public class QiniuController {
|
||||||
|
|
||||||
|
private final QiNiuService qiNiuService;
|
||||||
|
|
||||||
|
@GetMapping(value = "/config")
|
||||||
|
public ResponseEntity<Object> queryQiNiuConfig(){
|
||||||
|
return new ResponseEntity<>(qiNiuService.find(), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("配置七牛云存储")
|
||||||
|
@ApiOperation("配置七牛云存储")
|
||||||
|
@PutMapping(value = "/config")
|
||||||
|
public ResponseEntity<Object> updateQiNiuConfig(@Validated @RequestBody QiniuConfig qiniuConfig){
|
||||||
|
qiNiuService.config(qiniuConfig);
|
||||||
|
qiNiuService.update(qiniuConfig.getType());
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("导出数据")
|
||||||
|
@GetMapping(value = "/download")
|
||||||
|
public void exportQiNiu(HttpServletResponse response, QiniuQueryCriteria criteria) throws IOException {
|
||||||
|
qiNiuService.downloadList(qiNiuService.queryAll(criteria), response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询文件")
|
||||||
|
@GetMapping
|
||||||
|
public ResponseEntity<Object> queryQiNiu(QiniuQueryCriteria criteria, Pageable pageable){
|
||||||
|
return new ResponseEntity<>(qiNiuService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("上传文件")
|
||||||
|
@ApiOperation("上传文件")
|
||||||
|
@PostMapping
|
||||||
|
public ResponseEntity<Object> uploadQiNiu(@RequestParam MultipartFile file){
|
||||||
|
QiniuContent qiniuContent = qiNiuService.upload(file,qiNiuService.find());
|
||||||
|
Map<String,Object> map = new HashMap<>(3);
|
||||||
|
map.put("id",qiniuContent.getId());
|
||||||
|
map.put("errno",0);
|
||||||
|
map.put("data",new String[]{qiniuContent.getUrl()});
|
||||||
|
return new ResponseEntity<>(map,HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("同步七牛云数据")
|
||||||
|
@ApiOperation("同步七牛云数据")
|
||||||
|
@PostMapping(value = "/synchronize")
|
||||||
|
public ResponseEntity<Object> synchronizeQiNiu(){
|
||||||
|
qiNiuService.synchronize(qiNiuService.find());
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("下载文件")
|
||||||
|
@ApiOperation("下载文件")
|
||||||
|
@GetMapping(value = "/download/{id}")
|
||||||
|
public ResponseEntity<Object> downloadQiNiu(@PathVariable Long id){
|
||||||
|
Map<String,Object> map = new HashMap<>(1);
|
||||||
|
map.put("url", qiNiuService.download(qiNiuService.findByContentId(id),qiNiuService.find()));
|
||||||
|
return new ResponseEntity<>(map,HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除文件")
|
||||||
|
@ApiOperation("删除文件")
|
||||||
|
@DeleteMapping(value = "/{id}")
|
||||||
|
public ResponseEntity<Object> deleteQiNiu(@PathVariable Long id){
|
||||||
|
qiNiuService.delete(qiNiuService.findByContentId(id),qiNiuService.find());
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除多张图片")
|
||||||
|
@ApiOperation("删除多张图片")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseEntity<Object> deleteAllQiNiu(@RequestBody Long[] ids) {
|
||||||
|
qiNiuService.deleteAll(ids, qiNiuService.find());
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
package com.platform.service;
|
||||||
|
|
||||||
|
import com.platform.domain.vo.TradeVo;
|
||||||
|
import com.platform.domain.AlipayConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public interface AliPayService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询配置
|
||||||
|
* @return AlipayConfig
|
||||||
|
*/
|
||||||
|
AlipayConfig find();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新配置
|
||||||
|
* @param alipayConfig 支付宝配置
|
||||||
|
* @return AlipayConfig
|
||||||
|
*/
|
||||||
|
AlipayConfig config(AlipayConfig alipayConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理来自PC的交易请求
|
||||||
|
* @param alipay 支付宝配置
|
||||||
|
* @param trade 交易详情
|
||||||
|
* @return String
|
||||||
|
* @throws Exception 异常
|
||||||
|
*/
|
||||||
|
String toPayAsPc(AlipayConfig alipay, TradeVo trade) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理来自手机网页的交易请求
|
||||||
|
* @param alipay 支付宝配置
|
||||||
|
* @param trade 交易详情
|
||||||
|
* @return String
|
||||||
|
* @throws Exception 异常
|
||||||
|
*/
|
||||||
|
String toPayAsWeb(AlipayConfig alipay, TradeVo trade) throws Exception;
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
package com.platform.service;
|
||||||
|
|
||||||
|
import com.platform.domain.vo.EmailVo;
|
||||||
|
import com.platform.domain.EmailConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public interface EmailService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新邮件配置
|
||||||
|
* @param emailConfig 邮箱配置
|
||||||
|
* @param old /
|
||||||
|
* @return /
|
||||||
|
* @throws Exception /
|
||||||
|
*/
|
||||||
|
EmailConfig config(EmailConfig emailConfig, EmailConfig old) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询配置
|
||||||
|
* @return EmailConfig 邮件配置
|
||||||
|
*/
|
||||||
|
EmailConfig find();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送邮件
|
||||||
|
* @param emailVo 邮件发送的内容
|
||||||
|
* @param emailConfig 邮件配置
|
||||||
|
* @throws Exception /
|
||||||
|
*/
|
||||||
|
void send(EmailVo emailVo, EmailConfig emailConfig);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
package com.platform.service;
|
||||||
|
|
||||||
|
import com.platform.domain.LocalStorage;
|
||||||
|
import com.platform.service.dto.LocalStorageDto;
|
||||||
|
import com.platform.service.dto.LocalStorageQueryCriteria;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public interface LocalStorageService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
* @param criteria 条件
|
||||||
|
* @param pageable 分页参数
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
Object queryAll(LocalStorageQueryCriteria criteria, Pageable pageable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部数据
|
||||||
|
* @param criteria 条件
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
List<LocalStorageDto> queryAll(LocalStorageQueryCriteria criteria);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询
|
||||||
|
* @param id /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
LocalStorageDto findById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传
|
||||||
|
* @param name 文件名称
|
||||||
|
* @param file 文件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LocalStorage create(String name, MultipartFile file);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param resources 文件信息
|
||||||
|
*/
|
||||||
|
void update(LocalStorage resources);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选删除
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void deleteAll(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
* @param localStorageDtos 待导出的数据
|
||||||
|
* @param response /
|
||||||
|
* @throws IOException /
|
||||||
|
*/
|
||||||
|
void download(List<LocalStorageDto> localStorageDtos, HttpServletResponse response) throws IOException;
|
||||||
|
}
|
104
studio/box/src/main/java/com/platform/service/QiNiuService.java
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
|
||||||
|
package com.platform.service;
|
||||||
|
|
||||||
|
import com.platform.domain.QiniuConfig;
|
||||||
|
import com.platform.domain.QiniuContent;
|
||||||
|
import com.platform.service.dto.QiniuQueryCriteria;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public interface QiNiuService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查配置
|
||||||
|
* @return QiniuConfig
|
||||||
|
*/
|
||||||
|
QiniuConfig find();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改配置
|
||||||
|
* @param qiniuConfig 配置
|
||||||
|
* @return QiniuConfig
|
||||||
|
*/
|
||||||
|
QiniuConfig config(QiniuConfig qiniuConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
* @param criteria 条件
|
||||||
|
* @param pageable 分页参数
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
Object queryAll(QiniuQueryCriteria criteria, Pageable pageable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
* @param criteria 条件
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
List<QiniuContent> queryAll(QiniuQueryCriteria criteria);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
* @param file 文件
|
||||||
|
* @param qiniuConfig 配置
|
||||||
|
* @return QiniuContent
|
||||||
|
*/
|
||||||
|
QiniuContent upload(MultipartFile file, QiniuConfig qiniuConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件
|
||||||
|
* @param id 文件ID
|
||||||
|
* @return QiniuContent
|
||||||
|
*/
|
||||||
|
QiniuContent findByContentId(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载文件
|
||||||
|
* @param content 文件信息
|
||||||
|
* @param config 配置
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
String download(QiniuContent content, QiniuConfig config);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文件
|
||||||
|
* @param content 文件
|
||||||
|
* @param config 配置
|
||||||
|
*/
|
||||||
|
void delete(QiniuContent content, QiniuConfig config);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步数据
|
||||||
|
* @param config 配置
|
||||||
|
*/
|
||||||
|
void synchronize(QiniuConfig config);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文件
|
||||||
|
* @param ids 文件ID数组
|
||||||
|
* @param config 配置
|
||||||
|
*/
|
||||||
|
void deleteAll(Long[] ids, QiniuConfig config);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新数据
|
||||||
|
* @param type 类型
|
||||||
|
*/
|
||||||
|
void update(String type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
* @param queryAll /
|
||||||
|
* @param response /
|
||||||
|
* @throws IOException /
|
||||||
|
*/
|
||||||
|
void downloadList(List<QiniuContent> queryAll, HttpServletResponse response) throws IOException;
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
package com.platform.service.dto;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import com.platform.base.BaseDTO;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class LocalStorageDto extends BaseDTO implements Serializable {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private String suffix;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private String size;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
package com.platform.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.platform.annotation.Query;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LocalStorageQueryCriteria{
|
||||||
|
|
||||||
|
@Query(blurry = "name,suffix,type,createBy,size")
|
||||||
|
private String blurry;
|
||||||
|
|
||||||
|
@Query(type = Query.Type.BETWEEN)
|
||||||
|
private List<Timestamp> createTime;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
package com.platform.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import com.platform.annotation.Query;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sm.ms图床
|
||||||
|
*
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27 09:52:09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PictureQueryCriteria{
|
||||||
|
|
||||||
|
@Query(type = Query.Type.INNER_LIKE)
|
||||||
|
private String filename;
|
||||||
|
|
||||||
|
@Query(type = Query.Type.INNER_LIKE)
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@Query(type = Query.Type.BETWEEN)
|
||||||
|
private List<Timestamp> createTime;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
package com.platform.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import com.platform.annotation.Query;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27 09:54:37
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QiniuQueryCriteria{
|
||||||
|
|
||||||
|
@Query(type = Query.Type.INNER_LIKE)
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@Query(type = Query.Type.BETWEEN)
|
||||||
|
private List<Timestamp> createTime;
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
|
||||||
|
package com.platform.service.impl;
|
||||||
|
|
||||||
|
import com.alipay.api.AlipayClient;
|
||||||
|
import com.alipay.api.DefaultAlipayClient;
|
||||||
|
import com.alipay.api.request.AlipayTradePagePayRequest;
|
||||||
|
import com.alipay.api.request.AlipayTradeWapPayRequest;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import com.platform.domain.vo.TradeVo;
|
||||||
|
import com.platform.domain.AlipayConfig;
|
||||||
|
import com.platform.exception.BadRequestException;
|
||||||
|
import com.platform.repository.AliPayRepository;
|
||||||
|
import com.platform.service.AliPayService;
|
||||||
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
|
import org.springframework.cache.annotation.CachePut;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@CacheConfig(cacheNames = "aliPay")
|
||||||
|
public class AliPayServiceImpl implements AliPayService {
|
||||||
|
|
||||||
|
private final AliPayRepository alipayRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Cacheable(key = "'config'")
|
||||||
|
public AlipayConfig find() {
|
||||||
|
Optional<AlipayConfig> alipayConfig = alipayRepository.findById(1L);
|
||||||
|
return alipayConfig.orElseGet(AlipayConfig::new);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@CachePut(key = "'config'")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AlipayConfig config(AlipayConfig alipayConfig) {
|
||||||
|
alipayConfig.setId(1L);
|
||||||
|
return alipayRepository.save(alipayConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toPayAsPc(AlipayConfig alipay, TradeVo trade) throws Exception {
|
||||||
|
|
||||||
|
if(alipay.getId() == null){
|
||||||
|
throw new BadRequestException("请先添加相应配置,再操作");
|
||||||
|
}
|
||||||
|
AlipayClient alipayClient = new DefaultAlipayClient(alipay.getGatewayUrl(), alipay.getAppId(), alipay.getPrivateKey(), alipay.getFormat(), alipay.getCharset(), alipay.getPublicKey(), alipay.getSignType());
|
||||||
|
|
||||||
|
// 创建API对应的request(电脑网页版)
|
||||||
|
AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
|
||||||
|
|
||||||
|
// 订单完成后返回的页面和异步通知地址
|
||||||
|
request.setReturnUrl(alipay.getReturnUrl());
|
||||||
|
request.setNotifyUrl(alipay.getNotifyUrl());
|
||||||
|
// 填充订单参数
|
||||||
|
request.setBizContent("{" +
|
||||||
|
" \"out_trade_no\":\""+trade.getOutTradeNo()+"\"," +
|
||||||
|
" \"product_code\":\"FAST_INSTANT_TRADE_PAY\"," +
|
||||||
|
" \"total_amount\":"+trade.getTotalAmount()+"," +
|
||||||
|
" \"subject\":\""+trade.getSubject()+"\"," +
|
||||||
|
" \"body\":\""+trade.getBody()+"\"," +
|
||||||
|
" \"extend_params\":{" +
|
||||||
|
" \"sys_service_provider_id\":\""+alipay.getSysServiceProviderId()+"\"" +
|
||||||
|
" }"+
|
||||||
|
" }");//填充业务参数
|
||||||
|
// 调用SDK生成表单, 通过GET方式,口可以获取url
|
||||||
|
return alipayClient.pageExecute(request, "GET").getBody();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toPayAsWeb(AlipayConfig alipay, TradeVo trade) throws Exception {
|
||||||
|
if(alipay.getId() == null){
|
||||||
|
throw new BadRequestException("请先添加相应配置,再操作");
|
||||||
|
}
|
||||||
|
AlipayClient alipayClient = new DefaultAlipayClient(alipay.getGatewayUrl(), alipay.getAppId(), alipay.getPrivateKey(), alipay.getFormat(), alipay.getCharset(), alipay.getPublicKey(), alipay.getSignType());
|
||||||
|
|
||||||
|
double money = Double.parseDouble(trade.getTotalAmount());
|
||||||
|
double maxMoney = 5000;
|
||||||
|
if(money <= 0 || money >= maxMoney){
|
||||||
|
throw new BadRequestException("测试金额过大");
|
||||||
|
}
|
||||||
|
// 创建API对应的request(手机网页版)
|
||||||
|
AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest();
|
||||||
|
request.setReturnUrl(alipay.getReturnUrl());
|
||||||
|
request.setNotifyUrl(alipay.getNotifyUrl());
|
||||||
|
request.setBizContent("{" +
|
||||||
|
" \"out_trade_no\":\""+trade.getOutTradeNo()+"\"," +
|
||||||
|
" \"product_code\":\"FAST_INSTANT_TRADE_PAY\"," +
|
||||||
|
" \"total_amount\":"+trade.getTotalAmount()+"," +
|
||||||
|
" \"subject\":\""+trade.getSubject()+"\"," +
|
||||||
|
" \"body\":\""+trade.getBody()+"\"," +
|
||||||
|
" \"extend_params\":{" +
|
||||||
|
" \"sys_service_provider_id\":\""+alipay.getSysServiceProviderId()+"\"" +
|
||||||
|
" }"+
|
||||||
|
" }");
|
||||||
|
return alipayClient.pageExecute(request, "GET").getBody();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
|
||||||
|
package com.platform.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.extra.mail.Mail;
|
||||||
|
import cn.hutool.extra.mail.MailAccount;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import com.platform.domain.EmailConfig;
|
||||||
|
import com.platform.domain.vo.EmailVo;
|
||||||
|
import com.platform.exception.BadRequestException;
|
||||||
|
import com.platform.repository.EmailRepository;
|
||||||
|
import com.platform.service.EmailService;
|
||||||
|
import com.platform.utils.EncryptUtils;
|
||||||
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
|
import org.springframework.cache.annotation.CachePut;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@CacheConfig(cacheNames = "email")
|
||||||
|
public class EmailServiceImpl implements EmailService {
|
||||||
|
|
||||||
|
private final EmailRepository emailRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@CachePut(key = "'config'")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public EmailConfig config(EmailConfig emailConfig, EmailConfig old) throws Exception {
|
||||||
|
emailConfig.setId(1L);
|
||||||
|
if(!emailConfig.getPass().equals(old.getPass())){
|
||||||
|
// 对称加密
|
||||||
|
emailConfig.setPass(EncryptUtils.desEncrypt(emailConfig.getPass()));
|
||||||
|
}
|
||||||
|
return emailRepository.save(emailConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Cacheable(key = "'config'")
|
||||||
|
public EmailConfig find() {
|
||||||
|
Optional<EmailConfig> emailConfig = emailRepository.findById(1L);
|
||||||
|
return emailConfig.orElseGet(EmailConfig::new);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void send(EmailVo emailVo, EmailConfig emailConfig){
|
||||||
|
if(emailConfig.getId() == null){
|
||||||
|
throw new BadRequestException("请先配置,再操作");
|
||||||
|
}
|
||||||
|
// 封装
|
||||||
|
MailAccount account = new MailAccount();
|
||||||
|
// 设置用户
|
||||||
|
String user = emailConfig.getFromUser().split("@")[0];
|
||||||
|
account.setUser(user);
|
||||||
|
account.setHost(emailConfig.getHost());
|
||||||
|
account.setPort(Integer.parseInt(emailConfig.getPort()));
|
||||||
|
account.setAuth(true);
|
||||||
|
try {
|
||||||
|
// 对称解密
|
||||||
|
account.setPass(EncryptUtils.desDecrypt(emailConfig.getPass()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new BadRequestException(e.getMessage());
|
||||||
|
}
|
||||||
|
account.setFrom(emailConfig.getUser()+"<"+emailConfig.getFromUser()+">");
|
||||||
|
// ssl方式发送
|
||||||
|
account.setSslEnable(true);
|
||||||
|
// 使用STARTTLS安全连接
|
||||||
|
account.setStarttlsEnable(true);
|
||||||
|
String content = emailVo.getContent();
|
||||||
|
// 发送
|
||||||
|
try {
|
||||||
|
int size = emailVo.getTos().size();
|
||||||
|
Mail.create(account)
|
||||||
|
.setTos(emailVo.getTos().toArray(new String[size]))
|
||||||
|
.setTitle(emailVo.getSubject())
|
||||||
|
.setContent(content)
|
||||||
|
.setHtml(true)
|
||||||
|
//关闭session
|
||||||
|
.setUseGlobalSession(false)
|
||||||
|
.send();
|
||||||
|
}catch (Exception e){
|
||||||
|
throw new BadRequestException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,119 @@
|
|||||||
|
|
||||||
|
package com.platform.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import com.platform.config.FileProperties;
|
||||||
|
import com.platform.domain.LocalStorage;
|
||||||
|
import com.platform.service.dto.LocalStorageDto;
|
||||||
|
import com.platform.service.dto.LocalStorageQueryCriteria;
|
||||||
|
import com.platform.service.mapstruct.LocalStorageMapper;
|
||||||
|
import com.platform.exception.BadRequestException;
|
||||||
|
import com.platform.utils.*;
|
||||||
|
import com.platform.repository.LocalStorageRepository;
|
||||||
|
import com.platform.service.LocalStorageService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class LocalStorageServiceImpl implements LocalStorageService {
|
||||||
|
|
||||||
|
private final LocalStorageRepository localStorageRepository;
|
||||||
|
private final LocalStorageMapper localStorageMapper;
|
||||||
|
private final FileProperties properties;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object queryAll(LocalStorageQueryCriteria criteria, Pageable pageable){
|
||||||
|
Page<LocalStorage> page = localStorageRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||||
|
return PageUtil.toPage(page.map(localStorageMapper::toDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LocalStorageDto> queryAll(LocalStorageQueryCriteria criteria){
|
||||||
|
return localStorageMapper.toDto(localStorageRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LocalStorageDto findById(Long id){
|
||||||
|
LocalStorage localStorage = localStorageRepository.findById(id).orElseGet(LocalStorage::new);
|
||||||
|
ValidationUtil.isNull(localStorage.getId(),"LocalStorage","id",id);
|
||||||
|
return localStorageMapper.toDto(localStorage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public LocalStorage create(String name, MultipartFile multipartFile) {
|
||||||
|
FileUtil.checkSize(properties.getMaxSize(), multipartFile.getSize());
|
||||||
|
String suffix = FileUtil.getExtensionName(multipartFile.getOriginalFilename());
|
||||||
|
String type = FileUtil.getFileType(suffix);
|
||||||
|
File file = FileUtil.upload(multipartFile, properties.getPath().getPath() + type + File.separator);
|
||||||
|
if(ObjectUtil.isNull(file)){
|
||||||
|
throw new BadRequestException("上传失败");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
name = StringUtils.isBlank(name) ? FileUtil.getFileNameNoEx(multipartFile.getOriginalFilename()) : name;
|
||||||
|
LocalStorage localStorage = new LocalStorage(
|
||||||
|
file.getName(),
|
||||||
|
name,
|
||||||
|
suffix,
|
||||||
|
file.getPath(),
|
||||||
|
type,
|
||||||
|
FileUtil.getSize(file.length())
|
||||||
|
);
|
||||||
|
return localStorageRepository.save(localStorage);
|
||||||
|
}catch (Exception e){
|
||||||
|
FileUtil.del(file);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void update(LocalStorage resources) {
|
||||||
|
LocalStorage localStorage = localStorageRepository.findById(resources.getId()).orElseGet(LocalStorage::new);
|
||||||
|
ValidationUtil.isNull( localStorage.getId(),"LocalStorage","id",resources.getId());
|
||||||
|
localStorage.copy(resources);
|
||||||
|
localStorageRepository.save(localStorage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void deleteAll(Long[] ids) {
|
||||||
|
for (Long id : ids) {
|
||||||
|
LocalStorage storage = localStorageRepository.findById(id).orElseGet(LocalStorage::new);
|
||||||
|
FileUtil.del(storage.getPath());
|
||||||
|
localStorageRepository.delete(storage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void download(List<LocalStorageDto> queryAll, HttpServletResponse response) throws IOException {
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
for (LocalStorageDto localStorageDTO : queryAll) {
|
||||||
|
Map<String,Object> map = new LinkedHashMap<>();
|
||||||
|
map.put("文件名", localStorageDTO.getRealName());
|
||||||
|
map.put("备注名", localStorageDTO.getName());
|
||||||
|
map.put("文件类型", localStorageDTO.getType());
|
||||||
|
map.put("文件大小", localStorageDTO.getSize());
|
||||||
|
map.put("创建者", localStorageDTO.getCreateBy());
|
||||||
|
map.put("创建日期", localStorageDTO.getCreateTime());
|
||||||
|
list.add(map);
|
||||||
|
}
|
||||||
|
FileUtil.downloadExcel(list, response);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,223 @@
|
|||||||
|
|
||||||
|
package com.platform.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.qiniu.common.QiniuException;
|
||||||
|
import com.qiniu.http.Response;
|
||||||
|
import com.qiniu.storage.BucketManager;
|
||||||
|
import com.qiniu.storage.Configuration;
|
||||||
|
import com.qiniu.storage.UploadManager;
|
||||||
|
import com.qiniu.storage.model.DefaultPutRet;
|
||||||
|
import com.qiniu.storage.model.FileInfo;
|
||||||
|
import com.qiniu.util.Auth;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import com.platform.domain.QiniuConfig;
|
||||||
|
import com.platform.domain.QiniuContent;
|
||||||
|
import com.platform.repository.QiniuContentRepository;
|
||||||
|
import com.platform.service.dto.QiniuQueryCriteria;
|
||||||
|
import com.platform.utils.QiNiuUtil;
|
||||||
|
import com.platform.exception.BadRequestException;
|
||||||
|
import com.platform.repository.QiNiuConfigRepository;
|
||||||
|
import com.platform.service.QiNiuService;
|
||||||
|
import com.platform.utils.FileUtil;
|
||||||
|
import com.platform.utils.PageUtil;
|
||||||
|
import com.platform.utils.QueryHelp;
|
||||||
|
import com.platform.utils.ValidationUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
|
import org.springframework.cache.annotation.CachePut;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@CacheConfig(cacheNames = "qiNiu")
|
||||||
|
public class QiNiuServiceImpl implements QiNiuService {
|
||||||
|
|
||||||
|
private final QiNiuConfigRepository qiNiuConfigRepository;
|
||||||
|
private final QiniuContentRepository qiniuContentRepository;
|
||||||
|
|
||||||
|
@Value("${qiniu.max-size}")
|
||||||
|
private Long maxSize;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Cacheable(key = "'config'")
|
||||||
|
public QiniuConfig find() {
|
||||||
|
Optional<QiniuConfig> qiniuConfig = qiNiuConfigRepository.findById(1L);
|
||||||
|
return qiniuConfig.orElseGet(QiniuConfig::new);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@CachePut(key = "'config'")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public QiniuConfig config(QiniuConfig qiniuConfig) {
|
||||||
|
qiniuConfig.setId(1L);
|
||||||
|
String http = "http://", https = "https://";
|
||||||
|
if (!(qiniuConfig.getHost().toLowerCase().startsWith(http)||qiniuConfig.getHost().toLowerCase().startsWith(https))) {
|
||||||
|
throw new BadRequestException("外链域名必须以http://或者https://开头");
|
||||||
|
}
|
||||||
|
return qiNiuConfigRepository.save(qiniuConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object queryAll(QiniuQueryCriteria criteria, Pageable pageable){
|
||||||
|
return PageUtil.toPage(qiniuContentRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<QiniuContent> queryAll(QiniuQueryCriteria criteria) {
|
||||||
|
return qiniuContentRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public QiniuContent upload(MultipartFile file, QiniuConfig qiniuConfig) {
|
||||||
|
FileUtil.checkSize(maxSize, file.getSize());
|
||||||
|
if(qiniuConfig.getId() == null){
|
||||||
|
throw new BadRequestException("请先添加相应配置,再操作");
|
||||||
|
}
|
||||||
|
// 构造一个带指定Zone对象的配置类
|
||||||
|
Configuration cfg = new Configuration(QiNiuUtil.getRegion(qiniuConfig.getZone()));
|
||||||
|
UploadManager uploadManager = new UploadManager(cfg);
|
||||||
|
Auth auth = Auth.create(qiniuConfig.getAccessKey(), qiniuConfig.getSecretKey());
|
||||||
|
String upToken = auth.uploadToken(qiniuConfig.getBucket());
|
||||||
|
try {
|
||||||
|
String key = file.getOriginalFilename();
|
||||||
|
if(qiniuContentRepository.findByKey(key) != null) {
|
||||||
|
key = QiNiuUtil.getKey(key);
|
||||||
|
}
|
||||||
|
Response response = uploadManager.put(file.getBytes(), key, upToken);
|
||||||
|
//解析上传成功的结果
|
||||||
|
|
||||||
|
DefaultPutRet putRet = JSON.parseObject(response.bodyString(), DefaultPutRet.class);
|
||||||
|
QiniuContent content = qiniuContentRepository.findByKey(FileUtil.getFileNameNoEx(putRet.key));
|
||||||
|
if(content == null){
|
||||||
|
//存入数据库
|
||||||
|
QiniuContent qiniuContent = new QiniuContent();
|
||||||
|
qiniuContent.setSuffix(FileUtil.getExtensionName(putRet.key));
|
||||||
|
qiniuContent.setBucket(qiniuConfig.getBucket());
|
||||||
|
qiniuContent.setType(qiniuConfig.getType());
|
||||||
|
qiniuContent.setKey(FileUtil.getFileNameNoEx(putRet.key));
|
||||||
|
qiniuContent.setUrl(qiniuConfig.getHost()+"/"+putRet.key);
|
||||||
|
qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(file.getSize()+"")));
|
||||||
|
return qiniuContentRepository.save(qiniuContent);
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new BadRequestException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public QiniuContent findByContentId(Long id) {
|
||||||
|
QiniuContent qiniuContent = qiniuContentRepository.findById(id).orElseGet(QiniuContent::new);
|
||||||
|
ValidationUtil.isNull(qiniuContent.getId(),"QiniuContent", "id",id);
|
||||||
|
return qiniuContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String download(QiniuContent content,QiniuConfig config){
|
||||||
|
String finalUrl;
|
||||||
|
String type = "公开";
|
||||||
|
if(type.equals(content.getType())){
|
||||||
|
finalUrl = content.getUrl();
|
||||||
|
} else {
|
||||||
|
Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey());
|
||||||
|
// 1小时,可以自定义链接过期时间
|
||||||
|
long expireInSeconds = 3600;
|
||||||
|
finalUrl = auth.privateDownloadUrl(content.getUrl(), expireInSeconds);
|
||||||
|
}
|
||||||
|
return finalUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void delete(QiniuContent content, QiniuConfig config) {
|
||||||
|
//构造一个带指定Zone对象的配置类
|
||||||
|
Configuration cfg = new Configuration(QiNiuUtil.getRegion(config.getZone()));
|
||||||
|
Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey());
|
||||||
|
BucketManager bucketManager = new BucketManager(auth, cfg);
|
||||||
|
try {
|
||||||
|
bucketManager.delete(content.getBucket(), content.getKey() + "." + content.getSuffix());
|
||||||
|
qiniuContentRepository.delete(content);
|
||||||
|
} catch (QiniuException ex) {
|
||||||
|
qiniuContentRepository.delete(content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void synchronize(QiniuConfig config) {
|
||||||
|
if(config.getId() == null){
|
||||||
|
throw new BadRequestException("请先添加相应配置,再操作");
|
||||||
|
}
|
||||||
|
//构造一个带指定Zone对象的配置类
|
||||||
|
Configuration cfg = new Configuration(QiNiuUtil.getRegion(config.getZone()));
|
||||||
|
Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey());
|
||||||
|
BucketManager bucketManager = new BucketManager(auth, cfg);
|
||||||
|
//文件名前缀
|
||||||
|
String prefix = "";
|
||||||
|
//每次迭代的长度限制,最大1000,推荐值 1000
|
||||||
|
int limit = 1000;
|
||||||
|
//指定目录分隔符,列出所有公共前缀(模拟列出目录效果)。缺省值为空字符串
|
||||||
|
String delimiter = "";
|
||||||
|
//列举空间文件列表
|
||||||
|
BucketManager.FileListIterator fileListIterator = bucketManager.createFileListIterator(config.getBucket(), prefix, limit, delimiter);
|
||||||
|
while (fileListIterator.hasNext()) {
|
||||||
|
//处理获取的file list结果
|
||||||
|
QiniuContent qiniuContent;
|
||||||
|
FileInfo[] items = fileListIterator.next();
|
||||||
|
for (FileInfo item : items) {
|
||||||
|
if(qiniuContentRepository.findByKey(FileUtil.getFileNameNoEx(item.key)) == null){
|
||||||
|
qiniuContent = new QiniuContent();
|
||||||
|
qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(item.fsize+"")));
|
||||||
|
qiniuContent.setSuffix(FileUtil.getExtensionName(item.key));
|
||||||
|
qiniuContent.setKey(FileUtil.getFileNameNoEx(item.key));
|
||||||
|
qiniuContent.setType(config.getType());
|
||||||
|
qiniuContent.setBucket(config.getBucket());
|
||||||
|
qiniuContent.setUrl(config.getHost()+"/"+item.key);
|
||||||
|
qiniuContentRepository.save(qiniuContent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteAll(Long[] ids, QiniuConfig config) {
|
||||||
|
for (Long id : ids) {
|
||||||
|
delete(findByContentId(id), config);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void update(String type) {
|
||||||
|
qiNiuConfigRepository.update(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void downloadList(List<QiniuContent> queryAll, HttpServletResponse response) throws IOException {
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
for (QiniuContent content : queryAll) {
|
||||||
|
Map<String,Object> map = new LinkedHashMap<>();
|
||||||
|
map.put("文件名", content.getKey());
|
||||||
|
map.put("文件类型", content.getSuffix());
|
||||||
|
map.put("空间名称", content.getBucket());
|
||||||
|
map.put("文件大小", content.getSize());
|
||||||
|
map.put("空间类型", content.getType());
|
||||||
|
map.put("创建日期", content.getUpdateTime());
|
||||||
|
list.add(map);
|
||||||
|
}
|
||||||
|
FileUtil.downloadExcel(list, response);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
package com.platform.service.mapstruct;
|
||||||
|
|
||||||
|
import com.platform.base.BaseMapper;
|
||||||
|
import com.platform.service.dto.LocalStorageDto;
|
||||||
|
import com.platform.domain.LocalStorage;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ReportingPolicy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||||
|
public interface LocalStorageMapper extends BaseMapper<LocalStorageDto, LocalStorage> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
package com.platform.utils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付状态
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public enum AliPayStatusEnum {
|
||||||
|
|
||||||
|
/** 交易成功 */
|
||||||
|
FINISHED("TRADE_FINISHED"),
|
||||||
|
|
||||||
|
/** 支付成功 */
|
||||||
|
SUCCESS("TRADE_SUCCESS"),
|
||||||
|
|
||||||
|
/** 交易创建 */
|
||||||
|
BUYER_PAY("WAIT_BUYER_PAY"),
|
||||||
|
|
||||||
|
/** 交易关闭 */
|
||||||
|
CLOSED("TRADE_CLOSED");
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
AliPayStatusEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
71
studio/box/src/main/java/com/platform/utils/AlipayUtils.java
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
package com.platform.utils;
|
||||||
|
|
||||||
|
import com.alipay.api.AlipayApiException;
|
||||||
|
import com.alipay.api.internal.util.AlipaySignature;
|
||||||
|
import com.platform.domain.AlipayConfig;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝工具类
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27 14:04:35
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class AlipayUtils {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成订单号
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getOrderCode() {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
int a = (int)(Math.random() * 9000.0D) + 1000;
|
||||||
|
System.out.println(a);
|
||||||
|
Date date = new Date();
|
||||||
|
String str = sdf.format(date);
|
||||||
|
String[] split = str.split("-");
|
||||||
|
String s = split[0] + split[1] + split[2];
|
||||||
|
String[] split1 = s.split(" ");
|
||||||
|
String s1 = split1[0] + split1[1];
|
||||||
|
String[] split2 = s1.split(":");
|
||||||
|
return split2[0] + split2[1] + split2[2] + a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验签名
|
||||||
|
* @param request HttpServletRequest
|
||||||
|
* @param alipay 阿里云配置
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public boolean rsaCheck(HttpServletRequest request, AlipayConfig alipay){
|
||||||
|
|
||||||
|
// 获取支付宝POST过来反馈信息
|
||||||
|
Map<String,String> params = new HashMap<>(1);
|
||||||
|
Map<String, String[]> requestParams = request.getParameterMap();
|
||||||
|
for (Object o : requestParams.keySet()) {
|
||||||
|
String name = (String) o;
|
||||||
|
String[] values = requestParams.get(name);
|
||||||
|
String valueStr = "";
|
||||||
|
for (int i = 0; i < values.length; i++) {
|
||||||
|
valueStr = (i == values.length - 1) ? valueStr + values[i]
|
||||||
|
: valueStr + values[i] + ",";
|
||||||
|
}
|
||||||
|
params.put(name, valueStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return AlipaySignature.rsaCheckV1(params,
|
||||||
|
alipay.getPublicKey(),
|
||||||
|
alipay.getCharset(),
|
||||||
|
alipay.getSignType());
|
||||||
|
} catch (AlipayApiException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
57
studio/box/src/main/java/com/platform/utils/QiNiuUtil.java
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
|
||||||
|
package com.platform.utils;
|
||||||
|
|
||||||
|
import com.qiniu.storage.Region;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 七牛云存储工具类
|
||||||
|
* @author AllDataDC
|
||||||
|
* @date 2023-01-27
|
||||||
|
*/
|
||||||
|
public class QiNiuUtil {
|
||||||
|
|
||||||
|
private static final String HUAD = "华东";
|
||||||
|
|
||||||
|
private static final String HUAB = "华北";
|
||||||
|
|
||||||
|
private static final String HUAN = "华南";
|
||||||
|
|
||||||
|
private static final String BEIM = "北美";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得到机房的对应关系
|
||||||
|
* @param zone 机房名称
|
||||||
|
* @return Region
|
||||||
|
*/
|
||||||
|
public static Region getRegion(String zone){
|
||||||
|
|
||||||
|
if(HUAD.equals(zone)){
|
||||||
|
return Region.huadong();
|
||||||
|
} else if(HUAB.equals(zone)){
|
||||||
|
return Region.huabei();
|
||||||
|
} else if(HUAN.equals(zone)){
|
||||||
|
return Region.huanan();
|
||||||
|
} else if (BEIM.equals(zone)){
|
||||||
|
return Region.beimei();
|
||||||
|
// 否则就是东南亚
|
||||||
|
} else {
|
||||||
|
return Region.qvmHuadong();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认不指定key的情况下,以文件内容的hash值作为文件名
|
||||||
|
* @param file 文件名
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public static String getKey(String file){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||||
|
Date date = new Date();
|
||||||
|
return FileUtil.getFileNameNoEx(file) + "-" +
|
||||||
|
sdf.format(date) +
|
||||||
|
"." +
|
||||||
|
FileUtil.getExtensionName(file);
|
||||||
|
}
|
||||||
|
}
|
BIN
studio/common/aspose-words-20.3.jar
Normal file
115
studio/common/common-core/pom.xml
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<groupId>com.platform</groupId>
|
||||||
|
<version>0.4.x</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<version>0.4.x</version>
|
||||||
|
<artifactId>common-core</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- SpringWeb模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!--io常用工具类 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>${commons.io.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--文件上传工具类 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-fileupload</groupId>
|
||||||
|
<artifactId>commons-fileupload</artifactId>
|
||||||
|
<version>${commons.fileupload.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-codec</groupId>
|
||||||
|
<artifactId>commons-codec</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-beanutils</groupId>
|
||||||
|
<artifactId>commons-beanutils</artifactId>
|
||||||
|
<version>${commons.beanutils.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>${hutool.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>${fastjson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-extension</artifactId>
|
||||||
|
<version>${mybatis-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate.validator</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!--jackson模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.module</groupId>
|
||||||
|
<artifactId>jackson-module-parameter-names</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||||
|
<artifactId>jackson-datatype-jdk8</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||||
|
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.security</groupId>
|
||||||
|
<artifactId>spring-security-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- jwt -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt-api</artifactId>
|
||||||
|
<version>${jjwt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt-impl</artifactId>
|
||||||
|
<version>${jjwt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt-jackson</artifactId>
|
||||||
|
<version>${jjwt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.platform</groupId>
|
||||||
|
<artifactId>common-service-api</artifactId>
|
||||||
|
<version>0.4.x</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.platform</groupId>
|
||||||
|
<artifactId>common-log</artifactId>
|
||||||
|
<version>0.4.x</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
@ -0,0 +1,5 @@
|
|||||||
|
package cn.datax.common.base;
|
||||||
|
|
||||||
|
public abstract class BaseController {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.datax.common.base;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface BaseDao<T> extends BaseMapper<T> {
|
||||||
|
|
||||||
|
List<T> selectListDataScope(@Param("ew") Wrapper<T> queryWrapper, @Param("dataScope") DataScope dataScope);
|
||||||
|
|
||||||
|
IPage<T> selectPageDataScope(IPage<T> page, @Param("ew") Wrapper<T> queryWrapper, @Param("dataScope") DataScope dataScope);
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package cn.datax.common.base;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
public interface BaseService<T> extends IService<T> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package cn.datax.common.base;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
public abstract class BaseServiceImpl<M extends BaseDao<T>, T> extends ServiceImpl<M, T> implements BaseService<T> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected M baseDao;
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package cn.datax.common.base;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public abstract class DataFlowBaseEntity extends DataScopeBaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作流状态(1待提交,2已退回,3审核中,4通过,5不通过,6已撤销)
|
||||||
|
*/
|
||||||
|
@TableField(value = "flow_status", fill = FieldFill.INSERT)
|
||||||
|
private String flowStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例ID
|
||||||
|
*/
|
||||||
|
@TableField(value = "process_instance_id")
|
||||||
|
private String processInstanceId;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package cn.datax.common.base;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据权限查询参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DataScope {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表的部门字段
|
||||||
|
*/
|
||||||
|
private String deptScopeName = "create_dept";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表的用户字段
|
||||||
|
*/
|
||||||
|
private String userScopeName = "create_by";
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package cn.datax.common.base;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public abstract class DataScopeBaseEntity extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人所属部门
|
||||||
|
*/
|
||||||
|
@TableField(value = "create_dept", fill = FieldFill.INSERT)
|
||||||
|
private String createDept;
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
package cn.datax.common.config;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
|
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
||||||
|
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class JacksonConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@Primary
|
||||||
|
@ConditionalOnMissingBean(ObjectMapper.class)
|
||||||
|
public ObjectMapper jacksonObjectMapper(Jackson2ObjectMapperBuilder builder){
|
||||||
|
builder.simpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
ObjectMapper objectMapper = builder.createXmlMapper(false)
|
||||||
|
.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
||||||
|
.featuresToDisable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)
|
||||||
|
.timeZone(TimeZone.getTimeZone("Asia/Shanghai"))
|
||||||
|
.build();
|
||||||
|
// null数据不返回
|
||||||
|
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
|
objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
||||||
|
// 反序列化时候遇到不匹配的属性并不抛出异常
|
||||||
|
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
// 序列化时候遇到空对象不抛出异常
|
||||||
|
objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
|
||||||
|
// 反序列化的时候如果是无效子类型,不抛出异常
|
||||||
|
objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
|
||||||
|
// 不使用默认的dateTime进行序列化,
|
||||||
|
objectMapper.configure(SerializationFeature.WRITE_DATE_KEYS_AS_TIMESTAMPS, false);
|
||||||
|
// 数据精度问题
|
||||||
|
SimpleModule simpleModule = new SimpleModule()
|
||||||
|
.addSerializer(Long.class, ToStringSerializer.instance)
|
||||||
|
.addSerializer(Long.TYPE, ToStringSerializer.instance)
|
||||||
|
.addSerializer(BigInteger.class, ToStringSerializer.instance)
|
||||||
|
.addSerializer(BigDecimal.class, ToStringSerializer.instance);
|
||||||
|
objectMapper.registerModule(simpleModule);
|
||||||
|
|
||||||
|
JavaTimeModule javaTimeModule = new JavaTimeModule();
|
||||||
|
javaTimeModule.addSerializer(LocalDateTime.class,new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||||
|
javaTimeModule.addSerializer(LocalDate.class,new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
|
javaTimeModule.addSerializer(LocalTime.class,new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
|
||||||
|
javaTimeModule.addDeserializer(LocalDateTime.class,new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||||
|
javaTimeModule.addDeserializer(LocalDate.class,new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
|
javaTimeModule.addDeserializer(LocalTime.class,new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
|
||||||
|
objectMapper.registerModule(javaTimeModule).registerModule(new ParameterNamesModule());
|
||||||
|
return objectMapper;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package cn.datax.common.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.http.client.ClientHttpRequestFactory;
|
||||||
|
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class RestTemplateConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public RestTemplate restTemplate(ClientHttpRequestFactory factory){
|
||||||
|
return new RestTemplate(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ClientHttpRequestFactory simpleClientHttpRequestFactory(){
|
||||||
|
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
||||||
|
factory.setReadTimeout(5000);
|
||||||
|
factory.setConnectTimeout(5000);
|
||||||
|
return factory;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,211 @@
|
|||||||
|
package cn.datax.common.core;
|
||||||
|
|
||||||
|
public class DataConstant {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Oauth2安全相关常量
|
||||||
|
*/
|
||||||
|
public enum Security {
|
||||||
|
//请求头TOKEN名称
|
||||||
|
TOKENHEADER("gatewayToken"),
|
||||||
|
//请求头TOKEN值
|
||||||
|
TOKENVALUE("datax:gateway:123456"),
|
||||||
|
//OAUTH2请求头
|
||||||
|
AUTHORIZATION("Authorization"),
|
||||||
|
//OAUTH2令牌类型
|
||||||
|
TOKENTYPE("bearer "),
|
||||||
|
//security授权角色前缀
|
||||||
|
ROLEPREFIX("ROLE_");
|
||||||
|
|
||||||
|
Security(String val){
|
||||||
|
this.val = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String val;
|
||||||
|
|
||||||
|
public String getVal() {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用的是否
|
||||||
|
*/
|
||||||
|
public enum TrueOrFalse {
|
||||||
|
FALSE("0",false),
|
||||||
|
TRUE("1",true);
|
||||||
|
|
||||||
|
TrueOrFalse(String key, boolean val){
|
||||||
|
this.key = key;
|
||||||
|
this.val = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String key;
|
||||||
|
private final boolean val;
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getVal() {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户认证返回额外信息
|
||||||
|
*/
|
||||||
|
public enum UserAdditionalInfo {
|
||||||
|
LICENSE("license", "datax"),
|
||||||
|
USER("user", "用户"),
|
||||||
|
USERID("user_id", "用户ID"),
|
||||||
|
USERNAME("username", "用户名"),
|
||||||
|
NICKNAME("nickname", "用户昵称"),
|
||||||
|
DEPT("user_dept", "用户部门"),
|
||||||
|
ROLE("user_role", "用户角色"),
|
||||||
|
POST("user_post", "用户岗位");
|
||||||
|
|
||||||
|
UserAdditionalInfo(String key, String val){
|
||||||
|
this.key = key;
|
||||||
|
this.val = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String key;
|
||||||
|
private final String val;
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVal() {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用的启用禁用状态
|
||||||
|
*/
|
||||||
|
public enum EnableState {
|
||||||
|
DISABLE("0","禁用"),
|
||||||
|
ENABLE("1","启用");
|
||||||
|
|
||||||
|
EnableState(String key, String val){
|
||||||
|
this.key = key;
|
||||||
|
this.val = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String key;
|
||||||
|
private final String val;
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVal() {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程审核状态
|
||||||
|
*/
|
||||||
|
public enum AuditState{
|
||||||
|
WAIT("1","待提交"),
|
||||||
|
BACK("2", "已退回"),
|
||||||
|
AUDIT("3","审核中"),
|
||||||
|
AGREE("4","通过"),
|
||||||
|
REJECT("5","不通过"),
|
||||||
|
CANCEL("6", "已撤销");
|
||||||
|
|
||||||
|
AuditState(String key, String val){
|
||||||
|
this.key = key;
|
||||||
|
this.val = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String key;
|
||||||
|
private final String val;
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVal() {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单类型
|
||||||
|
*/
|
||||||
|
public enum MenuType{
|
||||||
|
MODULE("0","模块"),
|
||||||
|
MENU("1","菜单"),
|
||||||
|
BUTTON("2","按钮");
|
||||||
|
|
||||||
|
MenuType(String key, String val){
|
||||||
|
this.key = key;
|
||||||
|
this.val = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String key;
|
||||||
|
private final String val;
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVal() {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据范围
|
||||||
|
*/
|
||||||
|
public enum DataScope{
|
||||||
|
ALL("1","全部数据权限"),
|
||||||
|
CUSTOM("2","自定义数据权限"),
|
||||||
|
DEPT("3","本部门数据权限"),
|
||||||
|
DEPTANDCHILD("4","本部门及以下数据权限"),
|
||||||
|
SELF("5","仅本人数据权限");
|
||||||
|
DataScope(String key, String val){
|
||||||
|
this.key = key;
|
||||||
|
this.val = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String key;
|
||||||
|
private final String val;
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVal() {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Api状态
|
||||||
|
*/
|
||||||
|
public enum ApiState{
|
||||||
|
WAIT("1","待发布"),
|
||||||
|
RELEASE("2","已发布"),
|
||||||
|
CANCEL("3","已下线");
|
||||||
|
ApiState(String key, String val){
|
||||||
|
this.key = key;
|
||||||
|
this.val = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String key;
|
||||||
|
private final String val;
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVal() {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package cn.datax.common.core;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DataRole implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String dataScope;
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package cn.datax.common.core;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.userdetails.User;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class DataUser extends User {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String nickname;
|
||||||
|
private String dept;
|
||||||
|
private List<DataRole> roles;
|
||||||
|
private List<String> posts;
|
||||||
|
|
||||||
|
public DataUser(String id, String nickname, String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
|
||||||
|
super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
|
||||||
|
this.id = id;
|
||||||
|
this.nickname = nickname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAdmin() {
|
||||||
|
return isAdmin(this.getUsername());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isAdmin(String username) {
|
||||||
|
return ObjectUtil.equal(username, "admin");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNickname() {
|
||||||
|
return nickname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNickname(String nickname) {
|
||||||
|
this.nickname = nickname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDept() {
|
||||||
|
return dept;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDept(String dept) {
|
||||||
|
this.dept = dept;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DataRole> getRoles() {
|
||||||
|
return roles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoles(List<DataRole> roles) {
|
||||||
|
this.roles = roles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getPosts() {
|
||||||
|
return posts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPosts(List<String> posts) {
|
||||||
|
this.posts = posts;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "DataUser{" +
|
||||||
|
"id='" + id + '\'' +
|
||||||
|
", nickname='" + nickname + '\'' +
|
||||||
|
", dept='" + dept + '\'' +
|
||||||
|
", roles=" + roles +
|
||||||
|
", posts=" + posts +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|