4 | * 版权所有,侵权必究!
5 | */
6 |
7 | package me.zhengjie.modules.mockexam.utils;
8 |
9 | import org.springframework.context.MessageSource;
10 | import org.springframework.context.i18n.LocaleContextHolder;
11 |
12 |
13 | /**
14 | * 国际化
15 | *
16 | *
17 | * @return:
18 | * @Author: Mingxuan_X
19 | * @Date: 2021/4/11
20 | */
21 | public class MessageUtils {
22 | private MessageUtils() {
23 | }
24 |
25 | private static MessageSource messageSource;
26 |
27 | static {
28 | messageSource = (MessageSource) SpringContextUtils.getBean("messageSource");
29 | }
30 |
31 | public static String getMessage(int code) {
32 | return getMessage(code, new String[0]);
33 | }
34 |
35 | public static String getMessage(int code, String... params) {
36 | return messageSource.getMessage(code + "", params, LocaleContextHolder.getLocale());
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/quartz/repository/QuartzLogRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.quartz.repository;
17 |
18 | import me.zhengjie.modules.quartz.domain.QuartzLog;
19 | import org.springframework.data.jpa.repository.JpaRepository;
20 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
21 |
22 | /**
23 | * @author Zheng Jie
24 | * @date 2019-01-07
25 | */
26 | public interface QuartzLogRepository extends JpaRepository, JpaSpecificationExecutor {
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/dto/JobQueryCriteria.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.quartz.service.dto;
17 |
18 | import lombok.Data;
19 | import me.zhengjie.annotation.Query;
20 | import java.sql.Timestamp;
21 | import java.util.List;
22 |
23 | /**
24 | * @author Zheng Jie
25 | * @date 2019-6-4 10:33:02
26 | */
27 | @Data
28 | public class JobQueryCriteria {
29 |
30 | @Query(type = Query.Type.INNER_LIKE)
31 | private String jobName;
32 |
33 | @Query
34 | private Boolean isSuccess;
35 |
36 | @Query(type = Query.Type.BETWEEN)
37 | private List createTime;
38 | }
39 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/TestTask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.quartz.task;
17 |
18 | import lombok.extern.slf4j.Slf4j;
19 | import org.springframework.stereotype.Component;
20 |
21 | /**
22 | * 测试用
23 | * @author Zheng Jie
24 | * @date 2019-01-08
25 | */
26 | @Slf4j
27 | @Component
28 | public class TestTask {
29 |
30 | public void run(){
31 | log.info("run 执行成功");
32 | }
33 |
34 | public void run1(String str){
35 | log.info("run1 执行成功,参数为: {}" + str);
36 | }
37 |
38 | public void run2(){
39 | log.info("run2 执行成功");
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginCodeEnum.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.security.config.bean;
17 |
18 | /**
19 | * 验证码配置枚举
20 | *
21 | * @author: liaojinlong
22 | * @date: 2020/6/10 17:40
23 | */
24 |
25 | public enum LoginCodeEnum {
26 | /**
27 | * 算数
28 | */
29 | arithmetic,
30 | /**
31 | * 中文
32 | */
33 | chinese,
34 | /**
35 | * 中文闪图
36 | */
37 | chinese_gif,
38 | /**
39 | * 闪图
40 | */
41 | gif,
42 | spec
43 | }
44 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthUserDto.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.security.service.dto;
17 |
18 | import lombok.Getter;
19 | import lombok.Setter;
20 | import javax.validation.constraints.NotBlank;
21 |
22 | /**
23 | * @author Zheng Jie
24 | * @date 2018-11-30
25 | */
26 | @Getter
27 | @Setter
28 | public class AuthUserDto {
29 |
30 | @NotBlank
31 | private String username;
32 |
33 | @NotBlank
34 | private String password;
35 |
36 | private String code;
37 |
38 | private String uuid = "";
39 | }
40 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuMetaVo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.domain.vo;
17 |
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import java.io.Serializable;
21 |
22 | /**
23 | * @author Zheng Jie
24 | * @date 2018-12-20
25 | */
26 | @Data
27 | @AllArgsConstructor
28 | public class MenuMetaVo implements Serializable {
29 |
30 | private String title;
31 |
32 | private String icon;
33 |
34 | private Boolean noCache;
35 | }
36 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserPassVo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.domain.vo;
17 |
18 | import lombok.Data;
19 |
20 | /**
21 | * 修改密码的 Vo 类
22 | * @author Zheng Jie
23 | * @date 2019年7月11日13:59:49
24 | */
25 | @Data
26 | public class UserPassVo {
27 |
28 | private String oldPass;
29 |
30 | private String newPass;
31 | }
32 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DataService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service;
17 |
18 | import me.zhengjie.modules.system.service.dto.UserDto;
19 | import java.util.List;
20 |
21 | /**
22 | * 数据权限服务类
23 | * @author Zheng Jie
24 | * @date 2020-05-07
25 | */
26 | public interface DataService {
27 |
28 | /**
29 | * 获取数据权限
30 | * @param user /
31 | * @return /
32 | */
33 | List getDeptIds(UserDto user);
34 | }
35 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MonitorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service;
17 |
18 | import java.util.Map;
19 |
20 | /**
21 | * @author Zheng Jie
22 | * @date 2020-05-02
23 | */
24 | public interface MonitorService {
25 |
26 | /**
27 | * 查询数据分页
28 | * @return Map
29 | */
30 | Map getServers();
31 | }
32 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/VerifyService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service;
17 |
18 | import me.zhengjie.domain.vo.EmailVo;
19 |
20 | /**
21 | * @author Zheng Jie
22 | * @date 2018-12-26
23 | */
24 | public interface VerifyService {
25 |
26 | /**
27 | * 发送验证码
28 | * @param email /
29 | * @param key /
30 | * @return /
31 | */
32 | EmailVo sendEmail(String email, String key);
33 |
34 |
35 | /**
36 | * 验证
37 | * @param code /
38 | * @param key /
39 | */
40 | void validated(String key, String code);
41 | }
42 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptSmallDto.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.dto;
17 |
18 | import lombok.Data;
19 | import java.io.Serializable;
20 |
21 | /**
22 | * @author Zheng Jie
23 | * @date 2019-6-10 16:32:18
24 | */
25 | @Data
26 | public class DeptSmallDto implements Serializable {
27 |
28 | private Long id;
29 |
30 | private String name;
31 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictDetailDto.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.dto;
17 |
18 | import lombok.Getter;
19 | import lombok.Setter;
20 | import me.zhengjie.base.BaseDTO;
21 | import java.io.Serializable;
22 |
23 | /**
24 | * @author Zheng Jie
25 | * @date 2019-04-10
26 | */
27 | @Getter
28 | @Setter
29 | public class DictDetailDto extends BaseDTO implements Serializable {
30 |
31 | private Long id;
32 |
33 | private DictSmallDto dict;
34 |
35 | private String label;
36 |
37 | private String value;
38 |
39 | private Integer dictSort;
40 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictDetailQueryCriteria.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.dto;
17 |
18 | import lombok.Data;
19 | import me.zhengjie.annotation.Query;
20 |
21 | /**
22 | * @author Zheng Jie
23 | * @date 2019-04-10
24 | */
25 | @Data
26 | public class DictDetailQueryCriteria {
27 |
28 | @Query(type = Query.Type.INNER_LIKE)
29 | private String label;
30 |
31 | @Query(propName = "name",joinName = "dict")
32 | private String dictName;
33 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictDto.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.dto;
17 |
18 | import lombok.Getter;
19 | import lombok.Setter;
20 | import me.zhengjie.base.BaseDTO;
21 | import java.io.Serializable;
22 | import java.util.List;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-04-10
27 | */
28 | @Getter
29 | @Setter
30 | public class DictDto extends BaseDTO implements Serializable {
31 |
32 | private Long id;
33 |
34 | private List dictDetails;
35 |
36 | private String name;
37 |
38 | private String description;
39 | }
40 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictQueryCriteria.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.dto;
17 |
18 | import lombok.Data;
19 | import me.zhengjie.annotation.Query;
20 |
21 | /**
22 | * @author Zheng Jie
23 | * 公共查询类
24 | */
25 | @Data
26 | public class DictQueryCriteria {
27 |
28 | @Query(blurry = "name,description")
29 | private String blurry;
30 | }
31 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictSmallDto.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.dto;
17 |
18 | import lombok.Getter;
19 | import lombok.Setter;
20 | import java.io.Serializable;
21 |
22 | /**
23 | * @author Zheng Jie
24 | * @date 2019-04-10
25 | */
26 | @Getter
27 | @Setter
28 | public class DictSmallDto implements Serializable {
29 |
30 | private Long id;
31 | }
32 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/JobSmallDto.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.dto;
17 |
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 | import java.io.Serializable;
21 |
22 | /**
23 | * @author Zheng Jie
24 | * @date 2019-6-10 16:32:18
25 | */
26 | @Data
27 | @NoArgsConstructor
28 | public class JobSmallDto implements Serializable {
29 |
30 | private Long id;
31 |
32 | private String name;
33 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/RoleQueryCriteria.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.dto;
17 |
18 | import lombok.Data;
19 | import me.zhengjie.annotation.Query;
20 |
21 | import java.sql.Timestamp;
22 | import java.util.List;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * 公共查询类
27 | */
28 | @Data
29 | public class RoleQueryCriteria {
30 |
31 | @Query(blurry = "name,description")
32 | private String blurry;
33 |
34 | @Query(type = Query.Type.BETWEEN)
35 | private List createTime;
36 | }
37 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/RoleSmallDto.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.dto;
17 |
18 | import lombok.Data;
19 | import java.io.Serializable;
20 |
21 | /**
22 | * @author Zheng Jie
23 | * @date 2018-11-23
24 | */
25 | @Data
26 | public class RoleSmallDto implements Serializable {
27 |
28 | private Long id;
29 |
30 | private String name;
31 |
32 | private Integer level;
33 |
34 | private String dataScope;
35 | }
36 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DeptMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.Dept;
20 | import me.zhengjie.modules.system.service.dto.DeptDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-03-25
27 | */
28 | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface DeptMapper extends BaseMapper {
30 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DeptSmallMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.Dept;
20 | import me.zhengjie.modules.system.service.dto.DeptSmallDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-03-25
27 | */
28 | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface DeptSmallMapper extends BaseMapper {
30 |
31 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DictDetailMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.DictDetail;
20 | import me.zhengjie.modules.system.service.dto.DictDetailDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-04-10
27 | */
28 | @Mapper(componentModel = "spring", uses = {DictSmallMapper.class}, unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface DictDetailMapper extends BaseMapper {
30 |
31 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DictMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.Dict;
20 | import me.zhengjie.modules.system.service.dto.DictDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-04-10
27 | */
28 | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface DictMapper extends BaseMapper {
30 |
31 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DictSmallMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.Dict;
20 | import me.zhengjie.modules.system.service.dto.DictSmallDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-04-10
27 | */
28 | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface DictSmallMapper extends BaseMapper {
30 |
31 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/JobMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.Job;
20 | import me.zhengjie.modules.system.service.dto.JobDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-03-29
27 | */
28 | @Mapper(componentModel = "spring",uses = {DeptMapper.class},unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface JobMapper extends BaseMapper {
30 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/JobSmallMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.Job;
20 | import me.zhengjie.modules.system.service.dto.JobSmallDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-03-29
27 | */
28 | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface JobSmallMapper extends BaseMapper {
30 |
31 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/MenuMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.Menu;
20 | import me.zhengjie.modules.system.service.dto.MenuDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2018-12-17
27 | */
28 | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface MenuMapper extends BaseMapper {
30 | }
31 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/RoleMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.Role;
20 | import me.zhengjie.modules.system.service.dto.RoleDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2018-11-23
27 | */
28 | @Mapper(componentModel = "spring", uses = {MenuMapper.class, DeptMapper.class}, unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface RoleMapper extends BaseMapper {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/RoleSmallMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.Role;
20 | import me.zhengjie.modules.system.service.dto.RoleSmallDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-5-23
27 | */
28 | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface RoleSmallMapper extends BaseMapper {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/UserMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.modules.system.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.modules.system.domain.User;
20 | import me.zhengjie.modules.system.service.dto.UserDto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2018-11-23
27 | */
28 | @Mapper(componentModel = "spring",uses = {RoleMapper.class, DeptMapper.class, JobMapper.class},unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface UserMapper extends BaseMapper {
30 | }
31 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/resources/generator.properties:
--------------------------------------------------------------------------------
1 | #数据库类型转Java类型
2 | tinyint=Integer
3 | smallint=Integer
4 | mediumint=Integer
5 | int=Integer
6 | integer=Integer
7 |
8 | bigint=Long
9 |
10 | float=Float
11 |
12 | double=Double
13 |
14 | decimal=BigDecimal
15 |
16 | bit=Boolean
17 |
18 | char=String
19 | varchar=String
20 | tinytext=String
21 | text=String
22 | mediumtext=String
23 | longtext=String
24 |
25 | date=Timestamp
26 | datetime=Timestamp
27 | timestamp=Timestamp
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/resources/ip2region/ip2region.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1170159634/Mockexam-Server/12bb9bae87f20a919f175e56cbe23d70b9ff7414/background/eladmin-system/src/main/resources/ip2region/ip2region.db
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/resources/log4jdbc.log4j2.properties:
--------------------------------------------------------------------------------
1 | # If you use SLF4J. First, you need to tell log4jdbc-log4j2 that you want to use the SLF4J logger
2 | log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator
3 | log4jdbc.auto.load.popular.drivers=false
4 | log4jdbc.drivers=com.mysql.cj.jdbc.Driver
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/resources/mapper/MeWrongQuestionMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/resources/template/generator/admin/Mapper.ftl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package ${package}.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import ${package}.domain.${className};
20 | import ${package}.service.dto.${className}Dto;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @website https://el-admin.vip
26 | * @author ${author}
27 | * @date ${date}
28 | **/
29 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
30 | public interface ${className}Mapper extends BaseMapper<${className}Dto, ${className}> {
31 |
32 | }
--------------------------------------------------------------------------------
/background/eladmin-system/src/main/resources/template/generator/front/api.ftl:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | export function add(data) {
4 | return request({
5 | url: 'api/${changeClassName}',
6 | method: 'post',
7 | data
8 | })
9 | }
10 |
11 | export function del(ids) {
12 | return request({
13 | url: 'api/${changeClassName}/',
14 | method: 'delete',
15 | data: ids
16 | })
17 | }
18 |
19 | export function edit(data) {
20 | return request({
21 | url: 'api/${changeClassName}',
22 | method: 'put',
23 | data
24 | })
25 | }
26 |
27 | export default { add, edit, del }
28 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/test/java/me/zhengjie/test.java:
--------------------------------------------------------------------------------
1 | package me.zhengjie;
2 |
3 |
4 | import me.zhengjie.modules.mockexam.service.CrawlingService;
5 | import org.junit.Test;
6 | import org.junit.runner.RunWith;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.boot.test.context.SpringBootTest;
9 | import org.springframework.test.context.junit4.SpringRunner;
10 |
11 |
12 | @RunWith(SpringRunner.class)
13 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
14 | public class test {
15 |
16 | @Autowired
17 | private CrawlingService crawlingService;
18 |
19 | @Test
20 | public void contextLoads() {
21 | crawlingService.pic2Local();
22 | }
23 |
24 |
25 |
26 |
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/background/eladmin-system/src/test/java/me/zhengjie/testUtil.java:
--------------------------------------------------------------------------------
1 | package me.zhengjie;
2 |
3 | import cn.hutool.core.bean.BeanUtil;
4 |
5 | import java.util.ArrayList;
6 | import java.util.Collections;
7 | import java.util.HashMap;
8 | import java.util.List;
9 | import java.util.Map;
10 |
11 | /**
12 | * @author : Mingxuan_x
13 | * @version : 1.0
14 | * @Description:
15 | * @Telephone : 15135964789
16 | * @createDate : 2021/4/11 11:55
17 | * @updateUser : Mingxuan_x
18 | * @updateDate : 2021/4/11 11:55
19 | * @updateRemark : 修改内容
20 | **/
21 | public class testUtil {
22 | public static void main(String[] args) {
23 | ArrayList list = new ArrayList();
24 | for(int i=0;i<90000;i++)
25 | {
26 | list.add(1L);
27 | list.add(2L);
28 | list.add(3L);
29 | list.add(4L);
30 | list.add(5L);
31 | }
32 |
33 | Collections.shuffle(list);
34 | System.out.println(list.toString());
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/background/eladmin-tools/src/main/java/me/zhengjie/repository/AliPayRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.repository;
17 |
18 | import me.zhengjie.domain.AlipayConfig;
19 | import org.springframework.data.jpa.repository.JpaRepository;
20 |
21 | /**
22 | * @author Zheng Jie
23 | * @date 2018-12-31
24 | */
25 | public interface AliPayRepository extends JpaRepository {
26 | }
27 |
--------------------------------------------------------------------------------
/background/eladmin-tools/src/main/java/me/zhengjie/repository/EmailRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.repository;
17 |
18 | import me.zhengjie.domain.EmailConfig;
19 | import org.springframework.data.jpa.repository.JpaRepository;
20 |
21 | /**
22 | * @author Zheng Jie
23 | * @date 2018-12-26
24 | */
25 | public interface EmailRepository extends JpaRepository {
26 | }
27 |
--------------------------------------------------------------------------------
/background/eladmin-tools/src/main/java/me/zhengjie/repository/LocalStorageRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.repository;
17 |
18 | import me.zhengjie.domain.LocalStorage;
19 | import org.springframework.data.jpa.repository.JpaRepository;
20 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
21 |
22 | /**
23 | * @author Zheng Jie
24 | * @date 2019-09-05
25 | */
26 | public interface LocalStorageRepository extends JpaRepository, JpaSpecificationExecutor {
27 | }
--------------------------------------------------------------------------------
/background/eladmin-tools/src/main/java/me/zhengjie/repository/QiniuContentRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.repository;
17 |
18 | import me.zhengjie.domain.QiniuContent;
19 | import org.springframework.data.jpa.repository.JpaRepository;
20 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
21 |
22 | /**
23 | * @author Zheng Jie
24 | * @date 2018-12-31
25 | */
26 | public interface QiniuContentRepository extends JpaRepository, JpaSpecificationExecutor {
27 |
28 | /**
29 | * 根据key查询
30 | * @param key 文件名
31 | * @return QiniuContent
32 | */
33 | QiniuContent findByKey(String key);
34 | }
35 |
--------------------------------------------------------------------------------
/background/eladmin-tools/src/main/java/me/zhengjie/service/dto/LocalStorageDto.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.service.dto;
17 |
18 | import lombok.Getter;
19 | import lombok.Setter;
20 | import me.zhengjie.base.BaseDTO;
21 | import java.io.Serializable;
22 |
23 | /**
24 | * @author Zheng Jie
25 | * @date 2019-09-05
26 | */
27 | @Getter
28 | @Setter
29 | public class LocalStorageDto extends BaseDTO implements Serializable {
30 |
31 | private Long id;
32 |
33 | private String realName;
34 |
35 | private String name;
36 |
37 | private String suffix;
38 |
39 | private String type;
40 |
41 | private String size;
42 | }
--------------------------------------------------------------------------------
/background/eladmin-tools/src/main/java/me/zhengjie/service/dto/LocalStorageQueryCriteria.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.service.dto;
17 |
18 | import lombok.Data;
19 | import java.sql.Timestamp;
20 | import java.util.List;
21 |
22 | import me.zhengjie.annotation.Query;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-09-05
27 | */
28 | @Data
29 | public class LocalStorageQueryCriteria{
30 |
31 | @Query(blurry = "name,suffix,type,createBy,size")
32 | private String blurry;
33 |
34 | @Query(type = Query.Type.BETWEEN)
35 | private List createTime;
36 | }
--------------------------------------------------------------------------------
/background/eladmin-tools/src/main/java/me/zhengjie/service/dto/PictureQueryCriteria.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.service.dto;
17 |
18 | import lombok.Data;
19 | import me.zhengjie.annotation.Query;
20 | import java.sql.Timestamp;
21 | import java.util.List;
22 |
23 | /**
24 | * sm.ms图床
25 | *
26 | * @author Zheng Jie
27 | * @date 2019-6-4 09:52:09
28 | */
29 | @Data
30 | public class PictureQueryCriteria{
31 |
32 | @Query(type = Query.Type.INNER_LIKE)
33 | private String filename;
34 |
35 | @Query(type = Query.Type.INNER_LIKE)
36 | private String username;
37 |
38 | @Query(type = Query.Type.BETWEEN)
39 | private List createTime;
40 | }
41 |
--------------------------------------------------------------------------------
/background/eladmin-tools/src/main/java/me/zhengjie/service/dto/QiniuQueryCriteria.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.service.dto;
17 |
18 | import lombok.Data;
19 | import me.zhengjie.annotation.Query;
20 |
21 | import java.sql.Timestamp;
22 | import java.util.List;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-6-4 09:54:37
27 | */
28 | @Data
29 | public class QiniuQueryCriteria{
30 |
31 | @Query(type = Query.Type.INNER_LIKE)
32 | private String key;
33 |
34 | @Query(type = Query.Type.BETWEEN)
35 | private List createTime;
36 | }
37 |
--------------------------------------------------------------------------------
/background/eladmin-tools/src/main/java/me/zhengjie/service/mapstruct/LocalStorageMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2020 Zheng Jie
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.zhengjie.service.mapstruct;
17 |
18 | import me.zhengjie.base.BaseMapper;
19 | import me.zhengjie.service.dto.LocalStorageDto;
20 | import me.zhengjie.domain.LocalStorage;
21 | import org.mapstruct.Mapper;
22 | import org.mapstruct.ReportingPolicy;
23 |
24 | /**
25 | * @author Zheng Jie
26 | * @date 2019-09-05
27 | */
28 | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
29 | public interface LocalStorageMapper extends BaseMapper {
30 |
31 | }
--------------------------------------------------------------------------------
/background/src/main/resources/mapper/MeUserBehavior/MeUserBehaviorMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/background/src/main/resources/mapper/meFavorites/MeFavoritesMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/background/src/main/resources/mapper/meWrongQuestion/MeWrongQuestionMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/background/src/main/resources/mapper/question/MeQuestionMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/background/src/main/resources/mapper/quetsion/MeQuestionMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/front/.editorconfig:
--------------------------------------------------------------------------------
1 | # https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | end_of_line = lf
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
12 | [*.md]
13 | insert_final_newline = false
14 | trim_trailing_whitespace = false
15 |
--------------------------------------------------------------------------------
/front/.env.development:
--------------------------------------------------------------------------------
1 | ENV = 'development'
2 |
3 | # 接口地址
4 | VUE_APP_BASE_API = 'http://localhost:8000'
5 | VUE_APP_WS_API = 'ws://localhost:8000'
6 |
7 | # 是否启用 babel-plugin-dynamic-import-node插件
8 | VUE_CLI_BABEL_TRANSPILE_MODULES = true
9 |
--------------------------------------------------------------------------------
/front/.env.production:
--------------------------------------------------------------------------------
1 | ENV = 'production'
2 |
3 | # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
4 | # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
5 | VUE_APP_BASE_API = 'http://yourServerIp:8000'
6 | # 如果接口是 http 形式, wss 需要改为 ws
7 | VUE_APP_WS_API = 'ws://yourServerIp:8000'
8 |
--------------------------------------------------------------------------------
/front/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | src/assets
3 | public
4 | dist
5 |
--------------------------------------------------------------------------------
/front/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | **/*.log
8 |
9 | tests/**/coverage/
10 | tests/e2e/reports
11 | selenium-debug.log
12 |
13 | # Editor directories and files
14 | .idea
15 | .vscode
16 | *.suo
17 | *.ntvs*
18 | *.njsproj
19 | *.sln
20 | *.local
21 |
22 | package-lock.json
23 | yarn.lock
24 |
--------------------------------------------------------------------------------
/front/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js: 10
3 | script: npm run test
4 | notifications:
5 | email: false
6 |
--------------------------------------------------------------------------------
/front/README.md:
--------------------------------------------------------------------------------
1 | # 1.启动
2 |
3 | **(1)npm install** 或者**cnpm i**
4 |
5 | **(2)npm run dev**
6 |
7 |
--------------------------------------------------------------------------------
/front/babel.config.js:
--------------------------------------------------------------------------------
1 | const plugins = ['@vue/babel-plugin-transform-vue-jsx']
2 | // 生产环境移除console
3 | if (process.env.NODE_ENV === 'production') {
4 | plugins.push('transform-remove-console')
5 | }
6 | module.exports = {
7 | plugins: plugins,
8 | presets: [
9 | '@vue/app'
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/front/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
3 | transform: {
4 | '^.+\\.vue$': 'vue-jest',
5 | '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
6 | 'jest-transform-stub',
7 | '^.+\\.jsx?$': 'babel-jest'
8 | },
9 | moduleNameMapper: {
10 | '^@/(.*)$': '/src/$1'
11 | },
12 | snapshotSerializers: ['jest-serializer-vue'],
13 | testMatch: [
14 | '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
15 | ],
16 | collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
17 | coverageDirectory: '/tests/unit/coverage',
18 | // 'collectCoverage': true,
19 | 'coverageReporters': [
20 | 'lcov',
21 | 'text-summary'
22 | ],
23 | testURL: 'http://localhost/'
24 | }
25 |
--------------------------------------------------------------------------------
/front/plopfile.js:
--------------------------------------------------------------------------------
1 | const viewGenerator = require('./plop-templates/view/prompt')
2 | const componentGenerator = require('./plop-templates/component/prompt')
3 |
4 | module.exports = function(plop) {
5 | plop.setGenerator('view', viewGenerator)
6 | plop.setGenerator('component', componentGenerator)
7 | }
8 |
--------------------------------------------------------------------------------
/front/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/front/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1170159634/Mockexam-Server/12bb9bae87f20a919f175e56cbe23d70b9ff7414/front/public/favicon.ico
--------------------------------------------------------------------------------
/front/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | <%= webpackConfig.name %>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/front/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |