删除代码生成往来单位管理
This commit is contained in:
parent
63a4ab2839
commit
e593302202
|
|
@ -0,0 +1,75 @@
|
||||||
|
package generate;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bm_customer
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BmCustomer implements Serializable {
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 往来单位类型
|
||||||
|
*/
|
||||||
|
private Integer typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属分公司
|
||||||
|
*/
|
||||||
|
private Integer companyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 往来单位名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料员
|
||||||
|
*/
|
||||||
|
private String materialClerk;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目经理
|
||||||
|
*/
|
||||||
|
private String manager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用0不启用1启用
|
||||||
|
*/
|
||||||
|
private String isActive;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人代表
|
||||||
|
*/
|
||||||
|
private String legalRepresentative;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
private String legalPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Integer sortNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织分公司id
|
||||||
|
*/
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package generate;
|
||||||
|
|
||||||
|
import generate.BmCustomer;
|
||||||
|
|
||||||
|
public interface BmCustomerDao {
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int insert(BmCustomer record);
|
||||||
|
|
||||||
|
int insertSelective(BmCustomer record);
|
||||||
|
|
||||||
|
BmCustomer selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(BmCustomer record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(BmCustomer record);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,182 @@
|
||||||
|
<?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="generate.BmCustomerDao">
|
||||||
|
<resultMap id="BaseResultMap" type="generate.BmCustomer">
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="type_id" jdbcType="INTEGER" property="typeId" />
|
||||||
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="material_clerk" jdbcType="VARCHAR" property="materialClerk" />
|
||||||
|
<result column="manager" jdbcType="VARCHAR" property="manager" />
|
||||||
|
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
||||||
|
<result column="is_active" jdbcType="CHAR" property="isActive" />
|
||||||
|
<result column="time" jdbcType="VARCHAR" property="time" />
|
||||||
|
<result column="legal_representative" jdbcType="VARCHAR" property="legalRepresentative" />
|
||||||
|
<result column="legal_phone" jdbcType="VARCHAR" property="legalPhone" />
|
||||||
|
<result column="sort_num" jdbcType="INTEGER" property="sortNum" />
|
||||||
|
<result column="company" jdbcType="VARCHAR" property="company" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, type_id, company_id, `name`, material_clerk, manager, phone, is_active, `time`,
|
||||||
|
legal_representative, legal_phone, sort_num, company
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from bm_customer
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
delete from bm_customer
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="generate.BmCustomer" useGeneratedKeys="true">
|
||||||
|
insert into bm_customer (type_id, company_id, `name`,
|
||||||
|
material_clerk, manager, phone,
|
||||||
|
is_active, `time`, legal_representative,
|
||||||
|
legal_phone, sort_num, company
|
||||||
|
)
|
||||||
|
values (#{typeId,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
|
||||||
|
#{materialClerk,jdbcType=VARCHAR}, #{manager,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
|
||||||
|
#{isActive,jdbcType=CHAR}, #{time,jdbcType=VARCHAR}, #{legalRepresentative,jdbcType=VARCHAR},
|
||||||
|
#{legalPhone,jdbcType=VARCHAR}, #{sortNum,jdbcType=INTEGER}, #{company,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="generate.BmCustomer" useGeneratedKeys="true">
|
||||||
|
insert into bm_customer
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id,
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null">
|
||||||
|
company_id,
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</if>
|
||||||
|
<if test="materialClerk != null">
|
||||||
|
material_clerk,
|
||||||
|
</if>
|
||||||
|
<if test="manager != null">
|
||||||
|
manager,
|
||||||
|
</if>
|
||||||
|
<if test="phone != null">
|
||||||
|
phone,
|
||||||
|
</if>
|
||||||
|
<if test="isActive != null">
|
||||||
|
is_active,
|
||||||
|
</if>
|
||||||
|
<if test="time != null">
|
||||||
|
`time`,
|
||||||
|
</if>
|
||||||
|
<if test="legalRepresentative != null">
|
||||||
|
legal_representative,
|
||||||
|
</if>
|
||||||
|
<if test="legalPhone != null">
|
||||||
|
legal_phone,
|
||||||
|
</if>
|
||||||
|
<if test="sortNum != null">
|
||||||
|
sort_num,
|
||||||
|
</if>
|
||||||
|
<if test="company != null">
|
||||||
|
company,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null">
|
||||||
|
#{typeId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null">
|
||||||
|
#{companyId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="materialClerk != null">
|
||||||
|
#{materialClerk,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="manager != null">
|
||||||
|
#{manager,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="phone != null">
|
||||||
|
#{phone,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="isActive != null">
|
||||||
|
#{isActive,jdbcType=CHAR},
|
||||||
|
</if>
|
||||||
|
<if test="time != null">
|
||||||
|
#{time,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="legalRepresentative != null">
|
||||||
|
#{legalRepresentative,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="legalPhone != null">
|
||||||
|
#{legalPhone,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sortNum != null">
|
||||||
|
#{sortNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="company != null">
|
||||||
|
#{company,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="generate.BmCustomer">
|
||||||
|
update bm_customer
|
||||||
|
<set>
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id = #{typeId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null">
|
||||||
|
company_id = #{companyId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="materialClerk != null">
|
||||||
|
material_clerk = #{materialClerk,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="manager != null">
|
||||||
|
manager = #{manager,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="phone != null">
|
||||||
|
phone = #{phone,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="isActive != null">
|
||||||
|
is_active = #{isActive,jdbcType=CHAR},
|
||||||
|
</if>
|
||||||
|
<if test="time != null">
|
||||||
|
`time` = #{time,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="legalRepresentative != null">
|
||||||
|
legal_representative = #{legalRepresentative,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="legalPhone != null">
|
||||||
|
legal_phone = #{legalPhone,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sortNum != null">
|
||||||
|
sort_num = #{sortNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="company != null">
|
||||||
|
company = #{company,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="generate.BmCustomer">
|
||||||
|
update bm_customer
|
||||||
|
set type_id = #{typeId,jdbcType=INTEGER},
|
||||||
|
company_id = #{companyId,jdbcType=INTEGER},
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
material_clerk = #{materialClerk,jdbcType=VARCHAR},
|
||||||
|
manager = #{manager,jdbcType=VARCHAR},
|
||||||
|
phone = #{phone,jdbcType=VARCHAR},
|
||||||
|
is_active = #{isActive,jdbcType=CHAR},
|
||||||
|
`time` = #{time,jdbcType=VARCHAR},
|
||||||
|
legal_representative = #{legalRepresentative,jdbcType=VARCHAR},
|
||||||
|
legal_phone = #{legalPhone,jdbcType=VARCHAR},
|
||||||
|
sort_num = #{sortNum,jdbcType=INTEGER},
|
||||||
|
company = #{company,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue