예제 #1
0
  public void logLeadPartnerRegister(LeadRegisterDTO leadRegisterDTO) {
    BusiLogDTO busiLogDTO = new BusiLogDTO();
    busiLogDTO.setKeyWord(leadRegisterDTO.getUserId().toString());
    busiLogDTO.setKeyWordType(TypeEnum.KeyWordType.USER_ID.getKey());
    busiLogDTO.setBusiTypeCode(CommonEnum.BusiOperType.LeadPartnerRegister.getKey());

    Map<String, Object> oldMap = new LinkedHashMap<String, Object>();
    Map<String, Object> newMap = new LinkedHashMap<String, Object>();

    oldMap.put("客户类型", TypeEnum.CustType.PARTNER.getValue());

    if (StringUtils.isNotBlank(leadRegisterDTO.getEmail())) {
      newMap.put("邮箱", leadRegisterDTO.getEmail());
    } else if (StringUtils.isNotBlank(leadRegisterDTO.getMobile())) {
      newMap.put("手机号", leadRegisterDTO.getMobile());
    }
    // String password = leadRegisterDTO.getPassword();
    // newMap.put("密码", "********"+password.substring(password.length()-4, password.length()));
    // newMap.put("密码", leadRegisterDTO.getPassword());
    newMap.put("客户类型", TypeEnum.CustType.XIU.getValue());

    busiLogDTO.setBeforeContent(jsonUtils.toJson(oldMap));
    busiLogDTO.setAfterContent(jsonUtils.toJson(newMap));
    logService.insertBusiLog(busiLogDTO);
  }
예제 #2
0
  public void logRegisterUser(RegisterUserDTO registerUserDTO, Long userId) throws Exception {
    BusiLogDTO busiLogDTO = new BusiLogDTO();
    busiLogDTO.setKeyWord(userId.toString());
    busiLogDTO.setKeyWordType(TypeEnum.KeyWordType.USER_ID.getKey());
    busiLogDTO.setBusiTypeCode(CommonEnum.BusiOperType.RegisterUser.getKey());
    busiLogDTO.setOperId(registerUserDTO.getOperId());
    busiLogDTO.setOperIp(registerUserDTO.getRegisterIp());

    Map<String, Object> map = new LinkedHashMap<String, Object>();
    map.put("用户名", registerUserDTO.getLogonName());
    map.put("注册渠道", TypeEnum.ChannelType.getList().get(registerUserDTO.getChannelId()));
    map.put("注册类型", TypeEnum.RegisterType.getList().get(registerUserDTO.getRegisterType()));
    map.put("客户类型", TypeEnum.CustType.getList().get(registerUserDTO.getCustType()));
    if (TypeEnum.CustType.PARTNER.getKey().equals(registerUserDTO.getCustType())) {
      map.put("联盟ID", registerUserDTO.getPartnerId());
      map.put(
          "联盟渠道", TypeEnum.PartnerChannelType.getList().get(registerUserDTO.getPartnerChannelId()));
    }
    map.put("是否需要激活", TypeEnum.YesOrNo.getList().get(registerUserDTO.getIsNeedActivate()));

    busiLogDTO.setAfterContent(jsonUtils.toJson(map));
    logService.insertBusiLog(busiLogDTO);
  }