package com.wechat.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.google.common.collect.Lists;
import com.wechat.common.Constants;
import com.wechat.model.dbEntity.MdeVipPackage;
import com.wechat.model.dto.VipPackageDto;

@Service
public class PackageService {

	@Autowired
	MdeUserService MdeUserService;

	@Autowired
	MdeVipPackageService mdeVipPackageService;

	@Autowired
	CommonService commonService;
	
	/**
	 * 套餐页初始化
	 * 
	 * @param userCode
	 * @return
	 */
	public Map<String, Object> initPackagePage(String identityFlag, String lang) {
		Map<String, Object> map = new HashMap<String, Object>();
		List<VipPackageDto> list = Lists.newArrayList();
		// 头图
		map.put("broadcastPicture", commonService.getAdImages(Constants.PC_TAOCAN_TOP_AD));
		// 套餐
		list = mdeVipPackageService.getPackagesByIdentityFlag(identityFlag,lang);
		map.put("mdeVipPackage", list);
		return map;
	}
}
