| | |
| | | * 根据宠物id获取相关主人信息 |
| | | */ |
| | | @GetMapping() |
| | | public AjaxResult getByPetId(@PathParam("pid")Long pid){ |
| | | public AjaxResult getByPetId(@PathParam("pid")String pid){ |
| | | return zfMasterService.getMasterInfoByPetId(pid); |
| | | } |
| | | |
| | |
| | | */ |
| | | public interface ZfMasterService extends IService<ZfMaster> { |
| | | |
| | | AjaxResult getMasterInfoByPetId(Long pid); |
| | | AjaxResult getMasterInfoByPetId(String pid); |
| | | |
| | | List<ZfMaster> selectByCondition(ZfMaster zfMaster); |
| | | |
| | |
| | | public class ZfMasterServiceImpl extends ServiceImpl<ZfMasterMapper, ZfMaster> implements ZfMasterService { |
| | | |
| | | @Override |
| | | public AjaxResult getMasterInfoByPetId(Long pid) { |
| | | public AjaxResult getMasterInfoByPetId(String pid) { |
| | | LambdaQueryWrapper<ZfMaster> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(ZfMaster::getPetId,pid); |
| | | ZfMaster master = getOne(lqw); |