添加根据用户id查询企业信息
This commit is contained in:
+9
@@ -750,6 +750,15 @@ public class UserDriverEnterpriseApplicationService {
|
|||||||
public UserDriverEnterprisePo getEnterpriseByUserId(Long userId) {
|
public UserDriverEnterprisePo getEnterpriseByUserId(Long userId) {
|
||||||
return userDriverEnterpriseDomainService.getEnterpriseByUserId(userId);
|
return userDriverEnterpriseDomainService.getEnterpriseByUserId(userId);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据用户id查询用户企业信息
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public UserDriverEnterprisePo getEnterpriseByUserIds(Long userId) {
|
||||||
|
return userDriverEnterpriseDomainService.getEnterpriseByUserIds(userId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param driverEnterpriseCode
|
* @param driverEnterpriseCode
|
||||||
|
|||||||
+2
@@ -52,4 +52,6 @@ public interface UserDriverEnterpriseService extends IService<UserDriverEnterpri
|
|||||||
List<UserDriverEnterprisePo> queryCaptainList(UserDriverEnterpriseDo userDriverEnterpriseDo);
|
List<UserDriverEnterprisePo> queryCaptainList(UserDriverEnterpriseDo userDriverEnterpriseDo);
|
||||||
|
|
||||||
UserDriverEnterprisePo getEnterpriseByUserId(Long userId);
|
UserDriverEnterprisePo getEnterpriseByUserId(Long userId);
|
||||||
|
|
||||||
|
UserDriverEnterprisePo getEnterpriseByUserIds(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -35,4 +35,6 @@ public interface UserDriverEnterpriseMapper extends BaseMapper<UserDriverEnterpr
|
|||||||
List<UserDriverEnterprisePo> queryCaptainList(@Param("userDriverEnterpriseDo") UserDriverEnterpriseDo userDriverEnterpriseDo);
|
List<UserDriverEnterprisePo> queryCaptainList(@Param("userDriverEnterpriseDo") UserDriverEnterpriseDo userDriverEnterpriseDo);
|
||||||
|
|
||||||
UserDriverEnterprisePo getEnterpriseByUserId(@Param("userId") Long userId);
|
UserDriverEnterprisePo getEnterpriseByUserId(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
UserDriverEnterprisePo getEnterpriseByUserIds(@Param("userId") Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -111,4 +111,9 @@ public class UserDriverEnterpriseImpl extends ServiceImpl<UserDriverEnterpriseMa
|
|||||||
public UserDriverEnterprisePo getEnterpriseByUserId(Long userId) {
|
public UserDriverEnterprisePo getEnterpriseByUserId(Long userId) {
|
||||||
return userDriverEnterpriseMapper.getEnterpriseByUserId(userId);
|
return userDriverEnterpriseMapper.getEnterpriseByUserId(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserDriverEnterprisePo getEnterpriseByUserIds(Long userId) {
|
||||||
|
return userDriverEnterpriseMapper.getEnterpriseByUserIds(userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -154,4 +154,8 @@ public class UserDriverEnterpriseDomainService {
|
|||||||
.eq(UserDriverEnterprise::getUserId, userId)
|
.eq(UserDriverEnterprise::getUserId, userId)
|
||||||
.update();
|
.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UserDriverEnterprisePo getEnterpriseByUserIds(Long userId) {
|
||||||
|
return userDriverEnterpriseService.getEnterpriseByUserIds(userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.mhd.common.log.enums.BusinessType;
|
|||||||
import com.mhd.user.application.service.*;
|
import com.mhd.user.application.service.*;
|
||||||
import com.mhd.user.domain.userAggregate.entity.DriverExcel;
|
import com.mhd.user.domain.userAggregate.entity.DriverExcel;
|
||||||
import com.mhd.user.domain.userAggregate.repository.po.DriverVehicleBindPo;
|
import com.mhd.user.domain.userAggregate.repository.po.DriverVehicleBindPo;
|
||||||
|
import com.mhd.user.domain.userAggregate.repository.po.UserDriverEnterprisePo;
|
||||||
import com.mhd.user.domain.userAggregate.repository.todo.*;
|
import com.mhd.user.domain.userAggregate.repository.todo.*;
|
||||||
import com.mhd.user.interfaces.assember.*;
|
import com.mhd.user.interfaces.assember.*;
|
||||||
import com.mhd.user.interfaces.dto.DriverExcelDto;
|
import com.mhd.user.interfaces.dto.DriverExcelDto;
|
||||||
@@ -303,6 +304,12 @@ public class UserDriverAPI extends BaseController {
|
|||||||
return AjaxResult.success(userDriverEnterpriseApplicationService.getEnterpriseByUserId(userId));
|
return AjaxResult.success(userDriverEnterpriseApplicationService.getEnterpriseByUserId(userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据用户id查询企业信息(返回值不同)")
|
||||||
|
@GetMapping("/getEnterpriseByUserIds")
|
||||||
|
public UserDriverEnterprisePo getEnterpriseByUserIds(@RequestParam("userId") Long userId) {
|
||||||
|
return userDriverEnterpriseApplicationService.getEnterpriseByUserIds(userId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取司机校验相应值
|
* 获取司机校验相应值
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -106,4 +106,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND a.user_id = #{userId}
|
AND a.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getEnterpriseByUserIds" resultType="com.mhd.user.domain.userAggregate.repository.po.UserDriverEnterprisePo" parameterType="java.lang.Long">
|
||||||
|
SELECT
|
||||||
|
a.*
|
||||||
|
FROM
|
||||||
|
user_driver_enterprise a
|
||||||
|
WHERE
|
||||||
|
a.del_flag = 1
|
||||||
|
AND a.driver_type = 2
|
||||||
|
AND a.user_id = #{userId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user