package com.ruoyi.web.controller.zhang; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.domain.ZfMaster; import com.ruoyi.service.ZfMasterService; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import javax.websocket.server.PathParam; import java.util.Arrays; import java.util.List; import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; /** *
* 魅宠主人表 前端控制器 *
* * @author ojq * @since 2023-03-12 */ @RestController @RequestMapping("/zfMaster") @Slf4j public class ZfMasterController extends BaseController { @Resource private ZfMasterService zfMasterService; // @GetMapping("/all") // public AjaxResult listAll(ZfMaster zfMaster){ // Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); // Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); // return zfMasterService.selectPetNoteList(zfMaster, pageNum, pageSize); // } /** * 根据宠物id获取相关主人信息 */ @GetMapping() public AjaxResult getByPetId(@PathParam("pid")String pid){ return zfMasterService.getMasterInfoByPetId(pid); } /** * 导出魅宠主人信息记录列表 */ // @PreAuthorize("@ss.hasPermi('system:property:export')") @Log(title = "魅宠主人信息记录", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ZfMaster zfMaster) { List