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