| | |
| | | @ApiOperation(value = "用户订单匹配列表页面,用户订单去匹配司机的行程", httpMethod = "POST") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "int"), |
| | | @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近", dataType = "int"), |
| | | @ApiImplicitParam(name = "lon", value = "经度", dataType = "double"), |
| | | @ApiImplicitParam(name = "lat", value = "纬度", dataType = "double"), |
| | | @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近", dataType = "int") |
| | | }) |
| | | public Object userMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type,Double lon,Double lat){ |
| | | public Object userMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type){ |
| | | try { |
| | | if(ToolUtil.isEmpty(orderId)){ |
| | | return ResultUtil.paranErr("orderId不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(type)){ |
| | | return ResultUtil.paranErr("type不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(lon)){ |
| | | return ResultUtil.paranErr("lon不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(lat)){ |
| | | return ResultUtil.paranErr("lat不能为空"); |
| | | } |
| | | OrderRide orderRide=orderRideService.selectById(orderId); |
| | | current=current==null?1:current; |
| | |
| | | OrderRideVo orderRideVo=new OrderRideVo(); |
| | | orderRideVo.setCurrent(current); |
| | | orderRideVo.setSize(size); |
| | | orderRideVo.setLon(lon); |
| | | orderRideVo.setLat(lat); |
| | | orderRideVo.setLon(orderRide.getStartLon()); |
| | | orderRideVo.setLat(orderRide.getStartLat()); |
| | | orderRideVo.setNum(orderRide.getNum()); |
| | | orderRideVo.setType(type+1);//搜索条件:1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近 |
| | | List<OrderRideVo> orderRides=orderTravelService.getOrderTravel(orderRideVo); |
| | |
| | | @ApiOperation(value = "司机订单匹配列表页面(司机的订单去匹配乘客订单)", httpMethod = "POST") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "int"), |
| | | @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近,4价格最低", dataType = "int"), |
| | | @ApiImplicitParam(name = "lon", value = "经度", dataType = "double"), |
| | | @ApiImplicitParam(name = "lat", value = "纬度", dataType = "double"), |
| | | @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近,4价格最低", dataType = "int") |
| | | }) |
| | | public Object driverMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type,Double lon,Double lat){ |
| | | public Object driverMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type){ |
| | | try { |
| | | try { |
| | | if(ToolUtil.isEmpty(orderId)){ |
| | |
| | | } |
| | | if(ToolUtil.isEmpty(type)){ |
| | | return ResultUtil.paranErr("type不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(lon)){ |
| | | return ResultUtil.paranErr("lon不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(lat)){ |
| | | return ResultUtil.paranErr("lat不能为空"); |
| | | } |
| | | OrderTravel orderTravel=orderTravelService.selectById(orderId); |
| | | current=current==null?1:current; |
| | |
| | | orderRideVo.setCurrent(current); |
| | | orderRideVo.setSize(size); |
| | | orderRideVo.setNum(orderTravel.getNum()); |
| | | orderRideVo.setLon(lon); |
| | | orderRideVo.setLat(lat); |
| | | orderRideVo.setLon(orderTravel.getStartLon()); |
| | | orderRideVo.setLat(orderTravel.getStartLat()); |
| | | orderRideVo.setType(type+1);//搜索条件:1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近,4价格最低 |
| | | List<OrderRideVo> orderRides=orderRideService.getOrderRide(orderRideVo); |
| | | return ResultUtil.success(orderRides); |
| | |
| | | <!--用户顺风车订单 type :1待处理的订单,2根据线路、时间,人数综合匹配排序 3按时间排序最早,4距离最近排序,5价格最高 and r.startTime>=now()--> |
| | | <select id="getOrderRide" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideVo"> |
| | | select r.*,calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance,u.avatar as headImg,u.sex,u.totalOrders,u.nickName as name, |
| | | r.id as userOrderId,t.id as driverOrderId from app_order_ride r |
| | | r.id as userOrderId,t.id as driverOrderId, r.startLon as lon, r.startLat as lat |
| | | from app_order_ride r |
| | | left join app_order_travel t on r.travelId=t.id |
| | | left join t_user u on r.userId=u.id |
| | | left join t_user u1 on r.driverId=u1.driverId |
| | |
| | | <!--获取用户身份和司机身份的订单 只需要按照时间排序--> |
| | | <select id="getOrderRideAndTravel" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideVo"> |
| | | select * from ( |
| | | select r.addTime,r.startTime,1 as type,r.state,r.startName,r.endName,r.userId,t.driverId,r.num,r.id as userOrderId,t.id as driverOrderId,r.money from app_order_ride r |
| | | select r.addTime,r.startTime,1 as type,r.state,r.startName,r.endName,r.userId,t.driverId,r.num,r.id as userOrderId,t.id as driverOrderId,r.money, r.startLon as lon, r.startLat as lat from app_order_ride r |
| | | left join app_order_travel t on r.travelId=t.id where r.userId=#{userId} |
| | | UNION |
| | | select t.addTime,t.startTime,2 as type,t.state,t.startName,t.endName,0,t.driverId,r.num,r.id as userOrderId,t.id as driverOrderId,0 as money from app_order_travel t |
| | | select t.addTime,t.startTime,2 as type,t.state,t.startName,t.endName,0,t.driverId,r.num,r.id as userOrderId,t.id as driverOrderId,0 as money, r.startLon as lon, r.startLat as lat from app_order_travel t |
| | | left join app_order_ride r on r.travelId=t.id where t.driverId=#{driverId} |
| | | ) o |
| | | order by o.addTime desc |
| | |
| | | <select id="getOrderInfo" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideInfoVo"> |
| | | select r.addTime,r.startTime,r.endName,r.startName,r.money,r.id as userOrderId,r.state,t.id as driverOrderId,r.isEvaluate,t.isComplaint, |
| | | r.num,r.userId,r.driverId ,u.avatar as headImg,CASE when r.isDai=1 then r.lxPhone else u.phone end as phone,u.sex,u.nickName as name,u.totalOrders, |
| | | calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance |
| | | calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance,r.startLat as lat, r.startLon as lon |
| | | from (select * from app_order_ride where id=#{userOrderId}) r |
| | | left join app_order_travel t on r.travelId=t.id |
| | | left join app_driver_ride d on d.id=r.driverId |
| | |
| | | <!--顺风车司机订单行程 type :1待处理的订单,2根据线路、时间,人数综合匹配排序 3按时间排序,4距离最近排序 and r.startTime>=now()--> |
| | | <select id="getOrderTravel" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideVo"> |
| | | select r.*,calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance,d.totalOrders,u.sex,u.avatar as headImg,u.nickName as name, |
| | | r.id as driverOrderId,i.id as userOrderId |
| | | r.id as driverOrderId,i.id as userOrderId, r.startLon as lon, r.startLat as lat |
| | | from app_order_travel r |
| | | left join app_order_ride i on i.travelId=r.id |
| | | left join t_user u on u.driverId = r.driverId |
| | |
| | | <select id="getOrderInfo" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideInfoVo"> |
| | | select t.addTime,r.startTime,r.endName,r.startName,r.money,r.id as userOrderId,r.state,t.id as driverOrderId,r.isComplaint,r.num, |
| | | r.userId,r.driverId,u.avatar as headImg,u.phone,u.sex,u.nickName as realName as name,d.carNum,d.carType,d.totalOrders,IFNULL(format(d.evaluateScore/d.evaluateNum,2),0)as evaluateScore,r.evaluateScoreUser,r.isEvaluate |
| | | ,r.content |
| | | ,r.content,t.startLat as lat, t.startLon as lon |
| | | from (select * from app_order_travel where id= #{driverOrderId}) t |
| | | left join app_order_ride r on t.id=r.travelId |
| | | left join app_driver_ride d on d.id=t.driverId |
| | |
| | | |
| | | if (null == userInfo) { |
| | | userInfo = new UserInfo(); |
| | | userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png"); |
| | | userInfo.setPhone(phone); |
| | | userInfo.setPassWord(ShiroKit.md5("", salt)); |
| | | userInfo.setNickName(nickName); |
| | |
| | | UserInfo userInfo = userInfoMapper.queryByPhone(phone); |
| | | if (null == userInfo) { |
| | | userInfo = new UserInfo(); |
| | | userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png"); |
| | | userInfo.setPhone(phone); |
| | | userInfo.setPassWord(ShiroKit.md5("", salt)); |
| | | userInfo.setNickName(this.getDefaultName()); |
| | |
| | | } |
| | | if (null == userInfo) { |
| | | userInfo = new UserInfo(); |
| | | userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png"); |
| | | userInfo.setPassWord(ShiroKit.md5("", salt)); |
| | | userInfo.setRegistIp(registIp); |
| | | userInfo.setSex(sex); |
| | |
| | | int i =0; |
| | | if(null == userInfo){ |
| | | userInfo = new UserInfo(); |
| | | userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png"); |
| | | if(ToolUtil.isEmpty(phone)){ |
| | | String phone2 = getPhone(sessionKey, encryptedData, iv); |
| | | List<UserInfo> phone1 = userInfoMapper.selectList(new EntityWrapper<UserInfo>().eq("phone", phone2).eq("state",1).ne("flag",3)); |
| | |
| | | |
| | | if (null == userInfo) { |
| | | userInfo = new UserInfo(); |
| | | userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png"); |
| | | userInfo.setPhone(phone); |
| | | userInfo.setPassWord(ShiroKit.md5("", salt)); |
| | | userInfo.setNickName(nickName); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | import org.springframework.beans.BeansException; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.context.ApplicationContextAware; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public class SpringContextsUtil implements ApplicationContextAware{ |
| | | |
| | | private static ApplicationContext applicationContext; |
| | | |
| | | @Override |
| | | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { |
| | | if (SpringContextsUtil.applicationContext == null) { |
| | | SpringContextsUtil.applicationContext = applicationContext; |
| | | } |
| | | } |
| | | // 获取applicationContext |
| | | public static ApplicationContext getApplicationContext() { |
| | | return applicationContext; |
| | | } |
| | | // 通过name获取 Bean. |
| | | public static Object getBean(String name) { |
| | | return getApplicationContext().getBean(name); |
| | | } |
| | | // 通过class获取Bean. |
| | | public static <T> T getBean(Class<T> clazz) { |
| | | return getApplicationContext().getBean(clazz); |
| | | } |
| | | // 通过name,以及Clazz返回指定的Bean |
| | | public static <T> T getBean(String name, Class<T> clazz) { |
| | | System.out.println(getApplicationContext().getBean(name, clazz)); |
| | | return getApplicationContext().getBean(name, clazz); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.open.common.util.OpenApiClient; |
| | | import com.open.common.util.SystemParameterNames; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.SpringContextsUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | */ |
| | | @Slf4j |
| | | public class EmployeeUtil { |
| | | |
| | | private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig(); |
| | | |
| | | public static void main(String[] args) { |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | |
| | | */ |
| | | public static ResultUtil<SaveStaffNode> saveStaffNode(SaveStaffNodeRequest request) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/saveStaffNode"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/saveStaffNode"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【企业增加员工】请求地址:" + url); |
| | | log.info("【企业增加员工】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | */ |
| | | public static Boolean editStaffNode(EditStaffNodeRequest request){ |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/editStaffNode"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/editStaffNode"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【企业修改员工信息】请求地址:" + url); |
| | | log.info("【企业修改员工信息】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | */ |
| | | public static Boolean ecrmDeleteStafNode(DeleteStafNodeRequest request){ |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/ecrmDeleteStafNode"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/ecrmDeleteStafNode"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | String content = "";//业务参数 |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【企业删除人员】请求地址:" + url); |
| | | log.info("【企业删除人员】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | */ |
| | | public static StaffNodeInfo getStaffNode(GetStaffNodeRequest request){ |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/getStaffNode"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/getStaffNode"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【根据员工ID获取人员信息】请求地址:" + url); |
| | | log.info("【根据员工ID获取人员信息】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.open.common.util.OpenApiClient; |
| | | import com.open.common.util.SystemParameterNames; |
| | | import com.stylefeng.guns.modular.system.util.SpringContextsUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | */ |
| | | @Slf4j |
| | | public class EnterpriseUtil { |
| | | |
| | | private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig(); |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | */ |
| | | public static CheckEnterExist checkEnterExistByEnterIdCardNo(String uscc) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/check_enter_exist_by_enterIdCardNo"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/check_enter_exist_by_enterIdCardNo"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | map.put(SystemParameterNames.getAppKey(), appKey); |
| | | map.put(SystemParameterNames.getMessage_id(), messageId); |
| | | map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | map.put("content", "{\"uscc\":\"" + uscc + "\"}"); |
| | | log.info("【根据社会信用代码判断企业是否已存在】请求地址:" + url); |
| | | log.info("【根据社会信用代码判断企业是否已存在】请求参数:" + JSON.toJSONString(map)); |
| | |
| | | */ |
| | | public static CheckEnterExist checkEnterNameExist(String enterName) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/checkEnterNameExist"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/checkEnterNameExist"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | map.put(SystemParameterNames.getAppKey(), appKey); |
| | | map.put(SystemParameterNames.getMessage_id(), messageId); |
| | | map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | map.put("content", "{\"enterName\":\"" + enterName + "\"}"); |
| | | log.info("【根据企业名称判断企业是否已存在】请求地址:" + url); |
| | | log.info("【根据企业名称判断企业是否已存在】请求参数:" + JSON.toJSONString(map)); |
| | |
| | | */ |
| | | public static EnterpriseInfo getEnterpriseDetail(String enter_code) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/getEnterpriseDetail"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/getEnterpriseDetail"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | map.put(SystemParameterNames.getAppKey(), appKey); |
| | | map.put(SystemParameterNames.getMessage_id(), messageId); |
| | | map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | map.put("content", "{\"enter_code\":\"" + enter_code + "\"}"); |
| | | log.info("【查询企业详情】请求地址:" + url); |
| | | log.info("【查询企业详情】请求参数:" + JSON.toJSONString(map)); |
| | |
| | | */ |
| | | public static Boolean modifyEnterpriseInfo(ModifyEnterpriseInfoRequest request) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/modifyEnterpriseInfo"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/modifyEnterpriseInfo"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | map.put(SystemParameterNames.getAppKey(), appKey); |
| | | map.put(SystemParameterNames.getMessage_id(), messageId); |
| | | map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | map.put("content", new Gson().toJson(request)); |
| | | log.info("【修改企业基本信息】请求地址:" + url); |
| | | log.info("【修改企业基本信息】请求参数:" + JSON.toJSONString(map)); |
| | |
| | | */ |
| | | public static CreateEnterprise createEnterprise(CreateEnterpriseRequest request) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/createEnterprise"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/createEnterprise"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | map.put(SystemParameterNames.getAppKey(), appKey); |
| | | map.put(SystemParameterNames.getMessage_id(), messageId); |
| | | map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | map.put("content", new Gson().toJson(request)); |
| | | |
| | | log.info("【创建企业】请求地址:" + url); |
| | |
| | | */ |
| | | public static boolean delEnterprise(String enterNum, String operator) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/delCompany"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/delCompany"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | map.put(SystemParameterNames.getAppKey(), appKey); |
| | | map.put(SystemParameterNames.getMessage_id(), messageId); |
| | | map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | map.put("content", "{\"enterNum\":\"" + enterNum + "\",\"operator\":\"" + operator + "\"}"); |
| | | |
| | | log.info("【删除企业信息】请求地址:" + url); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.open.common.util.OpenApiClient; |
| | | import com.open.common.util.SystemParameterNames; |
| | | import com.stylefeng.guns.modular.system.util.SpringContextsUtil; |
| | | import com.stylefeng.guns.modular.system.util.UUIDUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | */ |
| | | @Slf4j |
| | | public class OrderUtil { |
| | | |
| | | private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig(); |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | |
| | | TradeRequest request = new TradeRequest<TradePayOff1Data>(); |
| | | request.setSceneId("1911676727023968256"); |
| | | request.setAppId(QianYunTongProperties.appkey); |
| | | request.setAppId(qianYunTongConfig.getAppkey()); |
| | | request.setConfigVersion(1); |
| | | request.setRequestId(UUIDUtil.getRandomCode()); |
| | | request.setData(tradePayOff1Data); |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/tradePayOff"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/tradePayOff"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUIDUtil.getRandomCode(); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【拉起支付】请求地址:" + url); |
| | | log.info("【拉起支付】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | request.setScene("TRAFFIC"); |
| | | request.setPartnerId("522700"); |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/createTravelItinerary"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/createTravelItinerary"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUIDUtil.getRandomCode(); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【创建行程单】请求地址:" + url); |
| | | log.info("【创建行程单】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | request.setScene("TRAFFIC"); |
| | | request.setPartnerId("522700"); |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/modifyTravelItinerary"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/modifyTravelItinerary"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUIDUtil.getRandomCode(); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【修改行程单】请求地址:" + url); |
| | | log.info("【修改行程单】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | request.setPartnerId("522700"); |
| | | |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/getTravelItineraryList"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/getTravelItineraryList"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUIDUtil.getRandomCode(); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【行程单列表查询】请求地址:" + url); |
| | | log.info("【行程单列表查询】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | |
| | | TradeRequest request = new TradeRequest<TradeOrderCreateData>(); |
| | | request.setSceneId("1945688132719169536"); |
| | | request.setAppId(QianYunTongProperties.appkey); |
| | | request.setAppId(qianYunTongConfig.getAppkey()); |
| | | request.setConfigVersion(1); |
| | | request.setRequestId(UUIDUtil.getRandomCode()); |
| | | request.setData(tradeOrderCreateData); |
| | | |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/tradeOrderCreate"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/tradeOrderCreate"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUIDUtil.getRandomCode(); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【订单创建及拉起支付】请求地址:" + url); |
| | | log.info("【订单创建及拉起支付】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | createOrderRequest.setChannelSource("GRJYCXWXXCX"); |
| | | |
| | | TradeRequest request = new TradeRequest<CreateOrderRequest>(); |
| | | request.setSceneId(QianYunTongProperties.sceneId); |
| | | request.setAppId(QianYunTongProperties.appkey); |
| | | request.setSceneId("1948289607125864448"); |
| | | request.setAppId(qianYunTongConfig.getAppkey()); |
| | | request.setConfigVersion(1); |
| | | request.setRequestId(UUIDUtil.getRandomCode()); |
| | | request.setData(createOrderRequest); |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/tradeOrderCreate"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/tradeOrderCreate"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUIDUtil.getRandomCode(); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【订单创建】请求地址:" + url); |
| | | log.info("【订单创建】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | |
| | | TradeRequest request = new TradeRequest<TradePayOffData>(); |
| | | request.setSceneId("1774717104844095488"); |
| | | request.setAppId(QianYunTongProperties.appkey); |
| | | request.setAppId(qianYunTongConfig.getAppkey()); |
| | | request.setConfigVersion(2); |
| | | request.setRequestId(UUIDUtil.getRandomCode()); |
| | | request.setData(tradePayOffData); |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/tradePayOff"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/tradePayOff"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUIDUtil.getRandomCode(); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【(补偿单)拉起支付】请求地址:" + url); |
| | | log.info("【(补偿单)拉起支付】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | request.setData(getPaymentInfoDataRequest); |
| | | |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/paymentInfo"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/paymentInfo"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUIDUtil.getRandomCode(); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【查询支付单信息】请求地址:" + url); |
| | | log.info("【查询支付单信息】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | request.setPayChannel(6); |
| | | request.setIsCompensate(1); |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/paymentOrder"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/paymentOrder"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUIDUtil.getRandomCode(); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【(补偿单)支付成功通知】请求地址:" + url); |
| | | log.info("【(补偿单)支付成功通知】请求参数:" + JSON.toJSONString(contentMap)); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.qianyuntong; |
| | | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2025/7/8 11:31 |
| | | */ |
| | | @Component |
| | | public class QianYunTongConfig { |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String activeProfile; |
| | | |
| | | |
| | | /** |
| | | * appkey |
| | | */ |
| | | private String appkey; |
| | | /** |
| | | * 私钥地址 |
| | | */ |
| | | private String privateKeyPath; |
| | | /** |
| | | * 消费者账号 |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * 状态 |
| | | * 1:生产环境 |
| | | * 2:测试环境 |
| | | */ |
| | | private String status; |
| | | /** |
| | | * API地址 |
| | | */ |
| | | private String apiUrl; |
| | | /** |
| | | * 桶名 |
| | | */ |
| | | private String bucketName; |
| | | /** |
| | | * 小程序appId |
| | | */ |
| | | private String appId; |
| | | /** |
| | | * HOS的基础路径(公共前缀) |
| | | */ |
| | | private String endPoint; |
| | | /** |
| | | * 账户的ID |
| | | */ |
| | | private String account; |
| | | /** |
| | | * 向UAAS服务请求到的access_key |
| | | */ |
| | | private String accessKey; |
| | | /** |
| | | * 向UAAS服务请求到的secret_key |
| | | */ |
| | | private String secretKey; |
| | | |
| | | public String getActiveProfile() { |
| | | return activeProfile; |
| | | } |
| | | |
| | | public void setActiveProfile(String activeProfile) { |
| | | this.activeProfile = activeProfile; |
| | | } |
| | | |
| | | public String getAppkey() { |
| | | return appkey; |
| | | } |
| | | |
| | | public void setAppkey(String appkey) { |
| | | this.appkey = appkey; |
| | | } |
| | | |
| | | public String getPrivateKeyPath() { |
| | | return privateKeyPath; |
| | | } |
| | | |
| | | public void setPrivateKeyPath(String privateKeyPath) { |
| | | this.privateKeyPath = privateKeyPath; |
| | | } |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getApiUrl() { |
| | | return apiUrl; |
| | | } |
| | | |
| | | public void setApiUrl(String apiUrl) { |
| | | this.apiUrl = apiUrl; |
| | | } |
| | | |
| | | public String getBucketName() { |
| | | return bucketName; |
| | | } |
| | | |
| | | public void setBucketName(String bucketName) { |
| | | this.bucketName = bucketName; |
| | | } |
| | | |
| | | public String getAppId() { |
| | | return appId; |
| | | } |
| | | |
| | | public void setAppId(String appId) { |
| | | this.appId = appId; |
| | | } |
| | | |
| | | public String getEndPoint() { |
| | | return endPoint; |
| | | } |
| | | |
| | | public void setEndPoint(String endPoint) { |
| | | this.endPoint = endPoint; |
| | | } |
| | | |
| | | public String getAccount() { |
| | | return account; |
| | | } |
| | | |
| | | public void setAccount(String account) { |
| | | this.account = account; |
| | | } |
| | | |
| | | public String getAccessKey() { |
| | | return accessKey; |
| | | } |
| | | |
| | | public void setAccessKey(String accessKey) { |
| | | this.accessKey = accessKey; |
| | | } |
| | | |
| | | public String getSecretKey() { |
| | | return secretKey; |
| | | } |
| | | |
| | | public void setSecretKey(String secretKey) { |
| | | this.secretKey = secretKey; |
| | | } |
| | | |
| | | public QianYunTongConfig getQianYunTongConfig() { |
| | | if("dev".equals(activeProfile)){ |
| | | this.appkey = "10001104"; |
| | | this.privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem"; |
| | | this.userName = "xiaofei"; |
| | | this.status = "1"; |
| | | this.setApiUrl("https://test-zhongtai.stqcloud.com:10070"); |
| | | this.setBucketName("bucuTest0625"); |
| | | this.setAppId("wxcc3c9058e2b294db"); |
| | | this.setEndPoint("http://119.4.112.68:27741/v1"); |
| | | this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e"); |
| | | this.setAccessKey("TYMFTFD5SIIT15DCCUD7"); |
| | | this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z"); |
| | | } |
| | | if("test".equals(activeProfile)){ |
| | | this.setAppkey("10001104"); |
| | | this.setPrivateKeyPath("/etraffic/server/private_key_test.pem"); |
| | | this.setUserName("xiaofei"); |
| | | this.setStatus("1"); |
| | | this.setApiUrl("https://test-zhongtai.stqcloud.com:10070"); |
| | | this.setBucketName("bucuTest0625"); |
| | | this.setAppId("wxcc3c9058e2b294db"); |
| | | this.setEndPoint("http://119.4.112.68:27741/v1"); |
| | | this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e"); |
| | | this.setAccessKey("TYMFTFD5SIIT15DCCUD7"); |
| | | this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z"); |
| | | } |
| | | if("prod".equals(activeProfile)){ |
| | | this.setAppkey("10001104"); |
| | | this.setPrivateKeyPath("/root/server/app/key/private_key.pem"); |
| | | this.setUserName("xiwang"); |
| | | this.setStatus("1"); |
| | | this.setApiUrl("http://jjzhongtai.stqcloud.com:10010"); |
| | | this.setBucketName("qyt20250702"); |
| | | this.setAppId("wxcc3c9058e2b294db"); |
| | | this.setEndPoint("http://119.4.112.68:27741/v1"); |
| | | this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e"); |
| | | this.setAccessKey("TYMFTFD5SIIT15DCCUD7"); |
| | | this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z"); |
| | | } |
| | | return this; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.google.gson.Gson; |
| | | import com.open.common.util.OpenApiClient; |
| | | import com.open.common.util.SystemParameterNames; |
| | | import com.stylefeng.guns.modular.system.util.SpringContextsUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.SendSmsRequest; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | @Slf4j |
| | | public class SMSUtil { |
| | | |
| | | private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig(); |
| | | |
| | | |
| | | /** |
| | | * 获取易信验证码 |
| | |
| | | */ |
| | | public static String sendVerifyCode(String mobile) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/sendVerifyCode"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/sendVerifyCode"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", "{\"mobile\":\"" + mobile + "\"}"); |
| | | log.info("【获取易信验证码】请求地址:" + url); |
| | | log.info("【获取易信验证码】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | */ |
| | | public static Boolean sendSms(SendSmsRequest request) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/sendSmsByTpl"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/sendSmsByTpl"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【根据模板发送短信】请求地址:" + url); |
| | | log.info("【根据模板发送短信】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.open.common.util.OpenApiClient; |
| | | import com.open.common.util.SystemParameterNames; |
| | | import com.stylefeng.guns.modular.system.util.SpringContextsUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | @Slf4j |
| | | public class UserUtil { |
| | | |
| | | private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig(); |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | // List<QYTUserInfo> userInfoByPhone = getUserInfoByPhone("15828353127"); |
| | |
| | | */ |
| | | public static List<QYTUserInfo> getUserInfoByPhone(String mobile) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/2.0/queryUserinfoByMobilev2"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/2.0/queryUserinfoByMobilev2"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", "{\"list\":[{\"mobile\":\"" + mobile + "\"}]}"); |
| | | log.info("【根据手机号码获取人员信息】请求地址:" + url); |
| | | log.info("【根据手机号码获取人员信息】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | */ |
| | | public static List<QYTUserInfo> getUserInfoByPhone(String mobile, String enterNum) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/getUserInfoByPhone"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/getUserInfoByPhone"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("mobile", mobile); |
| | | if (null != enterNum) { |
| | |
| | | */ |
| | | public static RegisterViaMobile registerViaMobile(RegisterViaMobileRequest request) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/m1_register_via_mobile"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/m1_register_via_mobile"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【根据手机号注册用户】请求地址:" + url); |
| | | log.info("【根据手机号注册用户】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | */ |
| | | public static Boolean modifyPwd(ModifyPwdRequest request) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/modifyPwd"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/modifyPwd"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【易信用户修改密码】请求地址:" + url); |
| | | log.info("【易信用户修改密码】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | */ |
| | | public static Boolean resetPwd(ResetPwdRequest request) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/resetPwd"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/resetPwd"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【易信重置密码】请求地址:" + url); |
| | | log.info("【易信重置密码】请求参数:" + JSON.toJSONString(contentMap)); |
| | |
| | | */ |
| | | public static Boolean idCardAuth(String realName, String cardNo) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/idCardAuth"; |
| | | String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/idCardAuth"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath(); |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String appKey = qianYunTongConfig.getAppkey();//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName()); |
| | | contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus()); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("realName", realName); |
| | | map.put("cardNo", cardNo); |