|
@@ -15,17 +15,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
15
|
15
|
<result property="expense" column="expense" />
|
16
|
16
|
<result property="remark" column="remark" />
|
17
|
17
|
<association property="car" javaType="CmcCar" resultMap="CmcCarResult" />
|
|
18
|
+ <association property="driverUser" javaType="SysUser" resultMap="SysUserResult" />
|
18
|
19
|
</resultMap>
|
19
|
20
|
|
20
|
21
|
<resultMap type="CmcCar" id="CmcCarResult">
|
21
|
22
|
<result property="carId" column="car_id" />
|
22
|
23
|
<result property="licensePlate" column="license_plate" />
|
|
24
|
+ <result property="driver" column="driver" />
|
23
|
25
|
<result property="dayCost" column="day_cost" />
|
24
|
26
|
</resultMap>
|
25
|
27
|
|
|
28
|
+ <resultMap type="SysUser" id="SysUserResult">
|
|
29
|
+ <result property="userId" column="user_id" />
|
|
30
|
+ <result property="nickName" column="nick_name" />
|
|
31
|
+ </resultMap>
|
|
32
|
+
|
26
|
33
|
<sql id="selectCmcBudgetCarVo">
|
27
|
|
- select bc.budget_car_id, bc.budget_id, bc.car_id, c.license_plate, c.day_cost, bc.days, bc.depreciation, bc.distance, bc.mileage, bc.expense, bc.remark from cmc_budget_car as bc
|
|
34
|
+ select bc.budget_car_id, bc.budget_id, bc.car_id, c.license_plate, c.driver, u.nick_name, c.day_cost, bc.days, bc.depreciation, bc.distance, bc.mileage, bc.expense, bc.remark from cmc_budget_car as bc
|
28
|
35
|
left join cmc_car as c on c.car_id = bc.car_id
|
|
36
|
+ left join sys_user as u on c.driver = u.user_id
|
29
|
37
|
</sql>
|
30
|
38
|
|
31
|
39
|
<select id="selectCmcBudgetCarList" parameterType="CmcBudgetCar" resultMap="CmcBudgetCarResult">
|