You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
5.0 KiB

<?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.mall.logisticsentruckinglog.mapper.LogisticsEntruckingLogMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog">
<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" />
<result column="car_number" jdbcType="VARCHAR" property="carNumber" />
<result column="car_phone" jdbcType="VARCHAR" property="carPhone" />
<result column="car_user_name" jdbcType="VARCHAR" property="carUserName" />
<result column="car_fee" jdbcType="DECIMAL" property="carFee" />
<result column="car_freight" jdbcType="DECIMAL" property="carFreight" />
</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,
car_number, car_phone, car_user_name, car_fee, car_freight
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_entrucking_log
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_logistics_entrucking_log
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog">
insert into t_logistics_entrucking_log
(id, create_by, create_time, del_flag, update_by, update_time, company_id, company_name, circuit_id, circuit_name,
car_number, car_phone, car_user_name, car_fee, car_freight)
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},
#{carNumber,jdbcType=VARCHAR}, #{carPhone,jdbcType=VARCHAR}, #{carUserName,jdbcType=VARCHAR}, #{carFee,jdbcType=DECIMAL}, #{carFreight,jdbcType=DECIMAL})
</insert>
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog">
update t_logistics_entrucking_log
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},
car_number = #{carNumber,jdbcType=VARCHAR},
car_phone = #{carPhone,jdbcType=VARCHAR},
car_user_name = #{carUserName,jdbcType=VARCHAR},
car_fee = #{carFee,jdbcType=DECIMAL},
car_freight = #{carFreight,jdbcType=DECIMAL}
where id = #{id,jdbcType=VARCHAR}
</update>
<!--管理商品分页列表-->
<select id="getLogisticsEntruckingLogPageList" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticsentruckinglog.vo.LogisticsEntruckingLogQueryVo">
select
<include refid="Base_Column_List" />
from t_logistics_entrucking_log
<where>
<!--物流公司id-->
<if test='queryParams.companyId!=null and queryParams.companyId.trim() neq ""'>
AND company_id = #{queryParams.companyId}
</if>
<!--物流公司名称-->
<if test='queryParams.companyName!=null and queryParams.companyName.trim() neq ""'>
AND company_name like concat('%',#{queryParams.companyName},'%')
</if>
<!--线路id-->
<if test='queryParams.circuitId!=null and queryParams.circuitId.trim() neq ""'>
AND circuit_id = #{queryParams.circuitId}
</if>
<!--线路名称-->
<if test='queryParams.circuitName!=null and queryParams.circuitName.trim() neq ""'>
AND circuit_name like concat('%',#{queryParams.circuitName},'%')
</if>
<!--车牌号-->
<if test='queryParams.carNumber!=null and queryParams.carNumber.trim() neq ""'>
AND car_number like concat('%',#{queryParams.carNumber},'%')
</if>
</where>
ORDER BY
create_time desc
</select>
</mapper>