Commit cf867ead by 高晓磊

修改 采砂许可证修改状态的时间(反了)

parent 157b6627
......@@ -110,7 +110,7 @@ public class SandMiningDaoImpl extends AbstractBaseDao implements SandMiningDao,
public void updateSandMiningStatus() {
//1.将未开始但时间已到的修改为已开始
template.execute(session -> {
Query query = session.createQuery("update " + ENTITY + " as a set a.status =1 where a.sandMiningStart >= :startDate and a.status = 0 and a.del=false");
Query query = session.createQuery("update " + ENTITY + " as a set a.status =1 where a.sandMiningStart <= :startDate and a.status = 0 and a.del=false");
query.setParameter("startDate", new Date());
query.executeUpdate();
return query;
......@@ -118,7 +118,7 @@ public class SandMiningDaoImpl extends AbstractBaseDao implements SandMiningDao,
//2.将已开始但超时的修改为已过期
template.execute(session -> {
Query query = session.createQuery("update " + ENTITY + " as a set a.status =2 where a.sandMiningEnd >= :endDate and a.status = 1 and a.del=false");
Query query = session.createQuery("update " + ENTITY + " as a set a.status =2 where a.sandMiningEnd <= :endDate and a.status in (0,1) and a.del=false");
query.setParameter("endDate", new Date());
query.executeUpdate();
return query;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment