提交 | 用户 | age
|
1bfb1b
|
1 |
package com.hz.his.constant; |
F |
2 |
|
9e43ec
|
3 |
import com.hx.util.StringUtils; |
F |
4 |
|
1bfb1b
|
5 |
/** |
F |
6 |
* 活动优惠类型 |
|
7 |
* @USER: fhx |
|
8 |
* @DATE: 2024/5/8 |
|
9 |
**/ |
|
10 |
public class ActivityPreferentialConstants { |
|
11 |
|
|
12 |
/** 优惠类型 - 降价 */ |
|
13 |
public static final String TYPE_PRICE_REDUCTION = "price_reduction"; |
|
14 |
/** 优惠类型 - 赠送优惠券 */ |
|
15 |
public static final String TYPE_GIFT_COUPON = "gift_coupon"; |
|
16 |
/** 优惠类型 - 赠送积分 */ |
|
17 |
public static final String TYPE_GIFT_INTEGRAL = "gift_integral"; |
|
18 |
/** 优惠类型 - 折扣 */ |
|
19 |
public static final String TYPE_DISCOUNT = "discount"; |
|
20 |
/** 优惠类型 - 赠送项目 */ |
|
21 |
public static final String TYPE_GIFT_PROJECT = "gift_project"; |
|
22 |
|
|
23 |
|
|
24 |
/** 转换优化类型中文 */ |
|
25 |
public static String changeTypeCn(String type){ |
|
26 |
switch (type){ |
|
27 |
case TYPE_PRICE_REDUCTION: return "降价"; |
|
28 |
case TYPE_GIFT_COUPON: return "赠送优惠券"; |
|
29 |
case TYPE_GIFT_INTEGRAL: return "赠送积分"; |
|
30 |
case TYPE_DISCOUNT: return "打折"; |
|
31 |
case TYPE_GIFT_PROJECT: return "赠送项目"; |
|
32 |
default: return "未知"; |
|
33 |
} |
|
34 |
} |
9e43ec
|
35 |
|
F |
36 |
/** 检查判断是否赠送类型 */ |
|
37 |
public static boolean checkGiftType(String type){ |
|
38 |
if(StringUtils.isEmpty(type)){ |
|
39 |
return false; |
|
40 |
} |
|
41 |
|
|
42 |
if(TYPE_GIFT_COUPON.equals(type) |
|
43 |
|| TYPE_GIFT_INTEGRAL.equals(type) |
|
44 |
|| TYPE_GIFT_PROJECT.equals(type)){ |
|
45 |
return true; |
|
46 |
} |
|
47 |
return false; |
|
48 |
} |
1bfb1b
|
49 |
} |