Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
|
3b2b8c684b | |
|
3b775dbd27 |
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -14,4 +14,6 @@ import java.util.List;
|
|||
@MapperScan
|
||||
public interface DoctorMapper {
|
||||
List<DoctorEntity> findDoctorList(Integer deptId);
|
||||
|
||||
DoctorEntity findDoctorInfo(Integer doctorId);
|
||||
}
|
||||
|
|
|
@ -25,4 +25,6 @@ public interface UserVideoMapper {
|
|||
void deleteVideoBuy(@Param("id") Integer id);
|
||||
|
||||
List<UserWallet> findUserWallet();
|
||||
|
||||
void addInfoCollection(@Param("infoId") Long infoId);
|
||||
}
|
||||
|
|
|
@ -12,4 +12,6 @@ import java.util.List;
|
|||
*/
|
||||
public interface DoctorService {
|
||||
List<DoctorEntity> findDoctorList(Integer deptId);
|
||||
|
||||
DoctorEntity findDoctorInfo(Integer doctorId);
|
||||
}
|
||||
|
|
|
@ -22,4 +22,6 @@ public interface UserVideoService {
|
|||
void deleteVideoBuy(Integer id);
|
||||
|
||||
List<UserWallet> findUserWallet();
|
||||
|
||||
void addInfoCollection(Long infoId);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue