| | |
| | | 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 { |
| | | |
| | |
| | | } |
| | | |
| | | @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).eq(Fields::getStatus, 1))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:fields:list')") |
| | | @PostMapping({"/fields/many/{ids}", "/fieldss/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(fieldsService.listByIds(Arrays.asList(ids))); |