Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
7c35a79c
Commit
7c35a79c
authored
May 05, 2020
by
ZhengJie
Browse files
[新增功能](el-admin v2.5): v2.5 beta
详情
https://www.ydyno.com/archives/1225.html
parent
d35ffc9d
Changes
295
Hide whitespace changes
Inline
Side-by-side
eladmin-tools/src/main/java/me/zhengjie/domain/VerificationCode.java
deleted
100644 → 0
View file @
d35ffc9d
package
me.zhengjie.domain
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
* @author Zheng Jie
* @date 2018-12-26
*/
@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Table
(
name
=
"verification_code"
)
public
class
VerificationCode
implements
Serializable
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
private
String
code
;
/** 使用场景,自己定义 */
private
String
scenes
;
/** true 为有效,false 为无效,验证时状态+时间+具体的邮箱或者手机号 */
private
Boolean
status
=
true
;
/** 类型 :phone 和 email */
@NotBlank
private
String
type
;
/** 具体的phone与email */
@NotBlank
private
String
value
;
/** 创建日期 */
@CreationTimestamp
@Column
(
name
=
"create_time"
)
private
Timestamp
createTime
;
public
VerificationCode
(
String
code
,
String
scenes
,
@NotBlank
String
type
,
@NotBlank
String
value
)
{
this
.
code
=
code
;
this
.
scenes
=
scenes
;
this
.
type
=
type
;
this
.
value
=
value
;
}
}
eladmin-tools/src/main/java/me/zhengjie/domain/vo/EmailVo.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.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
;
...
...
eladmin-tools/src/main/java/me/zhengjie/domain/vo/TradeVo.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.domain.vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.sql.Date
;
import
java.sql.Timestamp
;
...
...
eladmin-tools/src/main/java/me/zhengjie/repository/AliPayRepository.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.repository
;
import
me.zhengjie.domain.AlipayConfig
;
...
...
eladmin-tools/src/main/java/me/zhengjie/repository/EmailRepository.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.repository
;
import
me.zhengjie.domain.EmailConfig
;
...
...
eladmin-tools/src/main/java/me/zhengjie/repository/LocalStorageRepository.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.repository
;
import
me.zhengjie.domain.LocalStorage
;
...
...
eladmin-tools/src/main/java/me/zhengjie/repository/PictureRepository.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.repository
;
import
me.zhengjie.domain.Picture
;
...
...
eladmin-tools/src/main/java/me/zhengjie/repository/QiNiuConfigRepository.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.repository
;
import
me.zhengjie.domain.QiniuConfig
;
...
...
eladmin-tools/src/main/java/me/zhengjie/repository/QiniuContentRepository.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.repository
;
import
me.zhengjie.domain.QiniuContent
;
...
...
eladmin-tools/src/main/java/me/zhengjie/repository/VerificationCodeRepository.java
deleted
100644 → 0
View file @
d35ffc9d
package
me.zhengjie.repository
;
import
me.zhengjie.domain.VerificationCode
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @author Zheng Jie
* @date 2018-12-26
*/
public
interface
VerificationCodeRepository
extends
JpaRepository
<
VerificationCode
,
Long
>
{
/**
* 获取有效的验证码
* @param scenes 业务场景,如重置密码,重置邮箱等等
* @param type 类型
* @param value 值
* @return VerificationCode
*/
VerificationCode
findByScenesAndTypeAndValueAndStatusIsTrue
(
String
scenes
,
String
type
,
String
value
);
}
eladmin-tools/src/main/java/me/zhengjie/rest/AliPayController.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.rest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
me.zhengjie.annotation.AnonymousAccess
;
import
me.zhengjie.aop.log.Log
;
...
...
@@ -26,19 +42,14 @@ import java.util.Map;
*/
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/api/aliPay"
)
@Api
(
tags
=
"工具:支付宝管理"
)
public
class
AliPayController
{
private
final
AlipayUtils
alipayUtils
;
private
final
AliPayService
alipayService
;
public
AliPayController
(
AlipayUtils
alipayUtils
,
AliPayService
alipayService
)
{
this
.
alipayUtils
=
alipayUtils
;
this
.
alipayService
=
alipayService
;
}
@GetMapping
public
ResponseEntity
<
AlipayConfig
>
get
(){
return
new
ResponseEntity
<>(
alipayService
.
find
(),
HttpStatus
.
OK
);
...
...
eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.rest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
me.zhengjie.aop.log.Log
;
import
me.zhengjie.domain.vo.EmailVo
;
import
me.zhengjie.domain.EmailConfig
;
...
...
@@ -17,16 +33,13 @@ import org.springframework.web.bind.annotation.*;
* @date 2018/09/28 6:55:53
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"api/email"
)
@Api
(
tags
=
"工具:邮件管理"
)
public
class
EmailController
{
private
final
EmailService
emailService
;
public
EmailController
(
EmailService
emailService
)
{
this
.
emailService
=
emailService
;
}
@GetMapping
public
ResponseEntity
<
Object
>
get
(){
return
new
ResponseEntity
<>(
emailService
.
find
(),
HttpStatus
.
OK
);
...
...
eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.rest
;
import
lombok.RequiredArgsConstructor
;
import
me.zhengjie.aop.log.Log
;
import
me.zhengjie.domain.LocalStorage
;
import
me.zhengjie.service.LocalStorageService
;
...
...
@@ -20,17 +36,14 @@ import java.io.IOException;
* @author Zheng Jie
* @date 2019-09-05
*/
@Api
(
tags
=
"工具:本地存储管理"
)
@RestController
@RequiredArgsConstructor
@Api
(
tags
=
"工具:本地存储管理"
)
@RequestMapping
(
"/api/localStorage"
)
public
class
LocalStorageController
{
private
final
LocalStorageService
localStorageService
;
public
LocalStorageController
(
LocalStorageService
localStorageService
)
{
this
.
localStorageService
=
localStorageService
;
}
@ApiOperation
(
"查询文件"
)
@GetMapping
@PreAuthorize
(
"@el.check('storage:list')"
)
...
...
eladmin-tools/src/main/java/me/zhengjie/rest/PictureController.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.rest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
me.zhengjie.aop.log.Log
;
import
me.zhengjie.domain.Picture
;
import
me.zhengjie.service.PictureService
;
...
...
@@ -21,16 +37,13 @@ import java.io.IOException;
* @date 2018/09/20 14:13:32
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/api/pictures"
)
@Api
(
tags
=
"工具:免费图床管理"
)
public
class
PictureController
{
private
final
PictureService
pictureService
;
public
PictureController
(
PictureService
pictureService
)
{
this
.
pictureService
=
pictureService
;
}
@Log
(
"查询图片"
)
@PreAuthorize
(
"@el.check('pictures:list')"
)
@GetMapping
...
...
eladmin-tools/src/main/java/me/zhengjie/rest/QiniuController.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.rest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
me.zhengjie.aop.log.Log
;
import
me.zhengjie.domain.QiniuConfig
;
...
...
@@ -26,16 +42,13 @@ import java.util.Map;
*/
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/api/qiNiuContent"
)
@Api
(
tags
=
"工具:七牛云存储管理"
)
public
class
QiniuController
{
private
final
QiNiuService
qiNiuService
;
public
QiniuController
(
QiNiuService
qiNiuService
)
{
this
.
qiNiuService
=
qiNiuService
;
}
@GetMapping
(
value
=
"/config"
)
public
ResponseEntity
<
Object
>
get
(){
return
new
ResponseEntity
<>(
qiNiuService
.
find
(),
HttpStatus
.
OK
);
...
...
eladmin-tools/src/main/java/me/zhengjie/service/AliPayService.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.service
;
import
me.zhengjie.domain.vo.TradeVo
;
...
...
eladmin-tools/src/main/java/me/zhengjie/service/EmailService.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.service
;
import
me.zhengjie.domain.vo.EmailVo
;
...
...
@@ -30,6 +45,5 @@ public interface EmailService {
* @param emailConfig 邮件配置
* @throws Exception /
*/
@Async
void
send
(
EmailVo
emailVo
,
EmailConfig
emailConfig
)
throws
Exception
;
void
send
(
EmailVo
emailVo
,
EmailConfig
emailConfig
);
}
eladmin-tools/src/main/java/me/zhengjie/service/LocalStorageService.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.service
;
import
me.zhengjie.domain.LocalStorage
;
...
...
eladmin-tools/src/main/java/me/zhengjie/service/PictureService.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.service
;
import
me.zhengjie.domain.Picture
;
...
...
eladmin-tools/src/main/java/me/zhengjie/service/QiNiuService.java
View file @
7c35a79c
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
me.zhengjie.service
;
import
me.zhengjie.domain.QiniuConfig
;
...
...
Prev
1
…
10
11
12
13
14
15
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment