|  |  | 
 |  |  | import com.matrix.system.hive.action.util.QueryUtil; | 
 |  |  | import com.matrix.system.hive.bean.*; | 
 |  |  | import com.matrix.system.hive.dao.MoneyCardUseDao; | 
 |  |  | import com.matrix.system.hive.dao.SysVipLabelDao; | 
 |  |  | import com.matrix.system.hive.dao.VipAnswerDao; | 
 |  |  | import com.matrix.system.hive.plugin.util.DateUtils; | 
 |  |  | import com.matrix.core.tools.DateUtil; | 
 |  |  | import com.matrix.system.hive.pojo.RegisterInfo; | 
 |  |  | import com.matrix.system.hive.service.*; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | 
 |  |  |     private MoneyCardUseDao moneyCardUseDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private SysVipLabelDao sysVipLabelDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private SystemDictionaryService dataDictionaryService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private CustomerDataDictionaryDao customerDataDictionaryDao; | 
 |  |  |     @Resource | 
 |  |  |     private SysOrderService sysOrderService; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/showVipLevel") | 
 |  |  | 
 |  |  |         List<SysVipInfo> vips = vipInfoService.findByVipNoOrTel(keyWord); | 
 |  |  |         if (vips.size() > 0) { | 
 |  |  |             // 在session存放当前查询的客户 | 
 |  |  |             vips.get(0).setSysOrder(sysOrderService.findSysOrderTjByVipId(vips.get(0).getId())); | 
 |  |  |             vips.get(0).setLevelCard(cardUseService.findByVipId(vips.get(0).getId())); | 
 |  |  |             WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0)); | 
 |  |  |             // 满20后删除一个 | 
 |  |  | 
 |  |  |             if (isNoRepeat) { | 
 |  |  |                 userList.add(vips.get(0)); | 
 |  |  |             } | 
 |  |  |             vips.get(0).setLabels(sysVipLabelDao.selectByVipId(vips.get(0).getId())); | 
 |  |  |             vips.get(0).setAge(DateUtil.getAgeForBirthDay(vips.get(0).getBirthday1())); | 
 |  |  |             vips.get(0).setBalance(moneyCardUseDao.selectVipCardTotalMoney(vips.get(0).getId())); | 
 |  |  |             AjaxResult result=  new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0); | 
 |  |  |             return result; | 
 |  |  | 
 |  |  |     public @ResponseBody | 
 |  |  |     AjaxResult register(RegisterInfo vipInfo) { | 
 |  |  |  | 
 |  |  |         vipInfo.setBirthday1(DateUtils.stringToDate(vipInfo.getVoBirthday(), "yyyy-MM-dd")); | 
 |  |  |         vipInfo.setBirthday1(DateUtil.stringToDate(vipInfo.getVoBirthday(), "yyyy-MM-dd")); | 
 |  |  |         vipInfo.setVipState(Dictionary.VIP_STATE_HY); | 
 |  |  |         vipInfo.setStaffId(getMe().getSuId()); | 
 |  |  |         vipInfo.setShopId(getMe().getShopId()); | 
 |  |  | 
 |  |  |         int month = c.get(Calendar.MONTH) + 1; | 
 |  |  |         //获取日 | 
 |  |  |         int day = c.get(Calendar.DATE); | 
 |  |  |         //生肖 | 
 |  |  |         String sx = DateUtils.getYear(year); | 
 |  |  |  | 
 |  |  |         //星座 | 
 |  |  |         String xz = DateUtils.getConstellation(month, day); | 
 |  |  |         String xz = DateUtil.getConstellation(month, day); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         SysVipInfo vip = new SysVipInfo(); | 
 |  |  |         vip.setConstell(xz); | 
 |  |  |         vip.setAnimalSign(sx); | 
 |  |  |         List<SysVipInfo> vipList = new ArrayList<SysVipInfo>(); | 
 |  |  |         vipList.add(vip); | 
 |  |  |         return new AjaxResult(AjaxResult.STATUS_SUCCESS, vipList, 0); |