Compare commits

...

2 Commits

Author SHA1 Message Date
jpz 3b2b8c684b jpz10.0 2024-01-17 20:45:26 +08:00
jpz 3b775dbd27 jpz9.0 2024-01-16 22:27:23 +08:00
11 changed files with 44 additions and 6 deletions

View File

@ -3,11 +3,9 @@ package doctor.controller;
import doctor.common.core.domain.HealthR;
import doctor.domain.entity.DoctorEntity;
import doctor.service.DoctorService;
import doctor.system.api.domain.Doctor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.print.Doc;
import java.util.List;
@ -33,4 +31,12 @@ public class DoctorController {
List<DoctorEntity> list=doctorService.findDoctorList(deptId);
return HealthR.ok(list);
}
@GetMapping("/findDoctorInfo")
public HealthR<DoctorEntity> findDoctorInfo(@RequestHeader Integer userId,
@RequestHeader String sessionId,
@RequestParam(value = "doctorId",defaultValue = "2") Integer doctorId
){
DoctorEntity list=doctorService.findDoctorInfo(doctorId);
return HealthR.ok(list);
}
}

View File

@ -54,5 +54,10 @@ public class UserVideoController {
return R.ok(userWallets);
}
@PostMapping("/addInfoCollection")
public R addInfoCollection(@RequestParam Long infoId){
userVideoService.addInfoCollection(infoId);
return R.ok();
}
}

View File

@ -27,6 +27,6 @@ public class DoctorEntity {
private String imagePic;
private String inauguralHospital;
private String personalProfile;
private String goodFieId;
private String goodField;
private Date createTime;
}

View File

@ -14,4 +14,6 @@ import java.util.List;
@MapperScan
public interface DoctorMapper {
List<DoctorEntity> findDoctorList(Integer deptId);
DoctorEntity findDoctorInfo(Integer doctorId);
}

View File

@ -25,4 +25,6 @@ public interface UserVideoMapper {
void deleteVideoBuy(@Param("id") Integer id);
List<UserWallet> findUserWallet();
void addInfoCollection(@Param("infoId") Long infoId);
}

View File

@ -12,4 +12,6 @@ import java.util.List;
*/
public interface DoctorService {
List<DoctorEntity> findDoctorList(Integer deptId);
DoctorEntity findDoctorInfo(Integer doctorId);
}

View File

@ -22,4 +22,6 @@ public interface UserVideoService {
void deleteVideoBuy(Integer id);
List<UserWallet> findUserWallet();
void addInfoCollection(Long infoId);
}

View File

@ -23,4 +23,9 @@ public class DoctorServiceimpl implements DoctorService {
public List<DoctorEntity> findDoctorList(Integer deptId) {
return doctorMapper.findDoctorList(deptId);
}
@Override
public DoctorEntity findDoctorInfo(Integer doctorId) {
return doctorMapper.findDoctorInfo(doctorId);
}
}

View File

@ -44,4 +44,9 @@ public class UserVideoServiceImpl implements UserVideoService {
public List<UserWallet> findUserWallet() {
return userVideoMapper.findUserWallet();
}
@Override
public void addInfoCollection(Long infoId) {
userVideoMapper.addInfoCollection(infoId);
}
}

View File

@ -9,5 +9,8 @@
select *
from doctor where department_id = #{deptId}
</select>
<select id="findDoctorInfo" resultType="doctor.domain.entity.DoctorEntity">
select *
from doctor where department_id = #{doctorId}
</select>
</mapper>
2

View File

@ -3,6 +3,12 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="doctor.mapper.UserVideoMapper">
<insert id="addInfoCollection">
insert into information_watch_reward_record (info_id)
values (#{infoId})
</insert>
<delete id="cancelVideoCollection">
delete
from user_video_collection