| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.WebUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.licet.entity.Licet; |
| | | import org.springblade.modules.licet.vo.LicetVO; |
| | | import org.springblade.modules.licet.service.ILicetService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/lists") |
| | | public R lists(LicetVO licet, HttpServletRequest request){ |
| | | String fieldNames = WebUtil.getRequest().getHeader("_fieldNames"); |
| | | List<String> asList = new ArrayList<>(); |
| | | if (null!= fieldNames && !fieldNames.equals("")) { |
| | | //去除头尾 |
| | | String fieldString = fieldNames.substring(1, fieldNames.length() - 1); |
| | | asList = Arrays.asList(fieldString.split(",")); |
| | | } |
| | | List<Map<Object, Object>> list = licetService.selectLicetPages(licet,asList); |
| | | //返回 |
| | | return R.data(list); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |