保誠-保戶業務員媒合平台
Mila
2021-12-16 6b88c4b2695f21103322ab1fc8dc331806c56fa6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { AxiosResponse } from 'axios';
import { http } from "./httpClient";
import { editAppointmentParams } from '../models/editAppointmentParams.model';
import { AppointmentDetail } from '../models/AppointmentDetail';
import { UserSetting } from '../models/account.model';
import { FastQueryParams } from '../models/quickFilter.model';
import { Consultant } from '../models/consultant.model';
import { StrictQueryParams } from '../models/strictQueryParams';
import { AppointmentParams } from '../models/appointmentParams';
import { UserReviewsConsultantsParams } from '../models/UserReviewsConsultantsParams';
import { AgentOfStrictQuery } from '../models/agentOfStrictQuery';
import _ from "lodash";
 
 
 
 
class PamService {
  constructor() {}
 
  /** 推薦保險顧問 **/
  recommend():Promise<AxiosResponse<Consultant[]>>{
    return http.get('/consultant/recommend');
  }
 
  /** 快速篩選 **/
  fastQuery(data: FastQueryParams):Promise<AxiosResponse<Consultant[]>>{
    return http.post('/consultant/fastQuery', data)
  }
 
  /** 嚴選配對 **/
  strictQuery(data:StrictQueryParams):Promise<AxiosResponse<AgentOfStrictQuery[]>>{
    return http.post('/consultant/strictQuery', data)
  }
 
  /** 加入顧問 **/
  addFavoriteConsultant(agentNoList: string[]):Promise<AxiosResponse<any>>{
    return http.post('/consultant/favorite', {agentNoList})
  }
 
  /** 預約前詢問 **/
  appointmentDemand(data: AppointmentParams):Promise<AxiosResponse<any>> {
    return http.post('/appointment/customer/create', data)
  }
 
  /** 顧問詳細資訊 **/
  getConsultantDetail(agentNo:string):Promise<AxiosResponse<any>>{
    return http.get('/consultant/detail', {params:{agentNo:agentNo}})
  }
 
  /** 移除顧問 **/
  deleteConsultant(agentId: string):Promise<AxiosResponse<any>>{
    return http.delete('/consultant/favorite/'+agentId);
  }
 
 
 
  /** 取得預約單細節 **/
  getAppointmentDetail(apointmentId: number):Promise<AxiosResponse<AppointmentDetail>> {
    return http.get('/appointment/getDetail/'+apointmentId)
  }
 
  /** 取得使用者帳號資訊 **/
  getUserAccountSetting():Promise<AxiosResponse<UserSetting>>{
    return http.get<UserSetting>('/customer/info');
  }
 
  /** 更新使用者帳號資訊 **/
  updateAccountSetting(params: any):Promise<AxiosResponse<any>> {
    return http.put('/customer/info', params);
  }
 
  //客戶進行滿意度評分
  userReviewsConsultants(data: UserReviewsConsultantsParams):Promise<AxiosResponse<any>> {
    return http.post('/satisfaction/create', data);
  }
 
  // 取消預約
  cancelAppointment(appointment: number):Promise<AxiosResponse<any>>{
    return http.delete('/appointment/'+appointment);
  }
 
  // 編輯預約
  editAppointment(editAppointmentParams:editAppointmentParams):Promise<AxiosResponse<any>>{
    return http.put('/appointment', editAppointmentParams);
  }
}
 
export default new PamService();