java.lang.Object
ru.bitel.bgbilling.kernel.contract.api.server.bean.customer.CustomerDao

public class CustomerDao
extends java.lang.Object
  • Field Details

    • TABLE_CUSTOMER

      public static final java.lang.String TABLE_CUSTOMER
      See Also:
      Constant Field Values
    • TABLE_CUSTOMER_LOG

      public static final java.lang.String TABLE_CUSTOMER_LOG
      See Also:
      Constant Field Values
  • Constructor Details

    • CustomerDao

      public CustomerDao​(java.sql.Connection con)
  • Method Details

    • getCustomerLink

      public java.util.Optional<CustomerLink> getCustomerLink​(int contractId, java.time.LocalDateTime dateTime) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • addCustomerLink

      public void addCustomerLink​(CustomerLink customerLink) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getNewCustomerId

      public int getNewCustomerId​(Customer.CustomerType type) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateCustomerFieldValue

      public java.lang.String updateCustomerFieldValue​(int customerId, java.lang.String fieldKey, java.lang.String fieldValue, int userId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerDataJson

      public org.json.JSONObject getCustomerDataJson​(int customerId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomer

      public Customer getCustomer​(int customerId) throws ru.bitel.bgbilling.common.BGException
      Строка в JSON формате с данными клиента
      Parameters:
      customerId -
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
    • searchByKey

      public org.json.JSONArray searchByKey​(Customer.CustomerType customerType, java.lang.String key, java.lang.String value) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • searchByPassportRF

      public org.json.JSONArray searchByPassportRF​(java.lang.String serial, java.lang.String number) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • setCustomerLink

      public void setCustomerLink​(int contractId, int сustomerId, java.time.LocalDateTime linkDateTimeFrom) throws ru.bitel.bgbilling.common.BGException
      Установка связки клиент - договор
      Parameters:
      contractId - id договора
      \u0441ustomerId - id кастомера
      linkDateTimeFrom - время привязки
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerContracts

      public org.json.JSONArray getCustomerContracts​(int customerId, java.time.LocalDateTime onTime) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • setCustomerUnlinkContract

      public boolean setCustomerUnlinkContract​(int contractId, java.time.LocalDateTime unlinkTime) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerParameterHistory

      public java.lang.String getCustomerParameterHistory​(int customerId, java.lang.String fieldKey, int lastRecordCount) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerParameter

      public java.lang.String getCustomerParameter​(int customerId, java.lang.String fieldKey) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException