Class CustomerDao
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.kernel.contract.api.server.bean.customer.CustomerDao
public class CustomerDao
extends ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomerLink(CustomerLink customerLink) customerAccountAdd(int customerId, long account, int userId) voidcustomerAccountDelete(int customerId, long account) customerAccounts(int customerId) voidcustomerAccountSet(int customerId, int contractId, long account) customerByCustomerAccount(long account) customerEmployeeDelete(int customerId, String uuid, int userId) customerEmployeeList(int customerId) customerEmployeeUpdate(int customerId, CustomerEmployee value, int userId) voiddeleteCustomer(int customerId) getCustomer(int customerId) Customer с данными клиентаgetCustomerContracts(int customerId, LocalDateTime onTime) org.json.JSONObjectgetCustomerDataJson(int customerId) getCustomerDataListForContracts(List<Integer> contractIds) getCustomerLink(int contractId, LocalDateTime dateTime) getCustomerParameter(int customerId, String fieldKey) getCustomerParameterHistory(int customerId, String fieldKey, int lastRecordCount) intorg.json.JSONArraysearchByKey(Customer.CustomerType customerType, String key, String value) voidsearchCustomer(SearchResult<Customer> searchResult, Customer.CustomerType customerType, List<ru.bitel.bgbilling.common.model.KeyValue> filters) voidsetCustomerLink(int contractId, int customerId, LocalDateTime linkDateTimeFrom) Установка связки клиент - договорbooleansetCustomerUnlinkContract(int contractId, LocalDateTime unlinkTime) updateCustomerBank(int customerId, String text, int userId) updateCustomerContact(int customerId, CustomerContactType contactType, String value, int userId) updateCustomerFieldValue(int customerId, String fieldKey, String fieldValue, int userId) Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
error, error, error, getLogger, logError, logError, warn
-
Field Details
-
TABLE_CUSTOMER
- See Also:
-
TABLE_CUSTOMER_LOG
- See Also:
-
TABLE_CUSTOMER_LINK
- See Also:
-
TABLE_CUSTOMER_ACCOUNT
- See Also:
-
-
Constructor Details
-
CustomerDao
-
-
Method Details
-
searchCustomer
public void searchCustomer(SearchResult<Customer> searchResult, Customer.CustomerType customerType, List<ru.bitel.bgbilling.common.model.KeyValue> filters) throws SQLException - Throws:
SQLException
-
getCustomerLink
public Optional<CustomerLink> getCustomerLink(int contractId, LocalDateTime dateTime) throws SQLException - Throws:
SQLException
-
getCustomerDataListForContracts
public Map<Integer,org.json.JSONObject> getCustomerDataListForContracts(List<Integer> contractIds) throws SQLException - Throws:
SQLException
-
addCustomerLink
- Throws:
SQLException
-
getNewCustomerId
- Throws:
SQLException
-
updateCustomerFieldValue
public String updateCustomerFieldValue(int customerId, String fieldKey, String fieldValue, int userId) throws SQLException - Throws:
SQLException
-
updateCustomerContact
public String updateCustomerContact(int customerId, CustomerContactType contactType, String value, int userId) throws SQLException - Throws:
SQLException
-
updateCustomerBank
- Throws:
SQLException
-
customerEmployeeList
- Throws:
SQLException
-
customerEmployeeUpdate
public String customerEmployeeUpdate(int customerId, CustomerEmployee value, int userId) throws SQLException - Throws:
SQLException
-
customerEmployeeDelete
- Throws:
SQLException
-
getCustomerDataJson
- Throws:
SQLException
-
getCustomer
Customer с данными клиента- Parameters:
customerId-- Returns:
- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
searchByKey
public org.json.JSONArray searchByKey(Customer.CustomerType customerType, String key, String value) throws SQLException - Throws:
SQLException
-
setCustomerLink
public void setCustomerLink(int contractId, int customerId, LocalDateTime linkDateTimeFrom) throws SQLException Установка связки клиент - договор- Parameters:
contractId- id договораcustomerId- id кастомераlinkDateTimeFrom- время привязки- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
getCustomerContracts
public List<CustomerContract> getCustomerContracts(int customerId, LocalDateTime onTime) throws SQLException - Throws:
SQLException
-
setCustomerUnlinkContract
public boolean setCustomerUnlinkContract(int contractId, LocalDateTime unlinkTime) throws SQLException - Throws:
SQLException
-
getCustomerParameterHistory
public String getCustomerParameterHistory(int customerId, String fieldKey, int lastRecordCount) throws SQLException - Throws:
SQLException
-
getCustomerParameter
- Throws:
SQLException
-
deleteCustomer
- Throws:
SQLException
-
customerByCustomerAccount
- Throws:
SQLException
-
customerAccounts
- Throws:
SQLException
-
customerAccountAdd
public CustomerAccount customerAccountAdd(int customerId, long account, int userId) throws SQLException - Throws:
SQLException
-
customerAccountDelete
- Throws:
SQLException
-
customerAccountSet
- Throws:
SQLException
-