Class AdminEventsService

java.lang.Object
com.eeit87t3.tickiteasy.event.service.AdminEventsService

@Service public class AdminEventsService extends Object
活動功能的 Service。
Author:
Chuan (chuan13)
  • Constructor Details

    • AdminEventsService

      public AdminEventsService()
  • Method Details

    • findById

      public EventsEntity findById(Integer eventID)
      以活動編號查詢單筆活動、並更新狀態。
      Parameters:
      eventID - :活動編號。
      Returns:
      查詢結果。
    • findByCategoryString

      public List<EventsEntity> findByCategoryString(String categoryString)
      以活動類別查詢多筆活動、並更新狀態。
      Parameters:
      categoryString - :活動類別字串。
      Returns:
      查詢結果。
    • findByTagString

      public List<EventsEntity> findByTagString(String tagString)
      以活動標籤查詢多筆活動、並更新狀態。
      Parameters:
      tagString - :活動標籤字串。
      Returns:
      查詢結果。
    • findBySpecification

      public org.springframework.data.domain.Page<EventsEntity> findBySpecification(EventsSearchingDTO eventsSearchingDTO)
      管理員後台的動態查詢;單頁筆數固定為 10。
      Parameters:
      eventsSearchingDTO - // * @retur 查詢結果。
    • validateCreateInput

      public String validateCreateInput(EventsDTO createEventsDTO)
      新增活動的輸入驗證。
      Parameters:
      createEventsDTO -
      Returns:
      驗證結果:若正確,回傳「輸入正確!」;若錯誤,會包含錯誤訊息。
    • create

      public EventsEntity create(EventsDTO createEventsDTO)
      新增活動。
      Parameters:
      createEventsDTO - :新增內容。
      Returns:
      新增後的 EventsEntity。
    • validateEditInput

      public String validateEditInput(EventsDTO editEventsDTO)
      編輯活動的輸入驗證。
      Parameters:
      editEventsDTO - :編輯內容。
      Returns:
      驗證結果:若正確,回傳「輸入正確!」;若錯誤,會包含錯誤訊息。
    • edit

      public EventsEntity edit(EventsDTO editEventsDTO)
      編輯活動。
      Parameters:
      editEventsDTO - :編輯內容。
      Returns:
      編輯後的 EventsEntity。
    • validateEditStatus

      public String validateEditStatus(Integer eventID, Short editStatus)
      編輯活動狀態的輸入驗證。
      Parameters:
      eventID -
      editStatus - :要改為的狀態值。
      Returns:
      驗證結果:若正確,回傳「輸入正確!」;若錯誤,會包含錯誤訊息。
    • editStatus

      public EventsEntity editStatus(Integer eventID, Short editStatus)
      編輯活動狀態。
      Parameters:
      eventID -
      editStatus - :要改為的狀態值。
      Returns:
      編輯狀態後的 EventsEntity。
    • validateDeleteInput

      public String validateDeleteInput(Integer eventID)
      刪除活動的輸入驗證。
      Parameters:
      eventID - :要刪除的活動之活動編號。
      Returns:
      驗證結果:若正確,回傳「輸入正確!」;若錯誤,會包含錯誤訊息。
    • delete

      public Boolean delete(Integer eventID)
      刪除活動。
      Parameters:
      eventID - :要刪除的活動之活動編號。
      Returns:
      刪除執行結果。