Skip to content

Commit 80bfaa9

Browse files
committed
增加数据字典功能
1 parent b668319 commit 80bfaa9

File tree

36 files changed

+2317
-0
lines changed

36 files changed

+2317
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2016 http://www.hswebframework.org
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
~
17+
-->
18+
19+
<project xmlns="http://maven.apache.org/POM/4.0.0"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22+
<parent>
23+
<artifactId>hsweb-system-dictionary</artifactId>
24+
<groupId>org.hswebframework.web</groupId>
25+
<version>3.0-SNAPSHOT</version>
26+
</parent>
27+
<modelVersion>4.0.0</modelVersion>
28+
29+
<artifactId>hsweb-system-dictionary-controller</artifactId>
30+
31+
<dependencies>
32+
<dependency>
33+
<groupId>javax.servlet</groupId>
34+
<artifactId>servlet-api</artifactId>
35+
<version>2.5</version>
36+
<optional>true</optional>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.hswebframework.web</groupId>
40+
<artifactId>hsweb-system-dictionary-service-api</artifactId>
41+
<version>${project.version}</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.hswebframework.web</groupId>
45+
<artifactId>hsweb-commons-controller</artifactId>
46+
<version>${project.version}</version>
47+
</dependency>
48+
</dependencies>
49+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright 2016 http://www.hswebframework.org
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+
*/
17+
18+
package org.hswebframework.web.controller.dictionary;
19+
20+
import org.hswebframework.web.authorization.annotation.Authorize;
21+
import org.hswebframework.web.commons.entity.param.QueryParamEntity;
22+
import org.hswebframework.web.controller.GenericEntityController;
23+
import org.hswebframework.web.entity.dictionary.DictionaryEntity;
24+
import org.hswebframework.web.entity.dictionary.DictionaryItemEntity;
25+
import org.hswebframework.web.logging.AccessLogger;
26+
import org.hswebframework.web.service.dictionary.DictionaryService;
27+
import org.springframework.beans.factory.annotation.Autowired;
28+
import org.springframework.web.bind.annotation.RequestMapping;
29+
import org.springframework.web.bind.annotation.RestController;
30+
31+
/**
32+
* 数据字典
33+
*
34+
* @author hsweb-generator-online
35+
*/
36+
@RestController
37+
@RequestMapping("${hsweb.web.mappings.dictionary:dictionary}")
38+
@Authorize(permission = "dictionary")
39+
@AccessLogger("数据字典")
40+
public class DictionaryController implements GenericEntityController<DictionaryEntity<DictionaryItemEntity>, String, QueryParamEntity, DictionaryEntity> {
41+
42+
private DictionaryService dictionaryService;
43+
44+
@Override
45+
public DictionaryEntity<DictionaryItemEntity> modelToEntity(DictionaryEntity model, DictionaryEntity entity) {
46+
return model;
47+
}
48+
49+
@Autowired
50+
public void setDictionaryService(DictionaryService dictionaryService) {
51+
this.dictionaryService = dictionaryService;
52+
}
53+
54+
@Override
55+
public DictionaryService getService() {
56+
return dictionaryService;
57+
}
58+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright 2016 http://www.hswebframework.org
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+
*/
17+
18+
package org.hswebframework.web.controller.dictionary;
19+
20+
import org.hswebframework.web.authorization.annotation.Authorize;
21+
import org.hswebframework.web.commons.entity.param.QueryParamEntity;
22+
import org.hswebframework.web.controller.GenericEntityController;
23+
import org.hswebframework.web.entity.dictionary.DictionaryParserEntity;
24+
import org.hswebframework.web.logging.AccessLogger;
25+
import org.hswebframework.web.service.dictionary.DictionaryParserService;
26+
import org.springframework.beans.factory.annotation.Autowired;
27+
import org.springframework.web.bind.annotation.RequestMapping;
28+
import org.springframework.web.bind.annotation.RestController;
29+
30+
/**
31+
* 数据字典解析配置
32+
*
33+
* @author hsweb-generator-online
34+
*/
35+
@RestController
36+
@RequestMapping("${hsweb.web.mappings.dictionary-parser:dictionary-parser}")
37+
@Authorize(permission = "dictionary-parser")
38+
@AccessLogger("数据字典解析配置")
39+
public class DictionaryParserController implements GenericEntityController<DictionaryParserEntity, String, QueryParamEntity, DictionaryParserEntity> {
40+
41+
private DictionaryParserService dictionaryParserService;
42+
43+
@Override
44+
public DictionaryParserEntity modelToEntity(DictionaryParserEntity model, DictionaryParserEntity entity) {
45+
return model;
46+
}
47+
48+
@Autowired
49+
public void setDictionaryParserService(DictionaryParserService dictionaryParserService) {
50+
this.dictionaryParserService = dictionaryParserService;
51+
}
52+
53+
@Override
54+
public DictionaryParserService getService() {
55+
return dictionaryParserService;
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~
4+
~ Copyright 2016 http://www.hswebframework.org
5+
~
6+
~ Licensed under the Apache License, Version 2.0 (the "License");
7+
~ you may not use this file except in compliance with the License.
8+
~ You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing, software
13+
~ distributed under the License is distributed on an "AS IS" BASIS,
14+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ See the License for the specific language governing permissions and
16+
~ limitations under the License.
17+
~
18+
-->
19+
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<parent>
24+
<artifactId>hsweb-system-dictionary-dao</artifactId>
25+
<groupId>org.hswebframework.web</groupId>
26+
<version>3.0-SNAPSHOT</version>
27+
</parent>
28+
<modelVersion>4.0.0</modelVersion>
29+
30+
<artifactId>hsweb-system-dictionary-dao-api</artifactId>
31+
32+
<dependencies>
33+
<dependency>
34+
<groupId>org.hswebframework.web</groupId>
35+
<artifactId>hsweb-system-dictionary-entity</artifactId>
36+
<version>${project.version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.hswebframework.web</groupId>
40+
<artifactId>hsweb-commons-dao-api</artifactId>
41+
<version>${project.version}</version>
42+
</dependency>
43+
</dependencies>
44+
45+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2016 http://www.hswebframework.org
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+
*/
17+
package org.hswebframework.web.dao.dictionary;
18+
19+
import org.hswebframework.web.dao.CrudDao;
20+
import org.hswebframework.web.entity.dictionary.DictionaryEntity;
21+
import org.hswebframework.web.entity.dictionary.DictionaryItemEntity;
22+
23+
/**
24+
* 数据字典 DAO接口
25+
* @author hsweb-generator-online
26+
*/
27+
public interface DictionaryDao extends CrudDao<DictionaryEntity<DictionaryItemEntity>,String> {
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2016 http://www.hswebframework.org
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+
*/
17+
package org.hswebframework.web.dao.dictionary;
18+
19+
import org.hswebframework.web.dao.CrudDao;
20+
import org.hswebframework.web.entity.dictionary.DictionaryItemEntity;
21+
22+
/**
23+
* 数据字典选项 DAO接口
24+
* @author hsweb-generator-online
25+
*/
26+
public interface DictionaryItemDao extends CrudDao<DictionaryItemEntity,String> {
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2016 http://www.hswebframework.org
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+
*/
17+
package org.hswebframework.web.dao.dictionary;
18+
19+
import org.hswebframework.web.dao.CrudDao;
20+
import org.hswebframework.web.entity.dictionary.DictionaryParserEntity;
21+
22+
/**
23+
* 数据字典解析配置 DAO接口
24+
* @author hsweb-generator-online
25+
*/
26+
public interface DictionaryParserDao extends CrudDao<DictionaryParserEntity,String> {
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~
4+
~ Copyright 2016 http://www.hswebframework.org
5+
~
6+
~ Licensed under the Apache License, Version 2.0 (the "License");
7+
~ you may not use this file except in compliance with the License.
8+
~ You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing, software
13+
~ distributed under the License is distributed on an "AS IS" BASIS,
14+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ See the License for the specific language governing permissions and
16+
~ limitations under the License.
17+
~
18+
-->
19+
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<parent>
24+
<artifactId>hsweb-system-dictionary-dao</artifactId>
25+
<groupId>org.hswebframework.web</groupId>
26+
<version>3.0-SNAPSHOT</version>
27+
</parent>
28+
<modelVersion>4.0.0</modelVersion>
29+
30+
<artifactId>hsweb-system-dictionary-dao-mybatis</artifactId>
31+
32+
<dependencies>
33+
<dependency>
34+
<groupId>org.hswebframework.web</groupId>
35+
<artifactId>hsweb-system-dictionary-dao-api</artifactId>
36+
<version>${project.version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.hswebframework.web</groupId>
40+
<artifactId>hsweb-commons-dao-mybatis</artifactId>
41+
<version>${project.version}</version>
42+
</dependency>
43+
</dependencies>
44+
</project>

0 commit comments

Comments
 (0)