mapper
import com.atguigu.yygh.model.hosp.HospitalSet; import com.baomidou.mybatisplus.core.mapper.BaseMapper; public interface HospitalSetMapper extends BaseMapper<HospitalSet> { }
service
import com.atguigu.yygh.model.hosp.HospitalSet; import com.baomidou.mybatisplus.extension.service.IService; public interface HospitalSetService extends IService<HospitalSet> { }
serviceImpl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; @Service public class HospitalSetServiceImpl extends ServiceImpl<HospitalSetMapper, HospitalSet> implements HospitalSetService { }
controller
@PostMapping("updateHospitalSet") public Result updateHospitalSet(@RequestBody HospitalSet hospitalSet){ boolean flag = hospitalSetService.updateById(hospitalSet); return flag ? Result.ok() : Result.fail(); }
标签:mybatisPlus,service,示例,修改,HospitalSet,baomidou,import,com,public From: https://www.cnblogs.com/ixtao/p/17342913.html