コード例 #1
0
ファイル: ImportCustomer.java プロジェクト: qw4wer/back
  /**
   * 根据StlLaiDianBean返回Customer
   *
   * @param bean
   * @return
   */
  private Customer beanToCustomer(StlLaiDianBean bean) {

    Customer customer = new Customer();

    customer.setCustomerNo(CustomerUtils.getTmpCustomerNo());

    customer.setCustomerName(bean.getCustomerName());
    customer.setVisitDate(bean.getVisitDate());
    customer.setPhone(bean.getPhone());

    customer.setHomeProvince(17); // 居住省
    customer.setHomeCity(169); // 居住市
    customer.setHomeContent(bean.getHomeContent());

    customer.setAreaNum(bean.getAreaNum()); // 意向面积
    customer.setRemark1(bean.getRemark1()); // 备注

    customer.setCompanyId(29);
    customer.setProjectId(190);

    customer.setTeamId(0);
    customer.setUserId(2400);

    customer.setManagerId(2400);
    customer.setCustomerSource("1"); // 客户来源

    customer.setIsDeleted(CommonUtils.NORMAL);
    customer.setCreatedId(2400);
    customer.setCreatedTime(new Date());
    customer.setModId(2400);
    customer.setModTime(new Date());

    return customer;
  }
コード例 #2
0
ファイル: CustomerServices.java プロジェクト: qw4wer/back
  /** 更新 */
  @Override
  public void updateUserIdByCustomerId(int userId, int customerId) throws RuntimeException {

    logCustomer(customerId); // 增加LOG

    Customer customer = getCustomerById(customerId);
    customer.setUserId(userId);
    customer.setModId(SessionUser.getUserId());
    customer.setModTime(new Date());

    customerMapper.updateCustomer(customer);

    CacheUtils.removeCache(cacheKeyOne, customerId);
  }