コード例 #1
0
ファイル: UserManagerLog.java プロジェクト: kolenxiao/work
  public void logModifyEbayUserAgreement(
      EbayUserAgreementDTO ebayUserAgreementDTO, UserInfoPO oldUser, UserInfoPO newUser) {

    BusiLogDTO busiLogDTO = new BusiLogDTO();
    busiLogDTO.setKeyWord(ebayUserAgreementDTO.getUserId().toString());
    busiLogDTO.setKeyWordType(TypeEnum.KeyWordType.USER_ID.getKey());
    busiLogDTO.setBusiTypeCode(CommonEnum.BusiOperType.ModifyEbayUserAgreement.getKey());
    busiLogDTO.setOperIp(ebayUserAgreementDTO.getIpAddr());

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

    oldMap.put(
        "eBay用户协议是否同意",
        StringUtils.isNotEmpty(oldUser.getEbayUserAgreement())
            ? oldUser.getEbayUserAgreement()
            : TypeEnum.YesOrNo.NO.getKey());
    newMap.put("eBay用户协议是否同意", newUser.getEbayUserAgreement());

    busiLogDTO.setBeforeContent(jsonUtils.toJson(oldMap));
    busiLogDTO.setAfterContent(jsonUtils.toJson(newMap));
    logService.insertBusiLog(busiLogDTO);
  }
コード例 #2
0
ファイル: UserManagerLog.java プロジェクト: kolenxiao/work
  public void logModifyMobileAuthen(
      ModifyUserAuthenDTO modifyUserAuthenDTO, UserInfoPO oldUser, UserInfoPO newUser) {
    BusiLogDTO busiLogDTO = new BusiLogDTO();
    busiLogDTO.setKeyWord(modifyUserAuthenDTO.getUserId().toString());
    busiLogDTO.setKeyWordType(TypeEnum.KeyWordType.USER_ID.getKey());
    busiLogDTO.setBusiTypeCode(CommonEnum.BusiOperType.ModifyMobileAuthen.getKey());
    busiLogDTO.setOperIp(modifyUserAuthenDTO.getIpAddr());

    Map<String, Object> oldMap = new LinkedHashMap<String, Object>();
    Map<String, Object> newMap = new LinkedHashMap<String, Object>();
    if (!StringUtils.equals(oldUser.getMobile(), newUser.getMobile())) {
      oldMap.put("手机", oldUser.getMobile());
    }
    oldMap.put("状态", oldUser.getMobileAuthenStatus());
    newMap.put("手机", newUser.getMobile());
    newMap.put("状态", newUser.getMobileAuthenStatus());

    if (!oldMap.isEmpty()) {
      busiLogDTO.setBeforeContent(jsonUtils.toJson(oldMap));
    }
    busiLogDTO.setAfterContent(jsonUtils.toJson(newMap));
    logService.insertBusiLog(busiLogDTO);
  }