Browse Source

增加入驻兽医已审核通过列表接口

master
maotiantian 1 month ago
parent
commit
3f105a804d
  1. 19
      chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVetAuditController.java
  2. 68
      chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuFeedback.java
  3. 17
      chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuFeedbackServiceImpl.java
  4. 15
      chenhai-system/src/main/resources/mapper/muhu/MuhuFeedbackMapper.xml
  5. 8
      chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml
  6. 2
      chenhai-ui/src/views/system/vet/aduit/index.vue

19
chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVetAuditController.java

@ -39,7 +39,7 @@ public class SysVetAuditController extends BaseController
/** /**
* 查询兽医信息列表审核管理专用 * 查询兽医信息列表审核管理专用
*/ */
@PreAuthorize("@ss.hasPermi('sys:vetAudit:list')")
@PreAuthorize("@ss.hasPermi('sys:vetAudit:list') or @ss.hasRole('muhu') or @ss.hasRole('vet')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(VetPersonalInfo vetPersonalInfo) public TableDataInfo list(VetPersonalInfo vetPersonalInfo)
{ {
@ -48,6 +48,21 @@ public class SysVetAuditController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询审核通过的兽医列表
* 用于前台展示已认证兽医
*/
@PreAuthorize("@ss.hasRole('muhu') or @ss.hasRole('vet')")
@GetMapping("/approved/list")
public TableDataInfo approvedList(VetPersonalInfo vetPersonalInfo)
{
startPage();
// 设置审核状态为已通过假设1表示审核通过请根据实际状态码调整
vetPersonalInfo.setAuditStatus("1");
List<VetPersonalInfo> list = vetPersonalInfoService.selectVetPersonalInfoList(vetPersonalInfo);
return getDataTable(list);
}
/** /**
* 获取兽医完整审核信息包含证书详情 * 获取兽医完整审核信息包含证书详情
*/ */
@ -129,4 +144,4 @@ public class SysVetAuditController extends BaseController
vetQualification.setAuditTime(new Date()); vetQualification.setAuditTime(new Date());
return toAjax(vetQualificationService.updateVetQualification(vetQualification)); return toAjax(vetQualificationService.updateVetQualification(vetQualification));
} }
}
}

68
chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuFeedback.java

@ -11,7 +11,7 @@ import com.chenhai.common.core.domain.BaseEntity;
/** /**
* 反馈建议对象 muhu_feedback * 反馈建议对象 muhu_feedback
*
*
* @author ruoyi * @author ruoyi
* @date 2026-02-10 * @date 2026-02-10
*/ */
@ -75,132 +75,135 @@ public class MuhuFeedback extends BaseEntity
/** 用户昵称 */ /** 用户昵称 */
private String nickName; private String nickName;
public void setId(Long id)
/** 用户头像 */
private String avatar;
public void setId(Long id)
{ {
this.id = id; this.id = id;
} }
public Long getId()
public Long getId()
{ {
return id; return id;
} }
public void setUserId(Long userId)
public void setUserId(Long userId)
{ {
this.userId = userId; this.userId = userId;
} }
public Long getUserId()
public Long getUserId()
{ {
return userId; return userId;
} }
public void setType(String type)
public void setType(String type)
{ {
this.type = type; this.type = type;
} }
public String getType()
public String getType()
{ {
return type; return type;
} }
public void setTitle(String title)
public void setTitle(String title)
{ {
this.title = title; this.title = title;
} }
public String getTitle()
public String getTitle()
{ {
return title; return title;
} }
public void setContent(String content)
public void setContent(String content)
{ {
this.content = content; this.content = content;
} }
public String getContent()
public String getContent()
{ {
return content; return content;
} }
public void setContactInfo(String contactInfo)
public void setContactInfo(String contactInfo)
{ {
this.contactInfo = contactInfo; this.contactInfo = contactInfo;
} }
public String getContactInfo()
public String getContactInfo()
{ {
return contactInfo; return contactInfo;
} }
public void setStatus(String status)
public void setStatus(String status)
{ {
this.status = status; this.status = status;
} }
public String getStatus()
public String getStatus()
{ {
return status; return status;
} }
public void setPriority(String priority)
public void setPriority(String priority)
{ {
this.priority = priority; this.priority = priority;
} }
public String getPriority()
public String getPriority()
{ {
return priority; return priority;
} }
public void setPlatform(String platform)
public void setPlatform(String platform)
{ {
this.platform = platform; this.platform = platform;
} }
public String getPlatform()
public String getPlatform()
{ {
return platform; return platform;
} }
public void setVersion(String version)
public void setVersion(String version)
{ {
this.version = version; this.version = version;
} }
public String getVersion()
public String getVersion()
{ {
return version; return version;
} }
public void setImages(String images)
public void setImages(String images)
{ {
this.images = images; this.images = images;
} }
public String getImages()
public String getImages()
{ {
return images; return images;
} }
public void setCreatedAt(Date createdAt)
public void setCreatedAt(Date createdAt)
{ {
this.createdAt = createdAt; this.createdAt = createdAt;
} }
public Date getCreatedAt()
public Date getCreatedAt()
{ {
return createdAt; return createdAt;
} }
public void setUpdatedAt(Date updatedAt)
public void setUpdatedAt(Date updatedAt)
{ {
this.updatedAt = updatedAt; this.updatedAt = updatedAt;
} }
public Date getUpdatedAt()
public Date getUpdatedAt()
{ {
return updatedAt; return updatedAt;
} }
@ -215,6 +218,16 @@ public class MuhuFeedback extends BaseEntity
return nickName; return nickName;
} }
public void setAvatar(String avatar)
{
this.avatar = avatar;
}
public String getAvatar()
{
return avatar;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -232,6 +245,7 @@ public class MuhuFeedback extends BaseEntity
.append("createdAt", getCreatedAt()) .append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt()) .append("updatedAt", getUpdatedAt())
.append("nickName", getNickName()) .append("nickName", getNickName())
.append("avatar",getAvatar())
.toString(); .toString();
} }
} }

17
chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuFeedbackServiceImpl.java

@ -14,19 +14,19 @@ import com.chenhai.muhu.service.IMuhuFeedbackService;
/** /**
* 反馈建议Service业务层处理 * 反馈建议Service业务层处理
*
*
* @author ruoyi * @author ruoyi
* @date 2026-02-10 * @date 2026-02-10
*/ */
@Service @Service
public class MuhuFeedbackServiceImpl implements IMuhuFeedbackService
public class MuhuFeedbackServiceImpl implements IMuhuFeedbackService
{ {
@Autowired @Autowired
private MuhuFeedbackMapper muhuFeedbackMapper; private MuhuFeedbackMapper muhuFeedbackMapper;
/** /**
* 查询反馈建议 * 查询反馈建议
*
*
* @param id 反馈建议主键 * @param id 反馈建议主键
* @return 反馈建议 * @return 反馈建议
*/ */
@ -38,7 +38,7 @@ public class MuhuFeedbackServiceImpl implements IMuhuFeedbackService
/** /**
* 查询反馈建议列表 * 查询反馈建议列表
*
*
* @param muhuFeedback 反馈建议 * @param muhuFeedback 反馈建议
* @return 反馈建议 * @return 反馈建议
*/ */
@ -50,7 +50,7 @@ public class MuhuFeedbackServiceImpl implements IMuhuFeedbackService
/** /**
* 新增反馈建议 * 新增反馈建议
*
*
* @param muhuFeedback 反馈建议 * @param muhuFeedback 反馈建议
* @return 结果 * @return 结果
*/ */
@ -65,6 +65,7 @@ public class MuhuFeedbackServiceImpl implements IMuhuFeedbackService
// 自动设置用户ID和昵称 // 自动设置用户ID和昵称
muhuFeedback.setUserId(user.getUserId()); muhuFeedback.setUserId(user.getUserId());
muhuFeedback.setNickName(user.getNickName()); muhuFeedback.setNickName(user.getNickName());
muhuFeedback.setAvatar(user.getAvatar());
} else { } else {
// 如果没有登录用户可以根据需要设置默认值或抛出异常 // 如果没有登录用户可以根据需要设置默认值或抛出异常
throw new RuntimeException("用户未登录,无法提交反馈"); throw new RuntimeException("用户未登录,无法提交反馈");
@ -81,7 +82,7 @@ public class MuhuFeedbackServiceImpl implements IMuhuFeedbackService
/** /**
* 修改反馈建议 * 修改反馈建议
*
*
* @param muhuFeedback 反馈建议 * @param muhuFeedback 反馈建议
* @return 结果 * @return 结果
*/ */
@ -93,7 +94,7 @@ public class MuhuFeedbackServiceImpl implements IMuhuFeedbackService
/** /**
* 批量删除反馈建议 * 批量删除反馈建议
*
*
* @param ids 需要删除的反馈建议主键 * @param ids 需要删除的反馈建议主键
* @return 结果 * @return 结果
*/ */
@ -105,7 +106,7 @@ public class MuhuFeedbackServiceImpl implements IMuhuFeedbackService
/** /**
* 删除反馈建议信息 * 删除反馈建议信息
*
*
* @param id 反馈建议主键 * @param id 反馈建议主键
* @return 结果 * @return 结果
*/ */

15
chenhai-system/src/main/resources/mapper/muhu/MuhuFeedbackMapper.xml

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chenhai.muhu.mapper.MuhuFeedbackMapper"> <mapper namespace="com.chenhai.muhu.mapper.MuhuFeedbackMapper">
<resultMap type="MuhuFeedback" id="MuhuFeedbackResult"> <resultMap type="MuhuFeedback" id="MuhuFeedbackResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="userId" column="user_id" /> <result property="userId" column="user_id" />
@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createdAt" column="created_at" /> <result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" /> <result property="updatedAt" column="updated_at" />
<result property="nickName" column="nick_name" /> <result property="nickName" column="nick_name" />
<result property="avatar" column="avatar"/>
</resultMap> </resultMap>
<!-- 修改为关联查询 --> <!-- 修改为关联查询 -->
@ -37,14 +38,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f.images, f.images,
f.created_at, f.created_at,
f.updated_at, f.updated_at,
u.nick_name <!-- 从sys_user表关联查询昵称 -->
u.nick_name, <!-- 从sys_user表关联查询昵称 -->
u.avatar
from muhu_feedback f from muhu_feedback f
left join sys_user u on f.user_id = u.user_id left join sys_user u on f.user_id = u.user_id
</sql> </sql>
<select id="selectMuhuFeedbackList" parameterType="MuhuFeedback" resultMap="MuhuFeedbackResult"> <select id="selectMuhuFeedbackList" parameterType="MuhuFeedback" resultMap="MuhuFeedbackResult">
<include refid="selectMuhuFeedbackVo"/> <include refid="selectMuhuFeedbackVo"/>
<where>
<where>
<if test="userId != null "> and user_id = #{userId}</if> <if test="userId != null "> and user_id = #{userId}</if>
<if test="type != null and type != ''"> and type = #{type}</if> <if test="type != null and type != ''"> and type = #{type}</if>
<if test="title != null and title != ''"> and title = #{title}</if> <if test="title != null and title != ''"> and title = #{title}</if>
@ -58,9 +60,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdAt != null "> and created_at = #{createdAt}</if> <if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if> <if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if> <if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
<if test="avatar != null "> and avatar = #{avatar}</if>
</where> </where>
</select> </select>
<select id="selectMuhuFeedbackById" parameterType="Long" resultMap="MuhuFeedbackResult"> <select id="selectMuhuFeedbackById" parameterType="Long" resultMap="MuhuFeedbackResult">
<include refid="selectMuhuFeedbackVo"/> <include refid="selectMuhuFeedbackVo"/>
where id = #{id} where id = #{id}
@ -122,9 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteMuhuFeedbackByIds" parameterType="String"> <delete id="deleteMuhuFeedbackByIds" parameterType="String">
delete from muhu_feedback where id in
delete from muhu_feedback where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper>
</mapper>

8
chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml

@ -82,7 +82,11 @@
<if test="iphone != null and iphone != ''"> and v.iphone like concat('%', #{iphone}, '%')</if> <if test="iphone != null and iphone != ''"> and v.iphone like concat('%', #{iphone}, '%')</if>
<if test="expertType != null and expertType != ''"> and v.expert_type = #{expertType}</if> <if test="expertType != null and expertType != ''"> and v.expert_type = #{expertType}</if>
<if test="email != null and email != ''"> and v.email = #{email}</if> <if test="email != null and email != ''"> and v.email = #{email}</if>
<if test="specialty != null and specialty != ''"> and v.specialty like concat('%', #{specialty}, '%')</if>
<!-- 添加审核状态条件 -->
<if test="auditStatus != null and auditStatus != ''">
and v.audit_status = #{auditStatus}
</if>
<!-- 用户表条件 --> <!-- 用户表条件 -->
<if test="user != null"> <if test="user != null">
@ -219,4 +223,4 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper>
</mapper>

2
chenhai-ui/src/views/system/vet/aduit/index.vue

@ -107,7 +107,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="身份证号" align="center" prop="idCard" width="200px"/> <el-table-column label="身份证号" align="center" prop="idCard" width="200px"/>
<!-- <el-table-column label="擅长领域" align="center" prop="specialty" width="300px" :show-overflow-tooltip="true"/>-->
<el-table-column label="擅长领域" align="center" prop="specialty" width="300px" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="工作经验" align="center" prop="workExperience" width="100px"/>--> <!-- <el-table-column label="工作经验" align="center" prop="workExperience" width="100px"/>-->
<el-table-column label="职称" align="center" prop="title" width="200px"/> <el-table-column label="职称" align="center" prop="title" width="200px"/>
<el-table-column label="联系电话" align="center" prop="phone" width="200px"/> <el-table-column label="联系电话" align="center" prop="phone" width="200px"/>

Loading…
Cancel
Save