拍卖行:定时任务加锁
This commit is contained in:
@@ -18,10 +18,11 @@ import { checkSystemIsOpen } from './roleService';
|
||||
* @param roleId
|
||||
* @param roleName
|
||||
*/
|
||||
export async function getExpeditionStatus(roleId: string, roleName: string) {
|
||||
export async function getExpeditionStatus(roleId: string, roleName: string, isEntry = false) {
|
||||
// 重置次数
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
if(!checkSystemIsOpen(role, SYSTEM_OPEN_ID.EXPEDITION)) return false
|
||||
if(!role.hasInit) return false;
|
||||
if(isEntry && !checkSystemIsOpen(role, SYSTEM_OPEN_ID.EXPEDITION)) return false
|
||||
// 获取远征关卡状态
|
||||
let expeditionRecord = await ExpeditionRecordModel.getCurRecord(roleId);
|
||||
if (!expeditionRecord) { // 首次新建一条记录
|
||||
|
||||
Reference in New Issue
Block a user