|
|
|
@ -17,6 +17,7 @@
|
|
|
|
|
package org.springblade.system.controller; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
@ -25,6 +26,7 @@ import lombok.AllArgsConstructor;
|
|
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springblade.system.entity.Post; |
|
|
|
@ -130,8 +132,8 @@ public class PostController extends BladeController {
|
|
|
|
|
@GetMapping("/select") |
|
|
|
|
@ApiOperationSupport(order = 8) |
|
|
|
|
@ApiOperation(value = "下拉数据源", notes = "传入post") |
|
|
|
|
public R<List<Post>> select(Post post) { |
|
|
|
|
List<Post> list = postService.list(Condition.getQueryWrapper(post)); |
|
|
|
|
public R<List<Post>> select(String tenantId, BladeUser bladeUser) { |
|
|
|
|
List<Post> list = postService.list(Wrappers.<Post>query().lambda().eq(Post::getTenantId, Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()))); |
|
|
|
|
return R.data(list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|