liujie
2023-08-31 a0afbd1e36f74cb521c4d51b08a54f6a1fe538f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?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.stylefeng.guns.modular.system.dao.TCompanyMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TCompany">
        <id column="id" property="id" />
        <result column="describe" property="describe" />
        <result column="headImg" property="headImg" />
        <result column="name" property="name" />
        <result column="scac_code" property="scacCode" />
        <result column="contact_phone" property="contactPhone" />
        <result column="contact_email" property="contactEmail" />
        <result column="address" property="address" />
        <result column="mc_number" property="mcNumber" />
        <result column="usdot" property="usdot" />
        <result column="set_up_the_time" property="setUpTheTime" />
        <result column="logistics_contact_name" property="logisticsContactName" />
        <result column="logistics_contact_email" property="logisticsContactEmail" />
        <result column="account" property="account" />
        <result column="password" property="password" />
        <result column="expiration_time" property="expirationTime" />
        <result column="status" property="status" />
        <result column="HAZ_MAT" property="HAZMAT" />
        <result column="OVERWEIGHT_PERMIT" property="overweightPermit" />
        <result column="LIQUOR" property="liquor" />
        <result column="HOUSEHOLD_GOODS" property="householdGoods" />
        <result column="RESIDENTIAL_DELIVERY" property="residentialDelivery" />
        <result column="TSA" property="tsa" />
        <result column="AMAZON" property="amazon" />
        <result column="TRANSLOAD_SERVICE" property="transloadService" />
        <result column="CHAINS" property="chains" />
        <result column="CONTAINER_SIZES" property="containerSizes" />
        <result column="OCEAN_PORT_DRAYAGE" property="oceanPortDrayage" />
        <result column="RAIL_RAMP_DRAYAGE" property="railRampDrayage" />
        <result column="DRY_CONTAINER_DRAYAGE" property="dryContainerDrayage" />
        <result column="REEFER_DRAYAGE" property="reeferDrayage" />
        <result column="OPEN_TOP_DRAYAGE" property="openTopDrayage" />
        <result column="TANK_ENDORSED_DRAYAGE" property="tankEndorsedDrayage" />
        <result column="ISO_TANK_DRAYAGE" property="isoTankDrayage" />
        <result column="PRIVATE_CHASSIS" property="privateChassis" />
        <result column="TWIC" property="twic" />
        <result column="ELD" property="eld" />
        <result column="language" property="language" />
        <result column="GP" property="gp" />
        <result column="HQ" property="hq" />
        <result column="HC" property="hc" />
        <result column="RF" property="rf" />
        <result column="RH" property="rh" />
        <result column="OT" property="ot" />
        <result column="TK" property="tk" />
        <result column="FR" property="fr" />
        <result column="DG" property="dg" />
        <result column="class1" property="class1" />
        <result column="class2" property="class2" />
        <result column="class3" property="class3" />
        <result column="class4" property="class4" />
        <result column="class5" property="class5" />
        <result column="class6" property="class6" />
        <result column="class7" property="class7" />
        <result column="class8" property="class8" />
        <result column="class9" property="class9" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, describe, headImg, name, scac_code, contact_phone, contact_email, address, mc_number, usdot, set_up_the_time, logistics_contact_name, logistics_contact_email, account, password, expiration_time, status, HAZ_MAT, OVERWEIGHT_PERMIT, LIQUOR, HOUSEHOLD_GOODS, RESIDENTIAL_DELIVERY, TSA, AMAZON, TRANSLOAD_SERVICE, CHAINS, CONTAINER_SIZES, OCEAN_PORT_DRAYAGE, RAIL_RAMP_DRAYAGE, DRY_CONTAINER_DRAYAGE, REEFER_DRAYAGE, OPEN_TOP_DRAYAGE, TANK_ENDORSED_DRAYAGE, ISO_TANK_DRAYAGE, PRIVATE_CHASSIS, TWIC, ELD, language, GP, HQ, HC, RF, RH, OT, TK, FR, DG, class1, class2, class3, class4, class5, class6, class7, class8, class9
    </sql>
    <select id="selectList1" resultType="com.stylefeng.guns.modular.system.model.TCompanyVo">
        select id,headImg,name,account,status from t_company
        where remove = 0 and status in(1,3)
        <if test="name !=null and name != '' ">
            and (name like concat("%",#{name},"%") or id =#{name})
        </if>
        <if test="account !=null and account != '' ">
            and account like concat("%",#{account},"%")
        </if>
    </select>
    <select id="selectList2" resultType="com.stylefeng.guns.modular.system.model.TCompanyVo">
        select id,headImg,name,account,status from t_company
        where remove = 0
        <if test="name !=null and name != '' ">
            and (name like concat("%",#{name},"%") or id =#{name})
        </if>
        <if test="account !=null and account != '' ">
            and account like concat("%",#{account},"%")
        </if>
        <if test="state !=null and state != '' ">
            and status =#{state}
        </if>
        <if test="state == null or state == '' ">
            and status in (0,2)
        </if>
    </select>
 
</mapper>