Просмотр исходного кода

Merge branch 'cpq-dev' of wangfan/adweb3-server into master

chenpeiqing 5 месяцев назад
Родитель
Сommit
40c22f6f54
17 измененных файлов с 1409 добавлено и 3 удалено
  1. 158 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/common/constant/CompConstants.java
  2. 83 2
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/common/util/DateUtil.java
  3. 31 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/config/RocketMQConfig.java
  4. 338 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebEnquiryController.java
  5. 31 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/dto/param/AdmpEnquirySearchDto.java
  6. 26 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/dto/param/EnquiryListSearchDto.java
  7. 103 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/dto/result/AdmpEnquiryListDto.java
  8. 17 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/dto/result/EnquirySpecialFields.java
  9. 298 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/entity/AdwebEnquiry.java
  10. 41 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/mapper/AdwebEnquiryMapper.java
  11. 113 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/mapper/xml/AdwebEnquiryMapper.xml
  12. 14 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/IAdwebEnquiryService.java
  13. 19 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryServiceImpl.java
  14. 9 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/IAdwebSiteService.java
  15. 13 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/impl/AdwebSiteServiceImpl.java
  16. 19 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/SysAdwebApi.java
  17. 96 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/SysAdwebApiImpl.java

+ 158 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/common/constant/CompConstants.java

@@ -0,0 +1,158 @@
+package org.jeecg.modules.adweb.common.constant;
+
+/**
+ * @Author: 汤星鹏, Jeecg
+ * @Description: 物料收集常量
+ * @Date: 2020/4/2 10:04
+ */
+public class CompConstants {
+    /**
+     * 临时公告分类code
+     */
+    public static final String INTERIM_ANNOUNCEMENT = "interimAnnouncement";
+    /**
+     * 交流园地文章
+     */
+    public static final String CORNER = "corner";
+    /**
+     * 物料收集类别字典表catalog
+     */
+    public static final String SITE_COMP_CATALOG = "site_comp_catalog";
+    /**
+     * 物料收集添加失败
+     */
+    public static final String COMP_ADD_FAIL = "添加失败";
+    /**
+     * 物料收集字典表catalog头部分,用于拼接catalogCode查询属性名称,如:"site_code_baseInfo"
+     */
+    public static final String SITE_COMP_HEAD = "site_comp_";
+    /**
+     * 产品
+     */
+    public static final String PRODUCT = "product";
+    /**
+     * 基础信息
+     */
+    public static final String BASEINFO = "baseInfo";
+    /**
+     * 内容
+     */
+    public static final String NEWS = "news";
+    /**
+     * 荣誉资质
+     */
+    public static final String HONNOR = "honor";
+    /**
+     * 服务保障
+     */
+    public static final String SERVICE_ASSURANCE="serviceGuarantee";
+    /**
+     * 内容分类
+     */
+    public static final String NEWS_CATALOG = "newsCatalog";
+    /**
+     * 社交媒体
+     */
+    public static final String SOCIAL_MEDIA = "socialMedia";
+    /**
+     * 产品分类
+     */
+    public static final String PRODUCT_CATALOG = "productCatalog";
+    /**
+     * 客户评价
+     */
+    public static final String CUSTOMS_FEEDBACK = "customerReviews";
+    /**
+     * 合作商
+     */
+    public static final String C00PERATIVE_PARTNER = "partner";
+    /**
+     * 首页焦点图
+     */
+    public static final String HOMEPAGE_FOCUS = "homeFocusMap";
+
+    /**
+     * 其他页面的banner图
+     */
+    public static final String BANNERPRODUCTS = "banner-products";
+    public static final String BANNERPABOUTUS = "'banner-aboutUs'";
+    public static final String BANNERNEWS = "banner-news";
+    public static final String BANNERPQUESTION = "banner-question";
+    public static final String BANNERPCONTACTUS = "banner-contactUs";
+    public static final String BANNERPJOINUS = "banner-joinUs";
+    /**
+     * FAQ
+     */
+    public static final String FREQUENT_ASKED_QUESTION = "FAQ";
+    /**
+     * 参展信息
+     */
+    public static final String EXHIBITION_INFO = "exhibitionInfo";
+    /**
+     * 物流包装付款
+     */
+    public static final String LOGISTICS_PACKAGE_PAYMENT  = "logisticsPackagingPayment";
+    /**
+     * 公司风采
+     */
+    public static final String COMPANY_APPEARANCE = "enterpriseStyle";
+    /**
+     * 地图
+     */
+    public static final String MAP = "map";
+    /**
+     * 优势数据
+     */
+    public static final String ADVANTAGEDATA = "advantageData";
+    /**
+     * 多语言
+     */
+    public static final String ADWEB_LANGUAGE = "adweb_language";
+    /**
+     * 站点状态
+     */
+    public static final String SITE_STATUS = "site_status";
+    /**
+     * 站点运行状态
+     */
+    public static final String SITE_RUM_STATUS = "site_run_status";
+    /**
+     * 缓存前缀
+     */
+    public static final String CACHE_PREFIX = "AdWeb3::";
+
+    //询盘阶段,字典条目
+    public static final String ENQUIRY_PHASE = "enquiry_phase";
+    //询盘跟进状态,字典条目
+    public static final String ENQUIRY_TRACK_STATUS = "enquiry_track_status";
+    //询盘用户有效性,字典条目
+    public static final String ADMP_ENQUIRY_EFFECTIVE = "admp_enquiry_effective";
+    //询盘回复状态,字典条目
+    public static final String ENQUIRY_REPLAY_STATUS = "enquiry_replay_status";
+    //ADMP dictService
+    public static final String ADMP_CUSTOMER_ORDER_CURRENCY = "admp_customer_order_currency";
+
+    public static final String ADMP_ENQUIRY_PARAM_NAME = "admp_enquiry_param_name";
+    public static final String ADMP_ENQUIRY_PARAM_EMAIL = "admp_enquiry_param_email";
+    public static final String ADMP_ENQUIRY_PARAM_PHONE = "admp_enquiry_param_phone";
+    public static final String ADMP_ENQUIRY_PARAM_MESSAGE = "admp_enquiry_param_message";
+    public static final String ADMP_ENQUIRY_PARAM_COMPANY = "admp_enquiry_param_company";
+    public static final String ADMP_ENQUIRY_PARAM_FROM_PAGE = "admp_enquiry_param_from_page";
+
+    /**
+     * 页面code
+     */
+    public static final String HOME_PAGE_CODE = "home";
+    public static final String ABOUT_US_PAGE_CODE = "aboutUs";
+    public static final String PRODUCTS_PAGE_CODE = "products";
+    public static final String PRODUCT_DETAIL_PAGE_CODE = "productDetail";
+    public static final String NEWS_PAGE_CODE = "news";
+    public static final String NEWS_DETAIL_PAGE_CODE = "newsDetail";
+    public static final String CONTACT_US_PAGE_CODE = "contactUs";
+    public static final String FAQ_PAGE_CODE = "faq";
+
+    /**
+     * 模板标签
+     */
+    public static final String TEMPLATE_TAGS = "template_tags";
+}

+ 83 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/common/util/DateUtil.java

@@ -1,8 +1,13 @@
 package org.jeecg.modules.adweb.common.util;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.StringUtils;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.time.ZoneId;
-import java.util.Calendar;
-import java.util.Date;
+import java.util.*;
 
 /**
  * AdWeb时间工具类
@@ -22,4 +27,80 @@ public class DateUtil {
         calendar.add(Calendar.DAY_OF_MONTH, daysToAdd);
         return calendar.getTime();
     }
+
+    /**
+     * 特殊时间数据处理
+     *
+     * @param dateType 时间
+     */
+    public static Map<String, Date> dealDateType(String dateType) {
+        Date now = new Date();
+        Date start = null;
+        Date end = null;
+        if ("yesterday".equals(dateType)) {
+            start = getTodayZeroTime(DateUtil.addDay2(now, -1));
+            end = getTodayZeroTime(now);
+        }
+        if ("today".equals(dateType)) {
+            start = getTodayZeroTime(now);
+            end = getTomZeroTime(now);
+        }
+        if ("sevenDay".equals(dateType)) {
+            end = getTomZeroTime(now);
+            start = addDay2(end, -7);
+        }
+        if ("thirtyDay".equals(dateType)) {
+            end = getTomZeroTime(now);
+            start = addDay2(end, -30);
+        }
+        Map<String, Date> map = new HashMap<>();
+        map.put("start", start);
+        map.put("end", end);
+        return map;
+    }
+
+    /**
+     * 获取当日零点
+     * @param date
+     * @return
+     */
+    public static Date getTodayZeroTime(Date date) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        calendar.set(Calendar.MILLISECOND, 0);
+        return calendar.getTime();
+    }
+
+    /**
+     * 获取明日零点
+     * @param date
+     * @return
+     */
+    public static Date getTomZeroTime(Date date) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        calendar.set(Calendar.MILLISECOND, 0);
+        calendar.add(Calendar.DAY_OF_MONTH, 1);
+        return calendar.getTime();
+    }
+
+    /**
+     * 在当前日期上追加N天
+     * @param date 当前日期
+     * @param num 添加天数
+     * @return 日期字符串形式
+     */
+    public static Date addDay2(Date date, int num) {
+        Calendar c = Calendar.getInstance();
+        c.setTime(date);
+        c.add(Calendar.DAY_OF_MONTH, num);
+        return c.getTime();
+    }
 }
+

+ 31 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/config/RocketMQConfig.java

@@ -0,0 +1,31 @@
+package org.jeecg.modules.adweb.config;
+
+import org.apache.rocketmq.client.producer.DefaultMQProducer;
+import org.apache.rocketmq.spring.core.RocketMQTemplate;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class RocketMQConfig {
+
+    @Value("${rocketmq.producer.group}")
+    private String producerGroup;
+
+    @Value("${rocketmq.name-server}")
+    private String nameServer;
+
+    /**
+     * 由于使用的Spring版本是3.0.0以上,与rocketMq不是很兼容,对于rocketMqTemplate
+     * 的自动注入存在差异,如果不采用这种方式注入则会报出缺少bean的信息
+     */
+    @Bean("RocketMQTemplate")
+    public RocketMQTemplate rocketMqTemplate(){
+        RocketMQTemplate rocketMqTemplate = new RocketMQTemplate();
+        DefaultMQProducer defaultMqProducer = new DefaultMQProducer();
+        defaultMqProducer.setProducerGroup(producerGroup);
+        defaultMqProducer.setNamesrvAddr(nameServer);
+        rocketMqTemplate.setProducer(defaultMqProducer);
+        return rocketMqTemplate;
+    }
+}

+ 338 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebEnquiryController.java

@@ -0,0 +1,338 @@
+package org.jeecg.modules.adweb.enquiry.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.apache.rocketmq.spring.core.RocketMQTemplate;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.vo.DictModel;
+import org.jeecg.common.system.vo.DictPropertyModel;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.FastJsonUtil;
+import org.jeecg.modules.adweb.common.constant.CompConstants;
+import org.jeecg.modules.adweb.common.util.DateUtil;
+import org.jeecg.modules.adweb.common.util.ListUtil;
+import org.jeecg.modules.adweb.enquiry.dto.param.AdmpEnquirySearchDto;
+import org.jeecg.modules.adweb.enquiry.dto.param.EnquiryListSearchDto;
+import org.jeecg.modules.adweb.enquiry.dto.result.AdmpEnquiryListDto;
+import org.jeecg.modules.adweb.enquiry.dto.result.EnquirySpecialFields;
+import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiry;
+import org.jeecg.modules.adweb.enquiry.mapper.AdwebEnquiryMapper;
+import org.jeecg.modules.adweb.enquiry.service.IAdwebEnquiryService;
+import org.jeecg.modules.adweb.site.entity.AdwebSite;
+import org.jeecg.modules.adweb.site.service.IAdwebSiteService;
+import org.jeecg.modules.adweb.site.service.ISiteUserPermissionService;
+import org.jeecg.modules.adweb.system.service.SysAdwebApi;
+import org.jeecg.modules.system.service.ISysDictService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: 询盘信息存储表单
+ * @Author: jeecg-boot
+ * @Date: 2024-10-12
+ * @Version: V1.0
+ */
+@Tag(name = "询盘信息存储表单")
+@RestController
+@RequestMapping("/adweb/adwebEnquiry")
+@Slf4j
+public class AdwebEnquiryController extends JeecgController<AdwebEnquiry, IAdwebEnquiryService> {
+    @Autowired
+    private IAdwebEnquiryService adwebEnquiryService;
+
+    @Value("${enquiry.demoFlag:false}")
+    private Boolean demoFlag;
+
+    @Resource
+    private RocketMQTemplate rocketMQTemplate;
+
+    @Resource
+    private AdwebEnquiryMapper adwebEnquiryMapper;
+
+    @Autowired
+    private SysAdwebApi sysAdwebApi;
+
+    @Autowired
+    private IAdwebSiteService adwebSiteService;
+
+    @Autowired
+    private ISiteUserPermissionService siteUserPermissionService;
+
+    @Autowired
+    private ISysDictService sysDictService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param searchDto
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "询盘信息存储表单-分页列表查询")
+    @Operation(summary = "询盘信息存储表单-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<?> queryPageList(EnquiryListSearchDto searchDto,
+                                                     @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                   String principalUid) {
+//
+//		String message = "Hello World";
+//		rocketMQTemplate.convertAndSend("TEST", message);
+//		System.out.println("Message sent: " + message);
+
+        if (sysAdwebApi.isNotOwnSite(searchDto.getSiteId())) {
+            return Result.OK(new Page<>());
+        }
+
+        Page<AdmpEnquirySearchDto> page = new Page<> (pageNo, pageSize);
+		LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+		List<String> codeList = null;
+        List<String> uidList = null;
+
+        if (sysAdwebApi.isAdmin()) {
+
+        } else if (sysAdwebApi.isOem()) {
+            uidList = sysAdwebApi.getOemGroupUids();
+        } else {
+            uidList = new ArrayList<>();
+            uidList.add(sysUser.getId());
+        }
+        List<String> siteCodeList = null;
+        if (ListUtil.notEmpty(uidList)) {
+            siteCodeList = siteUserPermissionService.getSiteCodeListByUids(uidList);
+        }
+
+        if (searchDto.getSiteId() != null) {
+            String siteCode = adwebSiteService.getSiteCodeById(searchDto.getSiteId());
+            if (StringUtils.isNotBlank(siteCode)) {
+                QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
+                queryWrapper.eq("id", searchDto.getSiteId()).or().eq("parent_group_code", siteCode);
+                queryWrapper.ne("status", 0);
+                queryWrapper.in(!sysAdwebApi.isAdmin(), "code", siteCodeList);
+                codeList = adwebSiteService.list(queryWrapper).stream().map(AdwebSite::getCode).collect(Collectors.toList());
+            }
+        } else {
+            codeList = siteCodeList;
+        }
+
+
+		String dateType = searchDto.getDateType();
+		Date start = searchDto.getStart();
+		Date end = searchDto.getEnd();
+		if (StringUtils.isNotBlank(dateType)) {
+			Map<String, Date> map = DateUtil.dealDateType(dateType);
+			start = map.get("start");
+			end = map.get("end");
+		} else {
+			if (end != null) {
+				end = DateUtil.addDay2(end, 1);
+			}
+		}
+		if(ListUtil.isEmpty(codeList)){
+			return Result.OK(page);
+		}
+
+		String selfPrincipalUid = null;
+		if (sysAdwebApi.isAdwebSubVip()) {
+			selfPrincipalUid = sysUser.getId();
+		}
+
+		String userEfftecive = "(" + searchDto.getUserEffective() + ")";
+
+
+        IPage<AdmpEnquiryListDto> pageList = adwebEnquiryMapper.selectAdmpEnquiryList(page, codeList, userEfftecive, searchDto.getWasteEnquiryType(),
+                searchDto.getSearchText(), searchDto.getSearchContent(), start, end, searchDto.getWhatsApp(), searchDto.getReadStatus(), principalUid, selfPrincipalUid);
+
+        if (ListUtil.notEmpty(pageList.getRecords())) {
+            dealInfo(pageList.getRecords());
+        }
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 处理询盘列表结果集
+     * @param enquiryList
+     */
+    private void dealInfo(List<AdmpEnquiryListDto> enquiryList) {
+        if (ListUtil.isEmpty(enquiryList)) {
+            return;
+        }
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        List<DictModel> userEffectiveDict = sysDictService.queryDictItemsByCode(CompConstants.ADMP_ENQUIRY_EFFECTIVE);
+        AtomicInteger atomicInteger = new AtomicInteger();
+
+        enquiryList.forEach(enquiry -> {
+            // 来源页面如果以 / 结尾,去掉最后一个字符
+            String fromPage = enquiry.getFromPage();
+            if (StringUtils.isNotBlank(fromPage)) {
+                if (fromPage.endsWith("/")) {
+                    enquiry.setFromPage(fromPage.substring(0, fromPage.length() - 1));
+                }
+            }
+            atomicInteger.getAndIncrement();
+            enquiry.setDataIndex(atomicInteger.get());
+
+            // 示例关键信息脱敏
+            if(demoFlag){
+                enquiry.setFormCompany("**********");
+                enquiry.setFromEmail("**********");
+                enquiry.setWhatsApp("**********");
+                enquiry.setPhone("**********");
+                String siteName = enquiry.getSiteName();
+                enquiry.setSiteName(siteName.substring(0,2)+"**********"+siteName.substring(siteName.length()-2));
+            }
+
+            /**********************字典数据处理***********************/
+            if (ListUtil.notEmpty(userEffectiveDict)) {
+                userEffectiveDict.forEach(dict -> {
+                    if (dict.getValue().equals(enquiry.getUserEffective() + "")) {
+                        enquiry.setUserEffectiveStr(dict.getLabel());
+                    }
+                });
+            }
+
+            // 询盘中用户自定义的字段处理
+            if(StringUtils.isNotBlank(enquiry.getSpecialField())){
+                List<EnquirySpecialFields> specialFieldsList = FastJsonUtil.parseList(enquiry.getSpecialField(), EnquirySpecialFields.class);
+                enquiry.setSpecialFieldList(specialFieldsList);
+                enquiry.setSpecialField(null);
+            }
+
+            if(StringUtils.isNotBlank(enquiry.getContext())){
+                String context = enquiry.getContext();
+                Pattern CRLF = Pattern.compile("(\r\n|\r|\n|\n\r)");
+                Matcher m = CRLF.matcher(context);
+                if (m.find()) {
+                    context = m.replaceAll("<br/>");
+                }
+                enquiry.setContext(context);
+            }
+        });
+    }
+
+    /**
+     * 添加
+     *
+     * @param adwebEnquiry
+     * @return
+     */
+    @AutoLog(value = "询盘信息存储表单-添加")
+    @Operation(summary = "询盘信息存储表单-添加")
+    @PreAuthorize("@jps.requiresPermissions('adweb:adweb_enquiry:add')")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody AdwebEnquiry adwebEnquiry) {
+        adwebEnquiryService.save(adwebEnquiry);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param adwebEnquiry
+     * @return
+     */
+    @AutoLog(value = "询盘信息存储表单-编辑")
+    @Operation(summary = "询盘信息存储表单-编辑")
+    @PreAuthorize("@jps.requiresPermissions('adweb:adweb_enquiry:edit')")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody AdwebEnquiry adwebEnquiry) {
+        adwebEnquiryService.updateById(adwebEnquiry);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "询盘信息存储表单-通过id删除")
+    @Operation(summary = "询盘信息存储表单-通过id删除")
+    @PreAuthorize("@jps.requiresPermissions('adweb:adweb_enquiry:delete')")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        adwebEnquiryService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "询盘信息存储表单-批量删除")
+    @Operation(summary = "询盘信息存储表单-批量删除")
+    @PreAuthorize("@jps.requiresPermissions('adweb:adweb_enquiry:deleteBatch')")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.adwebEnquiryService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "询盘信息存储表单-通过id查询")
+    @Operation(summary = "询盘信息存储表单-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<AdwebEnquiry> queryById(@RequestParam(name = "id", required = true) String id) {
+        AdwebEnquiry adwebEnquiry = adwebEnquiryService.getById(id);
+        if (adwebEnquiry == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(adwebEnquiry);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param adwebEnquiry
+     */
+    @PreAuthorize("@jps.requiresPermissions('adweb:adweb_enquiry:exportXls')")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, AdwebEnquiry adwebEnquiry) {
+        return super.exportXls(request, adwebEnquiry, AdwebEnquiry.class, "询盘信息存储表单");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @PreAuthorize("@jps.requiresPermissions('adweb:adweb_enquiry:importExcel')")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, AdwebEnquiry.class);
+    }
+
+}

+ 31 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/dto/param/AdmpEnquirySearchDto.java

@@ -0,0 +1,31 @@
+package org.jeecg.modules.adweb.enquiry.dto.param;
+
+import lombok.Data;
+
+@Data
+public class AdmpEnquirySearchDto {
+    //询盘模块类型
+    private String modular;
+    //阶段
+    private String phase;
+    //跟进状态
+    private String trackStatus;
+    //跟进人id
+    private Long tracker;
+    //是否系统有效
+    private Integer isSysEffective;
+    //获取回复状态
+    private String replayStatus;
+    //获取用户有效性
+    private Integer userEffective;
+    private String siteCode;
+    private Integer siteId;
+    private String searchText;
+    private String ctimeBegin;
+    private String ctimeEnd;
+
+
+    private String whatsApp;
+
+    private String wasteEnquiryType;
+}

+ 26 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/dto/param/EnquiryListSearchDto.java

@@ -0,0 +1,26 @@
+package org.jeecg.modules.adweb.enquiry.dto.param;
+
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+public class EnquiryListSearchDto {
+    private Integer siteId;
+    private String searchText;
+    private String searchContent;
+    private String userEffective;
+    private String wasteEnquiryType;
+    private Integer readStatus;
+    private String dateType;
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date start;
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date end;
+    private String whatsApp;
+    private String ip;
+    private String email;
+    private String keyword;
+    private String type;
+}

+ 103 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/dto/result/AdmpEnquiryListDto.java

@@ -0,0 +1,103 @@
+package org.jeecg.modules.adweb.enquiry.dto.result;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class AdmpEnquiryListDto {
+    @JsonSerialize(using= ToStringSerializer.class)
+    private Long id;
+    //询盘编号(系统生成)
+    private String no;
+    private String noOut;
+    //询盘创建时间(发起时间)
+    private Date recordCtime;
+    //询盘业务模块
+    private String modular;
+    //询盘联系人
+    private String contact;
+    //询盘内容
+    private String context;
+    //询盘发送邮箱
+    private String fromEmail;
+    //国家/地区
+    private String country;
+    //发送询盘的站点
+    private String siteHost;
+    //用户有效性
+    private Integer userEffective;
+    //回复状态
+    private String replayStatus;
+    private Integer status;
+    private Integer siteId;
+    private String siteCode;
+
+    private List<String> job;
+    // 简历路径
+    private String path;
+    /**
+     * 后台处理字段
+     */
+
+    //来源页面
+    private String fromPage;
+    //电话
+    private String phone;
+    //表单公司
+    private String formCompany;
+    //用户有效性
+    private String userEffectiveStr;
+    //敏感词
+    private String sensitiveMessage;
+    //系统有效性
+    private Integer sysEffective;
+    private String siteName;
+    private String transContent;
+    private String cartItems;
+
+    /**
+     * 用于前端默认展示第一行数据
+     */
+    private Integer dataIndex;
+
+    private String whatsApp;
+
+    private String wasteEnquiry;
+
+    private String countryName;
+
+    private String countryCode;
+
+    private Integer readStatus;
+
+    private String fromIp;
+
+    private String customerIp;
+
+    private String visitId;
+
+    private String principalUid;
+
+    /**
+     * 特殊字段名
+     */
+    private String specialField;
+
+    private List<EnquirySpecialFields> specialFieldList;
+
+    /**
+     * 疑似垃圾询盘理由
+     */
+    private String effectiveReason;
+
+    /**
+     * 询盘来源插件名称
+     */
+    private String pluginName;
+
+    private String wasteEnquiryType;
+}

+ 17 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/dto/result/EnquirySpecialFields.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.adweb.enquiry.dto.result;
+
+import lombok.Data;
+
+@Data
+public class EnquirySpecialFields {
+
+    /**
+     * 特殊字段名
+     */
+    private String field;
+
+    /**
+     * 特殊字段值
+     */
+    private String value;
+}

+ 298 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/entity/AdwebEnquiry.java

@@ -0,0 +1,298 @@
+package org.jeecg.modules.adweb.enquiry.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 询盘信息存储表单
+ * @Author: jeecg-boot
+ * @Date:   2024-10-12
+ * @Version: V1.0
+ */
+@Data
+@TableName("adweb_enquiry")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="询盘信息存储表单")
+public class AdwebEnquiry implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**主键ID*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @Schema(description = "主键ID")
+    private Long id;
+	/**询盘单号、根据系统规定生成*/
+	@Excel(name = "询盘单号、根据系统规定生成", width = 15)
+    @Schema(description = "询盘单号、根据系统规定生成")
+    private String no;
+	/**询盘来源IP*/
+	@Excel(name = "询盘来源IP", width = 15)
+    @Schema(description = "询盘来源IP")
+    private String fromIp;
+	/**询盘发送者邮箱账号*/
+	@Excel(name = "询盘发送者邮箱账号", width = 15)
+    @Schema(description = "询盘发送者邮箱账号")
+    private String fromEmail;
+	/**询盘模块:admp_web:admp网站询盘 ;email:邮件询盘  ;diy_element:自定义组件询盘*/
+	@Excel(name = "询盘模块:admp_web:admp网站询盘 ;email:邮件询盘  ;diy_element:自定义组件询盘", width = 15)
+    @Schema(description = "询盘模块:admp_web:admp网站询盘 ;email:邮件询盘  ;diy_element:自定义组件询盘")
+    private String modular;
+	/**发送人姓名*/
+	@Excel(name = "发送人姓名", width = 15)
+    @Schema(description = "发送人姓名")
+    private String fromUser;
+	/**0删除,1有效,默认值1   2:待解析  3:数据解析中 4.解析失败*/
+	@Excel(name = "0删除,1有效,默认值1   2:待解析  3:数据解析中 4.解析失败", width = 15)
+    @Schema(description = "0删除,1有效,默认值1   2:待解析  3:数据解析中 4.解析失败")
+    private Integer status;
+	/**数据解析次数*/
+	@Excel(name = "数据解析次数", width = 15)
+    @Schema(description = "数据解析次数")
+    private Integer dealCount;
+	/**系统有效性  0:无效       1;有效 后台字段*/
+	@Excel(name = "系统有效性  0:无效       1;有效 后台字段", width = 15)
+    @Schema(description = "系统有效性  0:无效       1;有效 后台字段")
+    private Integer sysEffective;
+	/**用户有效性  0:无效       1:有效   2 : 待定 取自字典表*/
+	@Excel(name = "用户有效性  0:无效       1:有效   2 : 待定 取自字典表", width = 15)
+    @Schema(description = "用户有效性  0:无效       1:有效   2 : 待定 取自字典表")
+    private Integer userEffective;
+	/**敏感信息*/
+	@Excel(name = "敏感信息", width = 15)
+    @Schema(description = "敏感信息")
+    private String sensitiveMessage;
+	/**询盘阶段,由跟踪来决定(1:待沟通 ;2:沟通中;3:成单;4;放弃)*/
+	@Excel(name = "询盘阶段,由跟踪来决定(1:待沟通 ;2:沟通中;3:成单;4;放弃)", width = 15)
+    @Schema(description = "询盘阶段,由跟踪来决定(1:待沟通 ;2:沟通中;3:成单;4;放弃)")
+    private String phase;
+	/**跟进跟进状态,由跟踪来决定(1:待跟进 ;2:跟进中;3:完成;4;停止)*/
+	@Excel(name = "跟进跟进状态,由跟踪来决定(1:待跟进 ;2:跟进中;3:完成;4;停止)", width = 15)
+    @Schema(description = "跟进跟进状态,由跟踪来决定(1:待跟进 ;2:跟进中;3:完成;4;停止)")
+    private String trackStatus;
+	/**询盘所属用户主账号ID*/
+	@Excel(name = "询盘所属用户主账号ID", width = 15)
+    @Schema(description = "询盘所属用户主账号ID")
+    private String uid;
+	/**询盘跟进人 id*/
+	@Excel(name = "询盘跟进人 id", width = 15)
+    @Schema(description = "询盘跟进人 id")
+    private Integer tracker;
+	/**询盘创建时间*/
+	@Excel(name = "询盘创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "询盘创建时间")
+    private Date recordCtime;
+	/**ADMP平台创建时间*/
+	@Excel(name = "ADMP平台创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "ADMP平台创建时间")
+    private Date ctime;
+	/**国家/地区(根据ip获取)*/
+	@Excel(name = "国家/地区(根据ip获取)", width = 15)
+    @Schema(description = "国家/地区(根据ip获取)")
+    private String country;
+	/**通过ip解析获得国家码*/
+	@Excel(name = "通过ip解析获得国家码", width = 15)
+    @Schema(description = "通过ip解析获得国家码")
+    private String countryIsoCode;
+	/**通过ip解析获得区域码*/
+	@Excel(name = "通过ip解析获得区域码", width = 15)
+    @Schema(description = "通过ip解析获得区域码")
+    private String areaIsoCode;
+	/**询盘插件名称,名称小写,如:wpforms*/
+	@Excel(name = "询盘插件名称,名称小写,如:wpforms", width = 15)
+    @Schema(description = "询盘插件名称,名称小写,如:wpforms")
+    private String pluginName;
+	/**站点code,关联站点表*/
+	@Excel(name = "站点code,关联站点表", width = 15)
+    @Schema(description = "站点code,关联站点表")
+    private String siteCode;
+	/**站点token*/
+	@Excel(name = "站点token", width = 15)
+    @Schema(description = "站点token")
+    private String siteToken;
+	/**询盘来自站点的域名*/
+	@Excel(name = "询盘来自站点的域名", width = 15)
+    @Schema(description = "询盘来自站点的域名")
+    private String siteHost;
+	/**询盘原站点记录ID*/
+	@Excel(name = "询盘原站点记录ID", width = 15)
+    @Schema(description = "询盘原站点记录ID")
+    private String recordId;
+	/**状态更新时间*/
+	@Excel(name = "状态更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "状态更新时间")
+    private Date utime;
+	/**回复时间*/
+	@Excel(name = "回复时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "回复时间")
+    private Date replyTime;
+	/**转发状态:0未转发,1已转发,默认值0*/
+	@Excel(name = "转发状态:0未转发,1已转发,默认值0", width = 15)
+    @Schema(description = "转发状态:0未转发,1已转发,默认值0")
+    private Integer forward;
+	/**转发时间*/
+	@Excel(name = "转发时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "转发时间")
+    private Date forwardTime;
+	/**访客id*/
+	@Excel(name = "访客id", width = 15)
+    @Schema(description = "访客id")
+    private String visitId;
+	/**来源于站点的id*/
+	@Excel(name = "来源于站点的id", width = 15)
+    @Schema(description = "来源于站点的id")
+    private Integer siteId;
+	/**公司id*/
+	@Excel(name = "公司id", width = 15)
+    @Schema(description = "公司id")
+    private Integer companyId;
+	/**联系人id,字符串组合*/
+	@Excel(name = "联系人id,字符串组合", width = 15)
+    @Schema(description = "联系人id,字符串组合")
+    private String contactIds;
+	/**定时器任务修改查询唯一标识(10位随机数)*/
+	@Excel(name = "定时器任务修改查询唯一标识(10位随机数)", width = 15)
+    @Schema(description = "定时器任务修改查询唯一标识(10位随机数)")
+    private String jobId;
+	/**回复状态*/
+	@Excel(name = "回复状态", width = 15)
+    @Schema(description = "回复状态")
+    private String replayStatus;
+	/**外部编号*/
+	@Excel(name = "外部编号", width = 15)
+    @Schema(description = "外部编号")
+    private String noOut;
+	/**处理后的询盘当地时间字段*/
+	@Excel(name = "处理后的询盘当地时间字段", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "处理后的询盘当地时间字段")
+    private Date modifyRecordCtime;
+	/**transContent*/
+	@Excel(name = "transContent", width = 15)
+    @Schema(description = "transContent")
+    private String transContent;
+	/**国家code*/
+	@Excel(name = "国家code", width = 15)
+    @Schema(description = "国家code")
+    private String countryCode;
+	/**国家名*/
+	@Excel(name = "国家名", width = 15)
+    @Schema(description = "国家名")
+    private String countryName;
+	/**whatsApp*/
+	@Excel(name = "whatsApp", width = 15)
+    @Schema(description = "whatsApp")
+    private String whatsApp;
+	/**0:不是;1:是*/
+	@Excel(name = "0:不是;1:是", width = 15)
+    @Schema(description = "0:不是;1:是")
+    private Integer wasteEnquiry;
+	/**推送状态,0:待发送,1:成功,2不予发送*/
+	@Excel(name = "推送状态,0:待发送,1:成功,2不予发送", width = 15)
+    @Schema(description = "推送状态,0:待发送,1:成功,2不予发送")
+    private Integer pushStatus;
+	/**推送错误次数*/
+	@Excel(name = "推送错误次数", width = 15)
+    @Schema(description = "推送错误次数")
+    private Integer pushErrorNum;
+	/**姓名*/
+	@Excel(name = "姓名", width = 15)
+    @Schema(description = "姓名")
+    private String name;
+	/**邮箱地址*/
+	@Excel(name = "邮箱地址", width = 15)
+    @Schema(description = "邮箱地址")
+    private String email;
+	/**询盘信息*/
+	@Excel(name = "询盘信息", width = 15)
+    @Schema(description = "询盘信息")
+    private String message;
+	/**公司名称*/
+	@Excel(name = "公司名称", width = 15)
+    @Schema(description = "公司名称")
+    private String company;
+	/**来源页面*/
+	@Excel(name = "来源页面", width = 15)
+    @Schema(description = "来源页面")
+    private String fromPage;
+	/**form表单传入Ip*/
+	@Excel(name = "form表单传入Ip", width = 15)
+    @Schema(description = "form表单传入Ip")
+    private String customerIp;
+	/**手机号*/
+	@Excel(name = "手机号", width = 15)
+    @Schema(description = "手机号")
+    private String phone;
+	/**whatsapp*/
+	@Excel(name = "whatsapp", width = 15)
+    @Schema(description = "whatsapp")
+    private String whatsapp;
+	/**阅读状态,0是未阅读,1是已阅读*/
+	@Excel(name = "阅读状态,0是未阅读,1是已阅读", width = 15)
+    @Schema(description = "阅读状态,0是未阅读,1是已阅读")
+    private Integer readStatus;
+	/**负责人的id*/
+	@Excel(name = "负责人的id", width = 15)
+    @Schema(description = "负责人的id")
+    private String principalUid;
+	/**0代表系统根据规则分配,1代表主账户指定*/
+	@Excel(name = "0代表系统根据规则分配,1代表主账户指定", width = 15)
+    @Schema(description = "0代表系统根据规则分配,1代表主账户指定")
+    private Integer principalType;
+	/**form表单中的地址*/
+	@Excel(name = "form表单中的地址", width = 15)
+    @Schema(description = "form表单中的地址")
+    private String address;
+	/**客户自定义字段*/
+	@Excel(name = "客户自定义字段", width = 15)
+    @Schema(description = "客户自定义字段")
+    private String specialField;
+	/**向Wp发送请求时间*/
+	@Excel(name = "向Wp发送请求时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "向Wp发送请求时间")
+    private Date requestTime;
+	/**Adweb实时获取WebHookS消息时间,定时器无该值*/
+	@Excel(name = "Adweb实时获取WebHookS消息时间,定时器无该值", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "Adweb实时获取WebHookS消息时间,定时器无该值")
+    private Date acquireMessageTime;
+	/**疑似垃圾询盘理由*/
+	@Excel(name = "疑似垃圾询盘理由", width = 15)
+    @Schema(description = "疑似垃圾询盘理由")
+    private String effectiveReason;
+	/**垃圾询盘类型,关键词:keyword,邮箱:email,ip: ip,其他:other*/
+	@Excel(name = "垃圾询盘类型,关键词:keyword,邮箱:email,ip: ip,其他:other", width = 15)
+    @Schema(description = "垃圾询盘类型,关键词:keyword,邮箱:email,ip: ip,其他:other")
+    private String wasteEnquiryType;
+	/**询盘关联产品*/
+	@Excel(name = "询盘关联产品", width = 15)
+    @Schema(description = "询盘关联产品")
+    private String cartItems;
+}

+ 41 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/mapper/AdwebEnquiryMapper.java

@@ -0,0 +1,41 @@
+package org.jeecg.modules.adweb.enquiry.mapper;
+
+import java.util.Date;
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.adweb.enquiry.dto.param.AdmpEnquirySearchDto;
+import org.jeecg.modules.adweb.enquiry.dto.result.AdmpEnquiryListDto;
+import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiry;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 询盘信息存储表单
+ * @Author: jeecg-boot
+ * @Date:   2024-10-12
+ * @Version: V1.0
+ */
+public interface AdwebEnquiryMapper extends BaseMapper<AdwebEnquiry> {
+
+    /**
+     * @param page
+     * @param userEffective
+     * @param searchText
+     * @param ctimeBegin
+     * @param ctimeEnd
+     * @return
+     */
+    IPage<AdmpEnquiryListDto> selectAdmpEnquiryList(IPage<AdmpEnquirySearchDto> page,
+                                                    @Param("codeList") List<String> codeList,
+                                                    @Param("userEffective") String userEffective,
+                                                    @Param("wasteEnquiryType") String wasteEnquiryType,
+                                                    @Param("searchText") String searchText,
+                                                    @Param("searchContent") String searchContent,
+                                                    @Param("ctimeBegin") Date ctimeBegin,
+                                                    @Param("ctimeEnd") Date ctimeEnd,
+                                                    @Param("whatsApp") String whatsApp,
+                                                    @Param("readStatus") Integer readStatus,
+                                                    @Param("principalUid") String principalUid,
+                                                    @Param("selfPrincipalUid") String selfPrincipalUid);
+}

+ 113 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/mapper/xml/AdwebEnquiryMapper.xml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.adweb.enquiry.mapper.AdwebEnquiryMapper">
+
+    <select id="selectAdmpEnquiryList" parameterType="org.jeecg.modules.adweb.enquiry.dto.param.AdmpEnquirySearchDto"
+            resultType="org.jeecg.modules.adweb.enquiry.dto.result.AdmpEnquiryListDto">
+        SELECT
+        t1.id,
+        t2.`name` AS siteName,
+        t1.`no`,
+        t1.no_out AS noOut,
+        t1.modular,
+        t1.record_ctime AS recordCtime,
+        t1.from_email AS fromEmail,
+        t1.country,
+        t1.site_host AS siteHost,
+        t1.uid,
+        t1.`status`,
+        t1.tracker,
+        t1.site_code AS siteCode,
+        t1.site_id AS siteId,
+        t1.phase,
+        t1.track_status AS trackStatus,
+        t1.replay_status AS replayStatus,
+        t1.sys_effective AS sysEffective,
+        t1.user_effective AS userEffective,
+        t1.sensitive_message AS sensitiveMessage,
+        t1.company_id AS companyId,
+        t1.contact_ids AS contactIds,
+        t1.trans_content AS transContent,
+        t1.whats_app AS whatsApp,
+        t1.name contact,
+        t1.phone,
+        t1.company formCompany,
+        t1.from_page,
+        t1.message context,
+        t1.from_page path,
+        t1.read_status,
+        t1.visit_id,
+        t1.special_field,
+        t1.cart_items as cartItems,
+        t1.effective_reason effectiveReason,
+        t1.plugin_name pluginName,
+        t1.waste_enquiry_type wasteEnquiryType,
+        case waste_enquiry when 0 then '否' when 1 then '是' end as wasteEnquiry,
+        country_name as countryName,
+        country_code as countryCode,
+        t1.from_ip fromIp,
+        t1.customer_ip customerIp,
+        t1.principal_uid principalUid
+        FROM
+        adweb_enquiry t1,
+        adweb_site t2
+        <where>
+            t1.site_code = t2.`code`
+            AND t2.`status` != 0
+            AND t1.status != 0
+            <if test="codeList != null">
+                <choose>
+                    <when test="codeList.size() != 0">
+                        AND t1.site_code IN
+                        <foreach collection="codeList" item="code" open="(" close=")" separator=",">
+                            #{code}
+                        </foreach>
+                    </when>
+                    <otherwise>
+                        AND t1.id = -1
+                    </otherwise>
+                </choose>
+            </if>
+            <if test="null != searchText and '' != searchText">
+                and (
+                t1.from_email like CONCAT('%', #{searchText}, '%')
+                or t1.name like CONCAT('%', #{searchText}, '%')
+                or t1.country_name like CONCAT('%', #{searchText}, '%')
+                )
+            </if>
+            <if test="null != searchContent and '' != searchContent">
+                and (
+                t1.message like CONCAT('%', #{searchContent}, '%')
+                )
+            </if>
+            <if test="null != userEffective and '' != userEffective">
+                AND t1.user_effective IN ${userEffective}
+            </if>
+            <if test="null != wasteEnquiryType and '' != wasteEnquiryType">
+                AND t1.waste_enquiry_type = #{wasteEnquiryType}
+            </if>
+            <if test="null != ctimeBegin">
+                and t1.record_ctime >= #{ctimeBegin}
+            </if>
+            <if test="null != ctimeEnd">
+                and #{ctimeEnd} > t1.record_ctime
+            </if>
+            <if test="null != whatsApp and '' != whatsApp">
+                and t1.whats_app = #{whatsApp}
+            </if>
+            <if test="readStatus != null">
+                AND t1.read_status = #{readStatus}
+            </if>
+            <if test="principalUid != null and principalUid != ''">
+                AND t1.principal_uid = #{principalUid}
+            </if>
+            <if test="selfPrincipalUid != null and selfPrincipalUid != ''">
+                AND (t1.principal_uid = #{selfPrincipalUid} OR t1.principal_uid = 'ALL')
+            </if>
+        </where>
+        ORDER BY
+        t1.record_ctime DESC
+    </select>
+
+
+</mapper>

+ 14 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/IAdwebEnquiryService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.adweb.enquiry.service;
+
+import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiry;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 询盘信息存储表单
+ * @Author: jeecg-boot
+ * @Date:   2024-10-12
+ * @Version: V1.0
+ */
+public interface IAdwebEnquiryService extends IService<AdwebEnquiry> {
+
+}

+ 19 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.adweb.enquiry.service.impl;
+
+import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiry;
+import org.jeecg.modules.adweb.enquiry.mapper.AdwebEnquiryMapper;
+import org.jeecg.modules.adweb.enquiry.service.IAdwebEnquiryService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 询盘信息存储表单
+ * @Author: jeecg-boot
+ * @Date:   2024-10-12
+ * @Version: V1.0
+ */
+@Service
+public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, AdwebEnquiry> implements IAdwebEnquiryService {
+
+}

+ 9 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/IAdwebSiteService.java

@@ -17,5 +17,13 @@ public interface IAdwebSiteService extends IService<AdwebSite> {
      * 查询wordpress站点配置
      * @param siteCode
      */
-    public WordPressConfig queryWordPressConfig(String siteCode);
+    WordPressConfig queryWordPressConfig(String siteCode);
+
+    /**
+     * 根据siteId获取siteCode
+     *
+     * @param id 站点id
+     * @return 站点code
+     */
+    String getSiteCodeById(Integer id);
 }

+ 13 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/impl/AdwebSiteServiceImpl.java

@@ -121,4 +121,17 @@ public class AdwebSiteServiceImpl extends ServiceImpl<AdwebSiteMapper, AdwebSite
         }
         return config;
     }
+
+    /**
+     * @param id 站点id
+     * @return
+     */
+    @Override
+    public String getSiteCodeById(Integer id) {
+        AdwebSite adwebSite = this.getById(id);
+        if (adwebSite == null) {
+            return null;
+        }
+        return adwebSite.getCode();
+    }
 }

+ 19 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/SysAdwebApi.java

@@ -9,4 +9,23 @@ public interface SysAdwebApi {
     boolean isOem();
 
     List<String> getOemGroupUids();
+
+    /**
+     * 判断输入站点是否属于当前用户
+     * @param siteId
+     * @return
+     */
+    boolean isNotOwnSite(Integer siteId);
+
+    /**
+     * 判断输入站点是否属于当前用户
+     * @param siteCode
+     * @return
+     */
+    boolean isNotOwnSite(String siteCode);
+
+    /**
+     * 判断一个用户是否是adweb子会员
+     */
+    boolean isAdwebSubVip();
 }

+ 96 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/SysAdwebApiImpl.java

@@ -1,15 +1,24 @@
 package org.jeecg.modules.adweb.system.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.xkcoding.http.util.StringUtil;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.system.api.ISysBaseAPI;
 import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.modules.adweb.common.constant.AdwebConstant;
+import org.jeecg.modules.adweb.common.constant.NumConstant;
 import org.jeecg.modules.adweb.common.util.ListUtil;
+import org.jeecg.modules.adweb.site.entity.AdwebSite;
+import org.jeecg.modules.adweb.site.service.IAdwebSiteService;
+import org.jeecg.modules.adweb.site.service.ISiteUserPermissionService;
 import org.jeecg.modules.adweb.system.service.SysAdwebApi;
 import org.jeecg.modules.system.entity.SysUser;
 import org.jeecg.modules.system.mapper.SysUserMapper;
 import org.jeecg.modules.system.mapper.SysUserRoleMapper;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
@@ -25,6 +34,15 @@ public class SysAdwebApiImpl implements SysAdwebApi {
     @Resource
     private SysUserMapper userMapper;
 
+    @Autowired
+    private ISiteUserPermissionService siteUserPermissionService;
+
+    @Autowired
+    private IAdwebSiteService adwebSiteService;
+
+    @Autowired
+    private ISysBaseAPI sysBaseAPI;
+
     @Override
     public boolean isAdmin() {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -78,4 +96,82 @@ public class SysAdwebApiImpl implements SysAdwebApi {
         list.add(sysUser.getId());
         return list;
     }
+
+    /**
+     * @param siteId
+     * @return
+     */
+    @Override
+    public boolean isNotOwnSite(Integer siteId) {
+        if (siteId == null) {
+            return true;
+        }
+
+        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
+
+        if (this.isOem()) {
+            List<String> oemGroupUids = this.getOemGroupUids();
+            List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(oemGroupUids);
+            queryWrapper.in("code", codeList);
+        } else if (!this.isAdmin()) {
+            LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+            List<String> codeList = siteUserPermissionService.getSiteCodeList(loginUser.getId());
+            queryWrapper.in("code", codeList);
+        }
+        queryWrapper.eq("id", siteId);
+        queryWrapper.ne("status", NumConstant.ZERO);
+        List<AdwebSite> list = adwebSiteService.list(queryWrapper);
+        if (ListUtil.notEmpty(list)) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * @param siteCode
+     * @return
+     */
+    @Override
+    public boolean isNotOwnSite(String siteCode) {
+        if (this.isAdmin()) {
+            return false;
+        }
+        if (StringUtil.isEmpty(siteCode)) {
+            return true;
+        }
+        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
+
+        if (this.isOem()) {
+            List<String> oemGroupUids = this.getOemGroupUids();
+            List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(oemGroupUids);
+            queryWrapper.in("code", codeList);
+        } else if (!this.isAdmin()) {
+            LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+            List<String> codeList = siteUserPermissionService.getSiteCodeList(loginUser.getId());
+            queryWrapper.in("code", codeList);
+        }
+        queryWrapper.eq("code", siteCode);
+        queryWrapper.ne("status", AdwebConstant.SITE_DEL);
+        List<AdwebSite> list = adwebSiteService.list(queryWrapper);
+        if (ListUtil.notEmpty(list)) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * @return
+     */
+    @Override
+    public boolean isAdwebSubVip() {
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        String username = sysUser.getUsername();
+        List<String> roles = sysBaseAPI.getRolesByUsername(username);
+        for (String role : roles) {
+            if ("adweb_sub_vip".equals(role)) {
+                return true;
+            }
+        }
+        return false;
+    }
 }