|
|
@@ -1,17 +1,11 @@
|
|
|
package com.goafanti.customer.service.impl;
|
|
|
|
|
|
-import java.lang.reflect.InvocationTargetException;
|
|
|
-import java.util.UUID;
|
|
|
|
|
|
-import org.apache.commons.beanutils.BeanUtils;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import com.goafanti.common.dao.CustomerMapper;
|
|
|
import com.goafanti.common.dao.CustomerUserInfoMapper;
|
|
|
import com.goafanti.common.dao.FollowUpRecordMapper;
|
|
|
-import com.goafanti.common.model.Customer;
|
|
|
import com.goafanti.common.model.FollowUpRecord;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
@@ -21,24 +15,11 @@ import com.goafanti.customer.service.FollowUpService;
|
|
|
public class FollowUpServiceImp extends BaseMybatisDao<CustomerUserInfoMapper> implements FollowUpService{
|
|
|
@Autowired
|
|
|
private FollowUpRecordMapper followUpRecordMapper ;
|
|
|
- @Autowired
|
|
|
- private CustomerMapper customerMapper;
|
|
|
@Override
|
|
|
public int addFollowUp(FollowUpRecord fur,CustomerIn cusIn) {
|
|
|
- Customer cus = new Customer();
|
|
|
- try {
|
|
|
- BeanUtils.copyProperties(cus, cusIn);
|
|
|
- if(StringUtils.isNotBlank(cusIn.getFollowSituation()))
|
|
|
- cus.setFollowSituation(Integer.parseInt(cusIn.getFollowSituation()));
|
|
|
- if(StringUtils.isNotBlank(cusIn.getCustomerStatus()))
|
|
|
- cus.setCustomerStatus(Integer.parseInt(cusIn.getCustomerStatus()));
|
|
|
- } catch (IllegalAccessException | InvocationTargetException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
fur.setCid(cusIn.getId());
|
|
|
fur.setAid(TokenManager.getAdminId());
|
|
|
- followUpRecordMapper.insert(fur);
|
|
|
- return customerMapper.updateByPrimaryKeySelective(cus);
|
|
|
+ return followUpRecordMapper.insert(fur);
|
|
|
}
|
|
|
|
|
|
}
|