提交 adcd94f8 作者: 恶龙咆哮

飞手团队删除飞手

上级 23f16e93
...@@ -151,7 +151,7 @@ public class PilotCertificationController extends BaseController { ...@@ -151,7 +151,7 @@ public class PilotCertificationController extends BaseController {
@ApiOperation(value = "后台-飞手团队添加飞手") @ApiOperation(value = "后台-飞手团队添加飞手")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("/insertPilotJoinTeam") @GetMapping("/insertPilotJoinTeam")
public ResultBody insertPilotJoinTeam(HttpServletRequest request,@ApiParam(value = "要添加的飞手id", required = true) @RequestParam Integer pilotId) { public ResultBody insertPilotJoinTeam(HttpServletRequest request,@ApiParam(value = "要添加的飞手id", required = true) @RequestParam Integer pilotId) {
return certificationService.insertPilotJoinTeam(pilotId,this.getUserLoginInfoFromRedis(request).getUserAccountId()); return certificationService.insertPilotJoinTeam(pilotId,this.getUserLoginInfoFromRedis(request).getUserAccountId());
} }
...@@ -173,7 +173,7 @@ public class PilotCertificationController extends BaseController { ...@@ -173,7 +173,7 @@ public class PilotCertificationController extends BaseController {
@ApiOperation(value = "小程序-飞手是否加入团队") @ApiOperation(value = "小程序-飞手是否加入团队")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("/changePilotStatus") @GetMapping("/changePilotStatus")
public ResultBody updatePilotStatus(HttpServletRequest request,@ApiParam(value = "是否加入飞手团队 同意 1 ,拒绝 2", required = true) @RequestParam Integer status) { public ResultBody updatePilotStatus(HttpServletRequest request,@ApiParam(value = "是否加入飞手团队 同意 1 ,拒绝 2", required = true) @RequestParam Integer status) {
return certificationService.updatePilotStatus(this.getUserLoginInfoFromRedis(request).getUserAccountId(),status); return certificationService.updatePilotStatus(this.getUserLoginInfoFromRedis(request).getUserAccountId(),status);
} }
...@@ -184,4 +184,12 @@ public class PilotCertificationController extends BaseController { ...@@ -184,4 +184,12 @@ public class PilotCertificationController extends BaseController {
public ResultBody<CompanyInfoVO> selectCompanyInfoByPilotId(HttpServletRequest request) { public ResultBody<CompanyInfoVO> selectCompanyInfoByPilotId(HttpServletRequest request) {
return certificationService.selectCompanyInfoByPilotId(this.getUserLoginInfoFromRedis(request).getUserAccountId()); return certificationService.selectCompanyInfoByPilotId(this.getUserLoginInfoFromRedis(request).getUserAccountId());
} }
@ApiOperation(value = "后台-飞手团队踢人")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("/deletePilotFromTeam")
public ResultBody deletePilotFromTeam(@ApiParam(value = "把飞手踢出飞手团队", required = true) @RequestParam Integer pilotId) {
return certificationService.deletePilotFromTeam(pilotId);
}
} }
...@@ -111,4 +111,11 @@ public interface PilotCertificationDao { ...@@ -111,4 +111,11 @@ public interface PilotCertificationDao {
* @return {@link CompanyInfoDO} * @return {@link CompanyInfoDO}
*/ */
CompanyInfoDO selectCompanyInfoByPilotId(Integer pilotId); CompanyInfoDO selectCompanyInfoByPilotId(Integer pilotId);
/**
* 根据飞手的id删除飞手绑定的飞手团队
* @param pilotId 飞手的user_id
*/
void deletePilotFromTeam(Integer pilotId);
} }
...@@ -53,4 +53,6 @@ public interface PilotCertificationService { ...@@ -53,4 +53,6 @@ public interface PilotCertificationService {
ResultBody updatePilotStatus(Integer userId,Integer pilotStatus); ResultBody updatePilotStatus(Integer userId,Integer pilotStatus);
ResultBody selectCompanyInfoByPilotId(Integer pilotId); ResultBody selectCompanyInfoByPilotId(Integer pilotId);
ResultBody deletePilotFromTeam(Integer pilotId);
} }
...@@ -605,4 +605,10 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -605,4 +605,10 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
CompanyInfoVO companyInfoVO = companyInfoDO.buildCompanyInfoVO(); CompanyInfoVO companyInfoVO = companyInfoDO.buildCompanyInfoVO();
return ResultBody.success(companyInfoVO); return ResultBody.success(companyInfoVO);
} }
@Override
public ResultBody deletePilotFromTeam(Integer pilotId) {
certificationDao.deletePilotFromTeam(pilotId);
return ResultBody.success();
}
} }
...@@ -93,6 +93,10 @@ ...@@ -93,6 +93,10 @@
from pilot_ability_certification from pilot_ability_certification
where pilot_certification_id = #{id} where pilot_certification_id = #{id}
</delete> </delete>
<delete id="deletePilotFromTeam">
delete from pilot_join_team
where pilot_user_id = #{pilotId}
</delete>
<update id="updatePilot" parameterType="com.mmc.iuav.user.entity.dronepilot.PilotCertificationDO"> <update id="updatePilot" parameterType="com.mmc.iuav.user.entity.dronepilot.PilotCertificationDO">
UPDATE pilot_certification UPDATE pilot_certification
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论