Authored by chenchao

add dao

  1 +package com.yohoufo.dal.order;
  2 +
  3 +import com.yohoufo.dal.order.model.MetaConfig;
  4 +
  5 +public interface MetaConfigMapper {
  6 + int deleteByPrimaryKey(Integer id);
  7 +
  8 + int insert(MetaConfig record);
  9 +
  10 + int insertSelective(MetaConfig record);
  11 +
  12 + MetaConfig selectByPrimaryKey(Integer id);
  13 +
  14 + int updateByPrimaryKeySelective(MetaConfig record);
  15 +
  16 + int updateByPrimaryKey(MetaConfig record);
  17 +}
  1 +package com.yohoufo.dal.order.model;
  2 +
  3 +public class MetaConfig {
  4 + private Integer id;
  5 +
  6 + private String code;
  7 +
  8 + private String title;
  9 +
  10 + private String value;
  11 +
  12 + private Integer createTime;
  13 +
  14 + private String desc;
  15 +
  16 + public Integer getId() {
  17 + return id;
  18 + }
  19 +
  20 + public void setId(Integer id) {
  21 + this.id = id;
  22 + }
  23 +
  24 + public String getCode() {
  25 + return code;
  26 + }
  27 +
  28 + public void setCode(String code) {
  29 + this.code = code == null ? null : code.trim();
  30 + }
  31 +
  32 + public String getTitle() {
  33 + return title;
  34 + }
  35 +
  36 + public void setTitle(String title) {
  37 + this.title = title == null ? null : title.trim();
  38 + }
  39 +
  40 + public String getValue() {
  41 + return value;
  42 + }
  43 +
  44 + public void setValue(String value) {
  45 + this.value = value == null ? null : value.trim();
  46 + }
  47 +
  48 + public Integer getCreateTime() {
  49 + return createTime;
  50 + }
  51 +
  52 + public void setCreateTime(Integer createTime) {
  53 + this.createTime = createTime;
  54 + }
  55 +
  56 + public String getDesc() {
  57 + return desc;
  58 + }
  59 +
  60 + public void setDesc(String desc) {
  61 + this.desc = desc == null ? null : desc.trim();
  62 + }
  63 +}
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.yohoufo.dal.order.MetaConfigMapper">
  4 + <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.MetaConfig">
  5 + <id column="id" jdbcType="INTEGER" property="id" />
  6 + <result column="code" jdbcType="VARCHAR" property="code" />
  7 + <result column="title" jdbcType="VARCHAR" property="title" />
  8 + <result column="value" jdbcType="VARCHAR" property="value" />
  9 + <result column="create_time" jdbcType="INTEGER" property="createTime" />
  10 + <result column="desc" jdbcType="VARCHAR" property="desc" />
  11 + </resultMap>
  12 + <sql id="Base_Column_List">
  13 + id, code, title, value, create_time, desc
  14 + </sql>
  15 + <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  16 + select
  17 + <include refid="Base_Column_List" />
  18 + from meta_config
  19 + where id = #{id,jdbcType=INTEGER}
  20 + </select>
  21 + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  22 + delete from meta_config
  23 + where id = #{id,jdbcType=INTEGER}
  24 + </delete>
  25 + <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.MetaConfig" useGeneratedKeys="true">
  26 + insert into meta_config (code, title, value,
  27 + create_time, desc)
  28 + values (#{code,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR},
  29 + #{createTime,jdbcType=INTEGER}, #{desc,jdbcType=VARCHAR})
  30 + </insert>
  31 + <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.MetaConfig" useGeneratedKeys="true">
  32 + insert into meta_config
  33 + <trim prefix="(" suffix=")" suffixOverrides=",">
  34 + <if test="code != null">
  35 + code,
  36 + </if>
  37 + <if test="title != null">
  38 + title,
  39 + </if>
  40 + <if test="value != null">
  41 + value,
  42 + </if>
  43 + <if test="createTime != null">
  44 + create_time,
  45 + </if>
  46 + <if test="desc != null">
  47 + desc,
  48 + </if>
  49 + </trim>
  50 + <trim prefix="values (" suffix=")" suffixOverrides=",">
  51 + <if test="code != null">
  52 + #{code,jdbcType=VARCHAR},
  53 + </if>
  54 + <if test="title != null">
  55 + #{title,jdbcType=VARCHAR},
  56 + </if>
  57 + <if test="value != null">
  58 + #{value,jdbcType=VARCHAR},
  59 + </if>
  60 + <if test="createTime != null">
  61 + #{createTime,jdbcType=INTEGER},
  62 + </if>
  63 + <if test="desc != null">
  64 + #{desc,jdbcType=VARCHAR},
  65 + </if>
  66 + </trim>
  67 + </insert>
  68 + <update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.MetaConfig">
  69 + update meta_config
  70 + <set>
  71 + <if test="code != null">
  72 + code = #{code,jdbcType=VARCHAR},
  73 + </if>
  74 + <if test="title != null">
  75 + title = #{title,jdbcType=VARCHAR},
  76 + </if>
  77 + <if test="value != null">
  78 + value = #{value,jdbcType=VARCHAR},
  79 + </if>
  80 + <if test="createTime != null">
  81 + create_time = #{createTime,jdbcType=INTEGER},
  82 + </if>
  83 + <if test="desc != null">
  84 + desc = #{desc,jdbcType=VARCHAR},
  85 + </if>
  86 + </set>
  87 + where id = #{id,jdbcType=INTEGER}
  88 + </update>
  89 + <update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.MetaConfig">
  90 + update meta_config
  91 + set code = #{code,jdbcType=VARCHAR},
  92 + title = #{title,jdbcType=VARCHAR},
  93 + value = #{value,jdbcType=VARCHAR},
  94 + create_time = #{createTime,jdbcType=INTEGER},
  95 + desc = #{desc,jdbcType=VARCHAR}
  96 + where id = #{id,jdbcType=INTEGER}
  97 + </update>
  98 +</mapper>
@@ -67,6 +67,7 @@ datasources: @@ -67,6 +67,7 @@ datasources:
67 - com.yohoufo.dal.order.SellerTaskMapper 67 - com.yohoufo.dal.order.SellerTaskMapper
68 - com.yohoufo.dal.order.SellerTaskDetailMapper 68 - com.yohoufo.dal.order.SellerTaskDetailMapper
69 - com.yohoufo.dal.order.OrdersPrePayMapper 69 - com.yohoufo.dal.order.OrdersPrePayMapper
  70 + - com.yohoufo.dal.order.MetaConfigMapper
70 71
71 ufo_promotion: 72 ufo_promotion:
72 servers: 73 servers:
@@ -67,6 +67,7 @@ datasources: @@ -67,6 +67,7 @@ datasources:
67 - com.yohoufo.dal.order.SellerTaskMapper 67 - com.yohoufo.dal.order.SellerTaskMapper
68 - com.yohoufo.dal.order.SellerTaskDetailMapper 68 - com.yohoufo.dal.order.SellerTaskDetailMapper
69 - com.yohoufo.dal.order.OrdersPrePayMapper 69 - com.yohoufo.dal.order.OrdersPrePayMapper
  70 + - com.yohoufo.dal.order.MetaConfigMapper
70 71
71 ufo_promotion: 72 ufo_promotion:
72 servers: 73 servers: