提交 7c674f77 编写于 作者: zhouweidong's avatar zhouweidong

init

上级 f57d1621
<#ibiztemplate>
TARGET=PSDATAENTITY
</#ibiztemplate>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>${pub.getCodeName()?lower_case}-srv</artifactId>
<name>${pub.getCodeName()?lower_case}-srv</name>
<packaging>jar</packaging>
<parent>
<artifactId>${sys.codeName}</artifactId>
<groupId>${pub.getPKGCodeName()}</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
</project>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSDATAENTITY
</#ibiztemplate>
package ${pub.getPKGCodeName()}.${item.getPSSystemModule().codeName?lower_case}.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.sql.Timestamp;
/**
* 实体[${item.codeName}] 数据对象
*/
@TableName(value = "${item.getTableName()}")
@Data
public class ${item.codeName}{
<#list item.getPSDEFields() as defield>
<#if defield.isKeyDEField()>
@TableId(value= "${defield.getName()?lower_case}",type=IdType.UUID)//指定主键生成策略
</#if>
private ${srfjavatype(defield.stdDataType)} ${defield.codeName?lower_case};
</#list>
}
<#ibiztemplate>
TARGET=PSDATAENTITY
</#ibiztemplate>
package ${pub.getPKGCodeName()}.${item.getPSSystemModule().codeName?lower_case}.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ${pub.getPKGCodeName()}.${item.getPSSystemModule().codeName?lower_case}.domain.${item.getCodeName()};
public interface ${item.getCodeName()}Mapper extends BaseMapper<${item.getCodeName()}>{
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
package ${pub.getPKGCodeName()};
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.SpringApplication;
@SpringBootApplication
@MapperScan("${pub.getPKGCodeName()}.*.mapper")
public class ${pub.getCodeName()?lower_case}Main{
public static void main(String[] args) {
SpringApplication.run(${pub.getCodeName()?lower_case}Main.class, args);
}
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
<#assign dbinst = sysrun.getPSDBDevInst()>
spring:
datasource:
username: ${dbinst.getUserName()}
password: '${dbinst.getPassword()}'
url: jdbc:h2:mem:${dbinst.getUserName()};
driver-class-name: org.h2.Driver
logging:
level:
${pub.getPKGCodeName()}: debug
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
import ${pub.getPKGCodeName()}.quickstart.domain.QJD;
import ${pub.getPKGCodeName()}.quickstart.mapper.QJDMapper;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;
import ${pub.getPKGCodeName()}.jctaskMain;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = jctaskMain.class)
public class ApplicationTest {
@Autowired
private DataSource dataSource;
@Autowired
private QJDMapper userMapper;
@Before
public void beforeTest() {
try {
Connection connection = dataSource.getConnection();
//建表SQL
String qjdSql="create table IF NOT EXISTS QJD\n" +
"(\n" +
" qjdid VARCHAR2(100) not null,\n" +
" createman VARCHAR2(60),\n" +
" updateman VARCHAR2(60),\n" +
" createdate DATE,\n" +
" qjdname VARCHAR2(200),\n" +
" updatedate DATE\n" +
")";
connection.createStatement().execute(qjdSql);
connection.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
@Test
public void testMain() {
QJD qjd = new QJD();
qjd.setQjdid("1");
qjd.setQjdname("请假单1");
userMapper.insert(qjd);
}
}
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
package cn.ibizhub.demo;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World ibizSys8888!" );
}
}
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>${sys.codeName}</artifactId>
<groupId>${pub.getPKGCodeName()}</groupId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>${pub.getCodeName()?lower_case}-srv</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
</parent>
<properties>
<mybatis-plus.version>3.0.6</mybatis-plus.version>
<junit.version>4.12</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${r'${mybatis-plus.version}'}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${r'${junit.version}'}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册