chenyc
2024-12-31 4b36674b9496ffb36eb07ead5d21fcea6a641e0f
gx接口地址
1个文件已修改
1个文件已添加
31 ■■■■■ 已修改文件
chenyc.ps 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
thirdPartyApi.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
chenyc.ps
New file
@@ -0,0 +1,27 @@
#!/bin/bash
# 设置变量
user="chenyc"
start_date="2024-01-01T00:00:00"
end_date="2024-12-30T23:59:59"
# 检查当前目录是否是Git仓库
if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
  echo "当前目录不是一个Git仓库。请在Git仓库的根目录下运行此脚本。"
  exit 1
fi
# 获取提交次数
commit_count=$(git log --author="$user" --since="$start_date" --until="$end_date" --pretty=oneline | wc -l)
# 获取代码行数的变化
lines_info=$(git log --author="$user" --since="$start_date" --until="$end_date" --pretty=tformat: --numstat | awk '{ add += $1; del += $2; net += $1 - $2 } END { printf "%s,%s,%s", add, del, net }')
IFS=',' read lines_added lines_deleted lines_changed <<< "$lines_info"
# 输出结果
echo "日期: $start_date ~ $end_date"
echo "用户: $user"
echo "提交次数: $commit_count"
echo "增加的代码行数: $lines_added"
echo "删除的代码行数: $lines_deleted"
echo "净变化的代码行数: $lines_changed"
thirdPartyApi.js
@@ -3,8 +3,8 @@
const path = require('path');
const FormData = require('form-data');
const logger = require(path.resolve(__dirname, 'logger'));
// const BASIC_API = 'https://hemobs.icoldchain.cn/'
const BASIC_API = 'http://testbs.ihemodialysis.com/'
const BASIC_API = 'https://hemobs.icoldchain.cn/'
// const BASIC_API = 'http://testbs.ihemodialysis.com/'
let cachedToken = null;
let tokenExpiresAt = null;