const CacheBase=require("../cache.base");
const system=require("../../system");
//缓存首次登录的赠送的宝币数量
class InitGiftCache extends CacheBase{
   constructor(){
     super();
     this.pConfigDao=system.getObject("db.common.pconfigDao");
   }
    desc(){
      return "初始赠送";
    }
    prefix(){
      return "g_pconfig_initGift";
    }
    async buildCacheVal(cachekey,inputkey,val,ex,...items){
      const config=await this.pConfigDao.model.findOne({where:{configType:'initGift',appkey:inputkey},raw:true});
      const num2=Number(config.configValue);
      return num2;
    }
}
module.exports=InitGiftCache;
