Browse Source

新增报销帐号表

anderx 2 years ago
parent
commit
08b1d78e48

+ 17 - 0
src/main/java/com/goafanti/common/dao/ExpenseAccountAccountsMapper.java

@@ -0,0 +1,17 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.ExpenseAccountAccounts;
+
+public interface ExpenseAccountAccountsMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(ExpenseAccountAccounts record);
+
+    int insertSelective(ExpenseAccountAccounts record);
+
+    ExpenseAccountAccounts selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ExpenseAccountAccounts record);
+
+    int updateByPrimaryKey(ExpenseAccountAccounts record);
+}

+ 122 - 0
src/main/java/com/goafanti/common/mapper/ExpenseAccountAccountsMapper.xml

@@ -0,0 +1,122 @@
+<?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.goafanti.common.dao.ExpenseAccountAccountsMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.ExpenseAccountAccounts">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="bank" jdbcType="VARCHAR" property="bank" />
+    <result column="accounts" jdbcType="VARCHAR" property="accounts" />
+    <result column="open_bank" jdbcType="VARCHAR" property="openBank" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, aid, `name`, bank, accounts, open_bank, `status`, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from expense_account_accounts
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from expense_account_accounts
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountAccounts" useGeneratedKeys="true">
+    insert into expense_account_accounts (aid, `name`, bank, 
+      accounts, open_bank, `status`, 
+      create_time)
+    values (#{aid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{bank,jdbcType=VARCHAR}, 
+      #{accounts,jdbcType=VARCHAR}, #{openBank,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountAccounts" useGeneratedKeys="true">
+    insert into expense_account_accounts
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="name != null">
+        `name`,
+      </if>
+      <if test="bank != null">
+        bank,
+      </if>
+      <if test="accounts != null">
+        accounts,
+      </if>
+      <if test="openBank != null">
+        open_bank,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="bank != null">
+        #{bank,jdbcType=VARCHAR},
+      </if>
+      <if test="accounts != null">
+        #{accounts,jdbcType=VARCHAR},
+      </if>
+      <if test="openBank != null">
+        #{openBank,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccountAccounts">
+    update expense_account_accounts
+    <set>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        `name` = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="bank != null">
+        bank = #{bank,jdbcType=VARCHAR},
+      </if>
+      <if test="accounts != null">
+        accounts = #{accounts,jdbcType=VARCHAR},
+      </if>
+      <if test="openBank != null">
+        open_bank = #{openBank,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ExpenseAccountAccounts">
+    update expense_account_accounts
+    set aid = #{aid,jdbcType=VARCHAR},
+      `name` = #{name,jdbcType=VARCHAR},
+      bank = #{bank,jdbcType=VARCHAR},
+      accounts = #{accounts,jdbcType=VARCHAR},
+      open_bank = #{openBank,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 113 - 0
src/main/java/com/goafanti/common/model/ExpenseAccountAccounts.java

@@ -0,0 +1,113 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * expense_account_accounts
+ * @author 
+ */
+public class ExpenseAccountAccounts implements Serializable {
+    private Integer id;
+
+    /**
+     * 报销人
+     */
+    private String aid;
+
+    /**
+     * 帐号名称
+     */
+    private String name;
+
+    /**
+     * 银行名称
+     */
+    private String bank;
+
+    /**
+     * 帐号
+     */
+    private String accounts;
+
+    /**
+     * 开户行名称
+     */
+    private String openBank;
+
+    /**
+     * 状态 0=正常,1=默认
+     */
+    private Integer status;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getBank() {
+        return bank;
+    }
+
+    public void setBank(String bank) {
+        this.bank = bank;
+    }
+
+    public String getAccounts() {
+        return accounts;
+    }
+
+    public void setAccounts(String accounts) {
+        this.accounts = accounts;
+    }
+
+    public String getOpenBank() {
+        return openBank;
+    }
+
+    public void setOpenBank(String openBank) {
+        this.openBank = openBank;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}