PointLotteryBiz.java
1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.cjs.cms.biz.user.point;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cjs.cms.dao.user.point.PointLotteryDao;
import com.cjs.cms.model.user.point.PointLotteryInfo;
@Service
public class PointLotteryBiz {
@Autowired
private PointLotteryDao dao;
/**
* 定时修改过期的刮奖记录
*/
public void updateLottery() {
try {
List<PointLotteryInfo> list = dao.searchLotteryExpire();
for (PointLotteryInfo pointLotteryInfo : list) {
pointLotteryInfo.setLottery("3");//抽奖过期
dao.update(pointLotteryInfo);
}
list = dao.searchBuyExpire();
for (PointLotteryInfo pointLotteryInfo : list) {
pointLotteryInfo.setBuy("3");//购买过期
dao.update(pointLotteryInfo);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}