forked from hs-web/hsweb-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:/hs-web/hsweb-framework
- Loading branch information
Showing
25 changed files
with
749 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
hsweb-system/hsweb-system-template/hsweb-system-template-controller/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>hsweb-system-template</artifactId> | ||
<groupId>org.hswebframework.web</groupId> | ||
<version>3.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>hsweb-system-template-controller</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>servlet-api</artifactId> | ||
<version>2.5</version> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hswebframework.web</groupId> | ||
<artifactId>hsweb-system-template-service-api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hswebframework.web</groupId> | ||
<artifactId>hsweb-commons-controller</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
35 changes: 35 additions & 0 deletions
35
...ntroller/src/main/java/org/hswebframework/web/controller/tempalte/TempalteController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.hswebframework.web.controller.tempalte; | ||
|
||
import org.hswebframework.web.authorization.annotation.Authorize; | ||
import org.hswebframework.web.commons.entity.param.QueryParamEntity; | ||
import org.hswebframework.web.controller.SimpleGenericEntityController; | ||
import org.hswebframework.web.entity.tempalte.TemplateEntity; | ||
import org.hswebframework.web.logging.AccessLogger; | ||
import org.hswebframework.web.service.tempalte.TemplateService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
/** | ||
* 模板 | ||
* | ||
* @author hsweb-generator-online | ||
*/ | ||
@RestController | ||
@RequestMapping("${hsweb.web.mappings.template:template}") | ||
@Authorize(permission = "template") | ||
@AccessLogger("模板") | ||
public class TempalteController implements SimpleGenericEntityController<TemplateEntity, String, QueryParamEntity> { | ||
|
||
private TemplateService templateService; | ||
|
||
@Autowired | ||
public void setTemplateService(TemplateService templateService) { | ||
this.templateService = templateService; | ||
} | ||
|
||
@Override | ||
public TemplateService getService() { | ||
return templateService; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...tem/hsweb-system-template/hsweb-system-template-dao/hsweb-system-template-dao-api/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>hsweb-system-template-dao</artifactId> | ||
<groupId>org.hswebframework.web</groupId> | ||
<version>3.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>hsweb-system-template-dao-api</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.hswebframework.web</groupId> | ||
<artifactId>hsweb-system-template-entity</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hswebframework.web</groupId> | ||
<artifactId>hsweb-commons-dao-api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
11 changes: 11 additions & 0 deletions
11
...ystem-template-dao-api/src/main/java/org/hswebframework/web/dao/tempalte/TemplateDao.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.hswebframework.web.dao.tempalte; | ||
|
||
import org.hswebframework.web.dao.CrudDao; | ||
import org.hswebframework.web.entity.tempalte.TemplateEntity; | ||
|
||
/** | ||
* 模板 DAO接口 | ||
* @author hsweb-generator-online | ||
*/ | ||
public interface TemplateDao extends CrudDao<TemplateEntity,String> { | ||
} |
26 changes: 26 additions & 0 deletions
26
...hsweb-system-template/hsweb-system-template-dao/hsweb-system-template-dao-mybatis/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>hsweb-system-template-dao</artifactId> | ||
<groupId>org.hswebframework.web</groupId> | ||
<version>3.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>hsweb-system-template-dao-mybatis</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.hswebframework.web</groupId> | ||
<artifactId>hsweb-system-template-dao-api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hswebframework.web</groupId> | ||
<artifactId>hsweb-commons-dao-mybatis</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
50 changes: 50 additions & 0 deletions
50
...src/main/resources/org/hswebframework/web/dao/mybatis/mappers/tempalte/TempalteMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE mapper | ||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
"http://www.mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<mapper namespace="org.hswebframework.web.dao.tempalte.TemplateDao"> | ||
<resultMap id="TemplateResultMap" type="org.hswebframework.web.entity.tempalte.TemplateEntity"> | ||
<id property="id" column="u_id" javaType="string" jdbcType="VARCHAR"/> | ||
<result property="name" column="name" javaType="String" jdbcType="VARCHAR"/> | ||
<result property="type" column="type" javaType="String" jdbcType="VARCHAR"/> | ||
<result property="template" column="template" javaType="String" jdbcType="CLOB"/> | ||
<result property="config" column="config" javaType="String" jdbcType="CLOB"/> | ||
<result property="version" column="version" javaType="Long" jdbcType="DECIMAL"/> | ||
<result property="classified" column="classified" javaType="String" jdbcType="VARCHAR"/> | ||
</resultMap> | ||
|
||
<!--用于动态生成sql所需的配置--> | ||
<sql id="config"> | ||
<bind name="resultMapId" value="'TemplateResultMap'"/> | ||
<bind name="tableName" value="'s_template'"/> | ||
</sql> | ||
|
||
<insert id="insert" parameterType="org.hswebframework.web.entity.tempalte.TemplateEntity"> | ||
<include refid="config"/> | ||
<include refid="BasicMapper.buildInsertSql"/> | ||
</insert> | ||
|
||
<delete id="deleteByPk" parameterType="String"> | ||
delete from s_template where u_id =#{id} | ||
</delete> | ||
|
||
<delete id="delete" parameterType="org.hswebframework.web.commons.entity.Entity"> | ||
<include refid="config"/> | ||
<include refid="BasicMapper.buildDeleteSql"/> | ||
</delete> | ||
|
||
<update id="update" parameterType="org.hswebframework.web.commons.entity.Entity"> | ||
<include refid="config"/> | ||
<include refid="BasicMapper.buildUpdateSql"/> | ||
</update> | ||
|
||
<select id="query" parameterType="org.hswebframework.web.commons.entity.Entity" resultMap="TemplateResultMap"> | ||
<include refid="config"/> | ||
<include refid="BasicMapper.buildSelectSql"/> | ||
</select> | ||
|
||
<select id="count" parameterType="org.hswebframework.web.commons.entity.Entity" resultType="int"> | ||
<include refid="config"/> | ||
<include refid="BasicMapper.buildTotalSql"/> | ||
</select> | ||
</mapper> |
18 changes: 18 additions & 0 deletions
18
hsweb-system/hsweb-system-template/hsweb-system-template-dao/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>hsweb-system-template</artifactId> | ||
<groupId>org.hswebframework.web</groupId> | ||
<version>3.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>hsweb-system-template-dao</artifactId> | ||
<packaging>pom</packaging> | ||
<modules> | ||
<module>hsweb-system-template-dao-api</module> | ||
<module>hsweb-system-template-dao-mybatis</module> | ||
</modules> | ||
</project> |
22 changes: 22 additions & 0 deletions
22
hsweb-system/hsweb-system-template/hsweb-system-template-entity/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>hsweb-system-template</artifactId> | ||
<groupId>org.hswebframework.web</groupId> | ||
<version>3.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>hsweb-system-template-entity</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.hswebframework.web</groupId> | ||
<artifactId>hsweb-commons-entity</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
Oops, something went wrong.