示例#1
0
 /**
  * 逆向退款----查询-无分页
  *
  * @param query
  * @return
  */
 @RequestMapping(value = "query")
 @ResponseBody
 public Wrapper<?> query(RefundQuery query) {
   try {
     List<Refund> list = refundService.queryRefundList(query);
     if (!CollectionUtils.isEmpty(list)) {
       return WrapMapper.wrap(Wrapper.SUCCESS_CODE, Wrapper.SUCCESS_MESSAGE, list);
     } else {
       return WrapMapper.wrap(Wrapper.ERROR_CODE, "查询配置信息失败!");
     }
   } catch (Exception e) {
     LOG.error("refund query has error.", e);
     return WrapMapper.error();
   }
 }
示例#2
0
 /**
  * 逆向退款----删除
  *
  * @param refund
  * @return
  */
 @RequestMapping(value = "delete")
 @ResponseBody
 public Wrapper<?> delete(Refund refund) {
   try {
     refund.setUpdateUser(getLoginUserCnName());
     if (refundService.delete(refund)) {
       return WrapMapper.wrap(Wrapper.SUCCESS_CODE, "删除成功!");
     } else {
       return WrapMapper.wrap(Wrapper.ERROR_CODE, "删除失败!");
     }
   } catch (Exception e) {
     LOG.error("refund delete has error.", e);
     return WrapMapper.error();
   }
 }
 /**
  * 商品查询综合表----删除
  *
  * @param productSelect
  * @return
  */
 @RequestMapping(value = "delete")
 @ResponseBody
 public Wrapper<?> delete(ProductSelect productSelect) {
   try {
     productSelect.setUpdateUser(getLoginUserCnName());
     if (productSelectService.delete(productSelect)) {
       return WrapMapper.wrap(Wrapper.SUCCESS_CODE, "删除成功!");
     } else {
       return WrapMapper.wrap(Wrapper.ERROR_CODE, "删除失败!");
     }
   } catch (Exception e) {
     LOG.error("productSelect delete has error.", e);
     return WrapMapper.error();
   }
 }
示例#4
0
 /**
  * 添加个人基本资料
  *
  * @param requestDto
  * @return
  */
 public Wrapper<?> add(UserProfileRequestDto requestDto) {
   if (LOG.isDebugEnabled()) {
     LOG.debug("register request: " + JsonHelper.toJson(requestDto));
   }
   UserProfileRequest request = new UserProfileRequest(super.getKey(), requestDto);
   UserProfileResponse response = null;
   String url = null;
   try {
     url = super.getServiceUrlDomain() + "services/userProfile/add";
     response = super.getRestTemplate().postForObject(url, request, UserProfileResponse.class);
   } catch (Exception e) {
     LOG.error("#UserProfileClient.add# ERROR:" + e);
   }
   if (LOG.isDebugEnabled()) {
     LOG.debug("getUserProfile url: " + url);
     LOG.debug("getUserProfile response: " + JsonHelper.toJson(response));
   }
   if (null != response) {
     return WrapMapper.wrap(response.getCode(), response.getMessage());
   } else {
     return WrapMapper.error();
   }
 }
示例#5
0
  /**
   * 查询订单日志信息
   *
   * @param request 订单日志请求参数
   * @return 订单日志返回对象
   */
  @POST
  @Path("/orderLog/getOrderLog")
  public Wrapper<?> getOrderLog(OrderLogRequest request) {
    if (null == request || !request.checkSign()) {
      this.logger.error("getOrderLog 拒绝访问");
      return WrapMapper.forbidden();
    }

    OrderLogRequestDto requestDto = request.getContent();
    if (null == requestDto || null == requestDto.getId()) {
      this.logger.error("getOrderLog 传入参数有误");
      return WrapMapper.illegalArgument();
    }

    try {
      OrderLog orderLog = orderLogService.getOrderLogById(requestDto.getId());
      OrderLogResponseDto responseDto = convert(orderLog);
      return WrapMapper.ok().result(responseDto);
    } catch (Exception e) {
      this.logger.error("查询订单日志数据异常", e);
      return WrapMapper.error();
    }
  }