Commit ffb4338b by xiongzs

Merged from rop-merchant rop-1207分支

1 parent 205ffb8c
......@@ -3,6 +3,7 @@ package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.log.LogSearchRequest;
import cn.com.glsx.merchants.request.log.MerchantAndStaffLogRopRequest;
import cn.com.glsx.merchants.response.LogResponse;
import cn.com.glsx.merchants.service.MerchantLogService;
import cn.com.glsx.merchants.util.Pagination;
......@@ -46,4 +47,22 @@ public class LogController {
}
}
/**
* 查询商户、员工操作日志列表
*
* @param ropRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findMerchantAndStaffLog", needInSession = NeedInSessionType.NO)
@ApiOperation("查询商户、员工操作日志列表")
public RopResponse<Pagination<LogResponse>> findMerchantAndStaffLog(MerchantAndStaffLogRopRequest ropRequest) {
try {
Pagination<LogResponse> list = merchantLogService.findMerchantAndStaffLog(ropRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======LogController__invoke_findMerchantAndStaffLog__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
......@@ -10,6 +10,7 @@ import cn.com.glsx.merchants.model.response.MerchantLogResponse;
import cn.com.glsx.merchants.remote.MerchantLogRemote;
import cn.com.glsx.merchants.request.log.LogRequest;
import cn.com.glsx.merchants.request.log.LogSearchRequest;
import cn.com.glsx.merchants.request.log.MerchantAndStaffLogRopRequest;
import cn.com.glsx.merchants.response.LogResponse;
import cn.com.glsx.merchants.util.Pagination;
import lombok.extern.slf4j.Slf4j;
......@@ -52,4 +53,12 @@ public class MerchantLogService {
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(), merProductByPageRemote.getMessage());
}
public Pagination<LogResponse> findMerchantAndStaffLog(MerchantAndStaffLogRopRequest ropRequest) {
RpcResponse<RpcPagination<MerchantLogResponse>> merProductByPageRemote = merchantLogRemote.findMerchantLogForScrm(ConvertRequest.convertPage(ropRequest, new MerchantLogRequest()));
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merProductByPageRemote.getResult(), LogResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(), merProductByPageRemote.getMessage());
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!