main
parent
89471bc539
commit
9107e76fa5
|
|
@ -25,6 +25,7 @@ public class ScheduledService {
|
||||||
appUserMapper.updateAppUserById(ids);
|
appUserMapper.updateAppUserById(ids);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
//0 * * ? * *
|
||||||
|
|
||||||
@Scheduled(cron = "0 */1 * * * *")
|
@Scheduled(cron = "0 */1 * * * *")
|
||||||
public void updateEvents(){
|
public void updateEvents(){
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class AppEventsServiceImpl implements IAppEventsService
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<AppEvents> selectAppEventsList(AppEvents appEvents) {
|
public List<AppEvents> selectAppEventsList(AppEvents appEvents) {
|
||||||
if (appEvents != null && appEvents.getType() == 4 && appEvents.getUserId() != null) {
|
if (appEvents.getType() != null && appEvents.getType() == 4 && appEvents.getUserId() != null) {
|
||||||
appEvents.setType(2l);
|
appEvents.setType(2l);
|
||||||
AppEventsUser appEventsUser = new AppEventsUser();
|
AppEventsUser appEventsUser = new AppEventsUser();
|
||||||
appEventsUser.setUserId(appEvents.getUserId());
|
appEventsUser.setUserId(appEvents.getUserId());
|
||||||
|
|
|
||||||
|
|
@ -115,11 +115,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where
|
where
|
||||||
<if test="type == 1">
|
<if test="type == 1">
|
||||||
type = 1
|
type = 1
|
||||||
and start_time gt;= now()
|
and date_format(start_time,'%Y-%m-%d %H:%i') >= date_format(now(),'%Y-%m-%d %H:%i')
|
||||||
</if>
|
</if>
|
||||||
<if test="type == 2">
|
<if test="type == 2">
|
||||||
type = 2
|
type = 2
|
||||||
and end_time gt;= now()
|
and date_format(end_time,'%Y-%m-%d %H:%i') >= date_format(now(),'%Y-%m-%d %H:%i')
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue