diff --git a/ruoyi-admin/src/main/java/com/ruoyi/busi/mapper/BusiEvaluateMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/busi/mapper/BusiEvaluateMapper.java index f6453b1..b89972a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/busi/mapper/BusiEvaluateMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/busi/mapper/BusiEvaluateMapper.java @@ -4,6 +4,7 @@ import java.util.List; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.busi.domain.BusiEvaluate; +import com.ruoyi.busi.vo.BusiEvaluateVO; import org.apache.ibatis.annotations.Param; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; @@ -18,4 +19,14 @@ import org.apache.ibatis.annotations.Mapper; public interface BusiEvaluateMapper extends BaseMapper { IPage queryListPage(@Param("entity") BusiEvaluate entity, Page page); + + /** + * 通过用户id查询被评价情况 + * @author PQZ + * @date 15:22 2025/3/21 + * @param userId 用户id + * @return java.util.List + **/ + List listByToUserId(@Param("userId") Long userId); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/busi/service/IBusiEvaluateService.java b/ruoyi-admin/src/main/java/com/ruoyi/busi/service/IBusiEvaluateService.java index 2d4a6a2..f1e0175 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/busi/service/IBusiEvaluateService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/busi/service/IBusiEvaluateService.java @@ -1,11 +1,12 @@ package com.ruoyi.busi.service; -import java.util.List; - import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.busi.domain.BusiEvaluate; +import com.ruoyi.busi.vo.BusiEvaluateVO; + +import java.util.List; /** * 评价Service接口 @@ -24,5 +25,5 @@ public interface IBusiEvaluateService extends IService { * @author PQZ * @date 14:16 2025/3/21 **/ - List listByToUserId(Long userId); + List listByToUserId(Long userId); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/busi/service/impl/BusiEvaluateServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/busi/service/impl/BusiEvaluateServiceImpl.java index 3b3196f..883c4e1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/busi/service/impl/BusiEvaluateServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/busi/service/impl/BusiEvaluateServiceImpl.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.busi.domain.BusiEvaluate; import com.ruoyi.busi.mapper.BusiEvaluateMapper; import com.ruoyi.busi.service.IBusiEvaluateService; +import com.ruoyi.busi.vo.BusiEvaluateVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -38,9 +39,7 @@ public class BusiEvaluateServiceImpl extends ServiceImpl listByToUserId(Long userId) { - LambdaUpdateWrapper lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); - lambdaUpdateWrapper.eq(BusiEvaluate::getToUserId,userId); - return list(lambdaUpdateWrapper); + public List listByToUserId(Long userId) { + return busiEvaluateMapper.listByToUserId(userId); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/busi/vo/BusiEvaluateVO.java b/ruoyi-admin/src/main/java/com/ruoyi/busi/vo/BusiEvaluateVO.java new file mode 100644 index 0000000..7881eb3 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/busi/vo/BusiEvaluateVO.java @@ -0,0 +1,12 @@ +package com.ruoyi.busi.vo; + +import lombok.Data; + +@Data +public class BusiEvaluateVO { + /**评价内容**/ + private String evaluate; + /**内容数量*/ + private int num; + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/member/domain/MemberCard.java b/ruoyi-admin/src/main/java/com/ruoyi/member/domain/MemberCard.java index 910b243..f6a1c0e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/member/domain/MemberCard.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/member/domain/MemberCard.java @@ -48,10 +48,12 @@ public class MemberCard extends DlBaseEntity /** 生效日期(含) */ @Excel(name = "生效日期", readConverterExp = "含=") + @JsonFormat(pattern = "yyyy-MM-dd") private Date startDate; /** 失效日期(含) */ @Excel(name = "失效日期", readConverterExp = "含=") + @JsonFormat(pattern = "yyyy-MM-dd") private Date endDate; /** 关联订单id */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/member/service/IMemberCardService.java b/ruoyi-admin/src/main/java/com/ruoyi/member/service/IMemberCardService.java index 82983db..8f34d36 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/member/service/IMemberCardService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/member/service/IMemberCardService.java @@ -21,6 +21,6 @@ public interface IMemberCardService extends IService { * @author PQZ * @date 14:24 2025/3/21 **/ - List listByUserId(Long userId); + List listByUserId(Long userId,String userType); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/member/service/impl/MemberCardServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/member/service/impl/MemberCardServiceImpl.java index 9c35f12..f2de537 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/member/service/impl/MemberCardServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/member/service/impl/MemberCardServiceImpl.java @@ -33,12 +33,13 @@ public class MemberCardServiceImpl extends ServiceImpl listByUserId(Long userId) { + public List listByUserId(Long userId,String userType) { //查询列表 LambdaUpdateWrapper lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); lambdaUpdateWrapper .eq(DlBaseEntity::getDelFlag,0) .eq(MemberCard::getUserId,userId) + .eq(MemberCard::getUserType,userType) .orderByDesc(DlBaseEntity::getCreateTime); return list(lambdaUpdateWrapper); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/member/service/impl/MemberUserServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/member/service/impl/MemberUserServiceImpl.java index cc3a50d..31ad08d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/member/service/impl/MemberUserServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/member/service/impl/MemberUserServiceImpl.java @@ -63,7 +63,7 @@ public class MemberUserServiceImpl extends ServiceImpl evaluates; + List evaluates; /**开卡记录*/ List cards; /**通告列表*/ diff --git a/ruoyi-admin/src/main/resources/mapper/busi/BusiEvaluateMapper.xml b/ruoyi-admin/src/main/resources/mapper/busi/BusiEvaluateMapper.xml index f96cc98..9e909e6 100644 --- a/ruoyi-admin/src/main/resources/mapper/busi/BusiEvaluateMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/busi/BusiEvaluateMapper.xml @@ -1,36 +1,61 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - - - - - - - - - - - - + + + + + + + + + + + + + - select id, user_id, user_type, nickname, to_user_id, to_user_type, evaluate_code, evaluate, creator, create_time, updater, update_time, del_flag from dl_busi_evaluate + select id, + user_id, + user_type, + nickname, + to_user_id, + to_user_type, + evaluate_code, + evaluate, + creator, + create_time, + updater, + update_time, + del_flag + from dl_busi_evaluate + \ No newline at end of file