const CacheBase=require("../cache.base");
const system=require("../../system");
//缓存首次登录的赠送的宝币数量
class PConfigCache extends CacheBase{
   constructor(){
     super();
     this.pConfigDao=system.getObject("db.common.pconfigDao");
   }
   desc(){
     return "平台配置参数";
  }
  prefix(){
    return "g_pconfig";
  }
  async buildCacheVal(cachekey,inputkey,val,ex,...items){
    const configValue=await this.pConfigDao.model.findAll({where:{appkey:inputkey},attributes:["name","configType","configValue"],raw:true});
    var s=JSON.stringify(configValue);
    return s;
  }
}
module.exports=PConfigCache;
