| | |
| | | key-store: classpath:www.bendudu.com.pfx |
| | | # “.pfx”证书对应格式,“.jks"证书对应“RSA” |
| | | key-store-type: PKCS12 |
| | | key-store-password: 5yheh725 |
| | | key-store-password: n0l5twa7 |
| | | #key-password: 私钥密码 |
| | | |
| | | servlet: |
| | |
| | | import com.ruoyi.domain.MarrySelf; |
| | | import com.ruoyi.domain.MarryUser; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | import com.ruoyi.domain.ZSelfNote; |
| | | import com.ruoyi.domain.dto.MarryInfoDto; |
| | | import com.ruoyi.domain.dto.MarryUserDto; |
| | | import com.ruoyi.mapper.MarrySelfMapper; |
| | |
| | | @Resource |
| | | MarryUserService marryUserService; |
| | | |
| | | |
| | | @Resource |
| | | ZInfoUserService zInfoUserService; |
| | | |
| | | // @Resource |
| | | // MarrySelfService marrySelfService; |
| | |
| | | |
| | | //再查询前任的信息 |
| | | LambdaQueryWrapper<MarryUser> marryUserLQW = new LambdaQueryWrapper<>(); |
| | | marryUserLQW.eq(MarryUser::getUid,userId); |
| | | |
| | | |
| | | //根据userId查询到infouser的uaid |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoBysysId(userId); |
| | | //拿到所有的sysid |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid()).stream().map(ZInfoUser::getSysId).collect(Collectors.toList()); |
| | | |
| | | |
| | | marryUserLQW.in(MarryUser::getUid, fms); |
| | | // marryUserLQW.eq(MarryUser::getUid,userId); |
| | | List<MarryUser> spouseList = marryUserService.list(marryUserLQW); |
| | | List<MarryUserDto> frontList = spouseList.stream().map(s -> { |
| | | System.out.println(s); |
| | | MarryUserDto marryUserDto = new MarryUserDto(); |
| | | BeanUtils.copyProperties(s, marryUserDto); |
| | | return marryUserDto; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | |
| | | System.out.println("++++++++++++----------------"); |
| | | System.out.println(frontList); |
| | | //最终返回数据模型 |
| | | MarryInfoDto result = new MarryInfoDto(); |
| | | BeanUtils.copyProperties(myself,result); |
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.domain.ZHealthBase; |
| | | import com.ruoyi.domain.ZHealthNow; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | 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 com.ruoyi.service.ZInfoUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class ZHealthBaseServiceImpl extends ServiceImpl<ZHealthBaseMapper, ZHealthBase> implements ZHealthBaseService { |
| | | |
| | | @Autowired |
| | | ZInfoUserService zInfoUserService; |
| | | @Override |
| | | public ZHealthBaseDto selectData() { |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | |
| | | lqw.eq(ZHealthBase::getUid,userId); |
| | | ZHealthBase zHealthBase = getOne(lqw); |
| | | |
| | | |
| | | |
| | | |
| | | if(zHealthBase==null) |
| | | { |
| | | //根据userId查询到infouser的uaid |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoBysysId(userId); |
| | | System.out.println("55555555555555555555"); |
| | | |
| | | //拿到所有的sysid |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid()).stream().map(ZInfoUser::getSysId).collect(Collectors.toList()); |
| | | System.out.println(fms.size()); |
| | | |
| | | for(Long id:fms) |
| | | { |
| | | LambdaQueryWrapper<ZHealthBase> lqw1 = new LambdaQueryWrapper<>(); |
| | | |
| | | if(!id.equals(userId)) |
| | | { |
| | | |
| | | lqw1.eq(ZHealthBase::getUid, id); |
| | | zHealthBase = getOne(lqw1); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | //如果是第一次进来,之前没有这个用户的数据,抛异常让用户先插入数据 |
| | | if(zHealthBase == null){ |
| | | throw new RuntimeException("第一次进来,请先填写好数据"); |
| | |
| | | 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.Physcial; |
| | | import com.ruoyi.domain.*; |
| | | import com.ruoyi.domain.ZHealthHabit; |
| | | import com.ruoyi.domain.ZHealthHabit; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | import com.ruoyi.domain.dto.ZHealthHabitDto; |
| | | import com.ruoyi.domain.dto.ZHealthHabitDto; |
| | | import com.ruoyi.domain.health.*; |
| | |
| | | LambdaQueryWrapper<ZHealthHabit> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(ZHealthHabit::getUid,userId); |
| | | ZHealthHabit zHealthHabit = getOne(lqw); |
| | | System.out.println("+++++++6676+++++++++++"); |
| | | |
| | | if(zHealthHabit==null) |
| | | { |
| | | //根据userId查询到infouser的uaid |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoBysysId(userId); |
| | | System.out.println("++++++++++++++++++"); |
| | | |
| | | //拿到所有的sysid |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid()).stream().map(ZInfoUser::getSysId).collect(Collectors.toList()); |
| | | for(Long id:fms) |
| | | { |
| | | LambdaQueryWrapper<ZHealthHabit> lqw1 = new LambdaQueryWrapper<>(); |
| | | if(!id.equals(userId)) |
| | | { |
| | | lqw.eq(ZHealthHabit::getUid, id); |
| | | zHealthHabit = getOne(lqw); |
| | | System.out.println("++++++++++++++++++"); |
| | | System.out.println(id); |
| | | lqw1.eq(ZHealthHabit::getUid, id); |
| | | zHealthHabit = getOne(lqw1); |
| | | break; |
| | | } |
| | | } |
| | |
| | | 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.ZHealthInfo; |
| | | import com.ruoyi.domain.*; |
| | | import com.ruoyi.domain.ZHealthInfo; |
| | | import com.ruoyi.domain.ZHealthInfo; |
| | | import com.ruoyi.domain.dto.ZHealthInfoDto; |
| | |
| | | import com.ruoyi.domain.health.*; |
| | | import com.ruoyi.mapper.ZHealthInfoMapper; |
| | | import com.ruoyi.service.ZHealthInfoService; |
| | | import com.ruoyi.service.ZInfoUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class ZHealthInfoServiceImpl extends ServiceImpl<ZHealthInfoMapper, ZHealthInfo> implements ZHealthInfoService { |
| | | |
| | | @Autowired |
| | | ZInfoUserService zInfoUserService; |
| | | @Override |
| | | public AjaxResult selectData() { |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | |
| | | lqw.eq(ZHealthInfo::getUid,userId); |
| | | ZHealthInfo zHealthInfo = getOne(lqw); |
| | | |
| | | |
| | | |
| | | if(zHealthInfo==null) |
| | | { |
| | | //根据userId查询到infouser的uaid |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoBysysId(userId); |
| | | // System.out.println("sdfsdf999000550"); |
| | | |
| | | //拿到所有的sysid |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid()).stream().map(ZInfoUser::getSysId).collect(Collectors.toList()); |
| | | System.out.println(fms.size()); |
| | | |
| | | for(Long id:fms) |
| | | { |
| | | LambdaQueryWrapper<ZHealthInfo> lqw1 = new LambdaQueryWrapper<>(); |
| | | |
| | | if(!id.equals(userId)) |
| | | { |
| | | lqw1.eq(ZHealthInfo::getUid, id); |
| | | zHealthInfo = getOne(lqw1); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | //如果是第一次进来,之前没有这个用户的数据,抛异常让用户先插入数据 |
| | | if(zHealthInfo == null){ |
| | | throw new RuntimeException("第一次进来,请先填写好数据"); |
| | |
| | | { |
| | | //根据userId查询到infouser的uaid |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoBysysId(userId); |
| | | System.out.println("sdfsdf999000550"); |
| | | // System.out.println("sdfsdf999000550"); |
| | | |
| | | //拿到所有的sysid |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid()).stream().map(ZInfoUser::getSysId).collect(Collectors.toList()); |
| | | System.out.println(fms.size()); |
| | | |
| | | for(Long id:fms) |
| | | { |
| | | LambdaQueryWrapper<ZHealthNote> lqw1 = new LambdaQueryWrapper<>(); |
| | | |
| | | if(!id.equals(userId)) |
| | | { |
| | | lqw.eq(ZHealthNote::getUid, id); |
| | | result = getOne(lqw); |
| | | lqw1.eq(ZHealthNote::getUid, id); |
| | | result = getOne(lqw1); |
| | | break; |
| | | } |
| | | } |
| | | System.out.println("sdfsdf9990000"); |
| | | // System.out.println(result); |
| | | // System.out.println("sdfsdf9990000"); |
| | | } |
| | | if(result == null){ |
| | | throw new RuntimeException("请先填写好生活习惯数据!"); |
| | |
| | | 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.ZHealthNote; |
| | | import com.ruoyi.domain.ZHealthNow; |
| | | import com.ruoyi.domain.ZHealthNow; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | import com.ruoyi.domain.dto.ZHealthNowDto; |
| | | import com.ruoyi.domain.dto.ZHealthNowDto; |
| | | import com.ruoyi.domain.health.*; |
| | | import com.ruoyi.mapper.ZHealthNowMapper; |
| | | import com.ruoyi.service.ZHealthNowService; |
| | | import com.ruoyi.service.ZInfoUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.sql.rowset.BaseRowSet; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Author Jinquan_Ou |
| | |
| | | **/ |
| | | @Service |
| | | public class ZHealthNowServiceImpl extends ServiceImpl<ZHealthNowMapper, ZHealthNow> implements ZHealthNowService { |
| | | |
| | | @Autowired |
| | | ZInfoUserService zInfoUserService; |
| | | @Override |
| | | public AjaxResult selectData() { |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | |
| | | lqw.eq(ZHealthNow::getUid,userId); |
| | | ZHealthNow zHealthNow = getOne(lqw); |
| | | |
| | | if(zHealthNow==null) |
| | | { |
| | | //根据userId查询到infouser的uaid |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoBysysId(userId); |
| | | // System.out.println("sdfsdf999000550"); |
| | | |
| | | //拿到所有的sysid |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid()).stream().map(ZInfoUser::getSysId).collect(Collectors.toList()); |
| | | System.out.println(fms.size()); |
| | | |
| | | for(Long id:fms) |
| | | { |
| | | LambdaQueryWrapper<ZHealthNow> lqw1 = new LambdaQueryWrapper<>(); |
| | | |
| | | if(!id.equals(userId)) |
| | | { |
| | | lqw1.eq(ZHealthNow::getUid, id); |
| | | zHealthNow = getOne(lqw1); |
| | | break; |
| | | } |
| | | } |
| | | System.out.println(zHealthNow); |
| | | System.out.println("sdfsdf9990000"); |
| | | System.out.println("sdfsdf9990000"); |
| | | System.out.println("sdfsdf9990000"); |
| | | } |
| | | //如果是第一次进来,之前没有这个用户的数据,抛异常让用户先插入数据 |
| | | if(zHealthNow == null){ |
| | | throw new RuntimeException("第一次进来,请先填写好数据"); |
| | |
| | | return lqw; |
| | | } |
| | | |
| | | |
| | | private LambdaQueryWrapper<ZSelfNote> buildConditionSec(ZSelfNote zSelfNote,List<Long> userIds) { |
| | | LambdaQueryWrapper<ZSelfNote> lqw = new LambdaQueryWrapper<>(); |
| | | // lqw.in(ZSelfNote::getUid, getAll()) |
| | | |
| | | lqw.in(ZSelfNote::getUid, userIds) |
| | | .like(StringUtils.isNotEmpty(zSelfNote.getPeople()), ZSelfNote::getPeople, zSelfNote.getPeople()) |
| | | .like(StringUtils.isNotEmpty(zSelfNote.getTitle()), ZSelfNote::getTitle, zSelfNote.getTitle()) |
| | | .like(StringUtils.isNotEmpty(zSelfNote.getAddress()),ZSelfNote::getAddress,zSelfNote.getAddress()) |
| | | .like(StringUtils.isNotEmpty(zSelfNote.getRemark()),ZSelfNote::getRemark,zSelfNote.getRemark()) |
| | | .between(zSelfNote.getHappenStartTime() != null && zSelfNote.getHappenEndTime() != null, ZSelfNote::getHappenTime, zSelfNote.getHappenStartTime(), zSelfNote.getHappenEndTime()) |
| | | .orderByDesc(ZSelfNote::getCreateTime); |
| | | return lqw; |
| | | } |
| | | |
| | | // public List<ZfShareData> getAllByShareId(ZfShareData zfShareData1){ |
| | | // SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | // Long userId = user.getUserId(); |
| | |
| | | */ |
| | | @Override |
| | | public AjaxResult selectDataList(ZSelfNote zSelfNote, Integer pageNum, Integer pageSize) { |
| | | LambdaQueryWrapper<ZSelfNote> lqw = buildCondition(zSelfNote); |
| | | |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Long userId = user.getUserId(); |
| | | |
| | |
| | | return AjaxResult.success("请前往家族名称为"+byId.getClanName()+",用户名为"+infoBysysId.getNickName()+"的用户账号下查看"); |
| | | } |
| | | } |
| | | |
| | | // LambdaQueryWrapper<ZSelfNote> lqw = buildCondition(zSelfNote); |
| | | //根据userId查询到infouser的uaid |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoBysysId(userId); |
| | | //拿到所有的sysid |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid()).stream().map(ZInfoUser::getSysId).collect(Collectors.toList()); |
| | | LambdaQueryWrapper<ZSelfNote> lqw; |
| | | if(!fms.isEmpty()) |
| | | lqw = buildConditionSec(zSelfNote, fms); |
| | | else |
| | | lqw = buildCondition(zSelfNote); |
| | | Page<ZSelfNote> pageBean = new Page<>(pageNum, pageSize); |
| | | Page<ZSelfNote> pageResult = page(pageBean, lqw); |
| | | |