Esempio n. 1
0
        public bool UpdateUserLotteryPlan(string userId, LotteryType lotteryType, IList <int> planIds)
        {
            bool isSysDefault;
            var  userOldLotteryPlanIds = _anylseNormDapperReportory.GetUserSelectedPlans(userId, lotteryType,
                                                                                         out isSysDefault);

            var userBasicNorm = _lotteryAnalyseNormDapperRepostory.GetUserBasicNorm(userId, lotteryType);

            if (isSysDefault)
            {
                _anylseNormDapperReportory.InsertUserPlans(userId, lotteryType, userBasicNorm, planIds);
            }
            else
            {
                _anylseNormDapperReportory.UpdateUserPlans(userId, lotteryType, userBasicNorm, planIds, userOldLotteryPlanIds);
            }
            return(true);
        }
Esempio n. 2
0
 public UserBasicNorm GetUserBasicNorm(string userId, LotteryType lotteryType)
 {
     return(_analyseNormDapperRepostory.GetUserBasicNorm(userId, lotteryType));
 }