Skip to content

Commit

Permalink
日常
Browse files Browse the repository at this point in the history
日常
  • Loading branch information
miao.litao committed Aug 19, 2018
1 parent 30d5b76 commit 919de88
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 5 deletions.
7 changes: 2 additions & 5 deletions generator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- 注释控制完毕 -->

<!-- 数据库连接 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://rm-bp1462kb0cc7803is.mysql.rds.aliyuncs.com:3306/xyy_v4?characterEncoding=utf8" userId="test-ybm-b2b" password="TEST_YBM_B2B@2018">
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://rm-bp116802eans1qf74.mysql.rds.aliyuncs.com:3306/dubbo_demo?characterEncoding=utf8" userId="wang_zhenyu" password="ADEMRzNJD25uKOq9CbmkYWRxLpaxb5">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
Expand All @@ -34,9 +34,6 @@
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要对那些数据表进行生成操作,必须要有一个. -->
<table tableName="tb_order_report_merchant" domainObjectName="OrderReportMerchant" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="tb_order_report_merchantcode" domainObjectName="OrderReportMerchantcode" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="tb_order_report_areacode" domainObjectName="OrderReportAreacode" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="tb_order_report_productcode" domainObjectName="OrderReportProductcode" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="mlt_test" domainObjectName="MltTest" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration>
17 changes: 17 additions & 0 deletions src/main/java/com/xyy/saas/web/schedule/dao/MltTestMapper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.xyy.saas.web.schedule.dao;

import com.xyy.saas.web.schedule.po.MltTest;

public interface MltTestMapper {
int deleteByPrimaryKey(Integer id);

int insert(MltTest record);

int insertSelective(MltTest record);

MltTest selectByPrimaryKey(Integer id);

int updateByPrimaryKeySelective(MltTest record);

int updateByPrimaryKey(MltTest record);
}
43 changes: 43 additions & 0 deletions src/main/java/com/xyy/saas/web/schedule/po/MltTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.xyy.saas.web.schedule.po;

public class MltTest {
private Integer id;

private String name;

private Integer age;

private String text;

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name == null ? null : name.trim();
}

public Integer getAge() {
return age;
}

public void setAge(Integer age) {
this.age = age;
}

public String getText() {
return text;
}

public void setText(String text) {
this.text = text == null ? null : text.trim();
}
}
82 changes: 82 additions & 0 deletions src/main/resources/mapper/schedule/MltTestMapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?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="com.xyy.saas.web.schedule.dao.MltTestMapper">
<resultMap id="BaseResultMap" type="com.xyy.saas.web.schedule.po.MltTest">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="age" jdbcType="INTEGER" property="age" />
<result column="text" jdbcType="VARCHAR" property="text" />
</resultMap>
<sql id="Base_Column_List">
id, name, age, text
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from mlt_test
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from mlt_test
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.xyy.saas.web.schedule.po.MltTest">
insert into mlt_test (id, name, age,
text)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER},
#{text,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.xyy.saas.web.schedule.po.MltTest">
insert into mlt_test
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="age != null">
age,
</if>
<if test="text != null">
text,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="age != null">
#{age,jdbcType=INTEGER},
</if>
<if test="text != null">
#{text,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.xyy.saas.web.schedule.po.MltTest">
update mlt_test
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="age != null">
age = #{age,jdbcType=INTEGER},
</if>
<if test="text != null">
text = #{text,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.xyy.saas.web.schedule.po.MltTest">
update mlt_test
set name = #{name,jdbcType=VARCHAR},
age = #{age,jdbcType=INTEGER},
text = #{text,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

0 comments on commit 919de88

Please sign in to comment.