import { Common } from 'pc-component-v3';

/**
 * 工具类自动生成的API，请勿做任何修改，请勿做任何修改，请勿做任何修改（重要的事情说3遍）
 * 工具作者: 杨志杰
 *  
 */
export default {

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 离线盘点进行数据上传时进行验证token是否过期 
	 */
  authenticationToken: function(token){
    var requestUrl = 'api/userResource/authenticationToken';
    var paramCount = 0;
    if(token != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('token=' + token);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 录入新用户 
	 */
  createUser: function(createUserRequest){
    var requestUrl = 'api/userResource/createUser';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
        data: JSON.stringify(createUserRequest),
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据登录名查询用户信息 
	 */
  findByLoginName: function(loginName){
    var requestUrl = 'api/userResource/findByLoginName';
    var paramCount = 0;
    if(loginName != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('loginName=' + loginName);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户名和密码查询用户信息 
	 */
  findByNameAndPassword: function(loginName, password){
    var requestUrl = 'api/userResource/findByNameAndPassword';
    var paramCount = 0;
    if(loginName != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('loginName=' + loginName);
      paramCount ++;
    }
    if(password != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('password=' + password);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },


  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询所有用户 
	 */
  getAllUsers: function(){
    var requestUrl = 'api/userResource/getAllUsers';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询所有并且根据name进行排序 
	 */
  getAllUsersOrderByName: function(){
    var requestUrl = 'api/userResource/getAllUsersOrderByName';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据公司ID查询公司所有用户 
	 */
  getApprovalFlowUserByClientId: function(orgId){
    var requestUrl = 'api/userResource/getApprovalFlowUserByClientId';
    var paramCount = 0;
    if(orgId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('orgId=' + orgId);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 *  
	 */
  getApprovalFlowUserByName: function(name){
    var requestUrl = 'api/userResource/getApprovalFlowUserByName';
    var paramCount = 0;
    if(name != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('name=' + name);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 *  
	 */
  getApprovalFlowUserByOrganizationId: function(orgId){
    var requestUrl = 'api/userResource/getApprovalFlowUserByOrganizationId';
    var paramCount = 0;
    if(orgId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('orgId=' + orgId);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询用户组 
	 */
  getGroup: function(userId){
    var requestUrl = 'api/userResource/getGroup';
    var paramCount = 0;
    if(userId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('userId=' + userId);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户id、accountId、accountDate、languageId获取LoginContext 
	 */
  getLoginContextByUserId: function(userId, accountId, accountDate, languageId, ipAddress){
    var requestUrl = 'api/userResource/getLoginContextByUserId';
    var paramCount = 0;
    if(userId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('userId=' + userId);
      paramCount ++;
    }
    if(accountId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('accountId=' + accountId);
      paramCount ++;
    }
    if(accountDate != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('accountDate=' + accountDate);
      paramCount ++;
    }
    if(languageId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('languageId=' + languageId);
      paramCount ++;
    }
    if(ipAddress != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('ipAddress=' + ipAddress);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户id，查询loginInfo 
	 */
  getLoginInfoByUserId: function(userId, accountId){
    var requestUrl = 'api/userResource/getLoginInfoByUserId';
    var paramCount = 0;
    if(userId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('userId=' + userId);
      paramCount ++;
    }
    if(accountId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('accountId=' + accountId);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据ID获取用户信息 
	 */
  getUser: function(userId){
    var requestUrl = 'api/userResource/getUser';
    var paramCount = 0;
    if(userId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('userId=' + userId);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询审批节点用户 
	 */
  getUserByUserTask: function(userTaskDto){
    var requestUrl = 'api/userResource/getUserByUserTask';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
        data: JSON.stringify(userTaskDto),
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据资产EPC查询资产图片 
	 */
  getUserImageInfosByEpc: function(epc, start, length){
    var requestUrl = 'api/userResource/getUserImageInfosByEpc';
    var paramCount = 0;
    if(epc != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('epc=' + epc);
      paramCount ++;
    }
    if(start != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('start=' + start);
      paramCount ++;
    }
    if(length != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('length=' + length);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 *  
	 */
  getUserInfo: function(){
    var requestUrl = 'api/userResource/getUserInfo';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户名查询所有用户 
	 */
  getUsersByName: function(searchQueryParam){
    var requestUrl = 'api/userResource/getUsersByName';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
        data: JSON.stringify(searchQueryParam),
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询所有用户 用于工作流服务器之间的数据交互 
	 */
  list: function(ufts){
    var requestUrl = 'api/userResource/listAll';
    var paramCount = 0;
    if(ufts != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('ufts=' + ufts);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询公司下面所有的人员 
	 */
  listByClientId: function(){
    var requestUrl = 'api/userResource/listByClientId';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户名查询集团公司所有用户 
	 */
  listInGroupCompanyByCondition: function(searchQueryParam){
    var requestUrl = 'api/userResource/listInGroupCompanyByCondition';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
        data: JSON.stringify(searchQueryParam),
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户id，查询用户的主管领导 
	 */
  listLeaderUser: function(userId){
    var requestUrl = 'api/userResource/listLeaderUser';
    var paramCount = 0;
    if(userId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('userId=' + userId);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据部门Id集合，查询部门的主管领导 
	 */
  listLeaderUserByOrganizationIds: function(organizationIds){
    var requestUrl = 'api/userResource/listLeaderUserByOrganizationIds';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
        data: JSON.stringify(organizationIds),
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询没有人脸识别特征的用户 
	 */
  listNoFaceFeactureUsers: function(){
    var requestUrl = 'api/userResource/listNoFaceFeactureUsers';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询用户图片的人脸特征 
	 */
  listUserFaceFeature: function(){
    var requestUrl = 'api/userResource/listUserFaceFeature';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户组编号查询用户 
	 */
  listUserIdByGroupIds: function(groupIds){
    var requestUrl = 'api/userResource/listUserIdByGroupIds';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
        data: JSON.stringify(groupIds),
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户组编号查询用户 
	 */
  queryByGroupName: function(groupName){
    var requestUrl = 'api/userResource/queryByGroupName';
    var paramCount = 0;
    if(groupName != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('groupName=' + groupName);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据角色名称查询用户 
	 */
  queryByRoleName: function(roleName){
    var requestUrl = 'api/userResource/queryByRoleName';
    var paramCount = 0;
    if(roleName != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('roleName=' + roleName);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询公司用户 
	 */
  queryClientUser: function(){
    var requestUrl = 'api/userResource/queryClientUser';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },


  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询所有用户 
	 */
  queryUser: function(){
    var requestUrl = 'api/userResource/queryUser';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询集团公司下所有用户 
	 */
  queryUserByClient: function(){
    var requestUrl = 'api/userResource/queryUserByClient';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 查询用户 
	 */
  queryUserByCondition: function(start, length, searchString){
    var requestUrl = 'api/userResource/queryUserByCondition';
    var paramCount = 0;
    if(start != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('start=' + start);
      paramCount ++;
    }
    if(length != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('length=' + length);
      paramCount ++;
    }
    if(searchString != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('searchString=' + searchString);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户名称查询用户详细信息 
	 */
  queryUserDto: function(name){
    var requestUrl = 'api/userResource/queryUserDto';
    var paramCount = 0;
    if(name != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('name=' + name);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户名称查询设计师用户详细信息 
	 */
  queryUserDto1: function(name){
    var requestUrl = 'api/userResource/queryUserDto1';
    var paramCount = 0;
    if(name != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('name=' + name);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 重置用户密码 
	 */
  resetPassword: function(newPassword, newPassword2){
    var requestUrl = 'api/userResource/resetPassword';
    var paramCount = 0;
    if(newPassword != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('newPassword=' + newPassword);
      paramCount ++;
    }
    if(newPassword2 != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('newPassword2=' + newPassword2);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },


  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 保存用户的人脸识别的特征 
	 */
  saveFaceFeacture: function(userFaceFeatureDtos){
    var requestUrl = 'api/userResource/saveFaceFeacture';


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
        data: JSON.stringify(userFaceFeatureDtos),
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 根据用户Id修改用户人脸特征和照片 
	 */
  updateImageName: function(userId, imageName){
    var requestUrl = 'api/userResource/updateImageName';
    var paramCount = 0;
    if(userId != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('userId=' + userId);
      paramCount ++;
    }
    if(imageName != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('imageName=' + imageName);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'get',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },

  /**
	 * 工具类自动生成的方法
	 * 工具作者: 杨志杰
	 * 修改用户密码 
	 */
  updateUserPassword: function(oldPassword, newPassword, newPassword2){
    var requestUrl = 'api/userResource/updateUserPassword';
    var paramCount = 0;
    if(oldPassword != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('oldPassword=' + oldPassword);
      paramCount ++;
    }
    if(newPassword != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('newPassword=' + newPassword);
      paramCount ++;
    }
    if(newPassword2 != null){
      requestUrl += (paramCount > 0) ? '&' : '?';
      requestUrl += ('newPassword2=' + newPassword2);
      paramCount ++;
    }


    return new Promise((resolve, reject) => {
      $.ajax({
        url: Common.getApiUrl2(requestUrl),
        type: 'post',
        contentType: 'application/json',
				
				
				
				
        beforeSend: function(request) {
          Common.addTokenToRequest(request);
        },
        success: function(data) {
          resolve(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
          reject(XMLHttpRequest);
        },
      });
    });
  },
};
