Sfoglia il codice sorgente

修改手机登录获取token,新建数据表model

SysEnterpriseStaff
tags/B.2.5.9_20240103_base
yk 1 anno fa
parent
commit
6cfb1b3bd5
1 ha cambiato i file con 12 aggiunte e 3 eliminazioni
  1. +12
    -3
      xueyi-modules/xueyi-tenant/src/main/java/com/xueyi/tenant/tenant/controller/TeTenantController.java

+ 12
- 3
xueyi-modules/xueyi-tenant/src/main/java/com/xueyi/tenant/tenant/controller/TeTenantController.java Vedi File

@@ -16,6 +16,8 @@ import com.xueyi.common.security.annotation.Logical;
import com.xueyi.common.security.annotation.RequiresPermissions;
import com.xueyi.common.security.auth.Auth;
import com.xueyi.common.web.entity.controller.BaseController;
import com.xueyi.system.api.organize.domain.dto.SysEnterpriseDto;
import com.xueyi.system.api.organize.domain.po.SysEnterprisePo;
import com.xueyi.tenant.api.tenant.domain.dto.TeTenantDto;
import com.xueyi.tenant.api.tenant.domain.po.SysEnterpriseStaff;
import com.xueyi.tenant.api.tenant.domain.po.TeTenantPo;
@@ -56,7 +58,7 @@ public class TeTenantController extends BaseController<TeTenantQuery, TeTenantDt
}

@Autowired
private TeTenantMapper teTenantMapper;
private SysEnterpriseStaffMapper enterpriseStaffMapper;

@Autowired
private SysEnterpriseStaffMapper staffMapper;
@@ -79,8 +81,8 @@ public class TeTenantController extends BaseController<TeTenantQuery, TeTenantDt

@InnerAuth
@GetMapping("/one")
R<TeTenantPo> tenant(@RequestParam("phone") String phone) {
TeTenantPo po = teTenantMapper.selectByPhone(phone);
R<SysEnterpriseStaff> tenant(@RequestParam("phone") String phone) {
SysEnterpriseStaff po = enterpriseStaffMapper.selectByPhone(phone);
return R.ok(po);
}

@@ -91,6 +93,13 @@ public class TeTenantController extends BaseController<TeTenantQuery, TeTenantDt
SysEnterpriseStaff po = staffMapper.selectByPhone(phone);
return R.ok(po);
}

@InnerAuth
@PostMapping("/staff")
R<SysEnterpriseStaff> staff(@RequestBody SysEnterpriseStaff staff) {
staffMapper.insert(staff);
return R.ok(staff);
}
/**
* 查询租户列表
*/


Caricamento…
Annulla
Salva