Browse Source

coding:投流代码提交

zhangqin 4 days ago
parent
commit
87d963ca85
29 changed files with 890 additions and 15 deletions
  1. 6 0
      fs-ad-new-api/src/main/java/com/fs/app/facade/CallbackProcessingFacadeServiceImpl.java
  2. 6 6
      fs-ad-new-api/src/main/resources/logback.xml
  3. 10 0
      fs-company/src/main/java/com/fs/company/controller/newAdv/LandingPageTemplateController.java
  4. 59 0
      fs-company/src/main/java/com/fs/company/controller/qw/QwAssignRuleController.java
  5. 178 0
      fs-company/src/main/java/com/fs/company/controller/qw/QwCustomerLinkController.java
  6. 6 3
      fs-company/src/main/java/com/fs/company/controller/qw/QwGroupActualController.java
  7. 2 2
      fs-company/src/main/java/com/fs/framework/security/handle/AuthenticationEntryPointImpl.java
  8. 66 0
      fs-service/src/main/java/com/fs/qw/domain/QwAssignRule.java
  9. 84 0
      fs-service/src/main/java/com/fs/qw/domain/QwCustomerLink.java
  10. 84 0
      fs-service/src/main/java/com/fs/qw/domain/QwCustomerLinkChannel.java
  11. 55 0
      fs-service/src/main/java/com/fs/qw/domain/QwCustomerLinkUser.java
  12. 6 2
      fs-service/src/main/java/com/fs/qw/domain/QwGroupActual.java
  13. 25 0
      fs-service/src/main/java/com/fs/qw/dto/QwCustomerLinkChannelReq.java
  14. 35 0
      fs-service/src/main/java/com/fs/qw/dto/QwCustomerLinkReq.java
  15. 27 0
      fs-service/src/main/java/com/fs/qw/dto/QwCustomerLinkUserDto.java
  16. 18 0
      fs-service/src/main/java/com/fs/qw/mapper/QwAssignRuleMapper.java
  17. 18 0
      fs-service/src/main/java/com/fs/qw/mapper/QwCustomerLinkChannelMapper.java
  18. 18 0
      fs-service/src/main/java/com/fs/qw/mapper/QwCustomerLinkMapper.java
  19. 18 0
      fs-service/src/main/java/com/fs/qw/mapper/QwCustomerLinkUserMapper.java
  20. 2 2
      fs-service/src/main/java/com/fs/qw/mapper/QwUserMapper.java
  21. 16 0
      fs-service/src/main/java/com/fs/qw/service/IQwAssignRuleService.java
  22. 16 0
      fs-service/src/main/java/com/fs/qw/service/IQwCustomerLinkChannelService.java
  23. 16 0
      fs-service/src/main/java/com/fs/qw/service/IQwCustomerLinkService.java
  24. 16 0
      fs-service/src/main/java/com/fs/qw/service/IQwCustomerLinkUserService.java
  25. 20 0
      fs-service/src/main/java/com/fs/qw/service/impl/QwAssignRuleServiceImpl.java
  26. 20 0
      fs-service/src/main/java/com/fs/qw/service/impl/QwCustomerLinkChannelServiceImpl.java
  27. 20 0
      fs-service/src/main/java/com/fs/qw/service/impl/QwCustomerLinkServiceImpl.java
  28. 20 0
      fs-service/src/main/java/com/fs/qw/service/impl/QwCustomerLinkUserServiceImpl.java
  29. 23 0
      fs-service/src/main/java/com/fs/qw/vo/QwAssignPersonnelVo.java

+ 6 - 0
fs-ad-new-api/src/main/java/com/fs/app/facade/CallbackProcessingFacadeServiceImpl.java

@@ -1,6 +1,7 @@
 package com.fs.app.facade;
 
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.json.JSONArray;
 import cn.hutool.json.JSONUtil;
 import com.fs.app.integration.adapter.IAdvertiserAdapter;
 import com.fs.app.integration.client.IAccessTokenClient;
@@ -105,6 +106,11 @@ public class CallbackProcessingFacadeServiceImpl implements CallbackProcessingFa
     public LandingIndexRes getLandingIndexBySiteId(Long siteId) {
         Site byId = siteService.getById(siteId);
         LandingPageTemplate byId1 = landingPageTemplateService.getById(byId.getLaunchPageId());
+        String templateData = byId1.getTemplateData();
+        // JSONArray objects = JSONUtil.parseArray(templateData);
+/*        objects.jsonIter().forEach(o -> {
+            o.getStr("h5-qrcode")
+        });*/
         LandingIndexRes res = new LandingIndexRes();
         res.setTemplateData(byId1.getTemplateData());
         return res;

+ 6 - 6
fs-ad-new-api/src/main/resources/logback.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/fs-ai-websocket/logs" />
+	<property name="log.path" value="/home/fs-ad-new-api/logs" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 
@@ -19,8 +19,8 @@
 		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
             <!-- 日志文件名格式 -->
 			<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
-			<!-- 日志最大的历史 60天 -->
-			<maxHistory>60</maxHistory>
+			<!-- 日志最大的历史 30 -->
+			<maxHistory>30</maxHistory>
 		</rollingPolicy>
 		<encoder>
 			<pattern>${log.pattern}</pattern>
@@ -42,7 +42,7 @@
             <!-- 日志文件名格式 -->
             <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
 			<!-- 日志最大的历史 60天 -->
-			<maxHistory>60</maxHistory>
+			<maxHistory>30</maxHistory>
         </rollingPolicy>
         <encoder>
             <pattern>${log.pattern}</pattern>
@@ -64,7 +64,7 @@
             <!-- 按天回滚 daily -->
             <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
             <!-- 日志最大的历史 60天 -->
-            <maxHistory>60</maxHistory>
+            <maxHistory>30</maxHistory>
         </rollingPolicy>
         <encoder>
             <pattern>${log.pattern}</pattern>
@@ -72,7 +72,7 @@
     </appender>
 
 	<!-- 系统模块日志级别控制  -->
-	<logger name="com.fs" level="info" />
+	<logger name="com.fs" level="debug" />
 	<!-- Spring日志级别控制  -->
 	<logger name="org.springframework" level="warn" />
 

+ 10 - 0
fs-company/src/main/java/com/fs/company/controller/newAdv/LandingPageTemplateController.java

@@ -114,6 +114,16 @@ public class LandingPageTemplateController {
         return Result.success();
     }
 
+    /**
+     * 启停模板
+     *
+     * @return 操作结果
+     */
+    @PutMapping("/{id}")
+    public Result<Void> update(@PathVariable String id,@RequestBody LandingPageTemplate request) {
+        return templateService.updateById(request)?Result.success():Result.error("更新模板失败");
+    }
+
     /**
      * 启停模板
      *

+ 59 - 0
fs-company/src/main/java/com/fs/company/controller/qw/QwAssignRuleController.java

@@ -0,0 +1,59 @@
+package com.fs.company.controller.qw;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fs.common.result.Result;
+import com.fs.qw.domain.QwAssignRule;
+import com.fs.qw.domain.QwGroupActual;
+import com.fs.qw.service.IQwAssignRuleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-11-28
+ */
+@RestController
+@RequestMapping("/qwAssignRule")
+public class QwAssignRuleController {
+    @Autowired
+    private IQwAssignRuleService qwAssignRuleService;
+    /**
+     * 分页查询渠道
+     */
+    @GetMapping("/page")
+    public Result<IPage<QwAssignRule>> page(
+            @RequestParam(defaultValue = "1") Long pageNum,
+            @RequestParam(defaultValue = "10") Long pageSize,
+            @RequestParam(required = false) String ruleName
+    ) {
+        Page<QwAssignRule> page = new Page<>(pageNum, pageSize);
+        LambdaQueryWrapper<QwAssignRule> wrapper = new LambdaQueryWrapper<>();
+        wrapper.like(StrUtil.isNotBlank(ruleName), QwAssignRule::getRuleName, ruleName);
+        wrapper.orderByDesc(QwAssignRule::getCreateTime);
+        IPage<QwAssignRule> result = qwAssignRuleService.page(page, wrapper);
+        return Result.success(result);
+    }
+
+    /**
+     * 创建企业微信
+     */
+    @PostMapping("/addOrUpdate")
+    public Result<Void> create(@RequestBody QwAssignRule qwGroupLiveCode) {
+        boolean success = false;
+        if (qwGroupLiveCode.getId() != null) {
+            success = qwAssignRuleService.updateById(qwGroupLiveCode);
+        } else {
+            success = qwAssignRuleService.save(qwGroupLiveCode);
+        }
+        return success ? Result.success() : Result.error("创建失败");
+    }
+}

+ 178 - 0
fs-company/src/main/java/com/fs/company/controller/qw/QwCustomerLinkController.java

@@ -0,0 +1,178 @@
+package com.fs.company.controller.qw;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fs.common.result.Result;
+import com.fs.qw.domain.QwCustomerLink;
+import com.fs.qw.domain.QwCustomerLinkChannel;
+import com.fs.qw.domain.QwCustomerLinkUser;
+import com.fs.qw.dto.QwCustomerLinkChannelReq;
+import com.fs.qw.dto.QwCustomerLinkReq;
+import com.fs.qw.dto.QwCustomerLinkUserDto;
+import com.fs.qw.service.IQwCustomerLinkChannelService;
+import com.fs.qw.service.IQwCustomerLinkService;
+import com.fs.qw.service.IQwCustomerLinkUserService;
+import com.fs.qwApi.domain.QwLinkCreateResult;
+import com.fs.qwApi.param.QwLinkCreateParam;
+import com.fs.qwApi.service.QwApiService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 企微获客链接 前端控制器
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@RestController
+@RequestMapping("/qwCustomerLink")
+public class QwCustomerLinkController {
+
+    @Autowired
+    private IQwCustomerLinkService qwCustomerLinkService;
+    @Autowired
+    private IQwCustomerLinkUserService qwCustomerLinkUserService;
+    @Autowired
+    private IQwCustomerLinkChannelService qwCustomerLinkChannelService;
+    @Autowired
+    private QwApiService qwApiService;
+
+    /**
+     * 分页查询主链
+     */
+    @GetMapping("/page")
+    public Result<IPage<QwCustomerLink>> page(
+            @RequestParam(defaultValue = "1") Long pageNum,
+            @RequestParam(defaultValue = "10") Long pageSize,
+            @RequestParam(required = false) String corpName,
+            @RequestParam(required = false) String linkName
+    ) {
+        Page<QwCustomerLink> page = new Page<>(pageNum, pageSize);
+        LambdaQueryWrapper<QwCustomerLink> wrapper = new LambdaQueryWrapper<>();
+        wrapper.like(StrUtil.isNotBlank(corpName), QwCustomerLink::getCorpName, corpName);
+        wrapper.like(StrUtil.isNotBlank(linkName), QwCustomerLink::getLinkName, linkName);
+        wrapper.eq(QwCustomerLink::getStatus, 0);
+        wrapper.orderByDesc(QwCustomerLink::getCreateTime);
+        IPage<QwCustomerLink> result = qwCustomerLinkService.page(page, wrapper);
+        return Result.success(result);
+    }
+
+    /**
+     * 分页查询渠道链
+     */
+    @GetMapping("/channel/page")
+    public Result<IPage<QwCustomerLinkChannel>> pageChannel(
+            @RequestParam(defaultValue = "1") Long pageNum,
+            @RequestParam(defaultValue = "10") Long pageSize,
+            @RequestParam(required = false) String linkName
+    ) {
+        Page<QwCustomerLinkChannel> page = new Page<>(pageNum, pageSize);
+        LambdaQueryWrapper<QwCustomerLinkChannel> wrapper = new LambdaQueryWrapper<>();
+        wrapper.like(StrUtil.isNotBlank(linkName), QwCustomerLinkChannel::getLinkName, linkName);
+        wrapper.eq(QwCustomerLinkChannel::getStatus, 0);
+        wrapper.orderByDesc(QwCustomerLinkChannel::getCreateTime);
+        IPage<QwCustomerLinkChannel> result = qwCustomerLinkChannelService.page(page, wrapper);
+        return Result.success(result);
+    }
+
+    /**
+     * 新增/编辑 主链
+     */
+    @PostMapping("/createOrUpdate")
+    @Transactional(rollbackFor = Exception.class)
+    public Result<Void> create(@RequestBody QwCustomerLinkReq qwGroupLiveCode) {
+        QwCustomerLink bean = BeanUtil.toBean(qwGroupLiveCode, QwCustomerLink.class);
+
+        QwLinkCreateParam qwLinkCreateParam = new QwLinkCreateParam();
+        qwLinkCreateParam.setLink_name(qwGroupLiveCode.getLinkName());
+        qwLinkCreateParam.setSkip_verify(qwGroupLiveCode.getSkipVerify());
+        QwLinkCreateParam.Range range = new QwLinkCreateParam.Range();
+
+        range.setUser_list(qwGroupLiveCode.getLinkUser().stream().map(QwCustomerLinkUserDto::getQwUserId).collect(Collectors.toList()));
+        qwLinkCreateParam.setRange(range);
+
+        boolean success = false;
+        if (qwGroupLiveCode.getId() != null) {
+            QwCustomerLink byId = qwCustomerLinkService.getById(qwGroupLiveCode.getId());
+            qwLinkCreateParam.setLink_id(byId.getLinkId());
+            // qwApiService.linkUpdate(qwLinkCreateParam, qwGroupLiveCode.getCorpId());
+            success = qwCustomerLinkService.updateById(bean);
+        } else {
+/*            QwLinkCreateResult qwLinkCreateResult = qwApiService.linkCreate(qwLinkCreateParam, qwGroupLiveCode.getCorpId());
+            bean.setLinkId(qwLinkCreateResult.getLinkId());
+            bean.setUrl(qwLinkCreateResult.getUrl());*/
+            bean.setLinkId(IdUtil.randomUUID());
+            bean.setUrl("https://work.weixin.qq.com/ca/" + IdUtil.randomUUID());
+            success = qwCustomerLinkService.save(bean);
+        }
+
+        if (success) {
+            qwCustomerLinkUserService.remove(new LambdaQueryWrapper<QwCustomerLinkUser>().eq(QwCustomerLinkUser::getSysLinkId, bean.getId()));
+            qwCustomerLinkUserService.saveBatch(qwGroupLiveCode.getLinkUser().stream()
+                    .map(e -> {
+                        QwCustomerLinkUser user = new QwCustomerLinkUser();
+                        user.setSysLinkId(bean.getId());
+                        user.setQwUserId(e.getQwUserId());
+                        user.setSysQwUserId(e.getSysQwUserId());
+                        return user;
+                    })
+                    .collect(Collectors.toList()));
+        }
+        return success ? Result.success() : Result.error("创建失败");
+    }
+
+    /**
+     * 新增/获客链接
+     */
+    @PostMapping("/channel/create")
+    public Result<Void> createChannel(@RequestBody QwCustomerLinkChannelReq linkChannelReq) {
+        // 渠道链接
+        QwCustomerLinkChannel bean = BeanUtil.toBean(linkChannelReq, QwCustomerLinkChannel.class);
+        // 主链信息
+        QwCustomerLink qwCustomerLink = qwCustomerLinkService.getById(linkChannelReq.getSysLinkId());
+        // 生成链接
+        QwLinkCreateParam qwLinkCreateParam = new QwLinkCreateParam();
+        qwLinkCreateParam.setLink_name(linkChannelReq.getLinkName());
+        qwLinkCreateParam.setSkip_verify(qwCustomerLink.getSkipVerify().equals(1));
+        List<QwCustomerLinkUser> list = qwCustomerLinkUserService.list(new LambdaQueryWrapper<QwCustomerLinkUser>()
+                .eq(QwCustomerLinkUser::getSysQwUserId, qwCustomerLink.getId()));
+        QwLinkCreateParam.Range range = new QwLinkCreateParam.Range();
+        range.setUser_list(list.stream().map(QwCustomerLinkUser::getQwUserId).collect(Collectors.toList()));
+        qwLinkCreateParam.setRange(range);
+        QwLinkCreateResult qwLinkCreateResult = qwApiService.linkCreate(qwLinkCreateParam, qwCustomerLink.getCorpId());
+        // 设置链接信息
+        bean.setLinkId(qwLinkCreateResult.getLinkId());
+        bean.setUrl(qwLinkCreateResult.getUrl());
+        return qwCustomerLinkChannelService.save(bean) ? Result.success() : Result.error("创建失败");
+    }
+
+
+    /**
+     * 删除 主链
+     */
+    @PostMapping("/delete/{id}")
+    public Result<Void> create(@PathVariable Long id) {
+        return qwCustomerLinkService.update(new LambdaUpdateWrapper<QwCustomerLink>()
+                .eq(QwCustomerLink::getId, id)
+                .set(QwCustomerLink::getStatus, 1)) ? Result.success() : Result.error("删除失败");
+    }
+
+    /**
+     * 删除 渠道链
+     */
+    @PostMapping("/channel/delete/{id}")
+    public Result<Void> createChannel(@PathVariable Long id) {
+        return qwCustomerLinkChannelService.removeById(id) ? Result.success() : Result.error("删除失败");
+    }
+}

+ 6 - 3
fs-company/src/main/java/com/fs/company/controller/qw/QwGroupActualController.java

@@ -7,10 +7,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fs.common.result.Result;
 import com.fs.qw.domain.QwGroupActual;
-import com.fs.qw.domain.QwGroupLiveCode;
 import com.fs.qw.service.IQwGroupActualService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -52,7 +50,7 @@ public class QwGroupActualController {
      * 创建群活码/修改群活码
      */
     @PostMapping("/addOrUpdate")
-    public Result<Void> create(@RequestBody @Validated QwGroupActual qwGroupLiveCode) {
+    public Result<Void> create(@RequestBody QwGroupActual qwGroupLiveCode) {
         boolean success = false;
         if (qwGroupLiveCode.getId() != null) {
             success = qwGroupActualService.updateById(qwGroupLiveCode);
@@ -61,4 +59,9 @@ public class QwGroupActualController {
         }
         return success ? Result.success() : Result.error("创建失败");
     }
+
+    @GetMapping("/{id}")
+    public Result<QwGroupActual> create(@PathVariable Long id) {
+        return Result.success(qwGroupActualService.getById(id));
+    }
 }

+ 2 - 2
fs-company/src/main/java/com/fs/framework/security/handle/AuthenticationEntryPointImpl.java

@@ -16,8 +16,8 @@ import java.io.Serializable;
 
 /**
  * 认证失败处理类 返回未授权
- * 
- 
+ *
+
  */
 @Component
 public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, Serializable

+ 66 - 0
fs-service/src/main/java/com/fs/qw/domain/QwAssignRule.java

@@ -0,0 +1,66 @@
+package com.fs.qw.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.qw.vo.QwAssignPersonnelVo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-11-28
+ */
+@Getter
+@Setter
+@TableName("qw_assign_rule")
+@ApiModel(value = "QwAssignRule对象", description = "")
+public class QwAssignRule extends Model<QwAssignRule> {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty("规则名称")
+    @TableField("rule_name")
+    private String ruleName;
+
+    @ApiModelProperty("1轮询 2依次 3按权重")
+    @TableField("assign_type")
+    private Integer assignType;
+
+    @ApiModelProperty("客服人员信息")
+    @TableField("assign_personnel_json")
+    private String assignPersonnelJson;
+
+    @ApiModelProperty("是否启用 1是 0否")
+    private Integer status;
+
+    @ApiModelProperty("创建时间")
+    @TableField("create_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty("更新时间")
+    @TableField("update_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime updateTime;
+
+    @Override
+    public Serializable pkVal() {
+        return this.id;
+    }
+}

+ 84 - 0
fs-service/src/main/java/com/fs/qw/domain/QwCustomerLink.java

@@ -0,0 +1,84 @@
+package com.fs.qw.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 企微获客链接
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@Getter
+@Setter
+@TableName("qw_customer_link")
+@ApiModel(value = "QwCustomerLink对象", description = "企微获客链接")
+public class QwCustomerLink extends Model<QwCustomerLink> {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("id")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("获客链接名称")
+    @TableField("link_name")
+    private String linkName;
+
+    @ApiModelProperty("获客链接ID")
+    @TableField("link_id")
+    private String linkId;
+
+    @ApiModelProperty("获客链接地址")
+    @TableField("url")
+    private String url;
+
+    @ApiModelProperty("企微id")
+    @TableField("corp_id")
+    private String corpId;
+
+    @ApiModelProperty("企微id")
+    @TableField("corp_name")
+    private String corpName;
+
+    @ApiModelProperty("是否无需验证,默认为true")
+    @TableField("skip_verify")
+    private Integer skipVerify;
+
+    @ApiModelProperty("创建时间")
+    @TableField("create_time")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty("创建人")
+    @TableField("create_by")
+    private Long createBy;
+
+    @ApiModelProperty("修改人")
+    @TableField("update_by")
+    private Long updateBy;
+
+    @ApiModelProperty("修改时间")
+    @TableField("update_time")
+    private LocalDateTime updateTime;
+
+    @ApiModelProperty("是否删除 1是0否")
+    @TableField("status")
+    private Integer status;
+
+    @Override
+    public Serializable pkVal() {
+        return this.id;
+    }
+}

+ 84 - 0
fs-service/src/main/java/com/fs/qw/domain/QwCustomerLinkChannel.java

@@ -0,0 +1,84 @@
+package com.fs.qw.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 企微获客链接渠道链接
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@Getter
+@Setter
+@TableName("qw_customer_link_channel")
+@ApiModel(value = "QwCustomerLinkChannel对象", description = "企微获客链接渠道链接")
+public class QwCustomerLinkChannel extends Model<QwCustomerLinkChannel> {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("id")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("归属主链")
+    @TableField("sys_link_id")
+    private Long sysLinkId;
+
+    @ApiModelProperty("获客链接名称")
+    @TableField("link_name")
+    private String linkName;
+
+    @ApiModelProperty("获客链接ID")
+    @TableField("link_id")
+    private String linkId;
+
+    @ApiModelProperty("获客链接地址")
+    @TableField("url")
+    private String url;
+
+    @ApiModelProperty("渠道id")
+    @TableField("channel_id")
+    private Integer channelId;
+
+    @ApiModelProperty("渠道名称")
+    @TableField("channel_name")
+    private String channelName;
+
+    @ApiModelProperty("是否删除 1是0否")
+    @TableField("status")
+    private Integer status;
+
+    @ApiModelProperty("创建时间")
+    @TableField("create_time")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty("创建人")
+    @TableField("create_by")
+    private Long createBy;
+
+    @ApiModelProperty("修改人")
+    @TableField("update_by")
+    private Long updateBy;
+
+    @ApiModelProperty("修改时间")
+    @TableField("update_time")
+    private LocalDateTime updateTime;
+
+    @Override
+    public Serializable pkVal() {
+        return this.id;
+    }
+}

+ 55 - 0
fs-service/src/main/java/com/fs/qw/domain/QwCustomerLinkUser.java

@@ -0,0 +1,55 @@
+package com.fs.qw.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 企微获客链接用户关联表
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@Getter
+@Setter
+@TableName("qw_customer_link_user")
+@ApiModel(value = "QwCustomerLinkUser对象", description = "企微获客链接用户关联表")
+public class QwCustomerLinkUser extends Model<QwCustomerLinkUser> {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("id")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("链接ID")
+    @TableField("sys_link_id")
+    private Long sysLinkId;
+    @ApiModelProperty("企微表ID")
+    @TableField("sys_qw_user_id")
+    private Long sysQwUserId;
+
+    @ApiModelProperty("企微微信用户ID")
+    @TableField("qw_user_id")
+    private String qwUserId;
+
+    @ApiModelProperty("创建时间")
+    @TableField("create_time")
+    private LocalDateTime createTime;
+
+    @Override
+    public Serializable pkVal() {
+        return this.id;
+    }
+}

+ 6 - 2
fs-service/src/main/java/com/fs/qw/domain/QwGroupActual.java

@@ -1,9 +1,11 @@
 package com.fs.qw.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
@@ -28,7 +30,7 @@ public class QwGroupActual extends Model<QwGroupActual> {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId("id")
+    @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 
     @ApiModelProperty("活码id")
@@ -57,14 +59,16 @@ public class QwGroupActual extends Model<QwGroupActual> {
 
     @ApiModelProperty("是否启用 1是 0否")
     @TableField("status")
-    private String status;
+    private Integer status;
 
     @ApiModelProperty("创建时间")
     @TableField("create_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime createTime;
 
     @ApiModelProperty("更新时间")
     @TableField("update_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime updateTime;
 
     @Override

+ 25 - 0
fs-service/src/main/java/com/fs/qw/dto/QwCustomerLinkChannelReq.java

@@ -0,0 +1,25 @@
+package com.fs.qw.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class QwCustomerLinkChannelReq implements Serializable {
+
+    @ApiModelProperty("归属主链")
+    private Long sysLinkId;
+
+    @ApiModelProperty("获客链接名称")
+    private String linkName;
+
+    @ApiModelProperty("渠道id")
+    @TableField("channel_id")
+    private Integer channelId;
+
+    @ApiModelProperty("渠道名称")
+    @TableField("channel_name")
+    private String channelName;
+}

+ 35 - 0
fs-service/src/main/java/com/fs/qw/dto/QwCustomerLinkReq.java

@@ -0,0 +1,35 @@
+package com.fs.qw.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class QwCustomerLinkReq implements Serializable {
+
+    @ApiModelProperty("id")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("获客链接名称")
+    private String linkName;
+
+    @ApiModelProperty("企微id")
+    private String corpId;
+
+    @ApiModelProperty("企微id")
+    private String corpName;
+
+    @ApiModelProperty("是否无需验证,默认为true")
+    private Boolean skipVerify;
+
+    @ApiModelProperty("员工号信息")
+    private List<QwCustomerLinkUserDto> linkUser;
+
+
+}

+ 27 - 0
fs-service/src/main/java/com/fs/qw/dto/QwCustomerLinkUserDto.java

@@ -0,0 +1,27 @@
+package com.fs.qw.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+@Data
+public class QwCustomerLinkUserDto implements Serializable {
+
+
+    @ApiModelProperty("企微表ID")
+    @TableField("sys_qw_user_id")
+    private Long sysQwUserId;
+
+    @ApiModelProperty("企微名称")
+    @TableField("qw_user_name")
+    private String qwUserName;
+
+    @ApiModelProperty("企微微信用户ID")
+    @TableField("qw_user_id")
+    private String qwUserId;
+}

+ 18 - 0
fs-service/src/main/java/com/fs/qw/mapper/QwAssignRuleMapper.java

@@ -0,0 +1,18 @@
+package com.fs.qw.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.qw.domain.QwAssignRule;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-11-28
+ */
+@Mapper
+public interface QwAssignRuleMapper extends BaseMapper<QwAssignRule> {
+
+}

+ 18 - 0
fs-service/src/main/java/com/fs/qw/mapper/QwCustomerLinkChannelMapper.java

@@ -0,0 +1,18 @@
+package com.fs.qw.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.qw.domain.QwCustomerLinkChannel;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * 企微获客链接渠道链接 Mapper 接口
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@Mapper
+public interface QwCustomerLinkChannelMapper extends BaseMapper<QwCustomerLinkChannel> {
+
+}

+ 18 - 0
fs-service/src/main/java/com/fs/qw/mapper/QwCustomerLinkMapper.java

@@ -0,0 +1,18 @@
+package com.fs.qw.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.qw.domain.QwCustomerLink;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * 企微获客链接 Mapper 接口
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@Mapper
+public interface QwCustomerLinkMapper extends BaseMapper<QwCustomerLink> {
+
+}

+ 18 - 0
fs-service/src/main/java/com/fs/qw/mapper/QwCustomerLinkUserMapper.java

@@ -0,0 +1,18 @@
+package com.fs.qw.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.qw.domain.QwCustomerLinkUser;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * 企微获客链接用户关联表 Mapper 接口
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@Mapper
+public interface QwCustomerLinkUserMapper extends BaseMapper<QwCustomerLinkUser> {
+
+}

+ 2 - 2
fs-service/src/main/java/com/fs/qw/mapper/QwUserMapper.java

@@ -296,10 +296,10 @@ public interface QwUserMapper extends BaseMapper<QwUser>
             "\tqu.app_key = #{key}")
     QwHookAuthVO selectQwUserByAppKeyAuth(@Param("key") String key);
 
-    @Select("select login_code_url from qw_user where app_key=#{key}")
+//    @Select("select login_code_url from qw_user where app_key=#{key}")
     String selectQwUserByAppKeyToIP(String key);
 
-    @Select("select corp_id as dictValue,corp_name as dictLabel from qw_company where FIND_IN_SET(#{companyId},company_ids)")
+    @Select("select corp_id as dictValue,corp_name as dictLabel,corp_id,corp_name from qw_company where FIND_IN_SET(#{companyId},company_ids)")
     List<QwOptionsVO> selectQwCompanyListOptionsVOByCompanyId(Long companyId);
 
     @Select("select corp_id as dictValue,corp_name as dictLabel from qw_company where status=1")

+ 16 - 0
fs-service/src/main/java/com/fs/qw/service/IQwAssignRuleService.java

@@ -0,0 +1,16 @@
+package com.fs.qw.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.qw.domain.QwAssignRule;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-11-28
+ */
+public interface IQwAssignRuleService extends IService<QwAssignRule> {
+
+}

+ 16 - 0
fs-service/src/main/java/com/fs/qw/service/IQwCustomerLinkChannelService.java

@@ -0,0 +1,16 @@
+package com.fs.qw.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.qw.domain.QwCustomerLinkChannel;
+
+/**
+ * <p>
+ * 企微获客链接渠道链接 服务类
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+public interface IQwCustomerLinkChannelService extends IService<QwCustomerLinkChannel> {
+
+}

+ 16 - 0
fs-service/src/main/java/com/fs/qw/service/IQwCustomerLinkService.java

@@ -0,0 +1,16 @@
+package com.fs.qw.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.qw.domain.QwCustomerLink;
+
+/**
+ * <p>
+ * 企微获客链接 服务类
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+public interface IQwCustomerLinkService extends IService<QwCustomerLink> {
+
+}

+ 16 - 0
fs-service/src/main/java/com/fs/qw/service/IQwCustomerLinkUserService.java

@@ -0,0 +1,16 @@
+package com.fs.qw.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.qw.domain.QwCustomerLinkUser;
+
+/**
+ * <p>
+ * 企微获客链接用户关联表 服务类
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+public interface IQwCustomerLinkUserService extends IService<QwCustomerLinkUser> {
+
+}

+ 20 - 0
fs-service/src/main/java/com/fs/qw/service/impl/QwAssignRuleServiceImpl.java

@@ -0,0 +1,20 @@
+package com.fs.qw.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.qw.domain.QwAssignRule;
+import com.fs.qw.mapper.QwAssignRuleMapper;
+import com.fs.qw.service.IQwAssignRuleService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-11-28
+ */
+@Service
+public class QwAssignRuleServiceImpl extends ServiceImpl<QwAssignRuleMapper, QwAssignRule> implements IQwAssignRuleService {
+
+}

+ 20 - 0
fs-service/src/main/java/com/fs/qw/service/impl/QwCustomerLinkChannelServiceImpl.java

@@ -0,0 +1,20 @@
+package com.fs.qw.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.qw.domain.QwCustomerLinkChannel;
+import com.fs.qw.mapper.QwCustomerLinkChannelMapper;
+import com.fs.qw.service.IQwCustomerLinkChannelService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 企微获客链接渠道链接 服务实现类
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@Service
+public class QwCustomerLinkChannelServiceImpl extends ServiceImpl<QwCustomerLinkChannelMapper, QwCustomerLinkChannel> implements IQwCustomerLinkChannelService {
+
+}

+ 20 - 0
fs-service/src/main/java/com/fs/qw/service/impl/QwCustomerLinkServiceImpl.java

@@ -0,0 +1,20 @@
+package com.fs.qw.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.qw.domain.QwCustomerLink;
+import com.fs.qw.mapper.QwCustomerLinkMapper;
+import com.fs.qw.service.IQwCustomerLinkService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 企微获客链接 服务实现类
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@Service
+public class QwCustomerLinkServiceImpl extends ServiceImpl<QwCustomerLinkMapper, QwCustomerLink> implements IQwCustomerLinkService {
+
+}

+ 20 - 0
fs-service/src/main/java/com/fs/qw/service/impl/QwCustomerLinkUserServiceImpl.java

@@ -0,0 +1,20 @@
+package com.fs.qw.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.qw.domain.QwCustomerLinkUser;
+import com.fs.qw.mapper.QwCustomerLinkUserMapper;
+import com.fs.qw.service.IQwCustomerLinkUserService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 企微获客链接用户关联表 服务实现类
+ * </p>
+ *
+ * @author zhangqin
+ * @since 2025-12-03
+ */
+@Service
+public class QwCustomerLinkUserServiceImpl extends ServiceImpl<QwCustomerLinkUserMapper, QwCustomerLinkUser> implements IQwCustomerLinkUserService {
+
+}

+ 23 - 0
fs-service/src/main/java/com/fs/qw/vo/QwAssignPersonnelVo.java

@@ -0,0 +1,23 @@
+package com.fs.qw.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class QwAssignPersonnelVo implements Serializable {
+    // 企微号
+    private String qwUserId;
+    // 权重数
+    private Integer weight;
+    // 企微姓名
+    private String qwUserName;
+    // 今日分配数
+    private Integer assignNumToDay;
+    // 累积分配数
+    private Integer assignNumCount;
+    // 今日添加数
+    private Integer addNumToDay;
+    // 累积添加数
+    private Integer addNumCount;
+}