|
@@ -64,7 +64,7 @@ public class PrizeController {
|
|
|
prizeRecord.setVoucherId(user.getVoucherId());
|
|
|
prizeRecord.setNickName(user.getNickName());
|
|
|
UserPrizeCountExample uExp = new UserPrizeCountExample();
|
|
|
- Integer luckDrawCount = UserPrizeCountMapper.selectCountByToday();
|
|
|
+ Integer luckDrawCount = UserPrizeCountMapper.selectCountByTodayByUid(userId);
|
|
|
HashMap<String, Object> map = new HashMap<String, Object>();
|
|
|
if (luckDrawCount == 0) {
|
|
|
// 直接抽奖
|
|
@@ -77,7 +77,7 @@ public class PrizeController {
|
|
|
map.put("prizeRecord", prizeRecord);
|
|
|
msg.data = map;
|
|
|
} else if (luckDrawCount == 1) {
|
|
|
- int opportunityCount = prizeOpportunityMapper.selectCountByToday();
|
|
|
+ int opportunityCount = prizeOpportunityMapper.selectCountByToday(userId);
|
|
|
if (opportunityCount > 0) {
|
|
|
// 直接抽奖
|
|
|
count = getLuckDraw(prizeRecord, count);
|
|
@@ -209,7 +209,7 @@ public class PrizeController {
|
|
|
public void luckDrawAddCount(PrizeRecord prizeRecord, HttpServletResponse response)
|
|
|
throws Exception, KeyManagementException, NoSuchAlgorithmException, NoSuchProviderException, IOException {
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
- int count = prizeOpportunityMapper.selectCountByToday();
|
|
|
+ int count = prizeOpportunityMapper.selectCountByToday(prizeRecord.getUid());
|
|
|
if (count == 0) {
|
|
|
PrizeOpportunity prizeOpportunity = new PrizeOpportunity();
|
|
|
prizeOpportunity.setIsShare(1);
|