Commit 6e8ebf7a by 刘宇峰

新增车辆-车型管理

1 parent 54f8a5e9
...@@ -38,4 +38,6 @@ public interface TenantVehicleTypeMapper extends CommonBaseMapper<TenantVehicleT ...@@ -38,4 +38,6 @@ public interface TenantVehicleTypeMapper extends CommonBaseMapper<TenantVehicleT
*/ */
int logicDeleteByTenantId(@Param("tenantId") Long tenantId); int logicDeleteByTenantId(@Param("tenantId") Long tenantId);
int deleteByTenantId(@Param("tenantId") Long tenantId);
} }
\ No newline at end of file \ No newline at end of file
...@@ -824,7 +824,7 @@ public class VehicleService { ...@@ -824,7 +824,7 @@ public class VehicleService {
} }
}); });
if (CollectionUtils.isNotEmpty(tvTypeList)) { if (CollectionUtils.isNotEmpty(tvTypeList)) {
tenantVehicleTypeMapper.logicDeleteByTenantId(typesBO.getTenantId()); tenantVehicleTypeMapper.deleteByTenantId(typesBO.getTenantId());
tenantVehicleTypeMapper.insertList(tvTypeList); tenantVehicleTypeMapper.insertList(tvTypeList);
} }
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
) )
</if> </if>
group by tenant_id, name group by tenant_id, name
order by created_date desc
</select> </select>
<select id="selectByTypeId" resultMap="BaseResultMap"> <select id="selectByTypeId" resultMap="BaseResultMap">
...@@ -68,7 +69,7 @@ ...@@ -68,7 +69,7 @@
from t_tenant_vehicle_type from t_tenant_vehicle_type
where del_flag = 0 where del_flag = 0
and tenant_id = #{tenantId} and tenant_id = #{tenantId}
group by tenant_id, name group by tenant_id
</select> </select>
<select id="selectBrandByTenantIds" resultType="com.glsx.biz.common.base.entity.CarInfoSelected"> <select id="selectBrandByTenantIds" resultType="com.glsx.biz.common.base.entity.CarInfoSelected">
...@@ -116,6 +117,7 @@ ...@@ -116,6 +117,7 @@
</foreach> </foreach>
and series_id = #{seriesId} and series_id = #{seriesId}
group by type_id,type_name group by type_id,type_name
order by type_id desc
</select> </select>
<update id="logicDeleteByTenantId"> <update id="logicDeleteByTenantId">
...@@ -123,4 +125,10 @@ ...@@ -123,4 +125,10 @@
set del_flag = -1 set del_flag = -1
where tenant_id = #{tenantId} where tenant_id = #{tenantId}
</update> </update>
<delete id="deleteByTenantId">
delete
from t_tenant_vehicle_type
where tenant_id = #{tenantId}
</delete>
</mapper> </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!