Commit c1ed7fee by hayden

后台管理系统系统管理-日志管理-扫呗支付日志:新增筛选条件门店、房间

parent 987a23da
...@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController; ...@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult; import share.common.core.domain.AjaxResult;
import share.common.enums.BusinessType; import share.common.enums.BusinessType;
import share.system.domain.SaobeiApiLog; import share.system.domain.SaobeiApiLog;
import share.system.domain.SaobeiApiLogDto;
import share.system.service.SaobeiApiLogService; import share.system.service.SaobeiApiLogService;
import share.common.utils.poi.ExcelUtil; import share.common.utils.poi.ExcelUtil;
import share.common.core.page.TableDataInfo; import share.common.core.page.TableDataInfo;
...@@ -39,10 +40,10 @@ public class SaobeiApiLogController extends BaseController ...@@ -39,10 +40,10 @@ public class SaobeiApiLogController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:saobeilog:list')") @PreAuthorize("@ss.hasPermi('system:saobeilog:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SaobeiApiLog saobeiApiLog) public TableDataInfo list(SaobeiApiLogDto saobeiApiLogDto)
{ {
startPage(); startPage();
List<SaobeiApiLog> list = saobeiApiLogService.selectSaobeiApiLogList(saobeiApiLog); List<SaobeiApiLogDto> list = saobeiApiLogService.selectSaobeiApiLogList(saobeiApiLogDto);
return getDataTable(list); return getDataTable(list);
} }
...@@ -52,10 +53,10 @@ public class SaobeiApiLogController extends BaseController ...@@ -52,10 +53,10 @@ public class SaobeiApiLogController extends BaseController
@PreAuthorize("@ss.hasPermi('system:saobeilog:export')") @PreAuthorize("@ss.hasPermi('system:saobeilog:export')")
@Log(title = "扫呗接口调用日志", businessType = BusinessType.EXPORT) @Log(title = "扫呗接口调用日志", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SaobeiApiLog saobeiApiLog) public void export(HttpServletResponse response, SaobeiApiLogDto saobeiApiLog)
{ {
List<SaobeiApiLog> list = saobeiApiLogService.selectSaobeiApiLogList(saobeiApiLog); List<SaobeiApiLogDto> list = saobeiApiLogService.selectSaobeiApiLogList(saobeiApiLog);
ExcelUtil<SaobeiApiLog> util = new ExcelUtil<SaobeiApiLog>(SaobeiApiLog.class); ExcelUtil<SaobeiApiLogDto> util = new ExcelUtil<>(SaobeiApiLogDto.class);
util.exportExcel(response, list, "扫呗接口调用日志数据"); util.exportExcel(response, list, "扫呗接口调用日志数据");
} }
......
package share.system.domain;
import lombok.Data;
/**
* @author lichenghu
* @date 2024/1/25
*/
@Data
public class SaobeiApiLogDto extends SaobeiApiLog {
/**
* 门店id
*/
private Long storeId;
/**
* 房间id
*/
private Long roomId;
}
...@@ -3,6 +3,7 @@ package share.system.mapper; ...@@ -3,6 +3,7 @@ package share.system.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.SaobeiApiLog; import share.system.domain.SaobeiApiLog;
import share.system.domain.SaobeiApiLogDto;
/** /**
* 扫呗接口调用日志Mapper接口 * 扫呗接口调用日志Mapper接口
...@@ -26,7 +27,7 @@ public interface SaobeiApiLogMapper extends BaseMapper<SaobeiApiLog> ...@@ -26,7 +27,7 @@ public interface SaobeiApiLogMapper extends BaseMapper<SaobeiApiLog>
* @param saobeiApiLog 扫呗接口调用日志 * @param saobeiApiLog 扫呗接口调用日志
* @return 扫呗接口调用日志集合 * @return 扫呗接口调用日志集合
*/ */
public List<SaobeiApiLog> selectSaobeiApiLogList(SaobeiApiLog saobeiApiLog); public List<SaobeiApiLogDto> selectSaobeiApiLogList(SaobeiApiLog saobeiApiLog);
/** /**
* 新增扫呗接口调用日志 * 新增扫呗接口调用日志
......
...@@ -3,6 +3,7 @@ package share.system.service; ...@@ -3,6 +3,7 @@ package share.system.service;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.SaobeiApiLog; import share.system.domain.SaobeiApiLog;
import share.system.domain.SaobeiApiLogDto;
/** /**
* 扫呗接口调用日志Service接口 * 扫呗接口调用日志Service接口
...@@ -26,7 +27,7 @@ public interface SaobeiApiLogService extends IService<SaobeiApiLog> ...@@ -26,7 +27,7 @@ public interface SaobeiApiLogService extends IService<SaobeiApiLog>
* @param saobeiApiLog 扫呗接口调用日志 * @param saobeiApiLog 扫呗接口调用日志
* @return 扫呗接口调用日志集合 * @return 扫呗接口调用日志集合
*/ */
public List<SaobeiApiLog> selectSaobeiApiLogList(SaobeiApiLog saobeiApiLog); public List<SaobeiApiLogDto> selectSaobeiApiLogList(SaobeiApiLog saobeiApiLog);
/** /**
* 新增扫呗接口调用日志 * 新增扫呗接口调用日志
......
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import share.common.utils.DateUtils; import share.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import share.system.domain.SaobeiApiLogDto;
import share.system.mapper.SaobeiApiLogMapper; import share.system.mapper.SaobeiApiLogMapper;
import share.system.domain.SaobeiApiLog; import share.system.domain.SaobeiApiLog;
import share.system.service.SaobeiApiLogService; import share.system.service.SaobeiApiLogService;
...@@ -40,7 +41,7 @@ public class SaobeiApiLogServiceImpl extends ServiceImpl<SaobeiApiLogMapper, Sao ...@@ -40,7 +41,7 @@ public class SaobeiApiLogServiceImpl extends ServiceImpl<SaobeiApiLogMapper, Sao
* @return 扫呗接口调用日志 * @return 扫呗接口调用日志
*/ */
@Override @Override
public List<SaobeiApiLog> selectSaobeiApiLogList(SaobeiApiLog saobeiApiLog) public List<SaobeiApiLogDto> selectSaobeiApiLogList(SaobeiApiLog saobeiApiLog)
{ {
return saobeiApiLogMapper.selectSaobeiApiLogList(saobeiApiLog); return saobeiApiLogMapper.selectSaobeiApiLogList(saobeiApiLog);
} }
......
...@@ -31,23 +31,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -31,23 +31,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, pay_ver, pay_type, service_id, merchant_no, terminal_id, terminal_ip, terminal_trace, terminal_time, out_trade_no, request_params, response_params, result, result_msg, create_time, create_by, update_by, update_time, remark, flag from s_saobei_api_log select id, pay_ver, pay_type, service_id, merchant_no, terminal_id, terminal_ip, terminal_trace, terminal_time, out_trade_no, request_params, response_params, result, result_msg, create_time, create_by, update_by, update_time, remark, flag from s_saobei_api_log
</sql> </sql>
<select id="selectSaobeiApiLogList" parameterType="SaobeiApiLog" resultMap="SaobeiApiLogResult"> <select id="selectSaobeiApiLogList" parameterType="SaobeiApiLog" resultType="SaobeiApiLogDto">
<include refid="selectSaobeiApiLogVo"/> select
<where> t1.id,
<if test="payVer != null and payVer != ''"> and pay_ver = #{payVer}</if> t3.store_id,
<if test="payType != null and payType != ''"> and pay_type = #{payType}</if> t3.room_id,
<if test="serviceId != null and serviceId != ''"> and service_id = #{serviceId}</if> t1.pay_ver,
<if test="merchantNo != null and merchantNo != ''"> and merchant_no = #{merchantNo}</if> t1.pay_type,
<if test="terminalId != null and terminalId != ''"> and terminal_id = #{terminalId}</if> t1.service_id,
<if test="terminalIp != null and terminalIp != ''"> and terminal_ip = #{terminalIp}</if> t1.merchant_no,
<if test="terminalTrace != null and terminalTrace != ''"> and terminal_trace = #{terminalTrace}</if> t1.terminal_id,
<if test="terminalTime != null and terminalTime != ''"> and terminal_time = #{terminalTime}</if> t1.terminal_ip,
<if test="outTradeNo != null and outTradeNo != ''"> and out_trade_no = #{outTradeNo}</if> t1.terminal_trace,
<if test="requestParams != null and requestParams != ''"> and request_params = #{requestParams}</if> t1.terminal_time,
<if test="responseParams != null and responseParams != ''"> and response_params = #{responseParams}</if> t1.out_trade_no,
<if test="result != null and result != ''"> and result = #{result}</if> t1.request_params,
<if test="resultMsg != null and resultMsg != ''"> and result_msg = #{resultMsg}</if> t1.response_params,
<if test="flag != null and flag != ''"> and flag = #{flag}</if> t1.result,
t1.result_msg,
t1.create_time,
t1.create_by,
t1.update_by,
t1.update_time,
t1.remark,
t1.flag
from s_saobei_api_log t1
join s_wechat_pay_info t2 on t1.terminal_trace = t2.out_trade_no
join s_order t3 on t2.out_trade_no = t3.out_trade_no
<where>
<if test="storeId != null">and t3.store_id = #{storeId}</if>
<if test="roomId != null">and t3.room_id = #{roomId}</if>
<if test="payVer != null and payVer != ''">and t1.pay_ver = #{payVer}</if>
<if test="payType != null and payType != ''">and t1.pay_type = #{payType}</if>
<if test="serviceId != null and serviceId != ''">and t1.service_id = #{serviceId}</if>
<if test="merchantNo != null and merchantNo != ''">and t1.merchant_no = #{merchantNo}</if>
<if test="terminalId != null and terminalId != ''">and t1.terminal_id = #{terminalId}</if>
<if test="terminalIp != null and terminalIp != ''">and t1.terminal_ip = #{terminalIp}</if>
<if test="terminalTrace != null and terminalTrace != ''">and t1.terminal_trace = #{terminalTrace}</if>
<if test="terminalTime != null and terminalTime != ''">and t1.terminal_time = #{terminalTime}</if>
<if test="outTradeNo != null and outTradeNo != ''">and t1.out_trade_no = #{outTradeNo}</if>
<if test="requestParams != null and requestParams != ''">and t1.request_params = #{requestParams}</if>
<if test="responseParams != null and responseParams != ''">and t1.response_params = #{responseParams}</if>
<if test="result != null and result != ''">and t1.result = #{result}</if>
<if test="resultMsg != null and resultMsg != ''">and t1.result_msg = #{resultMsg}</if>
<if test="flag != null and flag != ''">and t1.flag = #{flag}</if>
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment