guohongjin
2024-05-15 5b7639f0bd9e056738ec15100ed0532e965c6cd5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package cn.stylefeng.guns.modular.business.service;
 
import cn.stylefeng.guns.modular.business.dto.OrderMentalTestDetailDTO;
import cn.stylefeng.guns.modular.business.dto.OrderMentalTestPageDTO;
import cn.stylefeng.guns.modular.business.entity.OrderMentalTest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
 
import java.util.List;
import java.util.Map;
 
/**
 * <p>
 * 心理测试订单 服务类
 * </p>
 *
 * @author goupan
 * @since 2024-01-01
 */
public interface IOrderMentalTestService extends IService<OrderMentalTest> {
 
    /**
     * 根据订单号获取订单
     *
     * @param orderNo
     * @return
     */
    OrderMentalTest getOrderByNo(String orderNo);
 
    /**
     * 支付成功
     *
     * @param orderNo
     * @param tradeNo
     * @param totalAmount
     * @param payType
     * @return
     */
    Boolean paySuccess(String orderNo, String tradeNo, String totalAmount, Integer payType);
 
    /**
     * 获取心理测试订单列表
     * @param page
     * @param title
     * @param nickName
     * @param telephone
     * @param testType 测试类型:0免费,1付费
     * @param statusFlag 订单状态
     * @param adminView 后台显示1(免费必须是提交测试的)
     * @return
     */
    Page<OrderMentalTestPageDTO> getPage(Page<Object> page, String title, String nickName, String telephone, Integer testType, Integer statusFlag, Integer adminView);
    OrderMentalTestDetailDTO getInfoById(Long Id);
 
    /**
     * 创建心理测试订单
     * @param userId 用户ID
     * @param topicId 题库ID
     * @param isNeedPay 是否需要支付,false无须支付直接创建,true需要支付
     * @param isBack 是否后台创建
     * @return
     */
    OrderMentalTest createOrderMentalTest(Long userId, Long topicId, Boolean isNeedPay, Boolean isBack);
 
    /**
     * 统计订单数据
     */
    List<Map<String, Object>> getStatOrderList(String dateFormat, String beginTime, String endTime, Long workerId, List<Integer> statusList, List<String> orderNoList);
 
}