whywhyo
2023-07-19 d1abd1ef9c4b33d4c0fe9c15a43996b2f9f67048
4577
18个文件已修改
20个文件已添加
1415 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZAuthorityController.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHealthBaseController.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHealthNoteController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHealthNowController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZRotationController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZHealthBase.java 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZHealthHabit.java 133 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZHealthInfo.java 272 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZHealthNote.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZHealthNow.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZInfoUser.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfCode.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/dto/AuthorityDto.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/dto/EmpowerDto.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/dto/ZHealthBaseDto.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/health/AllergyHistory.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/health/BloodType.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/health/GeneticDisease.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/mapper/ZHealthNoteMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/mapper/ZHealthNowMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/mapper/ZfCodeMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZAuthorityService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZHealthBaseService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZHealthNoteService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZHealthNowService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZInfoUserService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZfCodeService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZfFamilyService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZAuthorityServiceImpl.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZHealthBaseServiceImpl.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZHealthNoteServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZHealthNowServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZInfoUserServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZSecretServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCodeServiceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfFamilyServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZAuthorityController.java
New file
@@ -0,0 +1,61 @@
package com.ruoyi.web.controller.zhang;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.ZAuthority;
import com.ruoyi.domain.dto.AuthorityDto;
import com.ruoyi.service.ZAuthorityService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.websocket.server.PathParam;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-16 21:10
 * @Version 1.0.0
 **/
@RestController
@RequestMapping("/authority")
public class ZAuthorityController {
    @Resource
    ZAuthorityService zAuthorityService;
//    /**
//     * 查看自己的权限
//     */
//    @GetMapping("/all")
//    public AjaxResult getMyAuthority(){
//        return AjaxResult.success(zAuthorityService.getAuthority());
//    }
//
//    /**
//     * 查看自己有哪些家庭的权限
//     */
//    @GetMapping("/familyName")
//    public AjaxResult getFamilyName(){
//        return AjaxResult.success(zAuthorityService.getAuthorityFamilyName());
//    }
    /**
     * 根据条件查看权限
     */
    @GetMapping("/condition")
    public AjaxResult getAuthorityByCondition(@RequestBody AuthorityDto authorityDto){
        return AjaxResult.success(zAuthorityService.getByCondition(authorityDto));
    }
//    /**
//     * 授权(只有家庭管理员才能调用这个接口)
//     */
//    @PostMapping("/empower")
//    public AjaxResult empower(){
//
//    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHealthBaseController.java
@@ -1,9 +1,26 @@
package com.ruoyi.web.controller.zhang;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.common.annotation.Log;
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.ZHealthBase;
import com.ruoyi.domain.dto.ZHealthBaseDto;
import com.ruoyi.service.ZHealthBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
/**
 * <p>
@@ -16,6 +33,92 @@
@RestController
@RequestMapping("/zHealthBase")
public class ZHealthBaseController {
    @Autowired
    private ZHealthBaseService zHealthBaseService;
    /**
     * 查询数据
     */
    @GetMapping("/all")
    public AjaxResult listAll(){
        return AjaxResult.success(zHealthBaseService.selectData());
    }
//    /**
//     * 根据id查询
//     */
//    @GetMapping()
//    public AjaxResult listById(Long id){
//        return AjaxResult.success(zHealthBaseService.getById(id));
//    }
//    /**
//     * 模板
//     */
//    @GetMapping("/model")
//    public void getModel(HttpServletResponse response){
//        ZHealthBase zHealthBase = new ZHealthBase();
//        List<ZHealthBase> emptyList = Collections.singletonList(zHealthBase);
//        ExcelUtil<ZHealthBase> util = new ExcelUtil<>(ZHealthBase.class);
//        util.exportExcel(response, emptyList, "健康基本信息记录数据");
//    }
//
//    /**
//     * 导出健康基本信息记录列表
//     */
////    @PreAuthorize("@ss.hasPermi('system:property:export')")
//    @Log(title = "健康基本信息记录", businessType = BusinessType.EXPORT)
//    @PostMapping("/export/{ids}")
//    public void export(HttpServletResponse response,@PathVariable Long[] ids)
//    {
//        List<ZHealthBase> list = zHealthBaseService.selectByIds(ids);
//        ExcelUtil<ZHealthBase> util = new ExcelUtil<>(ZHealthBase.class);
//        util.exportExcel(response, list, "健康基本信息记录数据");
//    }
//    /**
//     * 导入健康基本信息记录列表
//     */
//    @Log(title = "用户管理", businessType = BusinessType.IMPORT)
//    @PostMapping("/importData")
//    public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception
//    {
//        return zHealthBaseService.importExcel(file);
//    }
//    /**
//     * 新增健康基本信息记录
//     */
////    @PreAuthorize("@ss.hasPermi('system:property:add')")
//    @Log(title = "健康基本信息记录", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody ZHealthBase zHealthBase)
//    {
//        return zHealthBaseService.addData(zHealthBase);
//    }
    /**
     * 新增或修改健康基本信息记录
     */
//    @PreAuthorize("@ss.hasPermi('system:property:edit')")
    @Log(title = "健康基本信息记录", businessType = BusinessType.UPDATE)
    @PostMapping
    public AjaxResult edit(@RequestBody ZHealthBaseDto zHealthBaseDto)
    {
        return zHealthBaseService.saveOrUpdateData(zHealthBaseDto);
    }
////
//    /**
//     * 批量删除健康基本信息记录
//     */
////    @PreAuthorize("@ss.hasPermi('system:property:remove')")
//    @Log(title = "健康基本信息记录", businessType = BusinessType.DELETE)
//    @DeleteMapping("/{ids}")
//    public AjaxResult remove(@PathVariable Long[] ids)
//    {
//        return zHealthBaseService.delete(Arrays.asList(ids));
//    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHealthNoteController.java
New file
@@ -0,0 +1,10 @@
package com.ruoyi.web.controller.zhang;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:30
 * @Version 1.0.0
 **/
public class ZHealthNoteController {
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHealthNowController.java
New file
@@ -0,0 +1,10 @@
package com.ruoyi.web.controller.zhang;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:30
 * @Version 1.0.0
 **/
public class ZHealthNowController {
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
@@ -12,7 +12,7 @@
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZInfoUser;
import com.ruoyi.domain.ZfRelation;
import com.ruoyi.domain.dto.EmpowerDto;
import com.ruoyi.domain.dto.Genealogy;
import com.ruoyi.domain.dto.GenealogyExportDto;
import com.ruoyi.domain.dto.RelationDto;
@@ -182,14 +182,14 @@
    }
    /**
     * 授权
     */
    @PostMapping("/empower")
    public AjaxResult empower(@RequestBody EmpowerDto empowerDto){
        return zInfoUserService.empower(empowerDto);
    }
//    /**
//     * 授权
//     */
//    @PostMapping("/empower")
//    public AjaxResult empower(@RequestBody EmpowerDto empowerDto){
//
//        return zInfoUserService.empower(empowerDto);
//    }
    /**
     * 家根网
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZRotationController.java
@@ -33,7 +33,7 @@
    }
    @PostMapping("/add")
    public AjaxResult addRotation(ZRotation zRotation){
    public AjaxResult addRotation(@RequestBody ZRotation zRotation){
        SysUser user = SecurityUtils.getLoginUser().getUser();
        Long userId = user.getUserId();
        zRotation.setUid(userId);
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java
@@ -16,6 +16,7 @@
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import javax.websocket.server.PathParam;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -52,7 +53,7 @@
     * 根据id查询
     */
    @GetMapping()
    public AjaxResult listById(Long id){
    public AjaxResult listById(@PathParam("id") Long id){
        return AjaxResult.success(zSelfNoteService.getById(id));
    }
zhang-content/src/main/java/com/ruoyi/domain/ZHealthBase.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
/**
@@ -13,195 +15,38 @@
 * @author ojq
 * @since 2023-03-14
 */
@Data
@TableName("z_health_base")
public class ZHealthBase implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private Long id;
    /**
     * 名字
     */
    private String nickName;
    private Long uid; // 所属用户id
    /**
     * 性别,0:女、1:男
     */
    private Integer sex;
    private String name; // 姓名
    /**
     * 文化程度
     */
    private String education;
    private Integer sex; // 性别,1:男,0:女
    /**
     * 职业
     */
    private String occupation;
    private String educationLevel; // 文化程度
    /**
     * 手机号
     */
    private String phoneNumber;
    private String work; // 职业
    /**
     * 邮箱
     */
    private String email;
    private String phone; // 电话
    /**
     * 住址
     */
    private String address;
    private String email; // 电子邮件
    /**
     * 血型
     */
    private Integer bloodType;
    private String address; // 住址
    /**
     * 过敏史
     */
    private Integer allergy;
    private String blood; // 血型(json数组)
    /**
     * 遗传病史
     */
    private Integer heritableDisease;
    private String allergy; // 过敏史(json数组)
    /**
     * 常用药物
     */
    private String medicinal;
    private String geneticDisease; // 遗传病史(json数组)
    /**
     * 目前基础病
     */
    private String baseDisease;
    private String medicine; // 常用药物
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getNickName() {
        return nickName;
    }
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
    public Integer getSex() {
        return sex;
    }
    public void setSex(Integer sex) {
        this.sex = sex;
    }
    public String getEducation() {
        return education;
    }
    public void setEducation(String education) {
        this.education = education;
    }
    public String getOccupation() {
        return occupation;
    }
    public void setOccupation(String occupation) {
        this.occupation = occupation;
    }
    public String getPhoneNumber() {
        return phoneNumber;
    }
    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public Integer getBloodType() {
        return bloodType;
    }
    public void setBloodType(Integer bloodType) {
        this.bloodType = bloodType;
    }
    public Integer getAllergy() {
        return allergy;
    }
    public void setAllergy(Integer allergy) {
        this.allergy = allergy;
    }
    public Integer getHeritableDisease() {
        return heritableDisease;
    }
    public void setHeritableDisease(Integer heritableDisease) {
        this.heritableDisease = heritableDisease;
    }
    public String getMedicinal() {
        return medicinal;
    }
    public void setMedicinal(String medicinal) {
        this.medicinal = medicinal;
    }
    public String getBaseDisease() {
        return baseDisease;
    }
    public void setBaseDisease(String baseDisease) {
        this.baseDisease = baseDisease;
    }
    @Override
    public String toString() {
        return "ZHealthBase{" +
        "id=" + id +
        ", nickName=" + nickName +
        ", sex=" + sex +
        ", education=" + education +
        ", occupation=" + occupation +
        ", phoneNumber=" + phoneNumber +
        ", email=" + email +
        ", address=" + address +
        ", bloodType=" + bloodType +
        ", allergy=" + allergy +
        ", heritableDisease=" + heritableDisease +
        ", medicinal=" + medicinal +
        ", baseDisease=" + baseDisease +
        "}";
    }
    private String baseDisease; // 目前基础病
}
zhang-content/src/main/java/com/ruoyi/domain/ZHealthHabit.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
/**
@@ -14,138 +16,35 @@
 * @since 2023-03-14
 */
@TableName("z_health_habit")
@Data
public class ZHealthHabit implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private Long id;
    /**
     * 健康表所属者id
     */
    private Integer hid;
    private Long uid; // 所属用户id
    /**
     * 饮食喜好与忌口
     */
    private String eat;
    private String eatGood; // 饮食(喜)
    /**
     * 爱好与嗜好
     */
    private String hobby;
    private String eatBad; // 饮食(忌)
    /**
     * 睡眠状态
     */
    private String sleep;
    private String hobby; // 爱好
    /**
     * 大便状态
     */
    private String bigEgestion;
    private String addition; // 嗜好
    /**
     * 小便状态
     */
    private String smallEgestion;
    private String sleep; // 睡眠状态(json)
    /**
     * 饮食习惯
     */
    private String eatType;
    private String bigEgestionStatus; // 大便规律(json)
    /**
     * 生活事件
     */
    private String lifeType;
    private String smallEgestionStatus; // 小便规律(json)
    private String bigEgestion; // 大便
    public Integer getId() {
        return id;
    }
    private String smallEgestion; // 小便
    public void setId(Integer id) {
        this.id = id;
    }
    private String eatType; // 饮食习惯(json)
    public Integer getHid() {
        return hid;
    }
    public void setHid(Integer hid) {
        this.hid = hid;
    }
    public String getEat() {
        return eat;
    }
    public void setEat(String eat) {
        this.eat = eat;
    }
    public String getHobby() {
        return hobby;
    }
    public void setHobby(String hobby) {
        this.hobby = hobby;
    }
    public String getSleep() {
        return sleep;
    }
    public void setSleep(String sleep) {
        this.sleep = sleep;
    }
    public String getBigEgestion() {
        return bigEgestion;
    }
    public void setBigEgestion(String bigEgestion) {
        this.bigEgestion = bigEgestion;
    }
    public String getSmallEgestion() {
        return smallEgestion;
    }
    public void setSmallEgestion(String smallEgestion) {
        this.smallEgestion = smallEgestion;
    }
    public String getEatType() {
        return eatType;
    }
    public void setEatType(String eatType) {
        this.eatType = eatType;
    }
    public String getLifeType() {
        return lifeType;
    }
    public void setLifeType(String lifeType) {
        this.lifeType = lifeType;
    }
    @Override
    public String toString() {
        return "ZHealthHabit{" +
        "id=" + id +
        ", hid=" + hid +
        ", eat=" + eat +
        ", hobby=" + hobby +
        ", sleep=" + sleep +
        ", bigEgestion=" + bigEgestion +
        ", smallEgestion=" + smallEgestion +
        ", eatType=" + eatType +
        ", lifeType=" + lifeType +
        "}";
    }
    private String lifeType; // 生活事件(json)
}
zhang-content/src/main/java/com/ruoyi/domain/ZHealthInfo.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
/**
@@ -14,278 +16,34 @@
 * @since 2023-03-14
 */
@TableName("z_health_info")
@Data
public class ZHealthInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private Long id;
    /**
     * 健康表所属者id
     */
    private Integer hid;
    private Long uid; // 健康表所属者id
    /**
     * 体温
     */
    private String temperature;
    private String temperature; // 体温
    /**
     * 脉搏
     */
    private String pulse;
    private String pulse; // 脉搏
    /**
     * 呼吸
     */
    private String breathe;
    private String breathe; // 呼吸
    /**
     * 血压
     */
    private String bloodPressure;
    private String bloodPressure; // 血压
    /**
     * 体重kg
     */
    private String weight;
    private String weight; // 体重kg
    /**
     * 四肢活动情况
     */
    private String movement;
    private String movement; // 四肢活动情况
    /**
     * 皮肤情况
     */
    private String skinType;
    private String skinType; // 皮肤情况
    /**
     * 心理状态
     */
    private String psychologyType;
    private String psychologyType; // 心理状态
    /**
     * 面对疾病的态度
     */
    private String attitude;
    private String attitude; // 面对疾病的态度
    /**
     * 全身营养状况
     */
    private String nutrition;
    private String nutrition; // 全身营养状况
    /**
     * 脑血管疾病
     */
    private String brain;
    /**
     * 心脏疾病
     */
    private String heart;
    /**
     * 血管疾病
     */
    private String blood;
    /**
     * 消化系统疾病
     */
    private String digestiveSystem;
    /**
     * 呼吸系统疾病
     */
    private String breathSystem;
    /**
     * 肾脏疾病
     */
    private String kidney;
    /**
     * 其他疾病
     */
    private String other;
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getHid() {
        return hid;
    }
    public void setHid(Integer hid) {
        this.hid = hid;
    }
    public String getTemperature() {
        return temperature;
    }
    public void setTemperature(String temperature) {
        this.temperature = temperature;
    }
    public String getPulse() {
        return pulse;
    }
    public void setPulse(String pulse) {
        this.pulse = pulse;
    }
    public String getBreathe() {
        return breathe;
    }
    public void setBreathe(String breathe) {
        this.breathe = breathe;
    }
    public String getBloodPressure() {
        return bloodPressure;
    }
    public void setBloodPressure(String bloodPressure) {
        this.bloodPressure = bloodPressure;
    }
    public String getWeight() {
        return weight;
    }
    public void setWeight(String weight) {
        this.weight = weight;
    }
    public String getMovement() {
        return movement;
    }
    public void setMovement(String movement) {
        this.movement = movement;
    }
    public String getSkinType() {
        return skinType;
    }
    public void setSkinType(String skinType) {
        this.skinType = skinType;
    }
    public String getPsychologyType() {
        return psychologyType;
    }
    public void setPsychologyType(String psychologyType) {
        this.psychologyType = psychologyType;
    }
    public String getAttitude() {
        return attitude;
    }
    public void setAttitude(String attitude) {
        this.attitude = attitude;
    }
    public String getNutrition() {
        return nutrition;
    }
    public void setNutrition(String nutrition) {
        this.nutrition = nutrition;
    }
    public String getBrain() {
        return brain;
    }
    public void setBrain(String brain) {
        this.brain = brain;
    }
    public String getHeart() {
        return heart;
    }
    public void setHeart(String heart) {
        this.heart = heart;
    }
    public String getBlood() {
        return blood;
    }
    public void setBlood(String blood) {
        this.blood = blood;
    }
    public String getDigestiveSystem() {
        return digestiveSystem;
    }
    public void setDigestiveSystem(String digestiveSystem) {
        this.digestiveSystem = digestiveSystem;
    }
    public String getBreathSystem() {
        return breathSystem;
    }
    public void setBreathSystem(String breathSystem) {
        this.breathSystem = breathSystem;
    }
    public String getKidney() {
        return kidney;
    }
    public void setKidney(String kidney) {
        this.kidney = kidney;
    }
    public String getOther() {
        return other;
    }
    public void setOther(String other) {
        this.other = other;
    }
    @Override
    public String toString() {
        return "ZHealthInfo{" +
        "id=" + id +
        ", hid=" + hid +
        ", temperature=" + temperature +
        ", pulse=" + pulse +
        ", breathe=" + breathe +
        ", bloodPressure=" + bloodPressure +
        ", weight=" + weight +
        ", movement=" + movement +
        ", skinType=" + skinType +
        ", psychologyType=" + psychologyType +
        ", attitude=" + attitude +
        ", nutrition=" + nutrition +
        ", brain=" + brain +
        ", heart=" + heart +
        ", blood=" + blood +
        ", digestiveSystem=" + digestiveSystem +
        ", breathSystem=" + breathSystem +
        ", kidney=" + kidney +
        ", other=" + other +
        "}";
    }
}
zhang-content/src/main/java/com/ruoyi/domain/ZHealthNote.java
New file
@@ -0,0 +1,42 @@
package com.ruoyi.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.io.Serializable;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:19
 * @Version 1.0.0
 **/
@Data
public class ZHealthNote implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long uid; // 用户id
    private String lifeHabits; // 生活习惯
    private String historyDisease; // 以往病史
    private String treatmentInfo; // 诊治情况
    private String familyDisease; // 家族病史
    private String nowDisease; // 现病史
    private String diseaseHappen; // 疾病的发生
    private String diseaseDevelop; // 疾病的发展
    private String diseaseTreat; // 疾病的治疗
    private String diseaseBack; // 疾病的转归
}
zhang-content/src/main/java/com/ruoyi/domain/ZHealthNow.java
New file
@@ -0,0 +1,40 @@
package com.ruoyi.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.io.Serializable;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:17
 * @Version 1.0.0
 **/
@Data
public class ZHealthNow implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long uid; // 用户id
    private String brain; // 脑血管疾病
    private String heart; // 心脏疾病
    private String blood; // 血管疾病
    private String digestiveSystem; // 消化系统疾病
    private String breathSystem; // 呼吸系统疾病
    private String kidney; // 肾脏疾病
    private String other; // 其他疾病
}
zhang-content/src/main/java/com/ruoyi/domain/ZInfoUser.java
@@ -188,6 +188,17 @@
    private Date birth;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 个人背景图片、视频
     */
    private String url;
zhang-content/src/main/java/com/ruoyi/domain/ZfCode.java
New file
@@ -0,0 +1,21 @@
package com.ruoyi.domain;
import lombok.Data;
import java.io.Serializable;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-16 23:28
 * @Version 1.0.0
 **/
@Data
public class ZfCode implements Serializable {
    private static final long serialVersionUID = 1L;
    private Long id;
    private String name;
    private Long code;
}
zhang-content/src/main/java/com/ruoyi/domain/dto/AuthorityDto.java
New file
@@ -0,0 +1,30 @@
package com.ruoyi.domain.dto;
import lombok.Data;
import java.io.Serializable;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-16 22:05
 * @Version 1.0.0
 **/
@Data
public class AuthorityDto implements Serializable {
    private static final long serialVersionUID = 1L;
    private String familyName;
    private String modelName;
    private Integer search = 0;
    private Integer insert = 0;
    private Integer update = 0;
    private Integer delete = 0;
}
zhang-content/src/main/java/com/ruoyi/domain/dto/EmpowerDto.java
@@ -15,20 +15,5 @@
public class EmpowerDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 授权的用户id
     */
    private String userId;
    /**
     * 授权的家庭号
     */
    private String familyId;
    /**
     * 授权的菜单id
     */
    private List<String> authorityList;
}
zhang-content/src/main/java/com/ruoyi/domain/dto/ZHealthBaseDto.java
New file
@@ -0,0 +1,50 @@
package com.ruoyi.domain.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.domain.health.AllergyHistory;
import com.ruoyi.domain.health.BloodType;
import com.ruoyi.domain.health.GeneticDisease;
import lombok.Data;
import java.io.Serializable;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 14:35
 * @Version 1.0.0
 **/
@Data
public class ZHealthBaseDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long uid; // 所属用户id
    private String name; // 姓名
    private Integer sex; // 性别,1:男,0:女
    private String educationLevel; // 文化程度
    private String work; // 职业
    private String phone; // 电话
    private String email; // 电子邮件
    private String address; // 住址
    private BloodType bloodClass; // 血型(json数组)
    private AllergyHistory allergyClass; // 过敏史(json数组)
    private GeneticDisease geneticDiseaseClass; // 遗传病史(json数组)
    private String medicine; // 常用药物
    private String baseDisease; // 目前基础病
}
zhang-content/src/main/java/com/ruoyi/domain/health/AllergyHistory.java
New file
@@ -0,0 +1,17 @@
package com.ruoyi.domain.health;
import lombok.Data;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 14:29
 * @Version 1.0.0
 **/
@Data
public class AllergyHistory {
    private Integer medicine = 0;
    private Integer food = 0;
    private Integer other = 0;
    private String otherText = "";
}
zhang-content/src/main/java/com/ruoyi/domain/health/BloodType.java
New file
@@ -0,0 +1,21 @@
package com.ruoyi.domain.health;
import lombok.Data;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 14:28
 * @Version 1.0.0
 **/
@Data
public class BloodType {
    private Integer a = 0;
    private Integer b = 0;
    private Integer o = 0;
    private Integer ab = 0;
    private Integer rh = 0;
    private Integer other = 0;
    private String otherText = "";
    private Integer unknown= 0 ;
}
zhang-content/src/main/java/com/ruoyi/domain/health/GeneticDisease.java
New file
@@ -0,0 +1,18 @@
package com.ruoyi.domain.health;
import lombok.Data;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 14:31
 * @Version 1.0.0
 **/
@Data
public class GeneticDisease {
    private Integer hypertension = 0;//高血压
    private Integer diabetes = 0;//糖尿病
    private Integer tumor = 0;//肿瘤
    private Integer other = 0;//其它
    private String otherText = "";
}
zhang-content/src/main/java/com/ruoyi/mapper/ZHealthNoteMapper.java
New file
@@ -0,0 +1,15 @@
package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.ZHealthNote;
import org.apache.ibatis.annotations.Mapper;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:22
 * @Version 1.0.0
 **/
@Mapper
public interface ZHealthNoteMapper extends BaseMapper<ZHealthNote> {
}
zhang-content/src/main/java/com/ruoyi/mapper/ZHealthNowMapper.java
New file
@@ -0,0 +1,15 @@
package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.ZHealthNow;
import org.apache.ibatis.annotations.Mapper;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:22
 * @Version 1.0.0
 **/
@Mapper
public interface ZHealthNowMapper extends BaseMapper<ZHealthNow> {
}
zhang-content/src/main/java/com/ruoyi/mapper/ZfCodeMapper.java
New file
@@ -0,0 +1,15 @@
package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.ZfCode;
import org.apache.ibatis.annotations.Mapper;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-16 23:31
 * @Version 1.0.0
 **/
@Mapper
public interface ZfCodeMapper extends BaseMapper<ZfCode> {
}
zhang-content/src/main/java/com/ruoyi/service/ZAuthorityService.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.ZAuthority;
import com.ruoyi.domain.dto.AuthorityDto;
import java.util.List;
@@ -13,4 +14,9 @@
 **/
public interface ZAuthorityService extends IService<ZAuthority> {
    List<ZAuthority> getAuthority();
    AuthorityDto getByCondition(AuthorityDto authorityDto);
    List<String> getAuthorityFamilyName();
}
zhang-content/src/main/java/com/ruoyi/service/ZHealthBaseService.java
@@ -2,7 +2,9 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.ZHealthBase;
import com.ruoyi.domain.dto.ZHealthBaseDto;
/**
 * <p>
@@ -14,4 +16,7 @@
 */
public interface ZHealthBaseService extends IService<ZHealthBase> {
    ZHealthBaseDto selectData();
    AjaxResult saveOrUpdateData(ZHealthBaseDto zHealthBaseDto);
}
zhang-content/src/main/java/com/ruoyi/service/ZHealthNoteService.java
New file
@@ -0,0 +1,13 @@
package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.ZHealthNote;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:24
 * @Version 1.0.0
 **/
public interface ZHealthNoteService extends IService<ZHealthNote> {
}
zhang-content/src/main/java/com/ruoyi/service/ZHealthNowService.java
New file
@@ -0,0 +1,13 @@
package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.ZHealthNow;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:25
 * @Version 1.0.0
 **/
public interface ZHealthNowService extends IService<ZHealthNow> {
}
zhang-content/src/main/java/com/ruoyi/service/ZInfoUserService.java
@@ -3,7 +3,7 @@
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.ZInfoUser;
import com.ruoyi.domain.ZfRelation;
import com.ruoyi.domain.dto.EmpowerDto;
import com.ruoyi.domain.dto.Genealogy;
import com.ruoyi.domain.dto.GenealogyExportDto;
import com.ruoyi.domain.dto.RelationDto;
@@ -32,7 +32,7 @@
    AjaxResult deleteRelation(Long[] ids);
    AjaxResult empower(EmpowerDto empowerDto);
//    AjaxResult empower(EmpowerDto empowerDto);
    AjaxResult listWithTree(Integer depth);
zhang-content/src/main/java/com/ruoyi/service/ZfCodeService.java
New file
@@ -0,0 +1,18 @@
package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.ZfCode;
import java.util.List;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-16 23:32
 * @Version 1.0.0
 **/
public interface ZfCodeService extends IService<ZfCode> {
    List<ZfCode> likeGetByName(String name);
    List<String> getNameByCode(List<Long> codeList);
}
zhang-content/src/main/java/com/ruoyi/service/ZfFamilyService.java
@@ -12,4 +12,11 @@
 **/
@Service
public interface ZfFamilyService extends IService<ZfFamily> {
    /**
     * 根据家庭名字查询家庭
     */
    ZfFamily getByName(String familyName);
}
zhang-content/src/main/java/com/ruoyi/service/impl/ZAuthorityServiceImpl.java
@@ -5,11 +5,18 @@
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.ZAuthority;
import com.ruoyi.domain.ZfCode;
import com.ruoyi.domain.ZfFamily;
import com.ruoyi.domain.dto.AuthorityDto;
import com.ruoyi.mapper.ZAuthorityMapper;
import com.ruoyi.service.ZAuthorityService;
import com.ruoyi.service.ZfCodeService;
import com.ruoyi.service.ZfFamilyService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @Author Jinquan_Ou
@@ -19,6 +26,13 @@
 **/
@Service
public class ZAuthorityServiceImpl extends ServiceImpl<ZAuthorityMapper, ZAuthority> implements ZAuthorityService {
    @Resource
    private ZfFamilyService zfFamilyService;
    @Resource
    private ZfCodeService zfCodeService;
    /**
     * 查询当前用户的权限
     */
@@ -32,4 +46,61 @@
        return list(lqw);
    }
    @Override
    public AuthorityDto getByCondition(AuthorityDto authorityDto) {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        Long userId = user.getUserId();
        String familyName = authorityDto.getFamilyName();
        String modelName = authorityDto.getModelName();
        //根据家庭的名字查出家庭的id
        Long familyId = zfFamilyService.getByName(familyName).getId();
        //根据模块的名字查出对应的权限码
        List<ZfCode> zfCodeList = zfCodeService.likeGetByName(modelName);
        List<Long> allCodeList = zfCodeList.stream().map(ZfCode::getCode).collect(Collectors.toList());//权限码数组
        //找到对应家庭对应模块的权限数组
        LambdaQueryWrapper<ZAuthority> lqw = new LambdaQueryWrapper<>();
        lqw.eq(ZAuthority::getFid,familyId)
                .eq(ZAuthority::getUid,userId)
                .in(ZAuthority::getAuthority,allCodeList);
        List<ZAuthority> authorityList = list(lqw);
        List<Long> codeList = authorityList.stream().map(ZAuthority::getAuthority).collect(Collectors.toList());//真正拥有权限的权限码数组
        List<String> nameList = zfCodeService.getNameByCode(codeList);
        AuthorityDto resultData = new AuthorityDto();
        nameList.forEach(name ->{
            if(name.contains("查看")){
                resultData.setSearch(1);
            }else if(name.contains("删除")){
                resultData.setDelete(1);
            }else if(name.contains("添加")){
                resultData.setInsert(1);
            }else if(name.contains("修改")){
                resultData.setUpdate(1);
            }
        });
        resultData.setModelName(modelName);
        resultData.setFamilyName(familyName);
        return resultData;
    }
    @Override
    public List<String> getAuthorityFamilyName() {
        List<ZAuthority> authorityList = getAuthority();
        List<Long> familyIds = authorityList.stream().map(ZAuthority::getFid).distinct().collect(Collectors.toList());
        List<ZfFamily> familyList = zfFamilyService.listByIds(familyIds);
        return familyList.stream().map(ZfFamily::getName).distinct().collect(Collectors.toList());
    }
}
zhang-content/src/main/java/com/ruoyi/service/impl/ZHealthBaseServiceImpl.java
@@ -1,8 +1,18 @@
package com.ruoyi.service.impl;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.ZHealthBase;
import com.ruoyi.domain.dto.ZHealthBaseDto;
import com.ruoyi.domain.health.AllergyHistory;
import com.ruoyi.domain.health.BloodType;
import com.ruoyi.domain.health.GeneticDisease;
import com.ruoyi.mapper.ZHealthBaseMapper;
import com.ruoyi.service.ZHealthBaseService;
import org.springframework.stereotype.Service;
@@ -18,4 +28,68 @@
@Service
public class ZHealthBaseServiceImpl extends ServiceImpl<ZHealthBaseMapper, ZHealthBase> implements ZHealthBaseService {
    @Override
    public ZHealthBaseDto selectData() {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        Long userId = user.getUserId();
        LambdaQueryWrapper<ZHealthBase> lqw = new LambdaQueryWrapper<>();
        lqw.eq(ZHealthBase::getUid,userId);
        ZHealthBase zHealthBase = getOne(lqw);
        //如果是第一次进来,之前没有这个用户的数据,抛异常让用户先插入数据
        if(zHealthBase == null){
            throw new RuntimeException("第一次进来,请先填写好数据");
        }
        //封装要返回的数据
        ZHealthBaseDto returnData = new ZHealthBaseDto();
        BeanUtils.copyProperties(zHealthBase,returnData);
//        returnData.setName(zHealthBase.getName());
//        returnData.setSex(zHealthBase.getSex());
//        returnData.setEducationLevel(zHealthBase.getEducationLevel());
//        returnData.setWork(zHealthBase.getWork());
//        returnData.setPhone(zHealthBase.getPhone());
//        returnData.setEmail(zHealthBase.getEmail());
//        returnData.setMedicine(zHealthBase.getMedicine());
//        returnData.setBaseDisease(zHealthBase.getBaseDisease());
        //将json数组转换成对象
        returnData.setBloodClass(JSON.parseObject(zHealthBase.getBlood(), BloodType.class));
        returnData.setAllergyClass(JSON.parseObject(zHealthBase.getAllergy(), AllergyHistory.class));
        returnData.setGeneticDiseaseClass(JSON.parseObject(zHealthBase.getGeneticDisease(), GeneticDisease.class));
        return returnData;
    }
    @Override
    public AjaxResult saveOrUpdateData(ZHealthBaseDto zHealthBaseDto) {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        Long userId = user.getUserId();
        LambdaQueryWrapper<ZHealthBase> lqw = new LambdaQueryWrapper<>();
        lqw.eq(ZHealthBase::getUid,userId);
        ZHealthBase getResult = getOne(lqw);
        ZHealthBase zHealthBase = new ZHealthBase();
        BeanUtils.copyProperties(zHealthBaseDto,zHealthBase);
        zHealthBase.setUid(userId);
        zHealthBase.setBlood(JSON.toJSONString(zHealthBaseDto.getBloodClass()));
        zHealthBase.setAllergy(JSON.toJSONString(zHealthBaseDto.getAllergyClass()));
        zHealthBase.setGeneticDisease(JSON.toJSONString(zHealthBaseDto.getGeneticDiseaseClass()));
        if(getResult == null){
            //如果是第一次进来,那么是新增数据
            save(zHealthBase);
        }else {
            //如果不是第一次,那就是修改数据了
            zHealthBase.setId(getResult.getId());
            updateById(zHealthBase);
        }
        return AjaxResult.success();
    }
}
zhang-content/src/main/java/com/ruoyi/service/impl/ZHealthNoteServiceImpl.java
New file
@@ -0,0 +1,17 @@
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.ZHealthNote;
import com.ruoyi.mapper.ZHealthNoteMapper;
import com.ruoyi.service.ZHealthNoteService;
import org.springframework.stereotype.Service;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:26
 * @Version 1.0.0
 **/
@Service
public class ZHealthNoteServiceImpl extends ServiceImpl<ZHealthNoteMapper, ZHealthNote> implements ZHealthNoteService {
}
zhang-content/src/main/java/com/ruoyi/service/impl/ZHealthNowServiceImpl.java
New file
@@ -0,0 +1,17 @@
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.ZHealthNow;
import com.ruoyi.mapper.ZHealthNowMapper;
import com.ruoyi.service.ZHealthNowService;
import org.springframework.stereotype.Service;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-17 13:28
 * @Version 1.0.0
 **/
@Service
public class ZHealthNowServiceImpl extends ServiceImpl<ZHealthNowMapper, ZHealthNow> implements ZHealthNowService {
}
zhang-content/src/main/java/com/ruoyi/service/impl/ZInfoUserServiceImpl.java
@@ -137,10 +137,10 @@
        return AjaxResult.success();
    }
    @Override
    public AjaxResult empower(EmpowerDto empowerDto) {
        return null;
    }
//    @Override
//    public AjaxResult empower(EmpowerDto empowerDto) {
//        return null;
//    }
//    /**
//     * 给用户授权的方法
zhang-content/src/main/java/com/ruoyi/service/impl/ZSecretServiceImpl.java
@@ -57,6 +57,7 @@
        lqw.eq(userId != null, ZSecret::getUserId, userId)
                .like(StringUtils.isNotEmpty(zSecret.getType()), ZSecret::getType, zSecret.getType())
                .like(StringUtils.isNotEmpty(zSecret.getAccNo()), ZSecret::getAccNo, zSecret.getAccNo())
                .eq(zSecret.getIsFinger()!=null,ZSecret::getIsFinger,zSecret.getIsFinger())
                .between(zSecret.getHappenStartTime() != null && zSecret.getHappenEndTime() != null, ZSecret::getHappenTime, zSecret.getHappenStartTime(), zSecret.getHappenEndTime())
                .orderByDesc(ZSecret::getCreateTime);
        return lqw;
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCodeServiceImpl.java
New file
@@ -0,0 +1,39 @@
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.ZfCode;
import com.ruoyi.mapper.ZfCodeMapper;
import com.ruoyi.service.ZfCodeService;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-07-16 23:32
 * @Version 1.0.0
 **/
@Service
public class ZfCodeServiceImpl extends ServiceImpl<ZfCodeMapper, ZfCode> implements ZfCodeService {
    @Override
    public List<ZfCode> likeGetByName(String name) {
        LambdaQueryWrapper<ZfCode> lqw = new LambdaQueryWrapper<>();
        lqw.like(ZfCode::getName,name);
        return list(lqw);
    }
    @Override
    public List<String> getNameByCode(List<Long> codeList) {
        if(codeList.size() == 0){
            return new ArrayList<>();
        }
        LambdaQueryWrapper<ZfCode> lqw = new LambdaQueryWrapper<>();
        lqw.in(codeList.size()!=0,ZfCode::getCode,codeList);
        List<ZfCode> zfCodeList = list(lqw);
        return zfCodeList.stream().map(ZfCode::getName).collect(Collectors.toList());
    }
}
zhang-content/src/main/java/com/ruoyi/service/impl/ZfFamilyServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.ZfEvent;
import com.ruoyi.domain.ZfFamily;
@@ -17,4 +18,10 @@
 **/
@Service
public class ZfFamilyServiceImpl extends ServiceImpl<ZfFamilyMapper, ZfFamily> implements ZfFamilyService {
    @Override
    public ZfFamily getByName(String familyName) {
        LambdaQueryWrapper<ZfFamily> lqw = new LambdaQueryWrapper<>();
        lqw.eq(ZfFamily::getName,familyName);
        return getOne(lqw);
    }
}