|
|
@ -62,6 +62,7 @@ public class QueueService extends BaseService{ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* query queue list paging |
|
|
|
* query queue list paging |
|
|
|
|
|
|
|
* |
|
|
|
* @param loginUser |
|
|
|
* @param loginUser |
|
|
|
* @param searchVal |
|
|
|
* @param searchVal |
|
|
|
* @param pageNo |
|
|
|
* @param pageNo |
|
|
@ -88,6 +89,14 @@ public class QueueService extends BaseService{ |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* create queue |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param loginUser |
|
|
|
|
|
|
|
* @param queue |
|
|
|
|
|
|
|
* @param queueName |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
public Map<String, Object> createQueue(User loginUser, String queue, String queueName) { |
|
|
|
public Map<String, Object> createQueue(User loginUser, String queue, String queueName) { |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
if (checkAdmin(loginUser, result)) { |
|
|
|
if (checkAdmin(loginUser, result)) { |
|
|
@ -99,6 +108,11 @@ public class QueueService extends BaseService{ |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (checkQueueExists(queueName)) { |
|
|
|
|
|
|
|
putMsg(result, Status.QUEUE_NAME_EXIST, queueName); |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Queue queueObj = new Queue(); |
|
|
|
Queue queueObj = new Queue(); |
|
|
|
Date now = new Date(); |
|
|
|
Date now = new Date(); |
|
|
|
|
|
|
|
|
|
|
@ -113,6 +127,15 @@ public class QueueService extends BaseService{ |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* update queue |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param loginUser |
|
|
|
|
|
|
|
* @param id |
|
|
|
|
|
|
|
* @param queue |
|
|
|
|
|
|
|
* @param queueName |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
public Map<String, Object> updateQueue(User loginUser, int id, String queue, String queueName) { |
|
|
|
public Map<String, Object> updateQueue(User loginUser, int id, String queue, String queueName) { |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
if (checkAdmin(loginUser, result)) { |
|
|
|
if (checkAdmin(loginUser, result)) { |
|
|
@ -120,7 +143,6 @@ public class QueueService extends BaseService{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Queue queueObj = queueMapper.queryById(id); |
|
|
|
Queue queueObj = queueMapper.queryById(id); |
|
|
|
if (queueObj == null) { |
|
|
|
if (queueObj == null) { |
|
|
|
putMsg(result, Status.QUEUE_NOT_EXIST, id); |
|
|
|
putMsg(result, Status.QUEUE_NOT_EXIST, id); |
|
|
|