admin
2022-08-25 264b5dea5b74c4b5ba54a90caba7e709858a037e
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
package com.yeshi.buwan.util.vip;
 
import com.yeshi.buwan.domain.vip.OrderType;
 
public class VIPOrderUtil {
 
    /**
     * 获取第三方订单号
     *
     * @param orderType
     * @param id
     * @return
     */
    public static String getOutOrderNo(OrderType orderType, String id) {
        if (orderType == OrderType.vip)
            return "buwan_vip_" + id;
        else
            return "buwan_video_" + id;
    }
 
 
    public static String getIdFromOutOrderNo(String orderNo) {
        return orderNo.replace("buwan_vip_", "").replace("buwan_video_", "");
    }
 
}