?? customerdao.java
字號:
package com.yuanchung.sales.dao.customer;
import java.util.List;
import org.springframework.dao.DataAccessException;
import com.yuanchung.sales.model.businessOpportunity.BusinessOpportunity;
import com.yuanchung.sales.model.customer.Customer;
import com.yuanchung.sales.model.customer.CustomerContact;
import com.yuanchung.sales.model.service.CustAccount;
import com.yuanchung.sales.model.user.User;
import com.yuanchung.sales.model.userDefined.UserDefined;
import com.yuanchung.sales.model.userDefined.UserField;
import com.yuanchung.sales.model.userDefined.UserFilter;
public interface CustomerDAO {
// 根據(jù)用戶取得所有的客戶
public List getByUser(User user, int flag) throws DataAccessException ;
public List getByUser(String userIds, int flag);
public void save(Customer customer) throws DataAccessException;
public void saveUserDefined(UserDefined userDefined) throws DataAccessException;
public void saveUserFilter(UserFilter userFilter) throws DataAccessException;
public void saveUserField(UserField userField) throws DataAccessException;
///根據(jù)用戶和類型查找選項(xiàng)
public List getUserDefinedByUserAndType(User user, int type) throws DataAccessException;
public List<Customer> getByUserAndUserDefined(User user, UserDefined userDefined) throws DataAccessException;
public UserDefined getUserDefinedById(int userDefinedId) throws DataAccessException;
public List<Customer> getCustomerByUserHql(String hql) throws DataAccessException;
//根據(jù)選項(xiàng)查找自定義選項(xiàng)
public UserField getUserFieldByOption(UserDefined userDefined) throws DataAccessException;
public Customer getById(int customerId) throws DataAccessException;
public void update(Customer customer) throws DataAccessException;
public void delete(Customer customer) throws DataAccessException;
//根據(jù)選項(xiàng)搜索過濾選項(xiàng)
public List getUserFilterByOption(UserDefined userDefined) throws DataAccessException;
//更新用戶選項(xiàng)
public void updateUserDefined(UserDefined userDefined) throws DataAccessException;
//根據(jù)id查詢過濾條件
public UserFilter getUserFilter(int id) throws DataAccessException;
//更新過濾條件
public void updateUserFilter(UserFilter userFilter) throws DataAccessException;
//根據(jù)選項(xiàng)搜索顯示字段
public UserField getUserFieldByUserDefined(UserDefined userDefined) throws DataAccessException;
//修改顯示字段
public void updateUserField(UserField userField) throws DataAccessException;
//刪除過濾條件
public void deleteFilter(UserFilter userFilter) throws DataAccessException;
//顯示左邊頁面的最新的客戶;
public List<Customer> getTopCustomer() throws DataAccessException;
//根據(jù)客戶名稱搜索客戶;
public List<Customer> getCustomerByName(String nameLike) throws DataAccessException;
//刪除客戶狀態(tài);
public void clearCustomer(Integer id) throws DataAccessException;
//羅列出被凍結(jié)的客戶;
public List getCustomerByDelete(User user, int flag) throws DataAccessException;
//刪除客戶以及相關(guān)信息;
public boolean deleteCustomerAndSome(Integer id) throws DataAccessException;
//根據(jù)客戶搜索聯(lián)系人
public List getCusConByCus(Customer customer) throws DataAccessException;
//根據(jù)客戶搜索業(yè)務(wù)機(jī)會;
public List getOpportByCus(Customer customer) throws DataAccessException;
//根據(jù)業(yè)務(wù)機(jī)會搜索業(yè)務(wù)活動;
public List getPlanByOpport(BusinessOpportunity businessOpportunity) throws DataAccessException;
//根據(jù)業(yè)務(wù)活動搜索業(yè)務(wù)記錄;
//刪除業(yè)務(wù)機(jī)會;
public boolean deleteOpport(BusinessOpportunity bo) throws DataAccessException;
//刪除該客戶的聯(lián)系人;
//public boolean deleteCusCon(List listCusCon) throws DataAccessException;
//刪除相關(guān)用戶聯(lián)系人列表
public boolean deleteListUserCon(List listUserCon) throws DataAccessException;
//刪除該客戶相關(guān)聯(lián)系人;
public boolean deleteCusCon(CustomerContact cusCon) throws DataAccessException;
//搜索用戶聯(lián)系人列表;
public List getUserConListByCusCon(CustomerContact cusCon) throws DataAccessException;
//修改該客戶的聯(lián)系人;
public boolean updateCusCon(CustomerContact cusCon) throws DataAccessException;
//修改業(yè)務(wù)機(jī)會;
public boolean updateOpport(BusinessOpportunity businessOpportunity) throws DataAccessException;
//-------------------------------更新后--------------------------------------------//
//根據(jù)客戶ID搜索聯(lián)系人
public List findContactByCustomerId(int customerId) throws DataAccessException;
//根據(jù)客戶ID搜索業(yè)務(wù)機(jī)會
public List findBusiOpportByCustomerId(int customerId) throws DataAccessException ;
//查找最新保存的客戶
public Customer getCustomerLastest() throws DataAccessException;
//查找上次修改人
public User getUserById(int userId) throws DataAccessException;
//更新客戶的狀態(tài)
public void updateCustomers(int modifyManId, String modifiTime, int customerId, int flag) throws DataAccessException;
//根據(jù)名稱模糊查找所有的客戶
public List getCustoemrsByNameLike(int flag, User user, String name) throws DataAccessException;
//************小洪2009-2-28**************//
//取得ID最大的客戶
public Customer getCustomerByMaxId();
//保存客戶賬號
public void saveCustAccount(CustAccount custAccount);
//**************end******************/
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -