账户消费记录及超市订单列表
This commit is contained in:
parent
44863a71d5
commit
ebb4d734c5
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.account.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.bonus.canteen.core.account.domain.param.AccConsumeDetailQueryParam;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import com.bonus.canteen.core.common.annotation.PreventRepeatSubmit;
|
import com.bonus.canteen.core.common.annotation.PreventRepeatSubmit;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|
@ -116,4 +118,17 @@ public class AccTradeController extends BaseController {
|
||||||
public AjaxResult remove(@PathVariable Long[] tradeIds) {
|
public AjaxResult remove(@PathVariable Long[] tradeIds) {
|
||||||
return toAjax(accTradeService.deleteAccTradeByTradeIds(tradeIds));
|
return toAjax(accTradeService.deleteAccTradeByTradeIds(tradeIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账户消费记录
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "账户消费记录")
|
||||||
|
//@PreventRepeatSubmit
|
||||||
|
//@RequiresPermissions("account:trade:remove")
|
||||||
|
@SysLog(title = "账户消费记录", businessType = OperaType.QUERY, logType = 1,module = "账户->账户消费记录")
|
||||||
|
@PostMapping("/consume/detail")
|
||||||
|
public TableDataInfo consumeDetail(@RequestBody AccConsumeDetailQueryParam param) {
|
||||||
|
startPage();
|
||||||
|
return getDataTable(accTradeService.queryAccConsumeDetail(param));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.bonus.canteen.core.account.domain.param;
|
||||||
|
|
||||||
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AccConsumeDetailQueryParam extends BaseEntity {
|
||||||
|
@ApiModelProperty("查询组织id集合")
|
||||||
|
private List<Long> deptIdList;
|
||||||
|
@ApiModelProperty("开始时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime startDateTime;
|
||||||
|
@ApiModelProperty("结束时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime endDateTime;
|
||||||
|
@ApiModelProperty("交易类型")
|
||||||
|
private Integer tradeType;
|
||||||
|
private Integer walletId;
|
||||||
|
private String searchValue;
|
||||||
|
public AccConsumeDetailQueryParam() {
|
||||||
|
this.endDateTime = LocalDateTime.now().plusDays(7);
|
||||||
|
this.startDateTime = LocalDateTime.now().minusDays(7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
package com.bonus.canteen.core.account.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AccConsumeDetailVO implements Serializable {
|
||||||
|
private Long tradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户昵称
|
||||||
|
*/
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门全名
|
||||||
|
*/
|
||||||
|
private String deptFullName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户类型
|
||||||
|
*/
|
||||||
|
private Integer userType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime payTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime orderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易类型
|
||||||
|
*/
|
||||||
|
private Integer tradeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 钱包ID
|
||||||
|
*/
|
||||||
|
private Long walletId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金额
|
||||||
|
*/
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 钱包余额
|
||||||
|
*/
|
||||||
|
private BigDecimal walletBal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源类型
|
||||||
|
*/
|
||||||
|
private Integer sourceType;
|
||||||
|
}
|
||||||
|
|
@ -3,7 +3,9 @@ package com.bonus.canteen.core.account.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.canteen.core.account.domain.AccTrade;
|
import com.bonus.canteen.core.account.domain.AccTrade;
|
||||||
import com.bonus.canteen.core.account.domain.bo.TradeAndWallerInfo;
|
import com.bonus.canteen.core.account.domain.bo.TradeAndWallerInfo;
|
||||||
|
import com.bonus.canteen.core.account.domain.param.AccConsumeDetailQueryParam;
|
||||||
import com.bonus.canteen.core.account.domain.param.AccWalletOperationQueryParam;
|
import com.bonus.canteen.core.account.domain.param.AccWalletOperationQueryParam;
|
||||||
|
import com.bonus.canteen.core.account.domain.vo.AccConsumeDetailVO;
|
||||||
import com.bonus.canteen.core.account.domain.vo.AccOperationListVO;
|
import com.bonus.canteen.core.account.domain.vo.AccOperationListVO;
|
||||||
import com.bonus.canteen.core.account.domain.vo.AccTradeVo;
|
import com.bonus.canteen.core.account.domain.vo.AccTradeVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
@ -74,4 +76,7 @@ public interface AccTradeMapper {
|
||||||
|
|
||||||
List<TradeAndWallerInfo> queryTradeAndWallerInfoByOrderNo(@Param("orderNo") String orderNo,
|
List<TradeAndWallerInfo> queryTradeAndWallerInfoByOrderNo(@Param("orderNo") String orderNo,
|
||||||
@Param("accTradeType") Integer accTradeType);
|
@Param("accTradeType") Integer accTradeType);
|
||||||
|
|
||||||
|
List<AccConsumeDetailVO> queryAccConsumeDetail(@Param("param") AccConsumeDetailQueryParam param,
|
||||||
|
@Param("encryptedSearchValue") String encryptedSearchValue);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,12 @@ package com.bonus.canteen.core.account.service;
|
||||||
import com.bonus.canteen.core.account.constants.AccTradeTypeEnum;
|
import com.bonus.canteen.core.account.constants.AccTradeTypeEnum;
|
||||||
import com.bonus.canteen.core.account.domain.AccTrade;
|
import com.bonus.canteen.core.account.domain.AccTrade;
|
||||||
import com.bonus.canteen.core.account.domain.bo.TradeAndWallerInfo;
|
import com.bonus.canteen.core.account.domain.bo.TradeAndWallerInfo;
|
||||||
|
import com.bonus.canteen.core.account.domain.param.AccConsumeDetailQueryParam;
|
||||||
import com.bonus.canteen.core.account.domain.param.AccWalletOperationQueryParam;
|
import com.bonus.canteen.core.account.domain.param.AccWalletOperationQueryParam;
|
||||||
|
import com.bonus.canteen.core.account.domain.vo.AccConsumeDetailVO;
|
||||||
import com.bonus.canteen.core.account.domain.vo.AccOperationListVO;
|
import com.bonus.canteen.core.account.domain.vo.AccOperationListVO;
|
||||||
import com.bonus.canteen.core.account.domain.vo.AccTradeVo;
|
import com.bonus.canteen.core.account.domain.vo.AccTradeVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -73,4 +76,6 @@ public interface IAccTradeService {
|
||||||
List<AccOperationListVO> queryAccOperationList(AccWalletOperationQueryParam param);
|
List<AccOperationListVO> queryAccOperationList(AccWalletOperationQueryParam param);
|
||||||
|
|
||||||
List<TradeAndWallerInfo> queryTradeAndWallerInfoByOrderNo(String orderNo, AccTradeTypeEnum accTradeTypeEnum);
|
List<TradeAndWallerInfo> queryTradeAndWallerInfoByOrderNo(String orderNo, AccTradeTypeEnum accTradeTypeEnum);
|
||||||
|
|
||||||
|
List<AccConsumeDetailVO> queryAccConsumeDetail(AccConsumeDetailQueryParam param);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@ import cn.hutool.core.collection.CollUtil;
|
||||||
import com.bonus.canteen.core.account.constants.AccTradeTypeEnum;
|
import com.bonus.canteen.core.account.constants.AccTradeTypeEnum;
|
||||||
import com.bonus.canteen.core.account.domain.AccTrade;
|
import com.bonus.canteen.core.account.domain.AccTrade;
|
||||||
import com.bonus.canteen.core.account.domain.bo.TradeAndWallerInfo;
|
import com.bonus.canteen.core.account.domain.bo.TradeAndWallerInfo;
|
||||||
|
import com.bonus.canteen.core.account.domain.param.AccConsumeDetailQueryParam;
|
||||||
import com.bonus.canteen.core.account.domain.param.AccWalletOperationQueryParam;
|
import com.bonus.canteen.core.account.domain.param.AccWalletOperationQueryParam;
|
||||||
|
import com.bonus.canteen.core.account.domain.vo.AccConsumeDetailVO;
|
||||||
import com.bonus.canteen.core.account.domain.vo.AccOperationListVO;
|
import com.bonus.canteen.core.account.domain.vo.AccOperationListVO;
|
||||||
import com.bonus.canteen.core.account.domain.vo.AccTradeVo;
|
import com.bonus.canteen.core.account.domain.vo.AccTradeVo;
|
||||||
import com.bonus.canteen.core.account.mapper.AccTradeMapper;
|
import com.bonus.canteen.core.account.mapper.AccTradeMapper;
|
||||||
|
|
@ -152,4 +154,10 @@ public class AccTradeServiceImpl implements IAccTradeService {
|
||||||
public List<TradeAndWallerInfo> queryTradeAndWallerInfoByOrderNo(String orderNo, AccTradeTypeEnum accTradeTypeEnum) {
|
public List<TradeAndWallerInfo> queryTradeAndWallerInfoByOrderNo(String orderNo, AccTradeTypeEnum accTradeTypeEnum) {
|
||||||
return accTradeMapper.queryTradeAndWallerInfoByOrderNo(orderNo, accTradeTypeEnum.getKey());
|
return accTradeMapper.queryTradeAndWallerInfoByOrderNo(orderNo, accTradeTypeEnum.getKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AccConsumeDetailVO> queryAccConsumeDetail(AccConsumeDetailQueryParam param) {
|
||||||
|
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue());
|
||||||
|
return accTradeMapper.queryAccConsumeDetail(param, encryptedSearchValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
package com.bonus.canteen.core.supermarket.controller;
|
package com.bonus.canteen.core.supermarket.controller;
|
||||||
|
|
||||||
|
import com.bonus.canteen.core.order.domain.OrderInfo;
|
||||||
|
import com.bonus.canteen.core.order.domain.param.OrderQueryParam;
|
||||||
|
import com.bonus.canteen.core.order.service.IOrderInfoService;
|
||||||
|
import com.bonus.canteen.core.supermarket.domain.ShopOrderQueryParam;
|
||||||
import com.bonus.canteen.core.supermarket.domain.SupermarketInfo;
|
import com.bonus.canteen.core.supermarket.domain.SupermarketInfo;
|
||||||
import com.bonus.canteen.core.supermarket.service.SupermarketInfoService;
|
import com.bonus.canteen.core.supermarket.service.SupermarketInfoService;
|
||||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||||
|
|
@ -10,10 +14,12 @@ import com.bonus.common.log.annotation.SysLog;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -28,6 +34,8 @@ import java.util.List;
|
||||||
public class SupermarketInfoController extends BaseController {
|
public class SupermarketInfoController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SupermarketInfoService supermarketInfoService;
|
private SupermarketInfoService supermarketInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IOrderInfoService orderInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jsk
|
* @author jsk
|
||||||
|
|
@ -86,4 +94,16 @@ public class SupermarketInfoController extends BaseController {
|
||||||
return toAjax(supermarketInfoService.deleteSupermarketInfoBySupermarketId(supermarketInfo));
|
return toAjax(supermarketInfoService.deleteSupermarketInfoBySupermarketId(supermarketInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询超市订单列表")
|
||||||
|
@PostMapping("/order/list")
|
||||||
|
public TableDataInfo orderList(@RequestBody @Valid ShopOrderQueryParam shopOrderQueryParam) {
|
||||||
|
startPage();
|
||||||
|
shopOrderQueryParam.setStartDateTime(shopOrderQueryParam.getStartDate().atTime(0,0,0));
|
||||||
|
shopOrderQueryParam.setEndDateTime(shopOrderQueryParam.getEndDate().atTime(23,59,59));
|
||||||
|
OrderQueryParam orderQueryParam = new OrderQueryParam();
|
||||||
|
BeanUtils.copyProperties(shopOrderQueryParam, orderQueryParam);
|
||||||
|
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderQueryParam);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,137 @@
|
||||||
|
package com.bonus.canteen.core.supermarket.domain;
|
||||||
|
|
||||||
|
import com.alibaba.excel.util.StringUtils;
|
||||||
|
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单对象 order_info
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-04-14
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ShopOrderQueryParam implements Serializable
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 设备订单号 */
|
||||||
|
private String deviceOrderId;
|
||||||
|
|
||||||
|
/** 设备sn */
|
||||||
|
private String deviceSn;
|
||||||
|
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
private List<Long> orderIdList;
|
||||||
|
|
||||||
|
private List<Long> deptIdList;
|
||||||
|
|
||||||
|
/** 设备编号 */
|
||||||
|
private String deviceNum;
|
||||||
|
|
||||||
|
/** 人员编号 */
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/** 身份验证方式 1 刷卡 2 刷脸 3 扫码 */
|
||||||
|
private Integer identityVerification;
|
||||||
|
|
||||||
|
/** 订单来源类型 */
|
||||||
|
private Integer sourceType;
|
||||||
|
|
||||||
|
/** 是否在线订单 1 是 2 否 */
|
||||||
|
private Integer isOnline;
|
||||||
|
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
|
/** 食堂id */
|
||||||
|
private Long canteenId;
|
||||||
|
|
||||||
|
private List<Long> canteenIdList;
|
||||||
|
|
||||||
|
/** 档口id */
|
||||||
|
private Long stallId;
|
||||||
|
|
||||||
|
private List<Long> stallIdList;
|
||||||
|
|
||||||
|
/** 餐次类型 1-早餐 2-午餐 3-晚餐 4-下午茶 5-夜宵 */
|
||||||
|
private Integer mealtimeType;
|
||||||
|
|
||||||
|
private List<Integer> mealtimeTypeList;
|
||||||
|
|
||||||
|
/** 订单日期 yyyy-MM-dd */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date orderDate;
|
||||||
|
|
||||||
|
/** 下单时间 yyyy-MM-dd HH:mm:ss */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date orderTime;
|
||||||
|
|
||||||
|
/** 订单类型 1 当餐 2 预订餐 3 报餐 4 商城 11 线下消费 12 自助餐 21 补扣 22 外部订单 */
|
||||||
|
@NotNull(message = "订单类型不能为空")
|
||||||
|
private Integer orderType;
|
||||||
|
|
||||||
|
private List<Integer> orderTypeList;
|
||||||
|
|
||||||
|
/** 订单状态 1 已下单 2 已完成 3 已取消 */
|
||||||
|
private Integer orderState;
|
||||||
|
|
||||||
|
private List<Integer> orderStateList;
|
||||||
|
|
||||||
|
/** 订单退款状态 1 未退单 2 已退单 3 部分退单 */
|
||||||
|
private Integer orderRefundState;
|
||||||
|
|
||||||
|
/** 扣款类型 1 下单扣款 2 核销扣款 */
|
||||||
|
private Integer deductionType;
|
||||||
|
|
||||||
|
/** 支付时间 yyyy-MM-dd HH:mm:ss */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date payTime;
|
||||||
|
|
||||||
|
/** 支付方式 */
|
||||||
|
private Integer payType;
|
||||||
|
|
||||||
|
/** 支付渠道 */
|
||||||
|
private Integer payChannel;
|
||||||
|
|
||||||
|
/** 支付状态 1 待支付 2 支付中 3 支付成功 4 支付失败 5 支付取消 6 部分支付 */
|
||||||
|
private Integer payState;
|
||||||
|
|
||||||
|
private List<Integer> payStateList;
|
||||||
|
|
||||||
|
/** 评论状态 1 已评论 2 未评论 */
|
||||||
|
private Integer commentState;
|
||||||
|
|
||||||
|
@ApiModelProperty("开始时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime startDateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("结束时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime endDateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("开始时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate startDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("结束时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate endDate;
|
||||||
|
|
||||||
|
private String custSearchInfo;
|
||||||
|
|
||||||
|
public ShopOrderQueryParam() {
|
||||||
|
this.endDate = LocalDate.now().plusDays(7);
|
||||||
|
this.startDate = LocalDate.now().minusDays(7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -294,4 +294,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and ate.trade_type = #{accTradeType}
|
and ate.trade_type = #{accTradeType}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryAccConsumeDetail" resultType="com.bonus.canteen.core.account.domain.vo.AccConsumeDetailVO">
|
||||||
|
select
|
||||||
|
at2.trade_id,
|
||||||
|
su.user_id,
|
||||||
|
su.nick_name,
|
||||||
|
sd.dept_full_name,
|
||||||
|
su.user_type,
|
||||||
|
oi.pay_time,
|
||||||
|
oi.order_time,
|
||||||
|
at2.trade_type,
|
||||||
|
atwd.wallet_id,
|
||||||
|
atwd.amount,
|
||||||
|
atwd.wallet_bal,
|
||||||
|
oi.source_type
|
||||||
|
from
|
||||||
|
order_info oi
|
||||||
|
inner join acc_trade at2 on
|
||||||
|
oi.order_id = at2.order_no
|
||||||
|
inner join acc_trade_wallet_detail atwd on
|
||||||
|
atwd.trade_id = at2.trade_id
|
||||||
|
inner join sys_user su on
|
||||||
|
oi.user_id = su.user_id
|
||||||
|
inner join sys_dept sd on
|
||||||
|
su.dept_id = sd.dept_id
|
||||||
|
where
|
||||||
|
atwd.trade_type in (110, 130)
|
||||||
|
and oi.order_state in (1, 2, 3)
|
||||||
|
and oi.pay_state = 3
|
||||||
|
<if test="param.tradeType != null">
|
||||||
|
and at2.trade_type = #{param.tradeType}
|
||||||
|
</if>
|
||||||
|
<if test="param.walletId != null">
|
||||||
|
and atwd.wallet_id = #{param.walletId}
|
||||||
|
</if>
|
||||||
|
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||||
|
and sd.dept_id in
|
||||||
|
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||||
|
#{deptId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.startDateTime != null">
|
||||||
|
and at2.trade_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endDateTime != null">
|
||||||
|
and at2.trade_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.searchValue != null and param.searchValue != ''">
|
||||||
|
and (su.nick_name like CONCAT('%',#{param.searchValue},'%')
|
||||||
|
or su.phonenumber = #{encryptedSearchValue}
|
||||||
|
or su.user_id like CONCAT('%',#{param.searchValue},'%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
order by
|
||||||
|
oi.pay_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue