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); }
public UserBasicNorm GetUserBasicNorm(string userId, LotteryType lotteryType) { return(_analyseNormDapperRepostory.GetUserBasicNorm(userId, lotteryType)); }