提交 0edf5dda 作者: 刘明祎-运维用途

限制飞手团队只能查看自己团队飞手的订单

上级 56946349
流水线 #7224 已通过 于阶段
in 2 分 10 秒
...@@ -20,6 +20,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -20,6 +20,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* @Author small * @Author small
...@@ -192,4 +193,12 @@ public class PilotCertificationController extends BaseController { ...@@ -192,4 +193,12 @@ public class PilotCertificationController extends BaseController {
return certificationService.deletePilotFromTeam(pilotId); return certificationService.deletePilotFromTeam(pilotId);
} }
@ApiOperation(value = "查询团队里面的飞手id")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("/selectPilotIdList")
public List<Integer> selectPilotListByTeamId(HttpServletRequest request) {
return certificationService.selectPilotIdList(this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
} }
...@@ -135,4 +135,11 @@ public interface PilotCertificationDao { ...@@ -135,4 +135,11 @@ public interface PilotCertificationDao {
* @param pilotId 飞手的user_id * @param pilotId 飞手的user_id
*/ */
void deletePilotFromTeam(Integer pilotId); void deletePilotFromTeam(Integer pilotId);
/**
* 根据后台(团队)id查询所属于该团队飞手的用户id
* @param backUserId
* @return {@link List}<{@link Integer}>
*/
List<Integer> selectPilotIdList(Integer backUserId);
} }
...@@ -11,6 +11,8 @@ import com.mmc.iuav.user.model.qo.dronepilot.*; ...@@ -11,6 +11,8 @@ import com.mmc.iuav.user.model.qo.dronepilot.*;
import com.mmc.iuav.user.model.vo.CompanyInfoVO; import com.mmc.iuav.user.model.vo.CompanyInfoVO;
import com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO; import com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO;
import java.util.List;
/** /**
* @Author small * @Author small
* @Date 2023/7/28 9:35 * @Date 2023/7/28 9:35
...@@ -55,4 +57,6 @@ public interface PilotCertificationService { ...@@ -55,4 +57,6 @@ public interface PilotCertificationService {
ResultBody selectCompanyInfoByPilotId(Integer pilotId); ResultBody selectCompanyInfoByPilotId(Integer pilotId);
ResultBody deletePilotFromTeam(Integer pilotId); ResultBody deletePilotFromTeam(Integer pilotId);
List<Integer> selectPilotIdList(Integer backUserId);
} }
...@@ -627,4 +627,9 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -627,4 +627,9 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
certificationDao.deletePilotFromTeam(pilotId); certificationDao.deletePilotFromTeam(pilotId);
return ResultBody.success(); return ResultBody.success();
} }
@Override
public List<Integer> selectPilotIdList(Integer backUserId) {
return certificationDao.selectPilotIdList(backUserId);
}
} }
...@@ -506,5 +506,8 @@ ...@@ -506,5 +506,8 @@
inner join pilot_join_team pjt on cbu.back_user_account_id = pjt.back_user_id inner join pilot_join_team pjt on cbu.back_user_account_id = pjt.back_user_id
where pjt.pilot_user_id = #{userId} where pjt.pilot_user_id = #{userId}
</select> </select>
<select id="selectPilotIdList" resultType="java.lang.Integer">
select pilot_user_id from pilot_join_team where back_user_id = #{backUserId}
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论