Package org.jayasoft.woj.portal.data.dao.commercial

Examples of org.jayasoft.woj.portal.data.dao.commercial.UserPointDao.save()


                if (godfather != null) {
                    ProductPoint pp = ppDao.get(p, years, ProductPoint.GODSON);
                    if (pp.getPoints()!=0) {
                        UserPoint oldGFUP = getUserPoint(godfather);
                        UserPoint gfUP = UserPointFactory.godson(godfather, oldGFUP, godson, p, subscribedUsers, pp);
                        upDao.save(gfUP);
                        ServiceFactory.getRegistrationService().sendFidelityAccountPointEarnedByGodSonBuyMail(godfather, godson, p, subscribedUsers, years, gfUP.getEarnedPoints(), gfUP.getPoints());
                        LOGGER.info("adding " + pp.getPoints() + " to user: " + godfather.getId() + ", his godson: " + godson.getId() + " bought " + p.getCode() + " for " + years + " years");
                    }
                } else {
                    LOGGER.info("user: " + buyer.getId() + " does not have a godfather");
View Full Code Here


                }
                ProductPoint pp = ppDao.get(p, years, ProductPoint.PURCHASE);
                if (pp != null && pp.getPoints()!=0) {
                    UserPoint oldGSUP = getUserPoint(godson);
                    UserPoint gsUP = UserPointFactory.purchase(godson, oldGSUP, p, subscribedUsers, pp);
                    upDao.save(gsUP);
                    ServiceFactory.getRegistrationService().sendFidelityAccountPointEarnedBySelfPurchaseMail(godson, p, subscribedUsers, years, gsUP.getEarnedPoints(),  gsUP.getPoints());
                    LOGGER.info("adding " + pp.getPoints() + " to user: " + godson.getId() + ", he bought " + p.getCode() + " for " + years + " years");
                }
            } catch (DaoException e) {
                LOGGER.warn("cannot add fidelity points to user: " + buyer.getId(), e);
View Full Code Here

               
                ProductPoint pp = ppDao.get(p, years, ProductPoint.RENEWAL);
                if (pp.getPoints()!=0) {
                    UserPoint oldGSUP = getUserPoint(godson);
                    UserPoint gsUP = UserPointFactory.renew(godson, oldGSUP, p, pp);
                    upDao.save(gsUP);
                    ServiceFactory.getRegistrationService().sendFidelityAccountPointEarnedBySelfRenewMail(godson, p, years, gsUP.getEarnedPoints(), gsUP.getPoints());
                    LOGGER.info("adding " + pp.getPoints() + " to user: " + godson.getId() + ", he renews " + p.getCode() + " for " + years + " years");
                }
            } catch (DaoException e) {
                LOGGER.warn("cannot add fidelity points to user: " + buyer.getId(), e);
View Full Code Here

                    UserPoint oldUP = getUserPoint(user);
                    if (oldUP.getPoints() < fo.getNeededPoints()) {
                        throw new ServiceException(RessourceBundleApplicationMessage.error("woj.page.fidelity.offers.not.enough.points", null));
                    }
                    UserPoint up = UserPointFactory.orderGift(u, oldUP, fo);
                    upDao.save(up);
                    ServiceFactory.getRegistrationService().sendOrderGiftMail(user, Messages.DEFAULT.getString(fo.getKey()), fo.getNeededPoints(), up.getPoints());
                    LOGGER.info("removing " + fo.getNeededPoints() + " from user: " + user.getId() + ", he ordered: " + fo.getKey());
                } else {
                    LOGGER.warn("gift " + giftId + " not found on db");
                }
View Full Code Here

                Integer points = new Integer(Messages.DEFAULT.getString("woj.page.fidelity.offers.program.module.array.value"));
               
                if (points.intValue()>0) {
                    UserPoint oldUP = getUserPoint(user);
                    UserPoint up = UserPointFactory.promotion(u, oldUP, moduleName, points.intValue());
                    upDao.save(up);
                    ServiceFactory.getRegistrationService().sendFidelityAccountPointEarnedByUploadMail(user, moduleName, up.getEarnedPoints(), up.getPoints());                   
                    LOGGER.info("adding " + points + " to user: " + user.getId() + ", module: " + moduleName + " has been promoted");
                }
            } catch (DaoException e) {
                LOGGER.warn("cannot give fidelity points for promotion of " + moduleName + " for user " + u.getLogin() , e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.