puzhibing
22 小时以前 722224153cf3214909bbc6ec627db0357f1f6ae2
修改bug和调试中台接口
10个文件已修改
1个文件已添加
190 ■■■■ 已修改文件
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/GunsApplication.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/EmployeeUtil.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongProperties.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/DeleteStafNodeRequest.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/EditStaffNodeRequest.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/GetStaffNodeRequest.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/SaveStaffNode.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/SaveStaffNodeRequest.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/StaffNodeInfo.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/GunsApplication.java
@@ -38,6 +38,7 @@
            SpringApplication.run(GunsApplication.class, args);
            logger.info("GunsApplication is success!");
        } catch (Exception e) {
            e.printStackTrace();
            logger.error("GunsApplication启动异常", e);
        }
    }
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/EmployeeUtil.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.open.common.util.OpenApiClient;
import com.open.common.util.SystemParameterNames;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.*;
@@ -27,7 +28,7 @@
     * @param request
     * @return
     */
    public static Boolean saveStaffNode(SaveStaffNodeRequest request){
    public static SaveStaffNode saveStaffNode(SaveStaffNodeRequest request){
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/saveStaffNode";
        //私钥文件
@@ -46,7 +47,7 @@
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put("content", JSON.toJSONString(request));
        contentMap.put("content", new Gson().toJson(request));
        log.info("【企业增加员工】请求地址:" + url);
        log.info("【企业增加员工】请求参数:" + JSON.toJSONString(contentMap));
        String result = OpenApiClient.sendCommonHttpRequst(url, headers, "POST", skprivateKeyFile, timeStamp, contentMap);
@@ -63,7 +64,8 @@
            log.error("【企业增加员工】失败:" + object.toJSONString());
            throw new RuntimeException("【企业增加员工】失败:" + object.toJSONString());
        }
        return true;
        SaveStaffNode saveStaffNode = jsonObject.getObject("object", SaveStaffNode.class);
        return saveStaffNode;
    }
    
    
@@ -91,7 +93,7 @@
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put("content", JSON.toJSONString(request));
        contentMap.put("content", new Gson().toJson(request));
        log.info("【企业修改员工信息】请求地址:" + url);
        log.info("【企业修改员工信息】请求参数:" + JSON.toJSONString(contentMap));
        String result = OpenApiClient.sendCommonHttpRequst(url, headers, "POST", skprivateKeyFile, timeStamp, contentMap);
@@ -137,7 +139,7 @@
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put("content", JSON.toJSONString(request));
        contentMap.put("content", new Gson().toJson(request));
        log.info("【企业删除人员】请求地址:" + url);
        log.info("【企业删除人员】请求参数:" + JSON.toJSONString(contentMap));
        String result = OpenApiClient.sendCommonHttpRequst(url, headers, "POST", skprivateKeyFile, timeStamp, contentMap);
@@ -182,7 +184,7 @@
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put("content", JSON.toJSONString(request));
        contentMap.put("content", new Gson().toJson(request));
        log.info("【根据员工ID获取人员信息】请求地址:" + url);
        log.info("【根据员工ID获取人员信息】请求参数:" + JSON.toJSONString(contentMap));
        String result = OpenApiClient.sendCommonHttpRequst(url, headers, "GET", skprivateKeyFile, timeStamp, contentMap);
@@ -199,7 +201,7 @@
            log.error("【根据员工ID获取人员信息】失败:" + object.toJSONString());
            throw new RuntimeException("【根据员工ID获取人员信息】失败:" + object.toJSONString());
        }
        StaffNodeInfo staffNodeInfo = jsonObject.getObject("object", StaffNodeInfo.class);
        StaffNodeInfo staffNodeInfo = object.getObject("data", StaffNodeInfo.class);
        return staffNodeInfo;
    }
}
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongProperties.java
@@ -13,7 +13,7 @@
    /**
     * 私钥地址
     */
    String privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem";
    String privateKeyPath = "E:\\IDEA Workspaces\\QianYunTong\\private_key_test.pem";
    /**
     * 消费者账号
     */
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/DeleteStafNodeRequest.java
@@ -11,7 +11,7 @@
    /**
     * 人员ID
     */
    private Long empId;
    private Integer empId;
    /**
     * 手机号
     */
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/EditStaffNodeRequest.java
@@ -11,23 +11,39 @@
    /**
     * 人员ID
     */
    private Long empId;
    private Integer empId;
    /**
     * 操作人手机号
     */
    private String mobile;
    /**
     * 操作人企业ID
     */
    private String entercode;
    /**
     * 企业ID
     */
    private String enterNum;
    private Long enterId;
    /**
     * 人员显示名
     */
    private String empName;
    /**
     * 人员显示名
     */
    private String empNickname;
    /**
     * 手机号
     */
    private String mphone;
    /**
     * 登录账号
     */
    private String loginNo;
    /**
     * 人员性别(男\女)
     */
    private String empSex;
    /**
     * 人员手机号
     */
    private String mphone;
    /**
     * 人员邮箱
     */
@@ -35,11 +51,11 @@
    /**
     * 员工所属部门ID多个部门英文; 分割
     */
    private String deptIds;
    private Integer deptId;
    /**
     * 员工职务ID
     */
    private Long positionId;
    private Integer positionId;
    /**
     * 员工职务名称,如不知道ID可以直接传入名称
     */
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/GetStaffNodeRequest.java
@@ -11,7 +11,7 @@
    /**
     * 人员ID
     */
    private Long empId;
    private Integer empId;
    /**
     * 操作人手机号
     */
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/SaveStaffNode.java
New file
@@ -0,0 +1,31 @@
package com.stylefeng.guns.modular.system.util.qianyuntong.model;
import lombok.Data;
/**
 * @author zhibing.pu
 * @date 2025/6/14 14:10
 */
@Data
public class SaveStaffNode {
    /**
     * 人员ID
     */
    private Long empId;
    /**
     * 员工名称
     */
    private String empName;
    /**
     * 员工昵称
     */
    private String empNickname;
    /**
     * 手机号
     */
    private String mphone;
    /**
     * 登录账号
     */
    private String loginNo;
}
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/SaveStaffNodeRequest.java
@@ -43,11 +43,11 @@
    /**
     * 员工所属部分ID
     */
    private Long deptIds;
    private Integer deptId;
    /**
     * 员工职务ID
     */
    private Long positionId;
    private Integer positionId;
    /**
     * 员工职务名称
     */
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/StaffNodeInfo.java
@@ -13,9 +13,21 @@
     */
    private Integer empId;
    /**
     * 主要号码
     */
    private String mainMphone;
    /**
     * 备注
     */
    private String remark;
    /**
     * 企业ID
     */
    private String enterNum;
    /**
     * 加密企业名称
     */
    private String empNameEncode;
    /**
     * 人员名称
     */
@@ -37,13 +49,25 @@
     */
    private String mphone;
    /**
     * 人员邮箱
     * 人员邮箱加密
     */
    private String mainEmailEncode;
    /**
     * 所属企业id
     */
    private Long enterId;
    /**
     * 唯一编号
     */
    private String onconuuid;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 员工所属部门ID多个部门英文; 分割
     */
    private String deptIds;
    private Integer deptId;
    /**
     * 员工职位ID
     */
@@ -60,4 +84,8 @@
     * 隐藏手机号 1 是 0 否
     */
    private Integer hideMobile;
    /**
     * 有效状态(0=否,1=是)
     */
    private String isValid;
}
DriverQYTTravel/guns-admin/src/main/resources/application.yml
@@ -71,7 +71,7 @@
spring:
  datasource:
    url: jdbc:mysql://127.0.0.1:3306/qyttravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai
    url: jdbc:mysql://127.0.0.1:3306/jyxtravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai
    username: root
    password: 123456
    db-name: qyttravel #用来搜集数据库的所有表
DriverQYTTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java
@@ -1,6 +1,9 @@
package com.stylefeng.guns;
import com.stylefeng.guns.modular.system.util.qianyuntong.EmployeeUtil;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.DeleteStafNodeRequest;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.EditStaffNodeRequest;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.GetStaffNodeRequest;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.SaveStaffNodeRequest;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -53,26 +56,51 @@
//        request.setCode("1111");
//        UserUtil.resetPwd(request);
        
        SaveStaffNodeRequest request = new SaveStaffNodeRequest();
        request.setMobile("15828353127");
        request.setEntercode("981100006005878");
        request.setEmpName("超级管理员");
        request.setEmpNickname("超级管理员");
        request.setLoginNo("18200000000");
        request.setEmpSex("男");
        request.setMphone("18200000000");
        request.setEmail("sn93@qq.com");
        request.setDeptIds(0L);
        request.setPositionId(1L);
        request.setSuperLevel(0);
        request.setHideMobile(0);
        EmployeeUtil.saveStaffNode(request);
//        GetStaffNodeRequest request = new GetStaffNodeRequest();
//        request.setEmpId(1L);
//        SaveStaffNodeRequest request = new SaveStaffNodeRequest();
//        request.setMobile("15828353127");
//        request.setEntercode("981100006005878");
//        EmployeeUtil.getStaffNode(request);
//        request.setEmpName("超级管理员");
//        request.setEmpNickname("超级管理员");
//        request.setLoginNo("18200000000");
//        request.setEmpSex("男");
//        request.setMphone("18200000000");
//        request.setEmail("sn93@qq.com");
//        request.setDeptId(0);
//        request.setPositionId(1);
//        request.setSuperLevel(0);
//        request.setHideMobile(0);
//        EmployeeUtil.saveStaffNode(request);
        //接口参数有问题
//        EditStaffNodeRequest request = new EditStaffNodeRequest();
//        request.setEmpId(11448036);
//        request.setMobile("15828353127");
//        request.setEntercode("981100006005878");
//        request.setEnterId(981100006005878l);
//        request.setEmpName("超级管理员");
//        request.setEmpNickname("超管");
//        request.setLoginNo("18200000000");
//        request.setMphone("18200000000");
//        request.setEmail("sn93@qq.com");
//        request.setDeptId(0);
//        request.setPositionId(1);
//        request.setSuperLevel(0);
//        request.setHideMobile(0);
//        EmployeeUtil.editStaffNode(request);
        GetStaffNodeRequest request = new GetStaffNodeRequest();
        request.setEmpId(11448036);
        request.setMobile("15828353127");
        request.setEntercode("981100006005878");
        EmployeeUtil.getStaffNode(request);
//        DeleteStafNodeRequest request = new DeleteStafNodeRequest();
//        request.setEmpId(11448036);
//        request.setMobile("15828353127");
//        request.setEntercode("981100006005878");
//        EmployeeUtil.ecrmDeleteStafNode(request);
    }
}