|
@@ -10,6 +10,8 @@ import ${package.Entity}.${entity};
|
|
|
import ${entityPath}.table.${entity}Table;
|
|
|
import ${entityPath}.vo.${table.entityName}Vo;
|
|
|
import com.jy.framework.model.base.BaseDao;
|
|
|
+import com.jy.system.service.AuthService;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
<% if(isNotEmpty(controllerMethods.list)){ %>
|
|
@@ -19,6 +21,9 @@ import java.util.List;
|
|
|
@Service
|
|
|
public class ${table.entityName}Dao extends BaseDao<${table.entityName}Mapper, ${table.entityName}> {
|
|
|
|
|
|
+ @Resource
|
|
|
+ private AuthService authService;
|
|
|
+
|
|
|
<% if(isNotEmpty(controllerMethods.list)){ %>
|
|
|
/**
|
|
|
* ${table.comment!}列表
|
|
@@ -32,7 +37,7 @@ public class ${table.entityName}Dao extends BaseDao<${table.entityName}Mapper, $
|
|
|
)
|
|
|
.from(${tableAlias})
|
|
|
.where(
|
|
|
-
|
|
|
+ ${tableAlias}.createUser.in(authService.getUserPermissionSet())
|
|
|
)
|
|
|
.orderBy(
|
|
|
${tableAlias}.id.desc()
|
|
@@ -54,10 +59,10 @@ public class ${table.entityName}Dao extends BaseDao<${table.entityName}Mapper, $
|
|
|
)
|
|
|
.from(${tableAlias})
|
|
|
.where(
|
|
|
-
|
|
|
+ ${tableAlias}.createUser.in(authService.getUserPermissionSet())
|
|
|
)
|
|
|
.orderBy(
|
|
|
- ${tableAlias}.id.desc()
|
|
|
+ ${tableAlias}.id.desc()
|
|
|
)
|
|
|
.page(dto.getPage());
|
|
|
}
|
|
@@ -76,7 +81,7 @@ public class ${table.entityName}Dao extends BaseDao<${table.entityName}Mapper, $
|
|
|
)
|
|
|
.from(${tableAlias})
|
|
|
.where(
|
|
|
- ${tableAlias}.id.eq(id)
|
|
|
+ ${tableAlias}.id.eq(id)
|
|
|
)
|
|
|
.one();
|
|
|
}
|