@Override public Map<String, Object> saveOneJlService( String phone, Float cprice, String ctype, Integer source, Integer payType, Integer payway) { List<JlService> haveList = jlService.hasBuyJLService(phone); Map<String, Object> map = new HashMap<String, Object>(); if (haveList.size() > 0) { map.put("type", 0); map.put("massage", "您已购买套餐,无需重复购买"); return map; } JlService bean = new JlService(); bean.setPhone(phone); bean.setCprice(cprice); bean.setCtype(ctype); jlService.addOne(bean); PaymentRecord record = paymentRecordService.saveJlService(bean, source, payType, payway); map.put("type", 1); map.put("massage", "购买成功"); map.put("id", bean.getId()); map.put("orderCode", bean.getOrderCode()); map.put("serialCode", record.getSerialCode()); map.put("ctype", ctype); map.put("cprice", cprice); return map; }
@Override public List<JlService> findByPhone(String phone) { return jlService.hasBuyJLService(phone); }