|
|
|
|
<?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="cc.hiver.core.logisticscompanyroute.mapper.LogisticsCompanyRouteMapper">
|
|
|
|
|
<resultMap id="BaseResultMap" type="cc.hiver.core.logisticscompanyroute.entity.LogisticsCompanyRoute">
|
|
|
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
|
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
|
|
|
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
|
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
|
|
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
|
|
|
|
|
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
|
|
|
|
|
<result column="circuit_id" jdbcType="VARCHAR" property="circuitId" />
|
|
|
|
|
<result column="circuit_name" jdbcType="VARCHAR" property="circuitName" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
id, create_by, create_time, del_flag, update_by, update_time,company_id, company_name, circuit_id, circuit_name
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from t_logistics_company_route
|
|
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
delete from t_logistics_company_route
|
|
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<insert id="insert" parameterType="cc.hiver.core.logisticscompanyroute.entity.LogisticsCompanyRoute">
|
|
|
|
|
insert into t_logistics_company_route
|
|
|
|
|
(id, create_by, create_time, del_flag, update_by, update_time,company_id, company_name, circuit_id, circuit_name)
|
|
|
|
|
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{companyId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{circuitId,jdbcType=VARCHAR}, #{circuitName,jdbcType=VARCHAR})
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
|
update t_logistics_company_route
|
|
|
|
|
<set>
|
|
|
|
|
<if test="record.id != null">
|
|
|
|
|
id = #{record.id,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.createBy != null">
|
|
|
|
|
create_by = #{record.createBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.createTime != null">
|
|
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.delFlag != null">
|
|
|
|
|
del_flag = #{record.delFlag,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.updateBy != null">
|
|
|
|
|
update_by = #{record.updateBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.updateTime != null">
|
|
|
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.companyId != null">
|
|
|
|
|
company_id = #{record.companyId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.companyName != null">
|
|
|
|
|
company_name = #{record.companyName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.circuitId != null">
|
|
|
|
|
circuit_id = #{record.circuitId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.circuitName != null">
|
|
|
|
|
circuit_name = #{record.circuitName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="updateByExample" parameterType="map">
|
|
|
|
|
update t_logistics_company_route
|
|
|
|
|
set id = #{record.id,jdbcType=VARCHAR},
|
|
|
|
|
create_by = #{record.createBy,jdbcType=VARCHAR},
|
|
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
del_flag = #{record.delFlag,jdbcType=INTEGER},
|
|
|
|
|
update_by = #{record.updateBy,jdbcType=VARCHAR},
|
|
|
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
company_id = #{record.companyId,jdbcType=VARCHAR},
|
|
|
|
|
company_name = #{record.companyName,jdbcType=VARCHAR},
|
|
|
|
|
circuit_id = #{record.circuitId,jdbcType=VARCHAR},
|
|
|
|
|
circuit_name = #{record.circuitName,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.core.logisticscompanyroute.entity.LogisticsCompanyRoute">
|
|
|
|
|
update t_logistics_company_route
|
|
|
|
|
<set>
|
|
|
|
|
<if test="createBy != null">
|
|
|
|
|
create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="delFlag != null">
|
|
|
|
|
del_flag = #{delFlag,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateBy != null">
|
|
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
company_id = #{companyId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyName != null">
|
|
|
|
|
company_name = #{companyName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="circuitId != null">
|
|
|
|
|
circuit_id = #{circuitId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="circuitName != null">
|
|
|
|
|
circuit_name = #{circuitName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="cc.hiver.core.logisticscompanyroute.entity.LogisticsCompanyRoute">
|
|
|
|
|
update t_logistics_company_route
|
|
|
|
|
set create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
del_flag = #{delFlag,jdbcType=INTEGER},
|
|
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
company_id = #{companyId,jdbcType=VARCHAR},
|
|
|
|
|
company_name = #{companyName,jdbcType=VARCHAR},
|
|
|
|
|
circuit_id = #{circuitId,jdbcType=VARCHAR},
|
|
|
|
|
circuit_name = #{circuitName,jdbcType=VARCHAR}
|
|
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<!--管理商品分页列表-->
|
|
|
|
|
<select id="getLogisticsCompanyRoutePageList" resultMap="BaseResultMap" parameterType="cc.hiver.core.logisticscompanyroute.vo.LogisticsCompanyRouteQueryVo">
|
|
|
|
|
select
|
|
|
|
|
t.id, t.create_by,t.create_time,t.del_flag,t.update_by,t.update_time,t.company_id,t.company_name,t.circuit_id,t.circuit_name
|
|
|
|
|
from t_logistics_company_route t
|
|
|
|
|
<where>
|
|
|
|
|
<!--反馈内容-->
|
|
|
|
|
<if test='queryParams.companyId!=null and queryParams.companyId.trim() neq ""'>
|
|
|
|
|
AND t.company_id = #{queryParams.companyId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='queryParams.circuitId!=null and queryParams.circuitId.trim() neq ""'>
|
|
|
|
|
AND t.circuit_id = #{queryParams.circuitId}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test='queryParams.companyName!=null and queryParams.companyName.trim() neq ""'>
|
|
|
|
|
AND t.company_name like concat('%',#{queryParams.companyName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test='queryParams.circuitName!=null and queryParams.circuitName.trim() neq ""'>
|
|
|
|
|
AND t.circuit_name like concat('%',#{queryParams.circuitName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<!--开始时间、结束时间-->
|
|
|
|
|
<if test="queryParams.startDate!=null and queryParams.endDate!=null">
|
|
|
|
|
AND t.create_time BETWEEN #{queryParams.startDate} AND #{queryParams.endDate}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY
|
|
|
|
|
t.create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getLogisticsCompanyRouteListByCompanyId" resultMap="BaseResultMap" parameterType="cc.hiver.core.logisticscompanyroute.vo.LogisticsCompanyRouteQueryVo">
|
|
|
|
|
select
|
|
|
|
|
t.id, t.create_by,t.create_time,t.del_flag,t.update_by,t.update_time,t.company_id,t.company_name,t.circuit_id,t.circuit_name
|
|
|
|
|
from t_logistics_company_route t
|
|
|
|
|
<where>
|
|
|
|
|
<!--反馈内容-->
|
|
|
|
|
<if test='queryParams.companyId!=null and queryParams.companyId.trim() neq ""'>
|
|
|
|
|
AND t.company_id = #{queryParams.companyId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='queryParams.circuitId!=null and queryParams.circuitId.trim() neq ""'>
|
|
|
|
|
AND t.circuit_id = #{queryParams.circuitId}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test='queryParams.companyName!=null and queryParams.companyName.trim() neq ""'>
|
|
|
|
|
AND t.company_name like concat('%',#{queryParams.companyName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test='queryParams.circuitName!=null and queryParams.circuitName.trim() neq ""'>
|
|
|
|
|
AND t.circuit_name like concat('%',#{queryParams.circuitName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<!--开始时间、结束时间-->
|
|
|
|
|
<if test="queryParams.startDate!=null and queryParams.endDate!=null">
|
|
|
|
|
AND t.create_time BETWEEN #{queryParams.startDate} AND #{queryParams.endDate}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY
|
|
|
|
|
t.create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|