⚡ 优化ing. 代码生成器描述,添加租户ID常量

This commit is contained in:
huangxutao committed 2019-06-18 18:54:57 +08:00
1 parent 7b2609408d
commit 64d2dad9c1
3 files changed
+8 -2

No files matched your search

@@ -28,6 +28,12 @@ public interface CommonConstants {
* header 中租户ID
*/
String TENANT_ID = "TENANT_ID";
/**
* 租户ID
*/
Integer TENANT_ID_1 = 1;
/**
* 删除
*/
@@ -53,7 +53,7 @@ public class TenantContextHolderFilter extends GenericFilterBean {
if (StrUtil.isNotBlank(tenantId)) {
TenantContextHolder.setTenantId(Integer.parseInt(tenantId));
} else {
TenantContextHolder.setTenantId(1);
TenantContextHolder.setTenantId(CommonConstants.TENANT_ID_1);
}
filterChain.doFilter(request, response);
@@ -40,7 +40,7 @@ import org.springframework.web.bind.annotation.*;
@RestController
@AllArgsConstructor
@RequestMapping("/${pathName}" )
@Api(value = "${pathName}", tags = "${pathName}管理")
@Api(value = "${pathName}", tags = "${comments}管理")
public class ${className}Controller {
private final ${className}Service ${classname}Service;