Commit 54728232 by zhengxj

finish 新增dao,实体类 ,映射文件 on 20190416 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@19722 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 360ced89
package com.glsx.ordercenter.mapper;
import java.util.List;
import com.glsx.ordercenter.pojo.SysChannelOrg;
import com.glsx.ordercenter.pojo.SysChannelOrgExample;
public interface SysChannelOrgMapper {
long countByExample(SysChannelOrgExample example);
int deleteByPrimaryKey(Integer id);
int insert(SysChannelOrg record);
int insertSelective(SysChannelOrg record);
List<SysChannelOrg> selectByExample(SysChannelOrgExample example);
SysChannelOrg selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(SysChannelOrg record);
int updateByPrimaryKey(SysChannelOrg record);
}
\ No newline at end of file \ No newline at end of file
package com.glsx.ordercenter.pojo;
import java.util.Date;
public class SysChannelOrg {
private Integer id;
private String channel;
private Integer orgid;
private String remark;
private Date createTime;
private Date updateTime;
private Integer createBy;
private Integer updateBy;
private String channelName;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getChannel() {
return channel;
}
public void setChannel(String channel) {
this.channel = channel == null ? null : channel.trim();
}
public Integer getOrgid() {
return orgid;
}
public void setOrgid(Integer orgid) {
this.orgid = orgid;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getCreateBy() {
return createBy;
}
public void setCreateBy(Integer createBy) {
this.createBy = createBy;
}
public Integer getUpdateBy() {
return updateBy;
}
public void setUpdateBy(Integer updateBy) {
this.updateBy = updateBy;
}
public String getChannelName() {
return channelName;
}
public void setChannelName(String channelName) {
this.channelName = channelName == null ? null : channelName.trim();
}
}
\ No newline at end of file \ 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="com.glsx.ordercenter.mapper.SysChannelOrgMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysChannelOrg">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="channel" jdbcType="VARCHAR" property="channel" />
<result column="orgId" jdbcType="INTEGER" property="orgid" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_by" jdbcType="INTEGER" property="createBy" />
<result column="update_by" jdbcType="INTEGER" property="updateBy" />
<result column="channel_name" jdbcType="VARCHAR" property="channelName" />
</resultMap>
<sql id="Example_Where_Clause">
<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="Base_Column_List">
id, channel, orgId, remark, create_time, update_time, create_by, update_by, channel_name
</sql>
<select id="selectByExample" parameterType="com.glsx.ordercenter.pojo.SysChannelOrgExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'false' as QUERYID,
<include refid="Base_Column_List" />
from sys_channel_org
<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">
select
<include refid="Base_Column_List" />
from sys_channel_org
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_channel_org
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glsx.ordercenter.pojo.SysChannelOrg">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_channel_org (channel, orgId, remark,
create_time, update_time, create_by,
update_by, channel_name)
values (#{channel,jdbcType=VARCHAR}, #{orgid,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=INTEGER},
#{updateBy,jdbcType=INTEGER}, #{channelName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysChannelOrg">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_channel_org
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="channel != null">
channel,
</if>
<if test="orgid != null">
orgId,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="channelName != null">
channel_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="channel != null">
#{channel,jdbcType=VARCHAR},
</if>
<if test="orgid != null">
#{orgid,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
#{createBy,jdbcType=INTEGER},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=INTEGER},
</if>
<if test="channelName != null">
#{channelName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.glsx.ordercenter.pojo.SysChannelOrgExample" resultType="java.lang.Long">
select count(*) from sys_channel_org
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysChannelOrg">
update sys_channel_org
<set>
<if test="channel != null">
channel = #{channel,jdbcType=VARCHAR},
</if>
<if test="orgid != null">
orgId = #{orgid,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=INTEGER},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=INTEGER},
</if>
<if test="channelName != null">
channel_name = #{channelName,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysChannelOrg">
update sys_channel_org
set channel = #{channel,jdbcType=VARCHAR},
orgId = #{orgid,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=INTEGER},
update_by = #{updateBy,jdbcType=INTEGER},
channel_name = #{channelName,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!