Commit 56dd7b41 by zhangxingmin

push

parent cf551581
...@@ -14,6 +14,8 @@ import org.springframework.validation.annotation.Validated; ...@@ -14,6 +14,8 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotBlank;
/** /**
* 预约信息 * 预约信息
* *
...@@ -158,5 +160,15 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient { ...@@ -158,5 +160,15 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient {
return apiAppointmentService.editPolicyTransfer(request); return apiAppointmentService.editPolicyTransfer(request);
} }
/**
* 删除预约信息
* @param appointmentBizId
* @return
*/
@Override
public Result del(String appointmentBizId) {
return apiAppointmentService.del(appointmentBizId);
}
} }
...@@ -36,5 +36,7 @@ public interface ApiAppointmentService { ...@@ -36,5 +36,7 @@ public interface ApiAppointmentService {
Result editPolicyTransfer(ApiPolicyTransferRequest request); Result editPolicyTransfer(ApiPolicyTransferRequest request);
Result del(String appointmentBizId);
Result<Appointment> checkAppointmentIsExist(String appointmentBizId); Result<Appointment> checkAppointmentIsExist(String appointmentBizId);
} }
...@@ -499,6 +499,20 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -499,6 +499,20 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
} }
/** /**
* 删除预约信息
* @param appointmentBizId
* @return
*/
@Override
public Result del(String appointmentBizId) {
//校验预约信息是否存在
Result<Appointment> result = checkAppointmentIsExist(appointmentBizId);
Appointment appointment = result.getData();
iAppointmentService.del(appointmentBizId);
return Result.success();
}
/**
* 新增健康问卷和预约对象关系绑定 * 新增健康问卷和预约对象关系绑定
* @return * @return
*/ */
......
...@@ -122,4 +122,12 @@ public interface ApiAppointmentFeignClient { ...@@ -122,4 +122,12 @@ public interface ApiAppointmentFeignClient {
*/ */
@PutMapping("/edit/policy/transfer") @PutMapping("/edit/policy/transfer")
Result editPolicyTransfer(@Validated @RequestBody ApiPolicyTransferRequest request); Result editPolicyTransfer(@Validated @RequestBody ApiPolicyTransferRequest request);
/**
* 删除预约信息
* @param appointmentBizId
* @return
*/
@DeleteMapping("/del")
Result del(@NotBlank(message = "预约信息主表唯一业务ID不能为空") @RequestParam(value = "appointmentBizId") String appointmentBizId);
} }
...@@ -85,6 +85,11 @@ public class ApiAppointmentFeignFallbackFactory implements FallbackFactory<ApiAp ...@@ -85,6 +85,11 @@ public class ApiAppointmentFeignFallbackFactory implements FallbackFactory<ApiAp
public Result editPolicyTransfer(ApiPolicyTransferRequest request) { public Result editPolicyTransfer(ApiPolicyTransferRequest request) {
return null; return null;
} }
@Override
public Result del(String appointmentBizId) {
return null;
}
}; };
} }
} }
...@@ -24,4 +24,6 @@ public interface AppointmentMapper extends BaseMapper<Appointment> { ...@@ -24,4 +24,6 @@ public interface AppointmentMapper extends BaseMapper<Appointment> {
//获取行程单的数据 //获取行程单的数据
ItineraryDto getItineraryDto(@Param("appointmentBizId") String appointmentBizId); ItineraryDto getItineraryDto(@Param("appointmentBizId") String appointmentBizId);
Integer updateDelStatus(@Param("appointmentBizId") String appointmentBizId);
} }
...@@ -24,4 +24,6 @@ public interface IAppointmentService extends IService<Appointment> { ...@@ -24,4 +24,6 @@ public interface IAppointmentService extends IService<Appointment> {
Appointment queryOne(String appointmentBizId); Appointment queryOne(String appointmentBizId);
ItineraryDto getItineraryDto(String appointmentBizId); ItineraryDto getItineraryDto(String appointmentBizId);
void del(String appointmentBizId);
} }
...@@ -54,4 +54,13 @@ public class AppointmentServiceImpl extends ServiceImpl<AppointmentMapper, Appoi ...@@ -54,4 +54,13 @@ public class AppointmentServiceImpl extends ServiceImpl<AppointmentMapper, Appoi
return baseMapper.getItineraryDto(appointmentBizId); return baseMapper.getItineraryDto(appointmentBizId);
} }
/**
* 删除预约信息
* @param appointmentBizId
*/
@Override
public void del(String appointmentBizId) {
baseMapper.updateDelStatus(appointmentBizId);
}
} }
...@@ -79,4 +79,16 @@ ...@@ -79,4 +79,16 @@
limit 1 limit 1
</select> </select>
<!-- 更新预约状态 -->
<update id="updateDelStatus">
update appointment set is_deleted = 1 where appointment_biz_id = #{appointmentBizId};
update appointment_file set is_deleted = 1 where appointment_biz_id = #{appointmentBizId};
update beneficiary set is_deleted = 1 where appointment_biz_id = #{appointmentBizId};
update insurant set is_deleted = 1 where appointment_biz_id = #{appointmentBizId};
update policyholder set is_deleted = 1 where appointment_biz_id = #{appointmentBizId};
update product_plan set is_deleted = 1 where appointment_biz_id = #{appointmentBizId};
update second_holder set is_deleted = 1 where appointment_biz_id = #{appointmentBizId};
update fna set appointment_no = '',appointment_biz_id = '' where appointment_biz_id = #{appointmentBizId};
</update>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment