| | |
| | | import com.vincent.rsf.server.system.entity.Fields; |
| | | import com.vincent.rsf.server.system.service.FieldsService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @Api(tags = "动态扩展字段") |
| | | @RestController |
| | | public class FieldsController extends BaseController { |
| | | |
| | |
| | | @PostMapping("/fields/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(fieldsService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:fields:list')") |
| | | @GetMapping("/fields/enable/list") |
| | | @ApiOperation("获取已开启扩展字段") |
| | | public R getEnableList() { |
| | | return R.ok(fieldsService.list(new LambdaQueryWrapper<Fields>().eq(Fields::getFlagEnable, 1))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:fields:list')") |
| | |
| | | } |
| | | |
| | | } |
| | | |