game-api/ff-admin/src/main/java/com/ff/api/controller/ApiAgentController.java

82 lines
2.6 KiB
Java

package com.ff.api.controller;
import com.ff.annotation.CheckHeader;
import com.ff.api.response.TenantInfoResponse;
import com.ff.base.constant.Constants;
import com.ff.base.core.controller.BaseController;
import com.ff.base.core.domain.AjaxResult;
import com.ff.base.enums.QuotaType;
import com.ff.base.system.service.ISysDeptService;
import com.ff.base.system.service.ISysRoleService;
import com.ff.base.utils.SecurityUtils;
import com.ff.base.utils.StringUtils;
import com.ff.base.utils.bean.BeanUtils;
import com.ff.common.domain.TenantGameQuota;
import com.ff.common.domain.TenantSecretKey;
import com.ff.common.service.ITenantGameQuotaService;
import com.ff.common.service.ITenantSecretKeyService;
import com.ff.config.KeyConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* api控制器
*
* @author shi
* @date 2025/02/10
*/
@RestController
@CheckHeader
@RequestMapping("/api/agent")
@Slf4j
public class ApiAgentController extends BaseController {
@Resource
private ITenantSecretKeyService tenantSecretKeyService;
@Resource
private ISysRoleService roleService;
@Resource
private ISysDeptService deptService;
//
// /**
// * 信息
// *
// * @return {@link AjaxResult }
// */
// @PostMapping("/create/tenant")
// public AjaxResult createTenant(TenantSecretKey tenantSecretKey) {
// roleService.selectRoleList(tenantSecretKey)
// if (!userService.checkUserNameUnique(user))
// {
// return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
// }
// else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user))
// {
// return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
// }
// else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
// {
// return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
// }
// user.setCreateBy(getUsername());
// user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
// return toAjax(userService.insertUser(user));
//
// tenantSecretKey.setAgentId(getUserId());
// tenantSecretKeyService.insertTenantSecretKey(tenantSecretKey);
// return AjaxResult.success(tenantInfoResponse);
// }
}