123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Bear
- * Date: 2018/11/29
- * Time: 下午5:44
- */
- namespace app\main\constants;
- class CustomConstants
- {
- //客服消息图文Mark
- const MARK_CUSTOM_IMG = 3201;
- //客服消息文字Mark
- const MARK_CUSTOM_TEXT = 3202;
- /**
- * 获取客服消息累计UV
- * @param $custom_id
- * @param $custom_idx
- * @return string
- */
- public static function getCustomUvKey($custom_id,$custom_idx){
- return "CU_UV:{$custom_id}:{$custom_idx}";
- }
- /**
- * 获取客服消息当天UV
- * @param $custom_id
- * @param $custom_idx
- * @param $time
- * @return string
- */
- public static function getCustomUvToDayKey($custom_id,$custom_idx,$time = null){
- $date_time = $time ? date('Ymd',$time) : date('Ymd');
- return "CU_UV_T:{$date_time}:{$custom_id}:{$custom_idx}";
- }
- /**
- * 获取客服消息当天Money
- * @param $custom_id
- * @param $custom_idx
- * @param $time
- * @return string
- */
- public static function getCustomRechargeMoneyToDayKey($custom_id,$custom_idx,$time = null){
- $date_time = $time ? date('Ymd',$time) : date('Ymd');
- return "CU_MONEY_T:{$date_time}:{$custom_id}:{$custom_idx}";
- }
- }
|