Bladeren bron

客服管理 修改

wks 1 jaar geleden
bovenliggende
commit
336ff34fa1
17 gewijzigde bestanden met toevoegingen van 253 en 26 verwijderingen
  1. 6 17
      src/main/java/com/ydtech/modules/admin/controller/SysQyWeChatController.java
  2. 15 0
      src/main/java/com/ydtech/modules/admin/controller/wechat/SysWechatCustomerConfigController.java
  3. 18 0
      src/main/java/com/ydtech/modules/admin/dao/SysWechatCustomerRecordingMapper.java
  4. 10 1
      src/main/java/com/ydtech/modules/admin/model/po/SysWechatCustomer.java
  5. 4 0
      src/main/java/com/ydtech/modules/admin/model/po/SysWechatCustomerDuty.java
  6. 46 0
      src/main/java/com/ydtech/modules/admin/model/po/SysWechatCustomerRecording.java
  7. 3 0
      src/main/java/com/ydtech/modules/admin/model/vo/wechat/SysWechatCustomerAddVo.java
  8. 9 0
      src/main/java/com/ydtech/modules/admin/model/vo/wechat/SysWechatCustomerVo.java
  9. 7 0
      src/main/java/com/ydtech/modules/admin/service/SysWechatCustomerBusinessService.java
  10. 13 0
      src/main/java/com/ydtech/modules/admin/service/SysWechatCustomerRecordingService.java
  11. 10 0
      src/main/java/com/ydtech/modules/admin/service/SysWechatCustomerService.java
  12. 65 6
      src/main/java/com/ydtech/modules/admin/service/impl/SysWechatCustomerBusinessServiceImpl.java
  13. 2 0
      src/main/java/com/ydtech/modules/admin/service/impl/SysWechatCustomerDutyServiceImpl.java
  14. 22 0
      src/main/java/com/ydtech/modules/admin/service/impl/SysWechatCustomerRecordingServiceImpl.java
  15. 3 1
      src/main/java/com/ydtech/modules/admin/service/impl/SysWechatCustomerServiceImpl.java
  16. 16 0
      src/main/resources/mapper/SysWechatCustomerRecordingMapper.xml
  17. 4 1
      src/main/resources/mapper/modules/admin/SysWechatCustomerMapper.xml

+ 6 - 17
src/main/java/com/ydtech/modules/admin/controller/SysQyWeChatController.java

@@ -5,16 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.admin.model.SysUser;
 import com.ydtech.modules.admin.model.po.SysQyWeChat;
-import com.ydtech.modules.admin.service.SysQyWeChatService;
-import com.ydtech.modules.admin.service.SysSwitchConfigService;
-import com.ydtech.modules.admin.service.SysUserService;
-import com.ydtech.modules.admin.service.WechatCustomerService;
+import com.ydtech.modules.admin.service.*;
 import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.protocol.utils.AssertionUtils;
 import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
+import me.chanjar.weixin.common.error.WxErrorException;
 import org.springframework.web.bind.annotation.*;
 
 import java.time.LocalDateTime;
@@ -33,7 +31,7 @@ public class SysQyWeChatController {
 
     private final SysSwitchConfigService sysSwitchConfigService;
 
-    private final WechatCustomerService wechatCustomerService;
+    private final SysWechatCustomerBusinessService sysWechatCustomerBusinessService;
 
     @ApiOperation(value = "配置宣传图/客服")
     @PostMapping(value = "/save/picture")
@@ -79,20 +77,11 @@ public class SysQyWeChatController {
 
     @ApiOperation(value = "查询微信客服链接")
     @PostMapping(value = "/find/wechatCustomer")
-    public HttpResult<String> findWechatPictureByUserId() {
+    public HttpResult<String> findWechatPictureByUserId() throws WxErrorException {
         String userId = BaseController.getUser().getId();
         SysUser user = sysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getId, userId));
-        SysQyWeChat sysQyWeChat = sysQyWeChatService.getOne(new LambdaQueryWrapper<SysQyWeChat>().eq(SysQyWeChat::getUserId, user.getLeaderId()));
-        if (sysQyWeChat == null) {
-            List<SysQyWeChat> list = sysQyWeChatService.list();
-            sysQyWeChat = list.get(new Random().nextInt(list.size()));
-        }
-        String s = wechatCustomerService.addContactWay(sysQyWeChat.getOpenKfId());
-        if(StringUtils.isNotEmpty(s)){
-            String url = s + "&scene_param=" + userId;
-            return HttpResult.ok(url);
-        }
-        return HttpResult.ok(sysQyWeChat.getSupportStaffUrl());
+        String link = sysWechatCustomerBusinessService.getWeChatCustomer(user);
+        return HttpResult.ok(link);
     }
 
 }

+ 15 - 0
src/main/java/com/ydtech/modules/admin/controller/wechat/SysWechatCustomerConfigController.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.admin.controller.wechat;
 
 
 import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.admin.model.po.SysWechatCustomer;
 import com.ydtech.modules.admin.model.vo.wechat.*;
 import com.ydtech.modules.admin.service.SysWechatCustomerBusinessService;
 import com.ydtech.modules.admin.service.SysWechatCustomerDutyService;
@@ -53,6 +54,13 @@ public class SysWechatCustomerConfigController {
         return HttpResult.ok(customerDutyRules);
     }
 
+    @PutMapping("/dutyConfig")
+    @ApiOperation(value = "值班配置")
+    public HttpResult<Object> getDutyConfig(@RequestBody SysWechatCustomerDutyRulesVo sysWechatCustomerDutyRules) {
+        sysWechatCustomerService.saveOrUpdateCustomerDutyRules(sysWechatCustomerDutyRules);
+        return HttpResult.ok();
+    }
+
     @DeleteMapping("/clearDutyConfig/{customerId}")
     @ApiOperation(value = "清除值班配置")
     public HttpResult<Object> clearDutyConfig(@PathVariable String customerId) {
@@ -67,6 +75,13 @@ public class SysWechatCustomerConfigController {
         return HttpResult.ok(sysWechatCustomerVoBasePageResult);
     }
 
+    @GetMapping("/getAll")
+    @ApiOperation("获取所有客服")
+    public HttpResult<List<SysWechatCustomer>> all() {
+        List<SysWechatCustomer> list = sysWechatCustomerService.list();
+        return HttpResult.ok(list);
+    }
+
     @GetMapping("/{customerId}")
     @ApiOperation(value = "编辑客服")
     public HttpResult<SysWechatCustomerAddVo> get(@PathVariable String customerId) throws WxErrorException {

+ 18 - 0
src/main/java/com/ydtech/modules/admin/dao/SysWechatCustomerRecordingMapper.java

@@ -0,0 +1,18 @@
+package com.ydtech.modules.admin.dao;
+
+import com.ydtech.modules.admin.model.po.SysWechatCustomerRecording;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author Administrator
+* @description 针对表【sys_wechat_customer_recording(微信客服记录表)】的数据库操作Mapper
+* @createDate 2025-04-22 17:18:47
+* @Entity com.ydtech.modules.admin.model.po.SysWechatCustomerRecording
+*/
+public interface SysWechatCustomerRecordingMapper extends BaseMapper<SysWechatCustomerRecording> {
+
+}
+
+
+
+

+ 10 - 1
src/main/java/com/ydtech/modules/admin/model/po/SysWechatCustomer.java

@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.ydtech.modules.admin.model.vo.wechat.SysWechatCustomerAddVo;
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
 import java.io.Serializable;
 
@@ -16,6 +18,8 @@ import java.io.Serializable;
  */
 @TableName(value = "sys_wechat_customer")
 @Data
+@AllArgsConstructor
+@NoArgsConstructor
 public class SysWechatCustomer implements Serializable {
     /**
      * 主键
@@ -40,7 +44,11 @@ public class SysWechatCustomer implements Serializable {
      */
     @TableField(value = "user_id")
     private String userId;
-
+    /**
+     * 接待人的部门
+     */
+    @TableField(value = "department_id")
+    private String departmentId;
     /**
      * 接待人企业微信客服
      */
@@ -80,6 +88,7 @@ public class SysWechatCustomer implements Serializable {
         this.nickname = sysWechatCustomerAddVo.getNickname();
         this.avatar = sysWechatCustomerAddVo.getAvatar();
         this.userId = sysWechatCustomerAddVo.getUserId();
+        this.departmentId = sysWechatCustomerAddVo.getDepartmentId();
         this.receptionist = sysWechatCustomerAddVo.getReceptionist();
         this.receptionistId = sysWechatCustomerAddVo.getReceptionistId();
     }

+ 4 - 0
src/main/java/com/ydtech/modules/admin/model/po/SysWechatCustomerDuty.java

@@ -10,13 +10,17 @@ import java.util.Date;
 
 import com.ydtech.modules.admin.model.vo.wechat.SysWechatCustomerDutyRulesVo;
 import com.ydtech.utils.DateTimeUtil;
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
 /**
  * 微信客服值班时间
  * @TableName sys_wechat_customer_duty
  */
 @TableName(value ="sys_wechat_customer_duty")
+@AllArgsConstructor
+@NoArgsConstructor
 @Data
 public class SysWechatCustomerDuty implements Serializable {
     /**

+ 46 - 0
src/main/java/com/ydtech/modules/admin/model/po/SysWechatCustomerRecording.java

@@ -0,0 +1,46 @@
+package com.ydtech.modules.admin.model.po;
+
+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 java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 微信客服记录表
+ * @TableName sys_wechat_customer_recording
+ */
+@TableName(value ="sys_wechat_customer_recording")
+@Data
+public class SysWechatCustomerRecording implements Serializable {
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 客服id
+     */
+    @TableField(value = "customer_id")
+    private Long customerId;
+
+    /**
+     * 用户id
+     */
+    @TableField(value = "user_id")
+    private String userId;
+
+    /**
+     * 创建时间
+     */
+    @TableField(value = "create_time")
+    private Date createTime;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+
+}

+ 3 - 0
src/main/java/com/ydtech/modules/admin/model/vo/wechat/SysWechatCustomerAddVo.java

@@ -29,6 +29,9 @@ public class SysWechatCustomerAddVo implements Serializable {
     @NotBlank(message = "请输入后线人员")
     private String userId;
 
+    @ApiModelProperty("企微选择的")
+    private String departmentId;
+
     @ApiModelProperty("接待人企业微信客服")
     @NotBlank(message = "请输入企业微信用户")
     private String receptionist;

+ 9 - 0
src/main/java/com/ydtech/modules/admin/model/vo/wechat/SysWechatCustomerVo.java

@@ -17,6 +17,9 @@ public class SysWechatCustomerVo {
     @TableField(value = "客服头像")
     private String avatar;
 
+    @TableField("客服链接")
+    private String avatarUrl;
+
     @ApiModelProperty("客服昵称")
     private String nickname;
 
@@ -26,9 +29,15 @@ public class SysWechatCustomerVo {
     @ApiModelProperty("工号")
     private String userId;
 
+    @ApiModelProperty("企业微信客服")
+    private String departmentId;
+
     @ApiModelProperty("企微用户")
     private String receptionist;
 
+    @ApiModelProperty("企微用户Id")
+    private String receptionistId;
+
     @ApiModelProperty("值班客服")
     private String dutyCustomer;
 

+ 7 - 0
src/main/java/com/ydtech/modules/admin/service/SysWechatCustomerBusinessService.java

@@ -1,5 +1,6 @@
 package com.ydtech.modules.admin.service;
 
+import com.ydtech.modules.admin.model.SysUser;
 import com.ydtech.modules.admin.model.vo.wechat.*;
 import com.ydtech.modules.order.entity.BasePageResult;
 import me.chanjar.weixin.common.error.WxErrorException;
@@ -61,4 +62,10 @@ public interface SysWechatCustomerBusinessService {
      */
     void updateWechatCustomer(String customerId, SysWechatCustomerAddVo sysWechatCustomerAddVo) throws WxErrorException;
 
+    /**
+     * 通过领导人的userId获取跳转链接
+     * @param user 用户
+     * @return 跳转链接
+     */
+    String getWeChatCustomer(SysUser user) throws WxErrorException;
 }

+ 13 - 0
src/main/java/com/ydtech/modules/admin/service/SysWechatCustomerRecordingService.java

@@ -0,0 +1,13 @@
+package com.ydtech.modules.admin.service;
+
+import com.ydtech.modules.admin.model.po.SysWechatCustomerRecording;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author Administrator
+* @description 针对表【sys_wechat_customer_recording(微信客服记录表)】的数据库操作Service
+* @createDate 2025-04-22 17:18:47
+*/
+public interface SysWechatCustomerRecordingService extends IService<SysWechatCustomerRecording> {
+
+}

+ 10 - 0
src/main/java/com/ydtech/modules/admin/service/SysWechatCustomerService.java

@@ -42,4 +42,14 @@ public interface SysWechatCustomerService extends BaseIService<SysWechatCustomer
      * @param sysWechatCustomerDutyRules 值班规则
      */
     void saveOrUpdateCustomerDutyRules(SysWechatCustomerDutyRulesVo sysWechatCustomerDutyRules);
+
+    /**
+     * 通过用户id 获取微信客服
+     * @param userId  用户id
+     * @return 微信客服
+     */
+    default SysWechatCustomer getByUserId(String userId){
+        return lambdaQuery().eq(SysWechatCustomer::getUserId, userId).one();
+    }
+
 }

+ 65 - 6
src/main/java/com/ydtech/modules/admin/service/impl/SysWechatCustomerBusinessServiceImpl.java

@@ -2,11 +2,14 @@ package com.ydtech.modules.admin.service.impl;
 
 import com.github.pagehelper.PageInfo;
 import com.ydtech.exception.SystemException;
+import com.ydtech.modules.admin.model.SysUser;
 import com.ydtech.modules.admin.model.po.SysWechatCustomer;
 import com.ydtech.modules.admin.model.po.SysWechatCustomerDuty;
+import com.ydtech.modules.admin.model.po.SysWechatCustomerRecording;
 import com.ydtech.modules.admin.model.vo.wechat.*;
 import com.ydtech.modules.admin.service.SysWechatCustomerBusinessService;
 import com.ydtech.modules.admin.service.SysWechatCustomerDutyService;
+import com.ydtech.modules.admin.service.SysWechatCustomerRecordingService;
 import com.ydtech.modules.admin.service.SysWechatCustomerService;
 import com.ydtech.modules.order.entity.BasePageResult;
 import com.ydtech.modules.order.entity.po.InsUploadFiles;
@@ -24,9 +27,12 @@ import me.chanjar.weixin.cp.bean.WxCpDepart;
 import me.chanjar.weixin.cp.bean.WxCpUser;
 import me.chanjar.weixin.cp.bean.kf.*;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.ObjectUtils;
 import org.springframework.util.StringUtils;
 
 import java.io.File;
+import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -48,6 +54,8 @@ public class SysWechatCustomerBusinessServiceImpl implements SysWechatCustomerBu
 
     private final SysWechatCustomerDutyService sysWechatCustomerDutyService;
 
+    private final SysWechatCustomerRecordingService sysWechatCustomerRecordingService;
+
     @Override
     public List<SysWechatCustomerDeptVo> getDeptByDeptId() throws WxErrorException {
         List<WxCpDepart> list = wxCpDepartmentService.list(null);
@@ -82,7 +90,7 @@ public class SysWechatCustomerBusinessServiceImpl implements SysWechatCustomerBu
                 .map(SysWechatCustomerVo::getId)
                 .collect(Collectors.toList());
 
-        if(!customer.isEmpty()){
+        if (!customer.isEmpty()) {
             // 获取值班时间列表
             Map<Long, List<SysWechatCustomerDuty>> dutyMap = sysWechatCustomerDutyService.lambdaQuery()
                     .in(SysWechatCustomerDuty::getId, customer)
@@ -93,14 +101,15 @@ public class SysWechatCustomerBusinessServiceImpl implements SysWechatCustomerBu
             // 设置值班时间
             sysWechatCustomerVoPageInfo.getList().forEach(sysWechatCustomerVo -> {
                 List<SysWechatCustomerDuty> sysWechatCustomerDuties = dutyMap.get(Long.valueOf(sysWechatCustomerVo.getId()));
-                List<String> collect = sysWechatCustomerDuties.stream()
-                        .map(x -> DateTimeUtil.startAndEndTimeFormatting(x.getStartTime(), x.getEndTime()))
-                        .collect(Collectors.toList());
-                sysWechatCustomerVo.setDutyDatetime(collect);
+                if (!CollectionUtils.isEmpty(sysWechatCustomerDuties)) {
+                    List<String> collect = sysWechatCustomerDuties.stream()
+                            .map(x -> DateTimeUtil.startAndEndTimeFormatting(x.getStartTime(), x.getEndTime()))
+                            .collect(Collectors.toList());
+                    sysWechatCustomerVo.setDutyDatetime(collect);
+                }
             });
         }
 
-
         return new BasePageResult<>(sysWechatCustomerQuery.getPageNum(), sysWechatCustomerQuery.getPageSize(), sysWechatCustomerVoPageInfo.getTotal(),
                 sysWechatCustomerVoPageInfo.getPages(), sysWechatCustomerVoPageInfo.getList());
     }
@@ -205,4 +214,54 @@ public class SysWechatCustomerBusinessServiceImpl implements SysWechatCustomerBu
         sysWechatCustomer.setAvatar(sysWechatCustomerAddVo.getAvatar());
         sysWechatCustomerService.updateById(sysWechatCustomer);
     }
+
+    @Override
+    public String getWeChatCustomer(SysUser user) throws WxErrorException {
+        SysWechatCustomer sysWechatCustomer = sysWechatCustomerService.getByUserId(user.getLeaderId());
+        if (!ObjectUtils.isEmpty(sysWechatCustomer)) {
+            List<SysWechatCustomerDuty> list = sysWechatCustomerDutyService.lambdaQuery()
+                    .ge(SysWechatCustomerDuty::getStartTime, LocalDateTime.now())
+                    .le(SysWechatCustomerDuty::getEndTime, LocalDateTime.now())
+                    .list();
+            if (sysWechatCustomer.getDutyCustomerId() > 0 && list != null && !list.isEmpty()) {
+                sysWechatCustomer = sysWechatCustomerService.getById(sysWechatCustomer.getDutyCustomerId());
+            }
+        }
+        if (ObjectUtils.isEmpty(sysWechatCustomer)) {
+            SysWechatCustomerRecording sysWechatCustomerRecording = sysWechatCustomerRecordingService.lambdaQuery()
+                    .eq(SysWechatCustomerRecording::getUserId, user.getId())
+                    .orderByDesc(SysWechatCustomerRecording::getCreateTime)
+                    .one();
+            if (!ObjectUtils.isEmpty(sysWechatCustomerRecording)) {
+                sysWechatCustomerRecording = sysWechatCustomerRecordingService.lambdaQuery()
+                        .orderByDesc(SysWechatCustomerRecording::getCreateTime)
+                        .last("limit 1")
+                        .one();
+            }
+
+            Long i = Optional.ofNullable(sysWechatCustomerRecording)
+                    .map(SysWechatCustomerRecording::getCustomerId)
+                    .orElse(0L);
+            sysWechatCustomer = sysWechatCustomerService.lambdaQuery()
+                    .ge(i > 0, SysWechatCustomer::getId, sysWechatCustomerRecording.getCustomerId())
+                    .orderByDesc(SysWechatCustomer::getId)
+                    .last("limit 1")
+                    .one();
+            if (ObjectUtils.isEmpty(sysWechatCustomer)) {
+                throw new SystemException("请联系管理员穿件客服");
+            }
+            SysWechatCustomerRecording customerRecording = new SysWechatCustomerRecording();
+            customerRecording.setCustomerId(sysWechatCustomer.getId());
+            customerRecording.setUserId(user.getId());
+            sysWechatCustomerRecordingService.save(customerRecording);
+        }
+
+        String openKfId = sysWechatCustomer.getOpenKfId();
+        WxCpKfAccountLink wxCpKfAccountLink = new WxCpKfAccountLink();
+        wxCpKfAccountLink.setOpenKfid(openKfId);
+        wxCpKfAccountLink.setScene(user.getId());
+        WxCpKfAccountLinkResp accountLink = wxCpKfService.getAccountLink(wxCpKfAccountLink);
+        return accountLink.getUrl();
+    }
+
 }

+ 2 - 0
src/main/java/com/ydtech/modules/admin/service/impl/SysWechatCustomerDutyServiceImpl.java

@@ -32,6 +32,8 @@ import java.util.stream.Collectors;
 public class SysWechatCustomerDutyServiceImpl extends ServiceImpl<SysWechatCustomerDutyMapper, SysWechatCustomerDuty>
         implements SysWechatCustomerDutyService {
 
+
+
 }
 
 

+ 22 - 0
src/main/java/com/ydtech/modules/admin/service/impl/SysWechatCustomerRecordingServiceImpl.java

@@ -0,0 +1,22 @@
+package com.ydtech.modules.admin.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.modules.admin.model.po.SysWechatCustomerRecording;
+import com.ydtech.modules.admin.service.SysWechatCustomerRecordingService;
+import com.ydtech.modules.admin.dao.SysWechatCustomerRecordingMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 针对表【sys_wechat_customer_recording(微信客服记录表)】的数据库操作Service实现
+* @createDate 2025-04-22 17:18:47
+*/
+@Service
+public class SysWechatCustomerRecordingServiceImpl extends ServiceImpl<SysWechatCustomerRecordingMapper, SysWechatCustomerRecording>
+    implements SysWechatCustomerRecordingService{
+
+}
+
+
+
+

+ 3 - 1
src/main/java/com/ydtech/modules/admin/service/impl/SysWechatCustomerServiceImpl.java

@@ -52,7 +52,9 @@ public class SysWechatCustomerServiceImpl extends ServiceImpl<SysWechatCustomerM
         List<SysWechatCustomerDuty> sysWechatCustomerDuties = sysWechatCustomerDutyService.getByCustomerId(customerId);
         SysWechatCustomerDutyRulesVo sysWechatCustomerDutyRulesVo = new SysWechatCustomerDutyRulesVo();
         sysWechatCustomerDutyRulesVo.setCustomerId(String.valueOf(customer.getId()));
-        sysWechatCustomerDutyRulesVo.setDutyCustomerId(String.valueOf(customer.getDutyCustomerId()));
+        if (customer.getDutyCustomerId() > 0) {
+            sysWechatCustomerDutyRulesVo.setDutyCustomerId(String.valueOf(customer.getDutyCustomerId()));
+        }
         List<SysWechatCustomerDutyRulesVo.DutyDateTime> collect = sysWechatCustomerDuties.stream()
                 .map(sysWechatCustomerDuty -> {
                     SysWechatCustomerDutyRulesVo.DutyDateTime dutyDateTime = new SysWechatCustomerDutyRulesVo.DutyDateTime();

+ 16 - 0
src/main/resources/mapper/SysWechatCustomerRecordingMapper.xml

@@ -0,0 +1,16 @@
+<?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="com.ydtech.modules.admin.dao.SysWechatCustomerRecordingMapper">
+
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.po.SysWechatCustomerRecording">
+            <id property="id" column="id" jdbcType="INTEGER"/>
+            <result property="customerId" column="customer_id" jdbcType="INTEGER"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,customer_id,create_time
+    </sql>
+</mapper>

+ 4 - 1
src/main/resources/mapper/modules/admin/SysWechatCustomerMapper.xml

@@ -22,11 +22,14 @@
 
     <select id="getByNickname" resultType="com.ydtech.modules.admin.model.vo.wechat.SysWechatCustomerVo">
         select c.id as id,
-        f.url as avatar,
+        f.id as avatar,
+        f.url as avatarUrl,
         c.nickname as nickname,
         u.name as username,
         u.id as userId,
+        c.department_id as departmentId,
         c.receptionist as receptionist,
+        c.receptionist_id as receptionistId,
         swc.nickname as dutyCustomer
         from sys_wechat_customer c
         left join sys_user u on u.id = c.user_id