package com.product.administration.service;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
|
import com.product.administration.config.CmnConst;
|
import com.product.core.dao.BaseDao;
|
import com.product.core.entity.DataTableEntity;
|
import com.product.core.entity.FieldSetEntity;
|
import com.product.core.service.support.AbstractBaseService;
|
|
@Component
|
public class CustomerVisitRecordService extends AbstractBaseService{
|
|
@Autowired
|
BaseDao baseDao;
|
|
/**
|
* 客户拜访记录列表
|
* @param fse
|
* @return
|
*/
|
public DataTableEntity listVisitRecord(FieldSetEntity fse) {
|
DataTableEntity dt=baseDao.listTable(CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD, null, null, null, null, fse.getInteger(CmnConst.PAGESIZE), fse.getInteger(CmnConst.CPAGE));
|
baseDao.loadPromptData(dt);
|
return dt;
|
}
|
|
/**
|
* 客户拜访记录详情
|
* @param uuid
|
* @return
|
*/
|
public FieldSetEntity findVisitRecord(String uuid) {
|
return baseDao.getFieldSetEntity(CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD, uuid, false);
|
}
|
|
/**
|
* 客户拜访记录新增
|
* @param fse
|
* @return
|
*/
|
public boolean addVisitRecord(FieldSetEntity fse) {
|
return baseDao.saveFieldSetEntity(fse);
|
}
|
|
/**
|
* 客户拜访记录修改
|
* @param fse
|
* @return
|
*/
|
public boolean updateVisitRecord(FieldSetEntity fse) {
|
return baseDao.saveFieldSetEntity(fse);
|
}
|
|
/**
|
* 客户拜访记录删除
|
* @param uuid
|
* @return
|
*/
|
public boolean deleteVisitRecord(String uuid) {
|
return baseDao.delete(CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD, "uuid=?", new Object[] {uuid});
|
}
|
}
|