[ADD] 新增預約單備註API
[ADD] 更新預約單備註API
[ADD] 刪除預約單備註API
[ADD] 顧問查詢自己的預約單清單時帶出備註資料
¤ñ¹ï·sÀÉ®× |
| | |
| | | http delete: |
| | | |
| | | http://localhost:8080/api/appointment/memo/{appointmentMemoId} |
| | | |
| | | http://localhost:8080/api/appointment/memo/1 |
| | | |
¤ñ¹ï·sÀÉ®× |
| | |
| | | http post : |
| | | |
| | | http://localhost:8080/api/appointment/memo/create |
| | | |
| | | |
| | | content : é ç´å®å註å
§å®¹ |
| | | appointmentId : é ç´å®id |
| | | |
| | | request body: |
| | | |
| | | { |
| | | "content":"test", |
| | | "appointmentId":368 |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | http post : |
| | | |
| | | http://localhost:8080/api/appointment/memo/update |
| | | |
| | | id : memo id |
| | | |
| | | |
| | | request body: |
| | | { |
| | | "id": 1 , |
| | | "content":"test4" |
| | | } |
| | |
| | | |
| | | http://localhost:8080/api/consultant/getMyAppointment |
| | | |
| | | appointmentMemoList : åè¨»è³æ |
| | | |
| | | |
| | | [ |
| | | { |
| | | "id": 110, |
| | | "phone": "09123456789", |
| | | "email": "", |
| | | "contactType": "mobile", |
| | | "gender": "male", |
| | | "age": "30", |
| | | "job": "å
§å¤", |
| | | "requirement": "å女æè²,è³ç¢è¦å,é²ç«ä¿å®ç¸é", |
| | | "communicateStatus": "contacted", |
| | | "hopeContactTime": "'禮æä¸,禮æäºã12:00~14:00,14:00~18:00'", |
| | | "otherRequirement": null, |
| | | "appointmentDate": "2021-12-02T09:58:58.932Z", |
| | | "lastModifiedDate": "2021-12-02T09:58:58.932Z", |
| | | "agentNo": "AG0109051204", |
| | | "customerId": 70, |
| | | "name": null, |
| | | "consultantViewTime": "2021-12-02T09:58:12.066Z", |
| | | "consultantReadTime": "2021-12-02T09:58:58.930Z", |
| | | "contactTime": "2021-12-02T09:58:58.930Z", |
| | | "satisfactionScore":3 // null 代表該çé ç´å®å°æªå¡«å¯«æ»¿æåº¦ |
| | | }, |
| | | { |
| | | "id": 109, |
| | | "phone": "09123456789", |
| | | "email": "", |
| | | "contactType": "mobile", |
| | | "gender": "male", |
| | | "age": "20", |
| | | "job": "å
§å¤", |
| | | "requirement": "å¥åº·èä¿é,å女æè²,ä¿å®å¥æª¢/è¦å,é²ç«ä¿å®ç¸é", |
| | | "communicateStatus": "contacted", |
| | | "hopeContactTime": "'禮æä¸,禮æäº,禮æä¸,禮æå,禮æäº,禮æå
,ç¦®ææ¥ã12:00~14:00,14:00~18:00'", |
| | | "otherRequirement": null, |
| | | "appointmentDate": "2021-12-02T10:12:24.613Z", |
| | | "lastModifiedDate": "2021-12-02T10:12:24.613Z", |
| | | "agentNo": "AG0109051204", |
| | | "customerId": 67, |
| | | "name": null, |
| | | "consultantViewTime": "2021-12-02T09:58:12.066Z", |
| | | "consultantReadTime": "2021-12-02T10:12:24.612Z", |
| | | "contactTime": null, |
| | | "satisfactionScore":3 // null 代表該çé ç´å®å°æªå¡«å¯«æ»¿æåº¦ |
| | | }, |
| | | { |
| | | "id": 114, |
| | | "phone": "09123456789", |
| | | "email": "", |
| | | "contactType": "mobile", |
| | | "gender": "male", |
| | | "age": "70", |
| | | "job": "å
§å¤", |
| | | "requirement": "å¥åº·èä¿é,å女æè²,è³ç¢è¦å,æ¨æ´»éä¼,é²ç«ä¿å®ç¸é", |
| | | "communicateStatus": "contacted", |
| | | "hopeContactTime": "'禮æä¸,禮æäº,禮æä¸,禮æå,禮æäº,禮æå
,ç¦®ææ¥ã12:00~14:00,14:00~18:00'", |
| | | "otherRequirement": null, |
| | | "appointmentDate": "2021-12-02T09:58:12.248Z", |
| | | "lastModifiedDate": "2021-12-02T09:58:12.248Z", |
| | | "agentNo": "AG0109051204", |
| | | "customerId": 71, |
| | | "name": null, |
| | | "consultantViewTime": "2021-12-02T09:58:12.066Z", |
| | | "consultantReadTime": null, |
| | | "contactTime": null, |
| | | "satisfactionScore":3 // null 代表該çé ç´å®å°æªå¡«å¯«æ»¿æåº¦ |
| | | }, |
| | | { |
| | | "id": 121, |
| | | "phone": "09123456789", |
| | | "email": "", |
| | | "contactType": "mobile", |
| | | "gender": "male", |
| | | "age": "20", |
| | | "job": "å
§å¤", |
| | | "requirement": "å女æè²", |
| | | "communicateStatus": "contacted", |
| | | "hopeContactTime": "'禮æä¸,禮æäº,禮æä¸,禮æå,禮æäº,禮æå
,ç¦®ææ¥ã9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'", |
| | | "otherRequirement": null, |
| | | "appointmentDate": "2021-12-02T09:58:12.248Z", |
| | | "lastModifiedDate": "2021-12-02T09:58:12.248Z", |
| | | "agentNo": "AG0109051204", |
| | | "customerId": 76, |
| | | "name": "æå²ç¶", |
| | | "consultantViewTime": "2021-12-02T09:58:12.066Z", |
| | | "consultantReadTime": "2021-12-02T09:54:20.872Z", |
| | | "contactTime": null, |
| | | "satisfactionScore":3 // null 代表該çé ç´å®å°æªå¡«å¯«æ»¿æåº¦ |
| | | }, |
| | | { |
| | | "id": 118, |
| | | "phone": "09123456789", |
| | | "email": "", |
| | | "contactType": "mobile", |
| | | "gender": "male", |
| | | "age": "20", |
| | | "job": "å
§å¤", |
| | | "requirement": "å¥åº·èä¿é", |
| | | "communicateStatus": "contacted", |
| | | "hopeContactTime": "'禮æä¸,禮æäº,禮æä¸,禮æå,禮æäº,禮æå
,ç¦®ææ¥ã12:00~14:00,14:00~18:00'", |
| | | "otherRequirement": null, |
| | | "appointmentDate": "2021-12-02T10:02:52.797Z", |
| | | "lastModifiedDate": "2021-12-02T10:02:52.797Z", |
| | | "agentNo": "AG0109051204", |
| | | "customerId": 72, |
| | | "name": null, |
| | | "consultantViewTime": "2021-12-02T09:58:12.066Z", |
| | | "consultantReadTime": "2021-12-02T10:02:52.796Z", |
| | | "contactTime": null, |
| | | "satisfactionScore":3 // null 代表該çé ç´å®å°æªå¡«å¯«æ»¿æåº¦ |
| | | }, |
| | | { |
| | | "id": 180, |
| | | "phone": "0911111111", |
| | | [ { |
| | | "id" : 435, |
| | | "phone" : "0973057067", |
| | | "email": "", |
| | | "contactType": "phone", |
| | | "gender": "female", |
| | | "age": "31-40", |
| | | "job": "å
§å¤", |
| | | "requirement": "å女æè²,å¥åº·èä¿é", |
| | | "communicateStatus": "contacted", |
| | | "hopeContactTime": "'禮æäº,禮æä¸,禮æå,禮æäº,禮æå
ã9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00','禮æä¸,禮æäº,禮æä¸,禮æå,禮æäº,ç¦®ææ¥ã12:00~14:00,14:00~18:00,18:00~21:00','禮æä¸,禮æå,禮æå
,ç¦®ææ¥ã14:00~18:00,18:00~21:00'", |
| | | "gender" : "male", |
| | | "age" : "under_20", |
| | | "job" : "å¤å¤", |
| | | "requirement" : "å¥åº·èä¿é", |
| | | "communicateStatus" : "reserved", |
| | | "hopeContactTime" : "'ææä¸,ææäº,ææä¸,ææå,ææäº,ææå
,æææ¥ã9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'", |
| | | "otherRequirement": null, |
| | | "appointmentDate": "2021-12-02T10:10:53.341Z", |
| | | "lastModifiedDate": "2021-12-03T03:40:16.344Z", |
| | | "agentNo": "AG0109051204", |
| | | "customerId": 77, |
| | | "name": "111", |
| | | "consultantViewTime": "2021-12-02T10:10:46.358Z", |
| | | "consultantReadTime": "2021-12-02T10:10:53.340Z", |
| | | "contactTime": "2021-12-03T03:40:16.215Z", |
| | | "satisfactionScore":3 // null 代表該çé ç´å®å°æªå¡«å¯«æ»¿æåº¦ |
| | | } |
| | | ] |
| | | "appointmentDate" : "2021-12-29T09:33:16.643Z", |
| | | "lastModifiedDate" : "2021-12-29T09:33:16.637Z", |
| | | "agentNo" : "A568420", |
| | | "customerId" : 90, |
| | | "name" : "Jack", |
| | | "consultantViewTime" : "2021-12-29T09:33:49.547Z", |
| | | "consultantReadTime" : null, |
| | | "contactTime" : null, |
| | | "satisfactionScore" : null, |
| | | "appointmentMemoList" : [ ] |
| | | }, { |
| | | "id" : 385, |
| | | "phone" : "0911223344", |
| | | "email" : "SDD", |
| | | "contactType" : "phone", |
| | | "gender" : "female", |
| | | "age" : "21-30", |
| | | "job" : "å
§å¤", |
| | | "requirement" : "å¥åº·èä¿é", |
| | | "communicateStatus" : "reserved", |
| | | "hopeContactTime" : "'ææä¸,ææäº,ææä¸,ææå,ææäº,ææå
,æææ¥ã9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'", |
| | | "otherRequirement" : null, |
| | | "appointmentDate" : "2021-12-16T07:11:05.400Z", |
| | | "lastModifiedDate" : "2021-12-16T07:11:05.399Z", |
| | | "agentNo" : "A568420", |
| | | "customerId" : 139, |
| | | "name" : "Angula-test", |
| | | "consultantViewTime" : "2021-12-27T02:02:18.711Z", |
| | | "consultantReadTime" : "2021-12-29T09:14:24.209Z", |
| | | "contactTime" : null, |
| | | "satisfactionScore" : null, |
| | | "appointmentMemoList" : [ { |
| | | "id" : 2, |
| | | "content" : "test4", |
| | | "appointmentId" : 385 |
| | | } ] |
| | | } ] |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.Instant; |
| | | import java.util.List; |
| | | |
| | | import javax.persistence.*; |
| | | |
| | |
| | | @Enumerated(value = EnumType.STRING) |
| | | @Column(name = "status") |
| | | private AppointmentStatusEnum status; |
| | | |
| | | @JoinColumn(name = "appointment_id") |
| | | @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) |
| | | private List<AppointmentMemo> appointmentMemoList; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | public void setLastModifiedDate(Instant lastModifiedDate) { |
| | | this.lastModifiedDate = lastModifiedDate; |
| | | } |
| | | |
| | | public List<AppointmentMemo> getAppointmentMemoList() { |
| | | return appointmentMemoList; |
| | | } |
| | | |
| | | public void setAppointmentMemoList(List<AppointmentMemo> appointmentMemoList) { |
| | | this.appointmentMemoList = appointmentMemoList; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.Instant; |
| | | import java.util.List; |
| | | |
| | | import javax.persistence.CascadeType; |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import javax.persistence.EnumType; |
| | | import javax.persistence.Enumerated; |
| | | import javax.persistence.FetchType; |
| | | import javax.persistence.Id; |
| | | import javax.persistence.JoinColumn; |
| | | import javax.persistence.OneToMany; |
| | | import javax.persistence.Table; |
| | | |
| | | import com.pollex.pam.enums.AppointmentStatusEnum; |
| | |
| | | @Enumerated(value = EnumType.STRING) |
| | | @Column(name = "status") |
| | | private AppointmentStatusEnum status; |
| | | |
| | | @JoinColumn(name = "appointment_id") |
| | | @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.REMOVE) |
| | | private List<AppointmentMemo> appointmentMemoList; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | public void setStatus(AppointmentStatusEnum status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public List<AppointmentMemo> getAppointmentMemoList() { |
| | | return appointmentMemoList; |
| | | } |
| | | |
| | | public void setAppointmentMemoList(List<AppointmentMemo> appointmentMemoList) { |
| | | this.appointmentMemoList = appointmentMemoList; |
| | | } |
| | | |
| | | |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.domain; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import javax.persistence.GeneratedValue; |
| | | import javax.persistence.GenerationType; |
| | | import javax.persistence.Id; |
| | | import javax.persistence.Table; |
| | | |
| | | @Entity |
| | | @Table(name = "appointment_memo") |
| | | public class AppointmentMemo extends AbstractAuditingEntity implements Serializable { |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Id |
| | | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| | | private Long id; |
| | | |
| | | @Column(name = "content") |
| | | private String content; |
| | | |
| | | @Column(name = "appointment_id") |
| | | private Long appointmentId; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | public Long getAppointmentId() { |
| | | return appointmentId; |
| | | } |
| | | |
| | | public void setAppointmentId(Long appointmentId) { |
| | | this.appointmentId = appointmentId; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.repository; |
| | | |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import com.pollex.pam.domain.AppointmentMemo; |
| | | |
| | | @Repository |
| | | public interface AppointmentMemoRepository extends JpaRepository<AppointmentMemo, Long>{ |
| | | |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.pollex.pam.domain.Appointment; |
| | | import com.pollex.pam.domain.AppointmentMemo; |
| | | import com.pollex.pam.repository.AppointmentMemoRepository; |
| | | import com.pollex.pam.repository.AppointmentRepository; |
| | | import com.pollex.pam.security.SecurityUtils; |
| | | import com.pollex.pam.service.dto.AppointmentMemoCreateDTO; |
| | | import com.pollex.pam.service.dto.AppointmentMemoUpdateDTO; |
| | | import com.pollex.pam.service.mapper.AppointmentMemoMapper; |
| | | import com.pollex.pam.web.rest.errors.AppointmentMemoNotFoundException; |
| | | import com.pollex.pam.web.rest.errors.AppointmentNotFoundException; |
| | | |
| | | @Service |
| | | public class AppointmentMemoService { |
| | | |
| | | @Autowired |
| | | AppointmentMemoRepository appointmentMemoRepository; |
| | | |
| | | @Autowired |
| | | AppointmentMemoMapper appointmentMemoMapper; |
| | | |
| | | @Autowired |
| | | AppointmentRepository appointmentRepository; |
| | | |
| | | public AppointmentMemo create(AppointmentMemoCreateDTO memoDTO) { |
| | | AppointmentMemo memo = appointmentMemoMapper.toAppointmentMemo(memoDTO); |
| | | return appointmentMemoRepository.save(memo); |
| | | } |
| | | |
| | | public void checkPermission(Long appointmentId) { |
| | | Appointment appointment = appointmentRepository.findById(appointmentId) |
| | | .orElseThrow(AppointmentNotFoundException::new); |
| | | if(!appointment.getAgentNo().equals(SecurityUtils.getAgentNo())) { |
| | | throw new IllegalAccessError("not have permission"); |
| | | } |
| | | } |
| | | |
| | | public AppointmentMemo update(AppointmentMemoUpdateDTO memoDTO) { |
| | | AppointmentMemo memo = appointmentMemoRepository |
| | | .findById(memoDTO.getId()) |
| | | .orElseThrow(AppointmentMemoNotFoundException::new); |
| | | checkPermission(memo.getAppointmentId()); |
| | | appointmentMemoMapper.copyToAppointmentMemo(memoDTO, memo); |
| | | return appointmentMemoRepository.save(memo); |
| | | } |
| | | |
| | | public void delete(Long memoId) { |
| | | AppointmentMemo memo = appointmentMemoRepository |
| | | .findById(memoId) |
| | | .orElseThrow(AppointmentMemoNotFoundException::new); |
| | | checkPermission(memo.getAppointmentId()); |
| | | appointmentMemoRepository.delete(memo); |
| | | } |
| | | } |
| | |
| | | package com.pollex.pam.service.dto; |
| | | |
| | | import java.time.Instant; |
| | | import java.util.List; |
| | | |
| | | import com.pollex.pam.domain.AppointmentMemo; |
| | | import com.pollex.pam.enums.ContactStatusEnum; |
| | | |
| | | public class AppointmentCustomerViewDTO { |
| | |
| | | private Instant consultantReadTime; |
| | | private Instant contactTime; |
| | | private Float satisfactionScore; |
| | | private List<AppointmentMemo> appointmentMemoList; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | public void setSatisfactionScore(Float satisfactionScore) { |
| | | this.satisfactionScore = satisfactionScore; |
| | | } |
| | | public List<AppointmentMemo> getAppointmentMemoList() { |
| | | return appointmentMemoList; |
| | | } |
| | | public void setAppointmentMemoList(List<AppointmentMemo> appointmentMemoList) { |
| | | this.appointmentMemoList = appointmentMemoList; |
| | | } |
| | | |
| | | |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service.dto; |
| | | |
| | | public class AppointmentMemoCreateDTO { |
| | | |
| | | private String content; |
| | | private Long appointmentId; |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | public Long getAppointmentId() { |
| | | return appointmentId; |
| | | } |
| | | public void setAppointmentId(Long appointmentId) { |
| | | this.appointmentId = appointmentId; |
| | | } |
| | | |
| | | |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service.dto; |
| | | |
| | | public class AppointmentMemoUpdateDTO{ |
| | | |
| | | private Long id; |
| | | private String content; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.pollex.pam.domain.AppointmentCustomerView; |
| | | import com.pollex.pam.service.dto.AppointmentCustomerViewDTO; |
| | |
| | | @Service |
| | | public class AppointmentCustomerViewMapper { |
| | | |
| | | @Transactional |
| | | public AppointmentCustomerViewDTO toAppointmentCustomerViewDTO(AppointmentCustomerView source) { |
| | | AppointmentCustomerViewDTO target = new AppointmentCustomerViewDTO(); |
| | | BeanUtils.copyProperties(source, target); |
| | | target.setAppointmentMemoList(source.getAppointmentMemoList()); |
| | | return target; |
| | | } |
| | | |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service.mapper; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.pollex.pam.domain.AppointmentMemo; |
| | | import com.pollex.pam.service.dto.AppointmentMemoCreateDTO; |
| | | import com.pollex.pam.service.dto.AppointmentMemoUpdateDTO; |
| | | |
| | | @Service |
| | | public class AppointmentMemoMapper { |
| | | |
| | | public AppointmentMemo toAppointmentMemo(AppointmentMemoCreateDTO source) { |
| | | AppointmentMemo target = new AppointmentMemo(); |
| | | BeanUtils.copyProperties(source, target); |
| | | return target; |
| | | } |
| | | |
| | | public AppointmentMemo copyToAppointmentMemo(AppointmentMemoUpdateDTO source, AppointmentMemo target) { |
| | | BeanUtils.copyProperties(source, target); |
| | | return target; |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.web.rest; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.pollex.pam.domain.AppointmentMemo; |
| | | import com.pollex.pam.security.SecurityUtils; |
| | | import com.pollex.pam.service.AppointmentMemoService; |
| | | import com.pollex.pam.service.dto.AppointmentMemoCreateDTO; |
| | | import com.pollex.pam.service.dto.AppointmentMemoUpdateDTO; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/appointment/memo") |
| | | public class AppointmentMemoResource { |
| | | |
| | | @Autowired |
| | | AppointmentMemoService appointmentMemoService; |
| | | |
| | | @PostMapping("/create") |
| | | public ResponseEntity<AppointmentMemo> createMemo(@RequestBody AppointmentMemoCreateDTO memoDTO) { |
| | | appointmentMemoService.checkPermission(memoDTO.getAppointmentId()); |
| | | AppointmentMemo memo = appointmentMemoService.create(memoDTO); |
| | | return new ResponseEntity<>(memo, HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | public ResponseEntity<AppointmentMemo> updateMemo(@RequestBody AppointmentMemoUpdateDTO memoDTO) { |
| | | AppointmentMemo memo = appointmentMemoService.update(memoDTO); |
| | | return new ResponseEntity<>(memo, HttpStatus.OK); |
| | | } |
| | | |
| | | @DeleteMapping("/{memoId}") |
| | | public void deleteMemo(@PathVariable Long memoId) { |
| | | appointmentMemoService.delete(memoId); |
| | | } |
| | | |
| | | |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.web.rest.errors; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.web.bind.annotation.ResponseStatus; |
| | | |
| | | @ResponseStatus(code = HttpStatus.NOT_FOUND, reason = "Appointment memo not found") |
| | | public class AppointmentMemoNotFoundException extends RuntimeException{ |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| | |
| | | indent-output: true |
| | | datasource: |
| | | type: com.zaxxer.hikari.HikariDataSource |
| | | url: jdbc:postgresql://dev.pollex.com.tw:5433/pam |
| | | url: jdbc:postgresql://dev.pollex.com.tw:5433/pam_p2 |
| | | #url: jdbc:postgresql://localhost:5432/omo?currentSchema=omo |
| | | username: pamadmin |
| | | password: pamadmin |