Commit 708d8bd0 authored by eddie.woo's avatar eddie.woo

modify

parent 7174042e
......@@ -8,8 +8,11 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import com.fasterxml.jackson.databind.MapperFeature;
......@@ -80,4 +83,17 @@ public class WebMvcConfig implements InitializingBean {
return new CommonsMultipartResolver();
}
@Bean
public RestTemplate restTemplate(ClientHttpRequestFactory factory) {
return new RestTemplate(factory);
}
@Bean
public ClientHttpRequestFactory simpleClientHttpRequestFactory() {
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
factory.setReadTimeout(5000);//单位为ms
factory.setConnectTimeout(5000);//单位为ms
return factory;
}
}
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entitiy.InputDevice;
import pwc.taxtech.atms.entitiy.InputDeviceExample;
@Mapper
@Repository
public interface InputDeviceMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
long countByExample(InputDeviceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
int deleteByExample(InputDeviceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
int insert(InputDevice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
int insertSelective(InputDevice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
List<InputDevice> selectByExampleWithRowbounds(InputDeviceExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
List<InputDevice> selectByExample(InputDeviceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
InputDevice selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") InputDevice record, @Param("example") InputDeviceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
int updateByExample(@Param("record") InputDevice record, @Param("example") InputDeviceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(InputDevice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
int updateByPrimaryKey(InputDevice record);
}
\ No newline at end of file
package pwc.taxtech.atms.entitiy;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table input_device
*
* @mbg.generated do_not_delete_during_merge
*/
public class InputDevice extends BaseEntity {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_device.id
*
* @mbg.generated
*/
private Integer id;
/**
* Database Column Remarks:
* 设备类型 0:未知 1:扫描仪
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_device.type
*
* @mbg.generated
*/
private Short type;
/**
* Database Column Remarks:
* 请求地址
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_device.url
*
* @mbg.generated
*/
private String url;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_device.id
*
* @return the value of input_device.id
*
* @mbg.generated
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_device.id
*
* @param id the value for input_device.id
*
* @mbg.generated
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_device.type
*
* @return the value of input_device.type
*
* @mbg.generated
*/
public Short getType() {
return type;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_device.type
*
* @param type the value for input_device.type
*
* @mbg.generated
*/
public void setType(Short type) {
this.type = type;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_device.url
*
* @return the value of input_device.url
*
* @mbg.generated
*/
public String getUrl() {
return url;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_device.url
*
* @param url the value for input_device.url
*
* @mbg.generated
*/
public void setUrl(String url) {
this.url = url == null ? null : url.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table input_device
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", type=").append(type);
sb.append(", url=").append(url);
sb.append("]");
return sb.toString();
}
}
\ 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">
<mapper namespace="pwc.taxtech.atms.dao.InputDeviceMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.entitiy.InputDevice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="SMALLINT" property="type" />
<result column="url" jdbcType="VARCHAR" property="url" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, `type`, url
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entitiy.InputDeviceExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from input_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from input_device
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from input_device
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.entitiy.InputDeviceExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from input_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.entitiy.InputDevice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into input_device (id, `type`, url
)
values (#{id,jdbcType=INTEGER}, #{type,jdbcType=SMALLINT}, #{url,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entitiy.InputDevice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into input_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
`type`,
</if>
<if test="url != null">
url,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=SMALLINT},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.entitiy.InputDeviceExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from input_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update input_device
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=SMALLINT},
</if>
<if test="record.url != null">
url = #{record.url,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update input_device
set id = #{record.id,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=SMALLINT},
url = #{record.url,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entitiy.InputDevice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update input_device
<set>
<if test="type != null">
`type` = #{type,jdbcType=SMALLINT},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entitiy.InputDevice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update input_device
set `type` = #{type,jdbcType=SMALLINT},
url = #{url,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entitiy.InputDeviceExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from input_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -104,28 +104,31 @@
<!--<columnOverride column="source_type" javaType="java.lang.Integer"/>-->
<!--</table>-->
<table tableName="input_material_item" domainObjectName="InputMaterialItem">
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<!--<table tableName="input_material_item" domainObjectName="InputMaterialItem">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<table tableName="input_material_item_category" domainObjectName="InputMaterialItemCategory">
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<!--<table tableName="input_material_item_category" domainObjectName="InputMaterialItemCategory">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<table tableName="input_vendor" domainObjectName="InputVendor">
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<!--<table tableName="input_vendor" domainObjectName="InputVendor">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<table tableName="input_vendor_address" domainObjectName="InputVendorAddress">
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<table tableName="input_vendor_bank_account" domainObjectName="InputVendorBankAccount">
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<table tableName="input_vendor_contactor" domainObjectName="InputVendorContactor">
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<table tableName="input_vendor_site" domainObjectName="InputVendorSite">
<!--<table tableName="input_vendor_address" domainObjectName="InputVendorAddress">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<!--<table tableName="input_vendor_bank_account" domainObjectName="InputVendorBankAccount">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<!--<table tableName="input_vendor_contactor" domainObjectName="InputVendorContactor">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<!--<table tableName="input_vendor_site" domainObjectName="InputVendorSite">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<table tableName="input_device" domainObjectName="InputDevice">
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment