From 8b54538f4beb6f5dd5f9240aa3f4305aff023532 Mon Sep 17 00:00:00 2001 From: xs Date: Mon, 6 Jan 2025 10:56:27 +0800 Subject: [PATCH] =?UTF-8?q?3.0.8=20=E9=97=A8=E6=88=B7=E7=BD=91=E7=AB=99?= =?UTF-8?q?=E7=AE=A1=E7=90=86=EF=BC=9A=E5=85=B3=E4=BA=8E=E6=88=91=E4=BB=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E3=80=81=E5=85=B3=E4=BA=8E=E6=88=91=E4=BB=AC?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E3=80=81=E8=81=94=E7=B3=BB=E6=88=91=E4=BB=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/controller/HwPortalController.java | 2 + .../impl/HwContactUsInfoServiceImpl.java | 1 + .../portal/HwAboutUsInfoDetailMapper.xml | 4 +- .../mapper/portal/HwAboutUsInfoMapper.xml | 4 +- .../mapper/portal/HwContactUsInfoMapper.xml | 6 +- .../src/views/portal/aboutUsInfo/index.vue | 57 +++++++++++++------ .../views/portal/aboutUsInfoDetail/index.vue | 27 ++------- .../src/views/portal/contactUsInfo/index.vue | 12 +--- 8 files changed, 58 insertions(+), 55 deletions(-) diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwPortalController.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwPortalController.java index 091c75e..c1224a8 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwPortalController.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwPortalController.java @@ -1,5 +1,6 @@ package com.ruoyi.portal.controller; +import com.ruoyi.common.core.utils.ip.IpUtils; import com.ruoyi.common.core.web.controller.BaseController; import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.page.TableDataInfo; @@ -102,6 +103,7 @@ public class HwPortalController extends BaseController @PostMapping("/addContactUsInfo") public AjaxResult addContactUsInfo(@RequestBody HwContactUsInfo hwContactUsInfo) { + hwContactUsInfo.setUserIp(IpUtils.getIpAddr()); return toAjax(hwContactUsInfoService.insertHwContactUsInfo(hwContactUsInfo)); } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwContactUsInfoServiceImpl.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwContactUsInfoServiceImpl.java index b2c3776..c647d9f 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwContactUsInfoServiceImpl.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwContactUsInfoServiceImpl.java @@ -54,6 +54,7 @@ public class HwContactUsInfoServiceImpl implements IHwContactUsInfoService @Override public int insertHwContactUsInfo(HwContactUsInfo hwContactUsInfo) { + hwContactUsInfo.setCreateTime(DateUtils.getNowDate()); return hwContactUsInfoMapper.insertHwContactUsInfo(hwContactUsInfo); } diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwAboutUsInfoDetailMapper.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwAboutUsInfoDetailMapper.xml index deabefe..86c769a 100644 --- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwAboutUsInfoDetailMapper.xml +++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwAboutUsInfoDetailMapper.xml @@ -25,8 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and about_us_info_id = #{aboutUsInfoId} - and us_info_detail_title = #{usInfoDetailTitle} - and us_info_detail_desc = #{usInfoDetailDesc} + and us_info_detail_title like concat('%', #{usInfoDetailTitle}, '%') + and us_info_detail_desc like concat('%', #{usInfoDetailDesc}, '%') and us_info_detail_order = #{usInfoDetailOrder} and us_info_detail_pic = #{usInfoDetailPic} diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwAboutUsInfoMapper.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwAboutUsInfoMapper.xml index 5df8e47..935cf71 100644 --- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwAboutUsInfoMapper.xml +++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwAboutUsInfoMapper.xml @@ -27,8 +27,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and about_us_info_type = #{aboutUsInfoType} - and about_us_info_title = #{aboutUsInfoTitle} - and about_us_info_desc = #{aboutUsInfoDesc} + and about_us_info_title like concat('%', #{aboutUsInfoTitle }, '%') + and about_us_info_desc like concat('%', #{aboutUsInfoDesc}, '%') and about_us_info_order = #{aboutUsInfoOrder} and about_us_info_pic = #{aboutUsInfoPic} diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwContactUsInfoMapper.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwContactUsInfoMapper.xml index 055adc4..c257d97 100644 --- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwContactUsInfoMapper.xml +++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwContactUsInfoMapper.xml @@ -25,9 +25,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and user_name like concat('%', #{userName}, '%') - and user_email = #{userEmail} - and user_phone = #{userPhone} - and user_ip = #{userIp} + and user_email like concat('%', #{userEmail}, '%') + and user_phone like concat('%', #{userPhone}, '%') + and user_ip like concat('%', #{userIp}, '%') diff --git a/ruoyi-ui/src/views/portal/aboutUsInfo/index.vue b/ruoyi-ui/src/views/portal/aboutUsInfo/index.vue index 305729c..8da41dc 100644 --- a/ruoyi-ui/src/views/portal/aboutUsInfo/index.vue +++ b/ruoyi-ui/src/views/portal/aboutUsInfo/index.vue @@ -25,14 +25,6 @@ @keyup.enter.native="handleQuery" /> - - - 搜索 重置 @@ -88,13 +80,25 @@ - + + + - - + + + + + +