提交 56e5efc8 编写于 作者: O OSWorks

no commit message

上级 0ab23901
<?xml version="1.0" encoding="UTF-8"?>
<configurations desc="参数配置文件">
<!-- 应用系统全局标识键 -->
<config key="app_key" value="aosuite" />
</configurations>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd"
default-lazy-init="true">
<description>系统全局上下文环境</description>
<!-- 加载属性配置文件 -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:aos.properties</value>
</list>
</property>
</bean>
<!-- Spring服务组件扫描(排除@Controller相关组件) -->
<!-- 提醒:请将com.corp.project修改为您的真实项目路径 -->
<context:component-scan base-package="aos;com.corp.project" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Service" />
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
<context:exclude-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice" />
</context:component-scan>
<!-- 平台缺省 JDBC 数据源 -->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 基本属性 url、user、password -->
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<!-- 配置初始化大小、最小、最大 -->
<property name="initialSize" value="1" />
<property name="minIdle" value="1" />
<property name="maxActive" value="50" />
<!-- 配置获取连接等待超时的时间 -->
<property name="maxWait" value="60000" />
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name="minEvictableIdleTimeMillis" value="300000" />
<property name="validationQuery" value="SELECT 'x'" />
<property name="testWhileIdle" value="true" />
<property name="testOnBorrow" value="false" />
<property name="testOnReturn" value="false" />
<!-- 打开PSCache,并且指定每个连接上PSCache的大小 ORACLE可配置为true -->
<property name="poolPreparedStatements" value="false" />
<property name="maxPoolPreparedStatementPerConnectionSize" value="20" />
<!-- 配置监控统计拦截的filters -->
<property name="filters" value="stat" />
</bean>
<!-- 平台缺省使用JDBC事务管理器 -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<!-- 注解驱动的声明式事务管理 -->
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
<!-- 平台缺省数据源 SqlSessionFactory配置 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<!-- 扫描SQL映射文件中使用到的持久化对象(PO、VO等) -->
<!-- 提醒:请将com.corp.project修改为您的真实项目路径 -->
<property name="typeAliasesPackage" value="aos;com.corp.project" />
<!-- 扫描SQL映射文件 -->
<property name="mapperLocations" value="classpath*:**/*Dao.xml" />
<property name="configLocation" value="classpath:aos.sqlmap.xml" />
</bean>
<!-- 扫描数据访问对象(*Dao对象) -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<!-- 提醒:请将com.corp.project修改为您的真实项目路径 -->
<property name="basePackage" value="aos;com.corp.project" />
<property name="annotationClass" value="aos.framework.core.annotation.Dao" />
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
</bean>
<!-- 平台缺省数据源的SQL通用访问接口 -->
<bean id="sqlDao" class="aos.framework.core.dao.SqlDao">
<property name="sqlSessionFactory" ref="sqlSessionFactory" />
</bean>
</beans>
\ No newline at end of file
#============ Redis Configuration Begin ==========#
redis_host=127.0.0.1
redis_port=6379
redis_pwd=
redis_maxTotal=200
redis_maxIdle=50
redis_minIdle=10
redis_maxWaitMillis=10000
#============= Redis Configuration End ===========#
#========== DataSource Configuration Begin =========#
#==MySQL Connection
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://127.0.0.1:3306/aosuite?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true
jdbc.username=root
jdbc.password=root
jdbc.vsql=SELECT 1
#==Oracle Connection
#jdbc.driver=oracle.jdbc.OracleDriver
#jdbc.url=jdbc:oracle:thin:@localhost:1521:orcl
#jdbc.username=aos
#jdbc.password=aos
#jdbc.vsql=SELECT 1 FROM DUAL
#==PostgreSQL Connection
#jdbc.driver=org.postgresql.Driver
#jdbc.url=jdbc:postgresql://localhost:5432/aos
#jdbc.username=postgres
#jdbc.password=111111
#jdbc.vsql=SELECT 1
#=========== DataSource Configuration End =========#
#============= Logback Configuration Begin ==========#
pattern=%d{yyyy-MM-dd HH:mm:ss} %p [Class:%C{1}->Thread:%t] %m %n
dao=DEBUG
aos=DEBUG
aos.framework.web.filter.HttpFilter=DEBUG
aos.framework.web.router.HttpRouterController=DEBUG
#============= Logback Configuration End ===========#
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
PUBLIC "-//ibatis.apache.org//DTD Config 3.0//EN"
"http://ibatis.apache.org/dtd/ibatis-3-config.dtd">
<!-- MyBatis数据持久层配置文件 -->
<configuration>
<!-- 参数设置 -->
<settings>
<!-- 禁用二级缓存 -->
<setting name="cacheEnabled" value="false" />
<!-- 配置一级缓存 可选值:STATEMENT|SESSION。
STATEMENT:相当于禁用了SqlSession级的一级缓存。
SESSION:则启用了一级缓存,这时如果要针对某个SQL设置的话也可以在SQL上面配置flushCache="true"属性。(SQL的userCache属性设置的是二级缓存。)
建议:强计算型系统(如金融、保险、财务、证券、税务、电商等)都配置为STATEMENT。只有这里设置为STATEMENT,事务隔离级别的配置(@Transactional(isolation=Isolation.READ_COMMITTED))才会按照你的预期工作。
比如:想把mysql的缺省REPEATABLE_READ改为READ_COMMITTED。
-->
<setting name="localCacheScope" value="STATEMENT" />
<setting name="logImpl" value="SLF4J" />
<setting name="logPrefix" value="dao."/>
</settings>
<!-- 通用别名设置 -->
<typeAliases>
<typeAlias type="aos.framework.core.typewrap.impl.HashDto" alias="Dto" />
</typeAliases>
<!-- 插件 -->
<plugins>
<!-- StatementHandler插件 -->
<plugin interceptor="aos.framework.core.dao.plugin.StatementHandlerPlugin">
<property name="sqlid" value=".*Page" />
</plugin>
<!-- ResultSetHandler插件 -->
<plugin interceptor="aos.framework.core.dao.plugin.ResultSetHandlerPlugin" />
</plugins>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"
default-lazy-init="true">
<description>Spring WebMVC 配置</description>
<!-- 扫描@Controller组件 -->
<!-- 提醒:请将com.corp.project修改为您的真实项目路径 -->
<context:component-scan base-package="aos;com.corp.project"
use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
<context:include-filter type="annotation"
expression="org.springframework.web.bind.annotation.ControllerAdvice" />
</context:component-scan>
<!-- MVC注解驱动配置 -->
<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager">
<mvc:message-converters register-defaults="true">
<!-- 设定StringHttpMessageConverter的默认编码 -->
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<constructor-arg value="UTF-8" />
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
<!-- 支持文件上传 -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" >
<property name="defaultEncoding" value="UTF-8" />
<!--文件上传最大值 单位: byte。缺省设置100兆。-->
<property name="maxUploadSize" value="104857600"/>
</bean>
<!-- content-negotiation-manager配置,mvc:annotation-driven引用 -->
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean" />
<!-- 将无法mapping到Controller的path以及静态资源的Path交给default处理 -->
<mvc:default-servlet-handler />
<!-- jsp视图解析器 -->
<bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
</bean>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- demo_account[demo_account]SQL自动映射 -->
<!-- 注意:此文件由AOS平台自动生成-禁止手工修改 2017-06-04 01:32:55 -->
<mapper namespace="aos.demo.dao.DemoAccountDao">
<!-- 插入一个数据持久化对象(插入字段为传入PO实体的非空属性) -->
<insert id="insert" parameterType="DemoAccountPO">
INSERT INTO demo_account (
<if test="name != null and name != ''">
name, <!-- 姓名 -->
</if>
<if test="card_id != null and card_id != ''">
card_id, <!-- 卡号 -->
</if>
<if test="card_type != null and card_type != ''">
card_type, <!-- 卡类型 -->
</if>
<if test="balance != null">
balance, <!-- 可用余额 -->
</if>
<if test="credit_line != null">
credit_line, <!-- 信用额度 -->
</if>
<if test="org_id != null and org_id != ''">
org_id, <!-- 所属银行机构ID -->
</if>
<if test="id_no != null and id_no != ''">
id_no, <!-- 身份证号 -->
</if>
<if test="sex != null and sex != ''">
sex, <!-- 性别 -->
</if>
<if test="birthday != null">
birthday, <!-- 生日 -->
</if>
<if test="age != null">
age, <!-- 年龄 -->
</if>
<if test="address != null and address != ''">
address, <!-- 地址 -->
</if>
<if test="create_time != null and create_time != ''">
create_time, <!-- 创建时间 -->
</if>
<if test="create_user_id != null and create_user_id != ''">
create_user_id, <!-- 创建人ID -->
</if>
<if test="id != null">
id <!-- 流水号 -->
</if>
)VALUES(
<if test="name != null and name != ''">
#{name, jdbcType=VARCHAR}, <!-- 姓名 -->
</if>
<if test="card_id != null and card_id != ''">
#{card_id, jdbcType=VARCHAR}, <!-- 卡号 -->
</if>
<if test="card_type != null and card_type != ''">
#{card_type, jdbcType=VARCHAR}, <!-- 卡类型 -->
</if>
<if test="balance != null">
#{balance, jdbcType=NUMERIC}, <!-- 可用余额 -->
</if>
<if test="credit_line != null">
#{credit_line, jdbcType=NUMERIC}, <!-- 信用额度 -->
</if>
<if test="org_id != null and org_id != ''">
#{org_id, jdbcType=VARCHAR}, <!-- 所属银行机构ID -->
</if>
<if test="id_no != null and id_no != ''">
#{id_no, jdbcType=VARCHAR}, <!-- 身份证号 -->
</if>
<if test="sex != null and sex != ''">
#{sex, jdbcType=VARCHAR}, <!-- 性别 -->
</if>
<if test="birthday != null">
#{birthday, jdbcType=DATE}, <!-- 生日 -->
</if>
<if test="age != null">
#{age, jdbcType=INTEGER}, <!-- 年龄 -->
</if>
<if test="address != null and address != ''">
#{address, jdbcType=VARCHAR}, <!-- 地址 -->
</if>
<if test="create_time != null and create_time != ''">
#{create_time, jdbcType=VARCHAR}, <!-- 创建时间 -->
</if>
<if test="create_user_id != null and create_user_id != ''">
#{create_user_id, jdbcType=VARCHAR}, <!-- 创建人ID -->
</if>
<if test="id != null">
#{id, jdbcType=INTEGER} <!-- 流水号 -->
</if>
)
</insert>
<!-- 插入一个数据持久化对象(含所有字段) -->
<insert id="insertAll" parameterType="DemoAccountPO">
INSERT INTO demo_account (
<include refid="column" />
)
VALUES (
#{id, jdbcType=INTEGER}, <!-- 流水号 -->
#{name, jdbcType=VARCHAR}, <!-- 姓名 -->
#{card_id, jdbcType=VARCHAR}, <!-- 卡号 -->
#{card_type, jdbcType=VARCHAR}, <!-- 卡类型 -->
#{balance, jdbcType=NUMERIC}, <!-- 可用余额 -->
#{credit_line, jdbcType=NUMERIC}, <!-- 信用额度 -->
#{org_id, jdbcType=VARCHAR}, <!-- 所属银行机构ID -->
#{id_no, jdbcType=VARCHAR}, <!-- 身份证号 -->
#{sex, jdbcType=VARCHAR}, <!-- 性别 -->
#{birthday, jdbcType=DATE}, <!-- 生日 -->
#{age, jdbcType=INTEGER}, <!-- 年龄 -->
#{address, jdbcType=VARCHAR}, <!-- 地址 -->
#{create_time, jdbcType=VARCHAR}, <!-- 创建时间 -->
#{create_user_id, jdbcType=VARCHAR} <!-- 创建人ID -->
)
</insert>
<!-- 根据主键修改数据持久化对象 -->
<update id="updateByKey" parameterType="DemoAccountPO">
UPDATE demo_account
<set>
<if test="id != null">
id = #{id, jdbcType=INTEGER}, <!-- 流水号 -->
</if>
<if test="name != null">
name = #{name, jdbcType=VARCHAR}, <!-- 姓名 -->
</if>
<if test="card_id != null">
card_id = #{card_id, jdbcType=VARCHAR}, <!-- 卡号 -->
</if>
<if test="card_type != null">
card_type = #{card_type, jdbcType=VARCHAR}, <!-- 卡类型 -->
</if>
<if test="balance != null">
balance = #{balance, jdbcType=NUMERIC}, <!-- 可用余额 -->
</if>
<if test="credit_line != null">
credit_line = #{credit_line, jdbcType=NUMERIC}, <!-- 信用额度 -->
</if>
<if test="org_id != null">
org_id = #{org_id, jdbcType=VARCHAR}, <!-- 所属银行机构ID -->
</if>
<if test="id_no != null">
id_no = #{id_no, jdbcType=VARCHAR}, <!-- 身份证号 -->
</if>
<if test="sex != null">
sex = #{sex, jdbcType=VARCHAR}, <!-- 性别 -->
</if>
<if test="birthday != null">
birthday = #{birthday, jdbcType=DATE}, <!-- 生日 -->
</if>
<if test="age != null">
age = #{age, jdbcType=INTEGER}, <!-- 年龄 -->
</if>
<if test="address != null">
address = #{address, jdbcType=VARCHAR}, <!-- 地址 -->
</if>
<if test="create_time != null">
create_time = #{create_time, jdbcType=VARCHAR}, <!-- 创建时间 -->
</if>
<if test="create_user_id != null">
create_user_id = #{create_user_id, jdbcType=VARCHAR}, <!-- 创建人ID -->
</if>
</set>
WHERE id = #{id}
</update>
<!-- 根据主键删除数据持久化对象 -->
<delete id="deleteByKey">
DELETE FROM demo_account WHERE id = #{id}
</delete>
<!-- 根据主键查询并返回数据持久化对象 -->
<select id="selectByKey" resultType="DemoAccountPO">
SELECT
<include refid="column" />
FROM demo_account WHERE id = #{id}
</select>
<!-- 根据唯一组合条件查询并返回数据持久化对象 -->
<select id="selectOne" parameterType="Dto" resultType="DemoAccountPO">
SELECT
<include refid="column" />
FROM demo_account
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回数据持久化对象集合 -->
<select id="list" parameterType="Dto" resultType="DemoAccountPO">
SELECT
<include refid="column" />
FROM demo_account
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回分页数据持久化对象集合 -->
<select id="listPage" parameterType="Dto" resultType="DemoAccountPO" useCache="false">
SELECT
<include refid="column" />
FRoM demo_account
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto模糊查询并返回数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="like" parameterType="Dto" resultType="DemoAccountPO">
SELECT
<include refid="column" />
FROM demo_account
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto模糊查询并返回分页数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="likePage" parameterType="Dto" resultType="DemoAccountPO" useCache="false">
SELECT
<include refid="column" />
FRoM demo_account
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto统计行数 -->
<select id="rows" resultType="Integer" parameterType="Dto">
SELECT COUNT(1) AS aos_rows_ FROM demo_account
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据数学表达式进行数学运算 -->
<select id="calc" parameterType="Dto" resultType="String">
SELECT
${_expr}
FROM demo_account
<where>
<include refid="equal" />
</where>
</select>
<!-- 表字段 -->
<sql id="column">
id, <!-- 流水号 -->
name, <!-- 姓名 -->
card_id, <!-- 卡号 -->
card_type, <!-- 卡类型 -->
balance, <!-- 可用余额 -->
credit_line, <!-- 信用额度 -->
org_id, <!-- 所属银行机构ID -->
id_no, <!-- 身份证号 -->
sex, <!-- 性别 -->
birthday, <!-- 生日 -->
age, <!-- 年龄 -->
address, <!-- 地址 -->
create_time, <!-- 创建时间 -->
create_user_id <!-- 创建人ID -->
</sql>
<!-- 表字段(用于外表的关联时引用) -->
<sql id="column2">
demo_account.id, <!-- 流水号 -->
demo_account.name, <!-- 姓名 -->
demo_account.card_id, <!-- 卡号 -->
demo_account.card_type, <!-- 卡类型 -->
demo_account.balance, <!-- 可用余额 -->
demo_account.credit_line, <!-- 信用额度 -->
demo_account.org_id, <!-- 所属银行机构ID -->
demo_account.id_no, <!-- 身份证号 -->
demo_account.sex, <!-- 性别 -->
demo_account.birthday, <!-- 生日 -->
demo_account.age, <!-- 年龄 -->
demo_account.address, <!-- 地址 -->
demo_account.create_time, <!-- 创建时间 -->
demo_account.create_user_id <!-- 创建人ID -->
</sql>
<!-- Where精确匹配字段 -->
<sql id="equal">
<if test="id != null ">
AND id = #{id} <!-- 流水号 -->
</if>
<if test="name != null and name != ''">
AND name = #{name} <!-- 姓名 -->
</if>
<if test="card_id != null and card_id != ''">
AND card_id = #{card_id} <!-- 卡号 -->
</if>
<if test="card_type != null and card_type != ''">
AND card_type = #{card_type} <!-- 卡类型 -->
</if>
<if test="balance != null ">
AND balance = #{balance} <!-- 可用余额 -->
</if>
<if test="credit_line != null ">
AND credit_line = #{credit_line} <!-- 信用额度 -->
</if>
<if test="org_id != null and org_id != ''">
AND org_id = #{org_id} <!-- 所属银行机构ID -->
</if>
<if test="id_no != null and id_no != ''">
AND id_no = #{id_no} <!-- 身份证号 -->
</if>
<if test="sex != null and sex != ''">
AND sex = #{sex} <!-- 性别 -->
</if>
<if test="birthday != null ">
AND birthday = #{birthday} <!-- 生日 -->
</if>
<if test="age != null ">
AND age = #{age} <!-- 年龄 -->
</if>
<if test="address != null and address != ''">
AND address = #{address} <!-- 地址 -->
</if>
<if test="create_time != null and create_time != ''">
AND create_time = #{create_time} <!-- 创建时间 -->
</if>
<if test="create_user_id != null and create_user_id != ''">
AND create_user_id = #{create_user_id} <!-- 创建人ID -->
</if>
</sql>
<!-- Where模糊匹配字段 -->
<sql id="like">
<if test="name != null and name != ''">
AND name like '${name}%' <!-- 姓名 -->
</if>
<if test="card_id != null and card_id != ''">
AND card_id like '${card_id}%' <!-- 卡号 -->
</if>
<if test="card_type != null and card_type != ''">
AND card_type like '${card_type}%' <!-- 卡类型 -->
</if>
<if test="org_id != null and org_id != ''">
AND org_id like '${org_id}%' <!-- 所属银行机构ID -->
</if>
<if test="id_no != null and id_no != ''">
AND id_no like '${id_no}%' <!-- 身份证号 -->
</if>
<if test="sex != null and sex != ''">
AND sex like '${sex}%' <!-- 性别 -->
</if>
<if test="address != null and address != ''">
AND address like '${address}%' <!-- 地址 -->
</if>
<if test="create_time != null and create_time != ''">
AND create_time like '${create_time}%' <!-- 创建时间 -->
</if>
<if test="create_user_id != null and create_user_id != ''">
AND create_user_id like '${create_user_id}%' <!-- 创建人ID -->
</if>
</sql>
</mapper>
\ No newline at end of file
package ${package};
import java.util.List;
#if(${importDto.bigDecimal})
import java.math.BigDecimal;
#end
#if(${importDto.bigInteger})
import java.math.BigInteger;
#end
import org.apache.ibatis.annotations.Param;
import aos.framework.core.annotation.Dao;
import aos.framework.core.typewrap.Dto;
import ${package_base}.po.${tableDto.upname}PO;
/**
* <b>$!{tableDto.comment}[${tableDto.name}]数据访问接口</b>
*
* <p>
* 注意:此文件由AOS平台自动生成-禁止手工修改
* </p>
*
* @author $!author
* @date $!sysdate
*/
@Dao("${tableDto.lowname}Dao")
public interface ${tableDto.upname}Dao {
/**
* 插入一个数据持久化对象(插入字段为传入PO实体的非空属性)
* <p> 防止DB字段缺省值需要程序中再次赋值
*
* @param ${tableDto.name}PO
* 要插入的数据持久化对象
* @return 返回影响行数
*/
int insert(${tableDto.upname}PO ${tableDto.lowname}PO);
/**
* 插入一个数据持久化对象(含所有字段)
*
* @param ${tableDto.name}PO
* 要插入的数据持久化对象
* @return 返回影响行数
*/
int insertAll(${tableDto.upname}PO ${tableDto.lowname}PO);
/**
* 根据主键修改数据持久化对象
*
* @param ${tableDto.name}PO
* 要修改的数据持久化对象
* @return int 返回影响行数
*/
int updateByKey(${tableDto.upname}PO ${tableDto.lowname}PO);
/**
* 根据主键查询并返回数据持久化对象
*
* @return ${tableDto.upname}PO
*/
${tableDto.upname}PO selectByKey(${bykey});
/**
* 根据唯一组合条件查询并返回数据持久化对象
*
* @return ${tableDto.upname}PO
*/
${tableDto.upname}PO selectOne(Dto pDto);
/**
* 根据Dto查询并返回数据持久化对象集合
*
* @return List<${tableDto.upname}PO>
*/
List<${tableDto.upname}PO> list(Dto pDto);
/**
* 根据Dto查询并返回分页数据持久化对象集合
*
* @return List<${tableDto.upname}PO>
*/
List<${tableDto.upname}PO> listPage(Dto pDto);
/**
* 根据Dto模糊查询并返回数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配)
*
* @return List<${tableDto.upname}PO>
*/
List<${tableDto.upname}PO> like(Dto pDto);
/**
* 根据Dto模糊查询并返回分页数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配)
*
* @return List<${tableDto.upname}PO>
*/
List<${tableDto.upname}PO> likePage(Dto pDto);
/**
* 根据主键删除数据持久化对象
*
* @return 影响行数
*/
int deleteByKey(${bykey});
/**
* 根据Dto统计行数
*
* @param pDto
* @return
*/
int rows(Dto pDto);
/**
* 根据数学表达式进行数学运算
*
* @param pDto
* @return String
*/
String calc(Dto pDto);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- $!{tableDto.comment}[${tableDto.name}]SQL自动映射 -->
<!-- 注意:此文件由AOS平台自动生成-禁止手工修改 $!sysdate -->
<mapper namespace="${package}.${tableDto.upname}Dao">
<!-- 插入一个数据持久化对象(插入字段为传入PO实体的非空属性) -->
<insert id="insert" #if(${tableDto.autoincrementPkName})useGeneratedKeys="true" keyProperty="${tableDto.autoincrementPkName}"#end parameterType="${tableDto.upname}PO">
INSERT INTO ${tableDto.name} (
#foreach($columnDto in $columnDtos)
#if(${columnDto.isPkey} == "false")
#if(${columnDto.jdbctype} == 'VARCHAR')
<if test="${columnDto.name} != null and ${columnDto.name} != ''">
#else
<if test="${columnDto.name} != null">
#end
${columnDto.name}, <!-- ${columnDto.comment} -->
</if>
#end
#end
## 以自增列做为主键
#if(${tableDto.autoincrementPkName})
${tableDto.autoincrementPkName}
#end
##这个动态插入映射语句的主键字段只能放在最末尾
## 如果不是以自增列做为主键
#if(!${tableDto.autoincrementPkName})
#foreach($columnDto in $pkeyColumnDtos)
#if(${columnDto.jdbctype} == 'VARCHAR')
<if test="${columnDto.name} != null and ${columnDto.name} != ''">
#else
<if test="${columnDto.name} != null">
#end
${columnDto.name}#if($velocityCount != $pkeyColumnDtos.size()),#end <!-- ${columnDto.comment} -->
</if>
#end
#end
)VALUES(
#foreach($columnDto in $columnDtos)
#if(${columnDto.isPkey} == "false")
#if(${columnDto.jdbctype} == 'VARCHAR')
<if test="${columnDto.name} != null and ${columnDto.name} != ''">
#else
<if test="${columnDto.name} != null">
#end
#{${columnDto.name}, jdbcType=${columnDto.jdbctype}}, <!-- ${columnDto.comment} -->
</if>
#end
#end
## 以自增列做为主键
#if(${tableDto.autoincrementPkName})
null
#end
## 如果不是以自增列做为主键
#if(!${tableDto.autoincrementPkName})
#foreach($columnDto in $pkeyColumnDtos)
#if(${columnDto.jdbctype} == 'VARCHAR')
<if test="${columnDto.name} != null and ${columnDto.name} != ''">
#else
<if test="${columnDto.name} != null">
#end
#{${columnDto.name}, jdbcType=${columnDto.jdbctype}}#if($velocityCount != $pkeyColumnDtos.size()),#end <!-- ${columnDto.comment} -->
</if>
#end
#end
)
</insert>
<!-- 插入一个数据持久化对象(含所有字段) -->
<insert id="insertAll" #if(${tableDto.autoincrementPkName})useGeneratedKeys="true" keyProperty="${tableDto.autoincrementPkName}"#end parameterType="${tableDto.upname}PO">
INSERT INTO ${tableDto.name} (
<include refid="column" />
)
VALUES (
#foreach($columnDto in $columnDtos)
#{${columnDto.name}, jdbcType=${columnDto.jdbctype}}#if($velocityCount != $columnDtos.size()),#end <!-- ${columnDto.comment} -->
#end
)
</insert>
<!-- 根据主键修改数据持久化对象 -->
<update id="updateByKey" parameterType="${tableDto.upname}PO">
UPDATE ${tableDto.name}
<set>
#foreach($columnDto in $columnDtos)
<if test="${columnDto.name} != null">
${columnDto.name} = #{${columnDto.name}, jdbcType=${columnDto.jdbctype}}, <!-- ${columnDto.comment} -->
</if>
#end
</set>
WHERE ${bykeywhere}
</update>
<!-- 根据主键删除数据持久化对象 -->
<delete id="deleteByKey">
DELETE FROM ${tableDto.name} WHERE ${bykeywhere}
</delete>
<!-- 根据主键查询并返回数据持久化对象 -->
<select id="selectByKey" resultType="${tableDto.upname}PO">
SELECT
<include refid="column" />
FROM ${tableDto.name} WHERE ${bykeywhere}
</select>
<!-- 根据唯一组合条件查询并返回数据持久化对象 -->
<select id="selectOne" parameterType="Dto" resultType="${tableDto.upname}PO">
SELECT
<include refid="column" />
FROM ${tableDto.name}
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回数据持久化对象集合 -->
<select id="list" parameterType="Dto" resultType="${tableDto.upname}PO">
SELECT
<include refid="column" />
FROM ${tableDto.name}
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回分页数据持久化对象集合 -->
<select id="listPage" parameterType="Dto" resultType="${tableDto.upname}PO" useCache="false">
SELECT
<include refid="column" />
FRoM ${tableDto.name}
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto模糊查询并返回数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="like" parameterType="Dto" resultType="${tableDto.upname}PO">
SELECT
<include refid="column" />
FROM ${tableDto.name}
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto模糊查询并返回分页数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="likePage" parameterType="Dto" resultType="${tableDto.upname}PO" useCache="false">
SELECT
<include refid="column" />
FRoM ${tableDto.name}
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto统计行数 -->
<select id="rows" resultType="Integer" parameterType="Dto">
SELECT COUNT(1) AS aos_rows_ FROM ${tableDto.name}
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据数学表达式进行数学运算 -->
<select id="calc" parameterType="Dto" resultType="String">
SELECT
${_expr}
FROM ${tableDto.name}
<where>
<include refid="equal" />
</where>
</select>
<!-- 表字段 -->
<sql id="column">
#foreach($columnDto in $columnDtos)
${columnDto.name}#if($velocityCount != $columnDtos.size()),#end <!-- ${columnDto.comment} -->
#end
</sql>
<!-- 表字段(用于外表的关联时引用) -->
<sql id="column2">
#foreach($columnDto in $columnDtos)
${tableDto.name}.${columnDto.name}#if($velocityCount != $columnDtos.size()),#end <!-- ${columnDto.comment} -->
#end
</sql>
<!-- Where精确匹配字段 -->
<sql id="equal">
#foreach($columnDto in $columnDtos)
##只对VARCHAR类型使用非空字符串测试
#if(${columnDto.jdbctype} == "VARCHAR")
<if test="${columnDto.name} != null and ${columnDto.name} != ''">
#else
<if test="${columnDto.name} != null ">
#end
AND ${columnDto.name} = #{${columnDto.name}} <!-- ${columnDto.comment} -->
</if>
#end
</sql>
<!-- Where模糊匹配字段 -->
<sql id="like">
#foreach($columnDto in $columnDtos)
##只对VARCHAR类型使用非空字符串测试
#if(${columnDto.jdbctype} == "VARCHAR")
<if test="${columnDto.name} != null and ${columnDto.name} != ''">
AND ${columnDto.name} like '${${columnDto.name}}%' <!-- ${columnDto.comment} -->
</if>
#end
#end
</sql>
</mapper>
\ No newline at end of file
package ${package}.po;
import aos.framework.core.typewrap.PO;
#if(${importDto.bigDecimal})
import java.math.BigDecimal;
#end
#if(${importDto.bigInteger})
import java.math.BigInteger;
#end
#if(${importDto.data})
import java.util.Date;
#end
#if(${importDto.timestamp})
import java.sql.Timestamp;
#end
##java.lang.*下的类型不需要导入
/**
* <b>$!{tableDto.comment}[${tableDto.name}]数据持久化对象</b>
* <p>
* 注意:此文件由AOS平台自动生成-禁止手工修改。
* </p>
*
* @author $!author
* @date $!sysdate
*/
public class ${tableDto.upname}PO extends PO {
private static final long serialVersionUID = 1L;
##变量声明
#foreach($columnDto in $columnDtos)
/**
* ${columnDto.comment}
*/
private ${columnDto.javatype} ${columnDto.name};
#end
##get方法
#foreach($columnDto in $columnDtos)
/**
* ${columnDto.comment}
*
* @return ${columnDto.name}
*/
public ${columnDto.javatype} get${columnDto.upname}() {
return ${columnDto.name};
}
#end
##set方法
#foreach($columnDto in $columnDtos)
/**
* ${columnDto.comment}
*
* @param ${columnDto.name}
*/
public void set${columnDto.upname}(${columnDto.javatype} ${columnDto.name}) {
this.${columnDto.name} = ${columnDto.name};
}
#end
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- 主数据缓存服务相关映射SQL语句 -->
<mapper namespace="CacheMasterData">
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<exceptionInfos desc="异常信息配置文件:只配置标签库异常和平台级异常,运行时系统异常请配置到业务异常参数表中">
<exception id="1" info="没有查询到对应IDNAME的ID配置对象" suggest="请检查IDNAME参数是否正确。" />
<exception id="2" info="ID生成器[{0}]号源用尽" suggest="请通过[ID管理]功能设置ID相应参数。" />
<exception id="5" info="参数{0}不能为空。" suggest="请检查相应参数。" />
<exception id="6" info="标签{0}属性值不合法,请检查。" suggest="请查看标签属性使用提示,设置正确的属性值。" />
<exception id="7" info="端口{0}被占用。" suggest="1)、有可能是你上次启动Server没关闭,请先正常关闭再重启。2)、其它程序占用端口,请在Server启动类AOS.java中使用aosServer.setPort();重设端口。" />
<exception id="8" info="你指定的报表文件{0}不存在。" suggest="请检查相应参数。" />
<exception id="9" info="没有在当前会话中根据你指定KEY[{0}]找到对应的报表对象。" suggest="1)、没有将AOSPrint对象存入会话。2)、如果使用的是自定义会话Key的话,请确保url中的参数值和你存储AOISPrint对象的会话Key保持一致。" />
<exception id="10" info="创建连接失败。" suggest="请检查数据库连接参数配置。" />
<exception id="11" info="表单行标签里的元素columnWidth属性之和不能大于1。" suggest="请检查页面rowset或rowset2标签表单元素的columnWidth属性。" />
<exception id="13" info="当前系统为在线演示模式,仅支持只读操作。" suggest="请确认系统运行模式。" />
<exception id="14" info="获取Redis客户端连接失败。" suggest="AOSuite依赖Redis,请确认您已安装并在aos.properties中正确配置了连接信息。" />
</exceptionInfos>
\ No newline at end of file
#default
class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
class.resource.loader.cache=true
input.encoding=utf-8
output.encoding=utf-8
resource.loader=class
#set log to NullLogSystem when production mode
runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogSystem
#runtime.log.logsystem.class=org.apache.velocity.runtime.log.Log4JLogChute
#runtime.log.logsystem.log4j.logger=velocityLogger
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- aos_dic[aos_dic]SQL自动映射 -->
<!-- 注意:此文件由AOS平台自动生成-禁止手工修改 2017-03-24 10:46:25 -->
<mapper namespace="aos.framework.dao.AosDicDao">
<!-- 插入一个数据持久化对象(插入字段为传入PO实体的非空属性) -->
<insert id="insert" parameterType="AosDicPO">
INSERT INTO aos_dic (
<if test="name != null and name != ''">
name, <!-- 字典名称 -->
</if>
<if test="dic_key != null and dic_key != ''">
dic_key, <!-- 字典KEY -->
</if>
<if test="code != null and code != ''">
code, <!-- 对照码 -->
</if>
<if test="dic_desc != null and dic_desc != ''">
dic_desc, <!-- 对照值 -->
</if>
<if test="is_enable != null and is_enable != ''">
is_enable, <!-- 是否启用 -->
</if>
<if test="hotkey != null and hotkey != ''">
hotkey, <!-- 热键 -->
</if>
<if test="dic_group != null and dic_group != ''">
dic_group, <!-- 所属分组 -->
</if>
<if test="sort_no != null">
sort_no, <!-- 排序号 -->
</if>
<if test="remark != null and remark != ''">
remark, <!-- 备注 -->
</if>
<if test="id != null">
id <!-- 流水号 -->
</if>
)VALUES(
<if test="name != null and name != ''">
#{name, jdbcType=VARCHAR}, <!-- 字典名称 -->
</if>
<if test="dic_key != null and dic_key != ''">
#{dic_key, jdbcType=VARCHAR}, <!-- 字典KEY -->
</if>
<if test="code != null and code != ''">
#{code, jdbcType=VARCHAR}, <!-- 对照码 -->
</if>
<if test="dic_desc != null and dic_desc != ''">
#{dic_desc, jdbcType=VARCHAR}, <!-- 对照值 -->
</if>
<if test="is_enable != null and is_enable != ''">
#{is_enable, jdbcType=VARCHAR}, <!-- 是否启用 -->
</if>
<if test="hotkey != null and hotkey != ''">
#{hotkey, jdbcType=VARCHAR}, <!-- 热键 -->
</if>
<if test="dic_group != null and dic_group != ''">
#{dic_group, jdbcType=VARCHAR}, <!-- 所属分组 -->
</if>
<if test="sort_no != null">
#{sort_no, jdbcType=INTEGER}, <!-- 排序号 -->
</if>
<if test="remark != null and remark != ''">
#{remark, jdbcType=VARCHAR}, <!-- 备注 -->
</if>
<if test="id != null">
#{id, jdbcType=INTEGER} <!-- 流水号 -->
</if>
)
</insert>
<!-- 插入一个数据持久化对象(含所有字段) -->
<insert id="insertAll" parameterType="AosDicPO">
INSERT INTO aos_dic (
<include refid="column" />
)
VALUES (
#{id, jdbcType=INTEGER}, <!-- 流水号 -->
#{name, jdbcType=VARCHAR}, <!-- 字典名称 -->
#{dic_key, jdbcType=VARCHAR}, <!-- 字典KEY -->
#{code, jdbcType=VARCHAR}, <!-- 对照码 -->
#{dic_desc, jdbcType=VARCHAR}, <!-- 对照值 -->
#{is_enable, jdbcType=VARCHAR}, <!-- 是否启用 -->
#{hotkey, jdbcType=VARCHAR}, <!-- 热键 -->
#{dic_group, jdbcType=VARCHAR}, <!-- 所属分组 -->
#{sort_no, jdbcType=INTEGER}, <!-- 排序号 -->
#{remark, jdbcType=VARCHAR} <!-- 备注 -->
)
</insert>
<!-- 根据主键修改数据持久化对象 -->
<update id="updateByKey" parameterType="AosDicPO">
UPDATE aos_dic
<set>
<if test="id != null">
id = #{id, jdbcType=INTEGER}, <!-- 流水号 -->
</if>
<if test="name != null">
name = #{name, jdbcType=VARCHAR}, <!-- 字典名称 -->
</if>
<if test="dic_key != null">
dic_key = #{dic_key, jdbcType=VARCHAR}, <!-- 字典KEY -->
</if>
<if test="code != null">
code = #{code, jdbcType=VARCHAR}, <!-- 对照码 -->
</if>
<if test="dic_desc != null">
dic_desc = #{dic_desc, jdbcType=VARCHAR}, <!-- 对照值 -->
</if>
<if test="is_enable != null">
is_enable = #{is_enable, jdbcType=VARCHAR}, <!-- 是否启用 -->
</if>
<if test="hotkey != null">
hotkey = #{hotkey, jdbcType=VARCHAR}, <!-- 热键 -->
</if>
<if test="dic_group != null">
dic_group = #{dic_group, jdbcType=VARCHAR}, <!-- 所属分组 -->
</if>
<if test="sort_no != null">
sort_no = #{sort_no, jdbcType=INTEGER}, <!-- 排序号 -->
</if>
<if test="remark != null">
remark = #{remark, jdbcType=VARCHAR}, <!-- 备注 -->
</if>
</set>
WHERE id = #{id}
</update>
<!-- 根据主键删除数据持久化对象 -->
<delete id="deleteByKey">
DELETE FROM aos_dic WHERE id = #{id}
</delete>
<!-- 根据主键查询并返回数据持久化对象 -->
<select id="selectByKey" resultType="AosDicPO">
SELECT
<include refid="column" />
FROM aos_dic WHERE id = #{id}
</select>
<!-- 根据唯一组合条件查询并返回数据持久化对象 -->
<select id="selectOne" parameterType="Dto" resultType="AosDicPO">
SELECT
<include refid="column" />
FROM aos_dic
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回数据持久化对象集合 -->
<select id="list" parameterType="Dto" resultType="AosDicPO">
SELECT
<include refid="column" />
FROM aos_dic
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回分页数据持久化对象集合 -->
<select id="listPage" parameterType="Dto" resultType="AosDicPO" useCache="false">
SELECT
<include refid="column" />
FRoM aos_dic
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto模糊查询并返回数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="like" parameterType="Dto" resultType="AosDicPO">
SELECT
<include refid="column" />
FROM aos_dic
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto模糊查询并返回分页数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="likePage" parameterType="Dto" resultType="AosDicPO" useCache="false">
SELECT
<include refid="column" />
FRoM aos_dic
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto统计行数 -->
<select id="rows" resultType="Integer" parameterType="Dto">
SELECT COUNT(1) AS aos_rows_ FROM aos_dic
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据数学表达式进行数学运算 -->
<select id="calc" parameterType="Dto" resultType="String">
SELECT
${_expr}
FROM aos_dic
<where>
<include refid="equal" />
</where>
</select>
<!-- 表字段 -->
<sql id="column">
id, <!-- 流水号 -->
name, <!-- 字典名称 -->
dic_key, <!-- 字典KEY -->
code, <!-- 对照码 -->
dic_desc, <!-- 对照值 -->
is_enable, <!-- 是否启用 -->
hotkey, <!-- 热键 -->
dic_group, <!-- 所属分组 -->
sort_no, <!-- 排序号 -->
remark <!-- 备注 -->
</sql>
<!-- 表字段(用于外表的关联时引用) -->
<sql id="column2">
aos_dic.id, <!-- 流水号 -->
aos_dic.name, <!-- 字典名称 -->
aos_dic.dic_key, <!-- 字典KEY -->
aos_dic.code, <!-- 对照码 -->
aos_dic.dic_desc, <!-- 对照值 -->
aos_dic.is_enable, <!-- 是否启用 -->
aos_dic.hotkey, <!-- 热键 -->
aos_dic.dic_group, <!-- 所属分组 -->
aos_dic.sort_no, <!-- 排序号 -->
aos_dic.remark <!-- 备注 -->
</sql>
<!-- Where精确匹配字段 -->
<sql id="equal">
<if test="id != null ">
AND id = #{id} <!-- 流水号 -->
</if>
<if test="name != null and name != ''">
AND name = #{name} <!-- 字典名称 -->
</if>
<if test="dic_key != null and dic_key != ''">
AND dic_key = #{dic_key} <!-- 字典KEY -->
</if>
<if test="code != null and code != ''">
AND code = #{code} <!-- 对照码 -->
</if>
<if test="dic_desc != null and dic_desc != ''">
AND dic_desc = #{dic_desc} <!-- 对照值 -->
</if>
<if test="is_enable != null and is_enable != ''">
AND is_enable = #{is_enable} <!-- 是否启用 -->
</if>
<if test="hotkey != null and hotkey != ''">
AND hotkey = #{hotkey} <!-- 热键 -->
</if>
<if test="dic_group != null and dic_group != ''">
AND dic_group = #{dic_group} <!-- 所属分组 -->
</if>
<if test="sort_no != null ">
AND sort_no = #{sort_no} <!-- 排序号 -->
</if>
<if test="remark != null and remark != ''">
AND remark = #{remark} <!-- 备注 -->
</if>
</sql>
<!-- Where模糊匹配字段 -->
<sql id="like">
<if test="name != null and name != ''">
AND name like '${name}%' <!-- 字典名称 -->
</if>
<if test="dic_key != null and dic_key != ''">
AND dic_key like '${dic_key}%' <!-- 字典KEY -->
</if>
<if test="code != null and code != ''">
AND code like '${code}%' <!-- 对照码 -->
</if>
<if test="dic_desc != null and dic_desc != ''">
AND dic_desc like '${dic_desc}%' <!-- 对照值 -->
</if>
<if test="is_enable != null and is_enable != ''">
AND is_enable like '${is_enable}%' <!-- 是否启用 -->
</if>
<if test="hotkey != null and hotkey != ''">
AND hotkey like '${hotkey}%' <!-- 热键 -->
</if>
<if test="dic_group != null and dic_group != ''">
AND dic_group like '${dic_group}%' <!-- 所属分组 -->
</if>
<if test="remark != null and remark != ''">
AND remark like '${remark}%' <!-- 备注 -->
</if>
</sql>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- aos_params[aos_params]SQL自动映射 -->
<!-- 注意:此文件由AOS平台自动生成-禁止手工修改 2017-03-24 10:46:25 -->
<mapper namespace="aos.framework.dao.AosParamsDao">
<!-- 插入一个数据持久化对象(插入字段为传入PO实体的非空属性) -->
<insert id="insert" parameterType="AosParamsPO">
INSERT INTO aos_params (
<if test="name != null and name != ''">
name, <!-- 参数名称 -->
</if>
<if test="params_key != null and params_key != ''">
params_key, <!-- 参数键 -->
</if>
<if test="value != null and value != ''">
value, <!-- 参数值 -->
</if>
<if test="params_group != null and params_group != ''">
params_group, <!-- 参数分组 -->
</if>
<if test="remark != null and remark != ''">
remark, <!-- 备注 -->
</if>
<if test="id != null">
id <!-- 流水号 -->
</if>
)VALUES(
<if test="name != null and name != ''">
#{name, jdbcType=VARCHAR}, <!-- 参数名称 -->
</if>
<if test="params_key != null and params_key != ''">
#{params_key, jdbcType=VARCHAR}, <!-- 参数键 -->
</if>
<if test="value != null and value != ''">
#{value, jdbcType=VARCHAR}, <!-- 参数值 -->
</if>
<if test="params_group != null and params_group != ''">
#{params_group, jdbcType=VARCHAR}, <!-- 参数分组 -->
</if>
<if test="remark != null and remark != ''">
#{remark, jdbcType=VARCHAR}, <!-- 备注 -->
</if>
<if test="id != null">
#{id, jdbcType=INTEGER} <!-- 流水号 -->
</if>
)
</insert>
<!-- 插入一个数据持久化对象(含所有字段) -->
<insert id="insertAll" parameterType="AosParamsPO">
INSERT INTO aos_params (
<include refid="column" />
)
VALUES (
#{id, jdbcType=INTEGER}, <!-- 流水号 -->
#{name, jdbcType=VARCHAR}, <!-- 参数名称 -->
#{params_key, jdbcType=VARCHAR}, <!-- 参数键 -->
#{value, jdbcType=VARCHAR}, <!-- 参数值 -->
#{params_group, jdbcType=VARCHAR}, <!-- 参数分组 -->
#{remark, jdbcType=VARCHAR} <!-- 备注 -->
)
</insert>
<!-- 根据主键修改数据持久化对象 -->
<update id="updateByKey" parameterType="AosParamsPO">
UPDATE aos_params
<set>
<if test="id != null">
id = #{id, jdbcType=INTEGER}, <!-- 流水号 -->
</if>
<if test="name != null">
name = #{name, jdbcType=VARCHAR}, <!-- 参数名称 -->
</if>
<if test="params_key != null">
params_key = #{params_key, jdbcType=VARCHAR}, <!-- 参数键 -->
</if>
<if test="value != null">
value = #{value, jdbcType=VARCHAR}, <!-- 参数值 -->
</if>
<if test="params_group != null">
params_group = #{params_group, jdbcType=VARCHAR}, <!-- 参数分组 -->
</if>
<if test="remark != null">
remark = #{remark, jdbcType=VARCHAR}, <!-- 备注 -->
</if>
</set>
WHERE id = #{id}
</update>
<!-- 根据主键删除数据持久化对象 -->
<delete id="deleteByKey">
DELETE FROM aos_params WHERE id = #{id}
</delete>
<!-- 根据主键查询并返回数据持久化对象 -->
<select id="selectByKey" resultType="AosParamsPO">
SELECT
<include refid="column" />
FROM aos_params WHERE id = #{id}
</select>
<!-- 根据唯一组合条件查询并返回数据持久化对象 -->
<select id="selectOne" parameterType="Dto" resultType="AosParamsPO">
SELECT
<include refid="column" />
FROM aos_params
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回数据持久化对象集合 -->
<select id="list" parameterType="Dto" resultType="AosParamsPO">
SELECT
<include refid="column" />
FROM aos_params
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回分页数据持久化对象集合 -->
<select id="listPage" parameterType="Dto" resultType="AosParamsPO" useCache="false">
SELECT
<include refid="column" />
FRoM aos_params
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto模糊查询并返回数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="like" parameterType="Dto" resultType="AosParamsPO">
SELECT
<include refid="column" />
FROM aos_params
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto模糊查询并返回分页数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="likePage" parameterType="Dto" resultType="AosParamsPO" useCache="false">
SELECT
<include refid="column" />
FRoM aos_params
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto统计行数 -->
<select id="rows" resultType="Integer" parameterType="Dto">
SELECT COUNT(1) AS aos_rows_ FROM aos_params
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据数学表达式进行数学运算 -->
<select id="calc" parameterType="Dto" resultType="String">
SELECT
${_expr}
FROM aos_params
<where>
<include refid="equal" />
</where>
</select>
<!-- 表字段 -->
<sql id="column">
id, <!-- 流水号 -->
name, <!-- 参数名称 -->
params_key, <!-- 参数键 -->
value, <!-- 参数值 -->
params_group, <!-- 参数分组 -->
remark <!-- 备注 -->
</sql>
<!-- 表字段(用于外表的关联时引用) -->
<sql id="column2">
aos_params.id, <!-- 流水号 -->
aos_params.name, <!-- 参数名称 -->
aos_params.params_key, <!-- 参数键 -->
aos_params.value, <!-- 参数值 -->
aos_params.params_group, <!-- 参数分组 -->
aos_params.remark <!-- 备注 -->
</sql>
<!-- Where精确匹配字段 -->
<sql id="equal">
<if test="id != null ">
AND id = #{id} <!-- 流水号 -->
</if>
<if test="name != null and name != ''">
AND name = #{name} <!-- 参数名称 -->
</if>
<if test="params_key != null and params_key != ''">
AND params_key = #{params_key} <!-- 参数键 -->
</if>
<if test="value != null and value != ''">
AND value = #{value} <!-- 参数值 -->
</if>
<if test="params_group != null and params_group != ''">
AND params_group = #{params_group} <!-- 参数分组 -->
</if>
<if test="remark != null and remark != ''">
AND remark = #{remark} <!-- 备注 -->
</if>
</sql>
<!-- Where模糊匹配字段 -->
<sql id="like">
<if test="name != null and name != ''">
AND name like '${name}%' <!-- 参数名称 -->
</if>
<if test="params_key != null and params_key != ''">
AND params_key like '${params_key}%' <!-- 参数键 -->
</if>
<if test="value != null and value != ''">
AND value like '${value}%' <!-- 参数值 -->
</if>
<if test="params_group != null and params_group != ''">
AND params_group like '${params_group}%' <!-- 参数分组 -->
</if>
<if test="remark != null and remark != ''">
AND remark like '${remark}%' <!-- 备注 -->
</if>
</sql>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- aos_user[aos_user]SQL自动映射 -->
<!-- 注意:此文件由AOS平台自动生成-禁止手工修改 2017-03-23 17:57:02 -->
<mapper namespace="aos.framework.dao.AosUserDao">
<!-- 插入一个数据持久化对象(插入字段为传入PO实体的非空属性) -->
<insert id="insert" parameterType="AosUserPO">
INSERT INTO aos_user (
<if test="account != null and account != ''">
account, <!-- 用户登录帐号 -->
</if>
<if test="password != null and password != ''">
password, <!-- 密码 -->
</if>
<if test="name != null and name != ''">
name, <!-- 用户姓名 -->
</if>
<if test="sex != null and sex != ''">
sex, <!-- 性别 -->
</if>
<if test="status != null and status != ''">
status, <!-- 用户状态 -->
</if>
<if test="type != null and type != ''">
type, <!-- 用户类型 -->
</if>
<if test="org_id != null">
org_id, <!-- 所属部门流水号 -->
</if>
<if test="email != null and email != ''">
email, <!-- 电子邮件 -->
</if>
<if test="mobile != null and mobile != ''">
mobile, <!-- 联系电话 -->
</if>
<if test="idno != null and idno != ''">
idno, <!-- 身份证号 -->
</if>
<if test="skin != null and skin != ''">
skin, <!-- 用户界面皮肤 -->
</if>
<if test="biz_code != null and biz_code != ''">
biz_code, <!-- 业务对照码 -->
</if>
<if test="address != null and address != ''">
address, <!-- 联系地址 -->
</if>
<if test="remark != null and remark != ''">
remark, <!-- 备注 -->
</if>
<if test="is_del != null and is_del != ''">
is_del, <!-- 是否已删除 -->
</if>
<if test="create_time != null and create_time != ''">
create_time, <!-- 创建时间 -->
</if>
<if test="create_by != null">
create_by, <!-- 创建人ID -->
</if>
<if test="id != null">
id <!-- 流水号 -->
</if>
)VALUES(
<if test="account != null and account != ''">
#{account, jdbcType=VARCHAR}, <!-- 用户登录帐号 -->
</if>
<if test="password != null and password != ''">
#{password, jdbcType=VARCHAR}, <!-- 密码 -->
</if>
<if test="name != null and name != ''">
#{name, jdbcType=VARCHAR}, <!-- 用户姓名 -->
</if>
<if test="sex != null and sex != ''">
#{sex, jdbcType=VARCHAR}, <!-- 性别 -->
</if>
<if test="status != null and status != ''">
#{status, jdbcType=VARCHAR}, <!-- 用户状态 -->
</if>
<if test="type != null and type != ''">
#{type, jdbcType=VARCHAR}, <!-- 用户类型 -->
</if>
<if test="org_id != null">
#{org_id, jdbcType=INTEGER}, <!-- 所属部门流水号 -->
</if>
<if test="email != null and email != ''">
#{email, jdbcType=VARCHAR}, <!-- 电子邮件 -->
</if>
<if test="mobile != null and mobile != ''">
#{mobile, jdbcType=VARCHAR}, <!-- 联系电话 -->
</if>
<if test="idno != null and idno != ''">
#{idno, jdbcType=VARCHAR}, <!-- 身份证号 -->
</if>
<if test="skin != null and skin != ''">
#{skin, jdbcType=VARCHAR}, <!-- 用户界面皮肤 -->
</if>
<if test="biz_code != null and biz_code != ''">
#{biz_code, jdbcType=VARCHAR}, <!-- 业务对照码 -->
</if>
<if test="address != null and address != ''">
#{address, jdbcType=VARCHAR}, <!-- 联系地址 -->
</if>
<if test="remark != null and remark != ''">
#{remark, jdbcType=VARCHAR}, <!-- 备注 -->
</if>
<if test="is_del != null and is_del != ''">
#{is_del, jdbcType=VARCHAR}, <!-- 是否已删除 -->
</if>
<if test="create_time != null and create_time != ''">
#{create_time, jdbcType=VARCHAR}, <!-- 创建时间 -->
</if>
<if test="create_by != null">
#{create_by, jdbcType=INTEGER}, <!-- 创建人ID -->
</if>
<if test="id != null">
#{id, jdbcType=INTEGER} <!-- 流水号 -->
</if>
)
</insert>
<!-- 插入一个数据持久化对象(含所有字段) -->
<insert id="insertAll" parameterType="AosUserPO">
INSERT INTO aos_user (
<include refid="column" />
)
VALUES (
#{id, jdbcType=INTEGER}, <!-- 流水号 -->
#{account, jdbcType=VARCHAR}, <!-- 用户登录帐号 -->
#{password, jdbcType=VARCHAR}, <!-- 密码 -->
#{name, jdbcType=VARCHAR}, <!-- 用户姓名 -->
#{sex, jdbcType=VARCHAR}, <!-- 性别 -->
#{status, jdbcType=VARCHAR}, <!-- 用户状态 -->
#{type, jdbcType=VARCHAR}, <!-- 用户类型 -->
#{org_id, jdbcType=INTEGER}, <!-- 所属部门流水号 -->
#{email, jdbcType=VARCHAR}, <!-- 电子邮件 -->
#{mobile, jdbcType=VARCHAR}, <!-- 联系电话 -->
#{idno, jdbcType=VARCHAR}, <!-- 身份证号 -->
#{skin, jdbcType=VARCHAR}, <!-- 用户界面皮肤 -->
#{biz_code, jdbcType=VARCHAR}, <!-- 业务对照码 -->
#{address, jdbcType=VARCHAR}, <!-- 联系地址 -->
#{remark, jdbcType=VARCHAR}, <!-- 备注 -->
#{is_del, jdbcType=VARCHAR}, <!-- 是否已删除 -->
#{create_time, jdbcType=VARCHAR}, <!-- 创建时间 -->
#{create_by, jdbcType=INTEGER} <!-- 创建人ID -->
)
</insert>
<!-- 根据主键修改数据持久化对象 -->
<update id="updateByKey" parameterType="AosUserPO">
UPDATE aos_user
<set>
<if test="id != null">
id = #{id, jdbcType=INTEGER}, <!-- 流水号 -->
</if>
<if test="account != null">
account = #{account, jdbcType=VARCHAR}, <!-- 用户登录帐号 -->
</if>
<if test="password != null">
password = #{password, jdbcType=VARCHAR}, <!-- 密码 -->
</if>
<if test="name != null">
name = #{name, jdbcType=VARCHAR}, <!-- 用户姓名 -->
</if>
<if test="sex != null">
sex = #{sex, jdbcType=VARCHAR}, <!-- 性别 -->
</if>
<if test="status != null">
status = #{status, jdbcType=VARCHAR}, <!-- 用户状态 -->
</if>
<if test="type != null">
type = #{type, jdbcType=VARCHAR}, <!-- 用户类型 -->
</if>
<if test="org_id != null">
org_id = #{org_id, jdbcType=INTEGER}, <!-- 所属部门流水号 -->
</if>
<if test="email != null">
email = #{email, jdbcType=VARCHAR}, <!-- 电子邮件 -->
</if>
<if test="mobile != null">
mobile = #{mobile, jdbcType=VARCHAR}, <!-- 联系电话 -->
</if>
<if test="idno != null">
idno = #{idno, jdbcType=VARCHAR}, <!-- 身份证号 -->
</if>
<if test="skin != null">
skin = #{skin, jdbcType=VARCHAR}, <!-- 用户界面皮肤 -->
</if>
<if test="biz_code != null">
biz_code = #{biz_code, jdbcType=VARCHAR}, <!-- 业务对照码 -->
</if>
<if test="address != null">
address = #{address, jdbcType=VARCHAR}, <!-- 联系地址 -->
</if>
<if test="remark != null">
remark = #{remark, jdbcType=VARCHAR}, <!-- 备注 -->
</if>
<if test="is_del != null">
is_del = #{is_del, jdbcType=VARCHAR}, <!-- 是否已删除 -->
</if>
<if test="create_time != null">
create_time = #{create_time, jdbcType=VARCHAR}, <!-- 创建时间 -->
</if>
<if test="create_by != null">
create_by = #{create_by, jdbcType=INTEGER}, <!-- 创建人ID -->
</if>
</set>
WHERE id = #{id}
</update>
<!-- 根据主键删除数据持久化对象 -->
<delete id="deleteByKey">
DELETE FROM aos_user WHERE id = #{id}
</delete>
<!-- 根据主键查询并返回数据持久化对象 -->
<select id="selectByKey" resultType="AosUserPO">
SELECT
<include refid="column" />
FROM aos_user WHERE id = #{id}
</select>
<!-- 根据唯一组合条件查询并返回数据持久化对象 -->
<select id="selectOne" parameterType="Dto" resultType="AosUserPO">
SELECT
<include refid="column" />
FROM aos_user
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回数据持久化对象集合 -->
<select id="list" parameterType="Dto" resultType="AosUserPO">
SELECT
<include refid="column" />
FROM aos_user
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto查询并返回分页数据持久化对象集合 -->
<select id="listPage" parameterType="Dto" resultType="AosUserPO" useCache="false">
SELECT
<include refid="column" />
FRoM aos_user
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据Dto模糊查询并返回数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="like" parameterType="Dto" resultType="AosUserPO">
SELECT
<include refid="column" />
FROM aos_user
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto模糊查询并返回分页数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配) -->
<select id="likePage" parameterType="Dto" resultType="AosUserPO" useCache="false">
SELECT
<include refid="column" />
FRoM aos_user
<where>
<include refid="like" />
</where>
</select>
<!-- 根据Dto统计行数 -->
<select id="rows" resultType="Integer" parameterType="Dto">
SELECT COUNT(1) AS aos_rows_ FROM aos_user
<where>
<include refid="equal" />
</where>
</select>
<!-- 根据数学表达式进行数学运算 -->
<select id="calc" parameterType="Dto" resultType="String">
SELECT
${_expr}
FROM aos_user
<where>
<include refid="equal" />
</where>
</select>
<!-- 表字段 -->
<sql id="column">
id, <!-- 流水号 -->
account, <!-- 用户登录帐号 -->
password, <!-- 密码 -->
name, <!-- 用户姓名 -->
sex, <!-- 性别 -->
status, <!-- 用户状态 -->
type, <!-- 用户类型 -->
org_id, <!-- 所属部门流水号 -->
email, <!-- 电子邮件 -->
mobile, <!-- 联系电话 -->
idno, <!-- 身份证号 -->
skin, <!-- 用户界面皮肤 -->
biz_code, <!-- 业务对照码 -->
address, <!-- 联系地址 -->
remark, <!-- 备注 -->
is_del, <!-- 是否已删除 -->
create_time, <!-- 创建时间 -->
create_by <!-- 创建人ID -->
</sql>
<!-- 表字段(用于外表的关联时引用) -->
<sql id="column2">
aos_user.id, <!-- 流水号 -->
aos_user.account, <!-- 用户登录帐号 -->
aos_user.password, <!-- 密码 -->
aos_user.name, <!-- 用户姓名 -->
aos_user.sex, <!-- 性别 -->
aos_user.status, <!-- 用户状态 -->
aos_user.type, <!-- 用户类型 -->
aos_user.org_id, <!-- 所属部门流水号 -->
aos_user.email, <!-- 电子邮件 -->
aos_user.mobile, <!-- 联系电话 -->
aos_user.idno, <!-- 身份证号 -->
aos_user.skin, <!-- 用户界面皮肤 -->
aos_user.biz_code, <!-- 业务对照码 -->
aos_user.address, <!-- 联系地址 -->
aos_user.remark, <!-- 备注 -->
aos_user.is_del, <!-- 是否已删除 -->
aos_user.create_time, <!-- 创建时间 -->
aos_user.create_by <!-- 创建人ID -->
</sql>
<!-- Where精确匹配字段 -->
<sql id="equal">
<if test="id != null ">
AND id = #{id} <!-- 流水号 -->
</if>
<if test="account != null and account != ''">
AND account = #{account} <!-- 用户登录帐号 -->
</if>
<if test="password != null and password != ''">
AND password = #{password} <!-- 密码 -->
</if>
<if test="name != null and name != ''">
AND name = #{name} <!-- 用户姓名 -->
</if>
<if test="sex != null and sex != ''">
AND sex = #{sex} <!-- 性别 -->
</if>
<if test="status != null and status != ''">
AND status = #{status} <!-- 用户状态 -->
</if>
<if test="type != null and type != ''">
AND type = #{type} <!-- 用户类型 -->
</if>
<if test="org_id != null ">
AND org_id = #{org_id} <!-- 所属部门流水号 -->
</if>
<if test="email != null and email != ''">
AND email = #{email} <!-- 电子邮件 -->
</if>
<if test="mobile != null and mobile != ''">
AND mobile = #{mobile} <!-- 联系电话 -->
</if>
<if test="idno != null and idno != ''">
AND idno = #{idno} <!-- 身份证号 -->
</if>
<if test="skin != null and skin != ''">
AND skin = #{skin} <!-- 用户界面皮肤 -->
</if>
<if test="biz_code != null and biz_code != ''">
AND biz_code = #{biz_code} <!-- 业务对照码 -->
</if>
<if test="address != null and address != ''">
AND address = #{address} <!-- 联系地址 -->
</if>
<if test="remark != null and remark != ''">
AND remark = #{remark} <!-- 备注 -->
</if>
<if test="is_del != null and is_del != ''">
AND is_del = #{is_del} <!-- 是否已删除 -->
</if>
<if test="create_time != null and create_time != ''">
AND create_time = #{create_time} <!-- 创建时间 -->
</if>
<if test="create_by != null ">
AND create_by = #{create_by} <!-- 创建人ID -->
</if>
</sql>
<!-- Where模糊匹配字段 -->
<sql id="like">
<if test="account != null and account != ''">
AND account like '${account}%' <!-- 用户登录帐号 -->
</if>
<if test="password != null and password != ''">
AND password like '${password}%' <!-- 密码 -->
</if>
<if test="name != null and name != ''">
AND name like '${name}%' <!-- 用户姓名 -->
</if>
<if test="sex != null and sex != ''">
AND sex like '${sex}%' <!-- 性别 -->
</if>
<if test="status != null and status != ''">
AND status like '${status}%' <!-- 用户状态 -->
</if>
<if test="type != null and type != ''">
AND type like '${type}%' <!-- 用户类型 -->
</if>
<if test="email != null and email != ''">
AND email like '${email}%' <!-- 电子邮件 -->
</if>
<if test="mobile != null and mobile != ''">
AND mobile like '${mobile}%' <!-- 联系电话 -->
</if>
<if test="idno != null and idno != ''">
AND idno like '${idno}%' <!-- 身份证号 -->
</if>
<if test="skin != null and skin != ''">
AND skin like '${skin}%' <!-- 用户界面皮肤 -->
</if>
<if test="biz_code != null and biz_code != ''">
AND biz_code like '${biz_code}%' <!-- 业务对照码 -->
</if>
<if test="address != null and address != ''">
AND address like '${address}%' <!-- 联系地址 -->
</if>
<if test="remark != null and remark != ''">
AND remark like '${remark}%' <!-- 备注 -->
</if>
<if test="is_del != null and is_del != ''">
AND is_del like '${is_del}%' <!-- 是否已删除 -->
</if>
<if test="create_time != null and create_time != ''">
AND create_time like '${create_time}%' <!-- 创建时间 -->
</if>
</sql>
</mapper>
\ No newline at end of file
#if($backGround == "true")
<style type="text/css">
##设置页面背景
body {
background-color: #FFFFFF !important;
background-attachment: fixed !important;
background-position: bottom center !important;
background-repeat: repeat-x !important;
background-image:url("${cxt}/static/image/background/main/${curSkin}.png") !important;
}
</style>
#end
<body#if($id) id="$id"#end#if($class) class="$class"#end>
\ No newline at end of file
## 动态CSS文件
<style type="text/css">
##滑动通知所需
.ux-notification-light {
background-image: url('$cxt/static/image/notification/${skin}.png');
}
</style>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册