コード例 #1
0
 @Override
 public IdentityStatusTransfer queryIdentityStatusTransferById(Long id) {
   logger.debug("IdentityStatusTransferServiceImpl:queryIdentityStatusTransferById(" + id + ")");
   IdentityStatusTransfer identityStatusTransfer = identityStatusTransferDao.findOne(id);
   logger.debug(
       "IdentityStatusTransferServiceImpl:queryIdentityStatusTransferById("
           + (BeanUtils.isNotNull(identityStatusTransfer) ? identityStatusTransfer.toString() : "")
           + ")[返回信息]");
   return identityStatusTransfer;
 }
コード例 #2
0
 @Override
 public IdentityStatusTransfer queryIdentityStatusTransferByParams(
     IdentityStatus oldStatus, IdentityStatus newStatus, IdentityType identityType) {
   logger.debug(
       "IdentityStatusTransferServiceImpl:queryIdentityStatusTransferByParams("
           + (BeanUtils.isNotNull(oldStatus) ? oldStatus.getStatus().toString() : "")
           + ","
           + (BeanUtils.isNotNull(newStatus) ? newStatus.getStatus().toString() : "")
           + ","
           + (BeanUtils.isNotNull(identityType) ? identityType.toString() : "")
           + ")");
   if (BeanUtils.isNotNull(oldStatus)
       && BeanUtils.isNotNull(newStatus)
       && BeanUtils.isNotNull(identityType)) {
     Map<String, SearchFilter> filters = new HashMap<String, SearchFilter>();
     filters.put(
         EntityConstant.IdentityStatusTransfer.IDENTITY_STATUS_OLD,
         new SearchFilter(
             EntityConstant.IdentityStatusTransfer.IDENTITY_STATUS_OLD,
             Operator.EQ,
             oldStatus.getStatus()));
     filters.put(
         EntityConstant.IdentityStatusTransfer.IDENTITY_STATUS_NEW,
         new SearchFilter(
             EntityConstant.IdentityStatusTransfer.IDENTITY_STATUS_NEW,
             Operator.EQ,
             newStatus.getStatus()));
     filters.put(
         EntityConstant.IdentityStatusTransfer.IDENTITY_TYPE,
         new SearchFilter(
             EntityConstant.IdentityStatusTransfer.IDENTITY_TYPE, Operator.EQ, identityType));
     Specification<IdentityStatusTransfer> spec =
         DynamicSpecifications.bySearchFilter(filters.values(), IdentityStatusTransfer.class);
     IdentityStatusTransfer identityStatusTransfer = identityStatusTransferDao.findOne(spec);
     if (identityStatusTransfer != null) {
       logger.debug(
           "IdentityStatusTransferServiceImpl:queryIdentityStatusTransferByParams("
               + (BeanUtils.isNotNull(identityStatusTransfer)
                   ? identityStatusTransfer.toString()
                   : "")
               + ")[返回信息]");
       return identityStatusTransfer;
     } else {
       logger.debug(
           "IdentityStatusTransferServiceImpl:queryIdentityStatusTransferByParams(未找到状态机信息)[返回信息]");
       String[] msgParams =
           new String[] {
             oldStatus.getStatus().toString(),
             newStatus.getStatus().toString(),
             identityType.toString()
           };
       ApplicationException e = new ApplicationException("identity001054", msgParams);
       throw ExceptionUtil.throwException(e);
     }
   } else {
     logger.debug(
         "IdentityStatusTransferServiceImpl:queryIdentityStatusTransferByParams(参数为空)[返回信息]");
     ApplicationException e = new ApplicationException("identity001055");
     throw ExceptionUtil.throwException(e);
   }
 }