数据库课设-中小企业工资管理系统

一、效果展示

二、后端代码

import string
import random
from flask import Flask, render_template, request, jsonify, redirect, session
import pymysql
from flask_cors import CORS
import time
import schedule
from datetime import datetime
import threading
from datetime import timedeltaapp = Flask(__name__)
# 创建一个名为app的Flask实例
app.secret_key = 'man_what_can_i_say'
CORS(app)
# 启用CORS机制,允许跨域访问#存储每天已经打卡的用户
user_attendance_day_list = []# 设置会话有效时间为30分钟
app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(minutes=30)# 请求钩子,在每次请求之前被调用
@app.before_request
def before_request():session.permanent = Trueapp.permanent_session_lifetime = timedelta(minutes=30)  # 设置每次请求后会话的有效时间为30分钟# 如果用户已经登录或会话已经存在,则更新会话的最后访问时间if 'user_id' in session:session.modified = True##
# 数据库模块
### MySQL数据库配置
DATABASE_CONFIG = {'host': '127.0.0.1','user': 'root','password': 'Your_Password','database': 'sql_web','cursorclass': pymysql.cursors.DictCursor# 指定游标类型为字典类型,使查询结果以字典形式返回,键为列名,值为对应数据
}# 创建MySQL连接
# 将字典DATABASE_CONFIG中的键对值解包后作为参数传递给connect函数,函数会返回一个表示与数据库连接的对象
def create_connection():return pymysql.connect(**DATABASE_CONFIG)# 创建用户表
def create_users_table():conn = create_connection()cursor = conn.cursor()cursor.execute('''CREATE TABLE IF NOT EXISTS users (u_id SMALLINT AUTO_INCREMENT PRIMARY KEY,username VARCHAR(255) NOT NULL,password VARCHAR(255) NOT NULL,phone VARCHAR(255) NOT NULL,department_id TINYINT NOT NULL,user_post_id TINYINT NOT NULL,attendance_day TINYINT DEFAULT 0,leave_day TINYINT DEFAULT 0,absence_day TINYINT DEFAULT 0,achievement_bouns INT DEFAULT 0,absence_nopay INT DEFAULT 0,other_nopay INT DEFAULT 0,gross_pay INT DEFAULT 0,after_tax_salary INT DEFAULT 0)''')# 依次为用户姓名、手机号、所属部门、用户职务、工资、考勤天数、请假天数、缺勤天数、绩效奖金、缺勤扣除、其他扣除、税前工资、税后工资#至于不在用户表中设置基础工资的原因:因为基础工资是和所属部门和职务挂钩的,而且基础工资内容可以改变,不在用户表中设置基础工资,# 可以实现在显示用户的基础工资时,其个人中心的基础工资和工资制度中的基础工资是相吻合的conn.commit()  # 提交对数据库的更改conn.close()  # 关闭数据库连接# 创建部门基础工资表
def create_department_salary_table():conn = create_connection()cursor = conn.cursor()cursor.execute('''CREATE TABLE IF NOT EXISTS department_salary(id  SMALLINT AUTO_INCREMENT PRIMARY KEY,department VARCHAR(255) NOT NULL,position VARCHAR(255) NOT NULL,basic_salary INT DEFAULT 0,overtime_pay INT DEFAULT 0,other_salary INT DEFAULT 0,d_id SMALLINT NOT NULL,p_id SMALLINT NOT NULL)''')conn.commit()conn.close()# 创建用户考勤表
def create_user_attendance_table(u_id):id = "attendance_table" + str(u_id)conn = create_connection()cursor = conn.cursor()cursor.execute('''CREATE TABLE IF NOT EXISTS `{}`(date_time DATE, attendance_value SMALLINT)'''.format(id))  # 第一个字段用来统计日期,第二个字段分别表示打卡(1)、请假(0)、缺勤(-1)print("考勤表创建")conn.commit()conn.close()# 登录功能数据库模块
def get_user(username, password):conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT * FROM users WHERE username = %s AND password = %s', (username, password))user = cursor.fetchone()  # 将查询的这行数据存储到变量user中conn.close()return user# 删除用户数据库模块
def user_delete_sql(u_id):conn = create_connection()cursor = conn.cursor()cursor.execute('DELETE FROM users WHERE u_id = %s', u_id)  # 先在用户表里删除cursor.execute('DROP TABLE `{}`'.format("attendance_table" + str(u_id)) ) # 再将该用户的考勤表删除conn.commit()conn.close()# 修改用户信息数据库模块
def user_update_sql(u_id, username, password, phone, department_id, user_post_id, gross_pay):conn = create_connection()cursor = conn.cursor()cursor.execute('UPDATE users SET username=%s,password=%s,phone=%s,department_id=%s,''user_post_id=%s,gross_pay=%s WHERE u_id=%s',(username,password,phone,department_id,user_post_id,gross_pay,u_id))conn.commit()conn.close()# 用户列表数据库模块
def user_list_sql():conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT * FROM users')user_list = cursor.fetchall()conn.close()return user_list# 个人信息数据库模块
def user_information_sql(u_id):conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT * FROM users WHERE u_id = %s', u_id)user_info = cursor.fetchone()conn.close()return user_info# 管理界面添加用户数据库模块
def user_add_sql(username, password, phone, department_id, user_post_id,gross_pay,after_tax_salary):create_users_table()conn = create_connection()cursor = conn.cursor()cursor.execute('INSERT INTO users(username,password,phone,department_id,user_post_id,''gross_pay,after_tax_salary)''VALUES(%s,%s,%s,%s,%s,%s,%s)', (username, password, phone, department_id,user_post_id,gross_pay,after_tax_salary))conn.commit()conn.close()# 管理界面搜索用户数据库模块
def user_search_sql(username):conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT * FROM users WHERE username=%s', username)search_result = cursor.fetchall()conn.close()return search_result# 系统概览数据库模块
def system_overview_sql():conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT SUM(gross_pay) FROM users')salary_total = cursor.fetchone()['SUM(gross_pay)']cursor.execute('SELECT COUNT(*) FROM users')staff_total = cursor.fetchone()['COUNT(*)']return staff_total, salary_total# 自动根据员工职务以及所属部门分配工资数据库模块
def automatic_salary_allocation(department_id,user_post_id):create_department_salary_table()id_ = 0if department_id == 1 and user_post_id == 1:id_ = 1elif department_id == 1 and user_post_id == 2:id_ = 2elif department_id == 1 and user_post_id == 3:id_ = 3elif department_id == 1 and user_post_id == 4:id_ = 4elif department_id == 2 and user_post_id == 1:id_ = 5elif department_id == 2 and user_post_id == 2:id_ = 6elif department_id == 2 and user_post_id == 3:id_ = 7elif department_id == 2 and user_post_id == 4:id_ = 8elif department_id == 3 and user_post_id == 1:id_ = 9elif department_id == 3 and user_post_id == 2:id_ = 10elif department_id == 3 and user_post_id == 3:id_ = 11elif department_id == 3 and user_post_id == 4:id_ = 12elif department_id == 4 and user_post_id == 1:id_ = 13elif department_id == 4 and user_post_id == 2:id_ = 14elif department_id == 4 and user_post_id == 3:id_ = 15elif department_id == 4 and user_post_id == 4:id_ = 16elif department_id == 5 and user_post_id == 1:id_ = 17elif department_id == 5 and user_post_id == 2:id_ = 18elif department_id == 5 and user_post_id == 3:id_ = 19elif department_id == 5 and user_post_id == 4:id_ = 20elif department_id == 6 and user_post_id == 1:id_ = 21elif department_id == 6 and user_post_id == 2:id_ = 22elif department_id == 6 and user_post_id == 3:id_ = 23elif department_id == 6 and user_post_id == 4:id_ = 24else:id_ = 25conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT basic_salary,overtime_pay,other_salary FROM department_salary WHERE id=%s',id_)salary_tuple = cursor.fetchone()return salary_tuple#公共单次数据库查询表数据库模块
def public_search_one_sql(variable_one,variable_two,variable_three,variable_four):conn = create_connection()cursor = conn.cursor()cursor.execute(f'SELECT `{variable_one}` FROM `{variable_two}` WHERE `{variable_three}`=%s',variable_four)public_result = cursor.fetchone()conn.close()return public_result#公共单次数据库修改表数据库模块
def public_update_one_sql(variable_one,variable_two,variable_three,variable_four,variable_five):conn = create_connection()cursor = conn.cursor()cursor.execute(f'UPDATE `{variable_one}` SET `{variable_two}`= %s WHERE `{variable_three}`=%s',(variable_four,variable_five))conn.commit()conn.close()#公共单次查询数据库-无条件 数据库模块
def public_search_one_no_condition(variable_one,variable_two):conn = create_connection()cursor = conn.cursor()cursor.execute(f'SELECT `{variable_one}` FROM `{variable_two}`')public_result = cursor.fetchall()conn.close()return public_result#python定时任务来定时插入考勤表数据,也就是用户每天考勤表是默认为缺勤的,用户在点击考勤之后,会更新考勤表数据,以此来记录
def timing_insert_attendance_table_sql():print("timing函数调用")global user_attendance_day_listglobal now_dateuser_attendance_day_list.clear()conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT u_id FROM users')variable_list = cursor.fetchall()for variable_tuple in variable_list:create_user_attendance_table(variable_tuple['u_id'])variable_temporary = 'attendance_table'+str(variable_tuple['u_id'])cursor.execute(f'INSERT INTO `{variable_temporary}`(date_time,attendance_value) VALUES(%s,-1)',str(now_date))conn.commit()conn.close()#获取所有用户的u_id
def get_all_users_u_id():conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT u_id FROM users')users_u_id = cursor.fetchall()conn.close()return users_u_id#各部门工资组成列表
def salary_composition_list():conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT id,basic_salary,overtime_pay,other_salary,d_id,p_id FROM department_salary')salary_composition_list = cursor.fetchall()return salary_composition_list#管理员修改各部门基础工资功能数据库模块
def modify_salary_sql():return 1# 用户密码生成函数
def create_password(length=8):# 定义包含所有可能的字符串all_characters = string.ascii_letters + string.digits + string.punctuation# 随机选择字符生成密码password = ''.join(random.choice(all_characters) for _ in range(length))return password#绩效奖金/其他罚金 管理函数
def user_achievement_bouns_or_other_nopay(u_id,new_salary):print("user_achievement_bouns_or_other_nopay函数调用")old_salary = public_search_one_sql('gross_pay','users','u_id',u_id)['gross_pay']print(old_salary)print(new_salary)if old_salary > new_salary:public_update_one_sql('users','other_nopay','u_id',(old_salary-new_salary),u_id)after_tax_salary = new_salaryif 5000 < new_salary <= 15000:after_tax_salary = new_salary - (new_salary - 5000) * 0.05else:after_tax_salary = new_salary - (new_salary - 5000) * 0.1 - 350public_update_one_sql('users', 'after_tax_salary', 'u_id', after_tax_salary, u_id)elif old_salary < new_salary:public_update_one_sql('users','achievement_bouns','u_id',(new_salary-old_salary),u_id)after_tax_salary = new_salaryif 5000 < new_salary <= 15000:after_tax_salary = new_salary - (new_salary - 5000) * 0.05else:after_tax_salary = new_salary - (new_salary - 5000) * 0.1 - 350public_update_one_sql('users', 'after_tax_salary', 'u_id', after_tax_salary, u_id)#用户工资算法(要在每天8点之后核算,这里用定时任务执行)
def user_salary_algorithm():if get_current_time():global user_attendance_day_listuser_all_list = [d['u_id'] for d in get_all_users_u_id()]difference_list = list(set(user_all_list)-set(user_attendance_day_list))#所有的用户与打卡的用户之间的不同就是缺勤的用户for u_id in difference_list:old_absence_nopay = public_search_one_sql('absence_nopay','users','u_id',u_id)['absence_nopay']gross_pay = public_search_one_sql('gross_pay','users','u_id',u_id)['gross_pay']public_update_one_sql('users','absence_nopay','u_id',(100+old_absence_nopay),u_id)#更新用户的缺勤罚金public_update_one_sql('users','gross_pay','u_id',(gross_pay-100),u_id)#更新用户的税前工资after_tax_salary = gross_payif 5000 < gross_pay <= 15000:after_tax_salary = gross_pay - (gross_pay - 5000) * 0.05else:after_tax_salary = gross_pay - (gross_pay - 5000) * 0.1 - 350public_update_one_sql('users','absence_nopay','u_id',after_tax_salary,u_id)#用户列表中的关于考勤数据的更新
def user_table_about_attendance_column():global now_dateuser_all_list = [d['u_id'] for d in get_all_users_u_id()]conn = create_connection()cursor = conn.cursor()for u_id in user_all_list:table_name = 'attendance_table'+str(u_id)attendance_value = public_search_one_sql('attendance_value',table_name,'date_time',now_date)['attendance_value']column_name = ''if attendance_value > 0:column_name = 'attendance_day'elif attendance_value==0:column_name = 'leave_day'else:column_name = 'absence_day'cursor.execute(f'UPDATE users SET `{column_name}`=`{column_name}`+1 WHERE u_id=%s', u_id)conn.commit()conn.close()#获取系统时间函数
def get_current_time():now = datetime.now()return now.strftime("%Y-%m-%d")#定时任务函数
def run_schedule():while True:schedule.run_pending()time.sleep(1)# 页面路由
@app.route("/")
def index():if session.get('logged_in'):u_id = session['user']['u_id']total = system_overview_sql()staff_total = total[0]salary_total = total[1]average_wage = staff_total / salary_total# timing_insert_attendance_table_sql()# user_salary_algorithm()# user_table_about_attendance_column()return render_template("index.html", staff_total=staff_total, salary_total=salary_total,average_wage=average_wage,u_id=u_id)else:return redirect("/login_interface")# 用户登录界面路由
@app.route("/login_interface")
def login_interface():return render_template("login.html")# 登陆验证模块
@app.route("/login", methods=['POST'])
def login():create_users_table()data = request.jsonusername = data.get('Username')password = data.get('Password')# 调用方法,实现对用户名和密码是否匹配的验证user = get_user(username, password)# 使用session将用户数据存储在其中,从而存储用户登录信息,方便后续调用if user:session['user'] = {'username': username,'u_id': user['u_id'],'user_post_id': user['user_post_id']}session['logged_in'] = Trueu_id = session['user']['u_id']print(public_search_one_sql('absence_nopay','users','u_id',u_id)['absence_nopay'])return jsonify({'success': True, 'message': '登录成功'})else:return jsonify({'success': False, 'message': '无效的用户名或密码'}), 401# 用户注销
@app.route("/logout")
def logout():session.pop('user', None)session.pop('logged_in', None)return redirect("/")# 用户管理界面
@app.route("/manage_interface")
def manage_interface():if session['user']['user_post_id'] <= 1:return render_template("manage_interface.html")#用户管理界面-用户列表
@app.route("/manage_user_list")
def manage_interface_user_list():user_list = user_list_sql()return jsonify(user_list)# 用户管理功能-添加用户
@app.route("/user_add", methods=['POST'])
def user_add():data = request.jsonusername = data.get('Username')password = create_password()phone = data.get('Phone')department_id = data.get('Department_id')user_post_id = data.get('Position_id')salary_tuple = automatic_salary_allocation(int(department_id), int(user_post_id))basic_salary = salary_tuple['basic_salary']     #基本工资overtime_pay = salary_tuple['overtime_pay']     #加班工资other_salary = salary_tuple['other_salary']     #其他津贴gross_pay = basic_salary+overtime_pay+other_salary     #根据用户的所属部门和职务来获取基本工资、加班工资、其他津贴after_tax_salary = gross_payif 5000 < gross_pay <= 15000:after_tax_salary = gross_pay-(gross_pay-5000)*0.05else:after_tax_salary = gross_pay-(gross_pay-5000)*0.1-350user_add_sql(username, password, phone, department_id, user_post_id,gross_pay,after_tax_salary)return jsonify({'success': True, 'message': '添加成功'})#用户管理界面-编辑用户
@app.route("/user_update",methods=['POST'])
def user_update():data = request.jsonu_id = int(data.get('u_id'))username = data.get('username')password = data.get('password')phone = data.get('phone')department_id = int(data.get('department_id'))user_post_id = int(data.get('user_post_id'))gross_pay = int(data.get('gross_pay'))user_achievement_bouns_or_other_nopay(u_id,gross_pay)user_update_sql(u_id,username,password,phone,department_id,user_post_id,gross_pay)return jsonify({'success': True, 'message': '编辑成功'})#用户管理界面-删除用户
@app.route("/user_delete",methods=['POST'])
def user_delete():data = request.jsonu_id = int(data.get('userId'))user_delete_sql(u_id)return jsonify({'success': True, 'message': '删除成功'})#用户管理界面-搜索用户
@app.route("/user_search",methods=['POST'])
def user_search():data = request.jsonusername = data.get('Uname')conn = create_connection()cursor = conn.cursor()cursor.execute('SELECT * FROM users WHERE username=%s',username)search_result_list = cursor.fetchall()print(search_result_list)return jsonify({'success': True, 'message': '搜索成功'})# 个人信息界面
@app.route("/profile_interface")
def profile_interface():if session.get('logged_in'):user_info = user_information_sql(session['user']['u_id'])user_department_post_salary = automatic_salary_allocation(int(user_info['department_id']),int(user_info['user_post_id']))return render_template("profile.html", username=str(user_info['username']), phone=user_info['phone'],department_id=user_info['department_id'],user_post_id=user_info['user_post_id'],basic_salary=user_department_post_salary['basic_salary'],overtime_pay = user_department_post_salary['overtime_pay'],other_salary =user_department_post_salary['other_salary'],attendance_day=user_info['attendance_day'],leave_day=user_info['leave_day'],absence_day=user_info['absence_day'],achievement_bouns=user_info['achievement_bouns'],absence_nopay=user_info['absence_nopay'],other_nopay=user_info['other_nopay'],gross_pay=user_info['gross_pay'],after_tax_salary=user_info['after_tax_salary'])else:return redirect("/login_interface")#考勤功能
@app.route("/attendance_function",methods=['POST'])
def attendance_function():data = request.jsonu_id = session['user']['u_id']global user_attendance_day_listif u_id not in user_attendance_day_list:user_attendance_day_list.append(u_id)attendance_value = int(data.get('action'))attendance_table = 'attendance_table'+str(u_id)global now_datepublic_update_one_sql(attendance_table,'attendance_value','date_time',attendance_value,now_date)return jsonify({'success': True, 'message': '今日打卡成功'})else:return jsonify({'success': True, 'message': '今日已打卡'})# 财务界面
@app.route("/finance_department")
def finance_interface():if session['user']['user_post_id'] <= 2:return render_template("finance_department.html")# 报销页面
@app.route("/reimbursement_interface")
def reimbursement_interface():return render_template("reimbursement.html")# 报销功能
@app.route("/reimbursement")
def reimbursement():return 1# 工资制度
@app.route("/salary_composition")
def salary_composition():# a=salary_composition_list()# print(a)return render_template("salary_composition.html",salary_composition_list=salary_composition_list())#工资制度修改
@app.route("/salary_composition_change")
def salary_composition_change():return 1#后勤采购
@app.route("/logistics_procurement_interface")
def logistics_procurement_interface():return render_template("logistics_procurement.html")schedule.every().day.at("08:00").do(timing_insert_attendance_table_sql)
schedule.every().day.at("08:01").do(user_salary_algorithm)
schedule.every().day.at("08:02").do(user_table_about_attendance_column)
# 创建定时任务线程
schedule_thread = threading.Thread(target=run_schedule)
schedule_thread.daemon = True  # 设置为守护线程,当主线程结束时,该线程也会结束
schedule_thread.start()#获取系统时间
now_date = get_current_time()if __name__ == '__main__':app.run(debug=True)

三、前端代码

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/29120.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

HK1-BOX X3刷UBUNTU 24.04,并开启WIFI

端午刚好有点时间&#xff0c;顺便把改完散热的HK1-BOX刷了个最新OC版的UBUNTU 24&#xff0c;这里记录下操作的步骤&#xff1a; 准备材料 HK1-BOX S905X3&#xff1a;注意X4的不行固件没匹配的。建议先改完散热&#xff0c;不然作为7X24小时的机器长时间高温还是很伤硬件的…

Web前端项目-拼图游戏【附源码】

拼图游戏 拼图游戏是一种经典的益智游戏&#xff0c;通过HTML、CSS和JavaScript等前端技术的综合运用来实现&#xff1b;拼图游戏可以锻炼玩家的观察能力、空间认知能力和逻辑思维能力。游戏开始时&#xff0c;一张图片会被切割成多个小块&#xff0c;并以随机顺序排列在游戏区…

CMOS图像传感器——列噪声(CFPN)去除

目前CMOS 图像传感器系统中列共用结构应用最为广泛,在该结构中,虽然像素曝光均匀,但是由于列输出系统处理属性的变动,对于不同列,像素的输出是不均匀的。因此,基于列的CMOS 图像传感器表现出垂直条纹固定模式噪声(CFPN),从而降低了图像的质量。由于人眼 的关系,CFPN …

「布道师系列文章」宝兰德徐清康解析 Kafka 和 AutoMQ 的监控

作者&#xff5c;北京宝兰德公司解决方案总监徐清康 01 前言 当我们使用一个软件的时候&#xff0c;经常都会问这个软件怎么监控、监控他的哪些指标&#xff1f;Kafka 的监控挺长时间都是一个老大难的问题&#xff0c;社区在监控方面一直没有投入太大的精力。如果要实现一…

kotlin 中的字符串

一、字符类访问 1、字符串的访问跟js一样&#xff0c;可以使用索引来访问或者直接循环。 fun main() {val a: String "2024"// 方式一&#xff1a;for (item in a) {println(item) // 输出每一个字符}// 方式二&#xff1a;println("${a[0]}, ${a[1]}, ${a[2…

IAP固件升级进阶(Qt上位机)

前言 时隔近一年&#xff0c;再次接触IAP固件升级&#xff0c;这次修改了以前的一些bug&#xff0c;同时新增一些实用性的功能。 有纰漏请指出&#xff0c;转载请说明。 学习交流请发邮件 1280253714qq.com。 上位机界面 视频演示 当Up对iap固件升级的机制有了更深的理解后…

【C++】类和对象的引入

文章目录 前言一、类的定义二、类的访问控制与封装三、类的作用域四、类的实例化五、类的存储方式及大小计算六、隐藏的this指针 前言 C语言是面向过程的&#xff0c;关注的是过程&#xff0c;分析出求解问题的步骤&#xff0c;通过函数调用逐步解决问题。 C是基于面向对象的&…

算法题解记录29+++全排列(百日筑基)

一、题目描述 题目难度&#xff1a;中等 给定一个不含重复数字的数组 nums &#xff0c;返回其 所有可能的全排列 。你可以 按任意顺序 返回答案。 示例 1&#xff1a; 输入&#xff1a;nums [1,2,3] 输出&#xff1a;[[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] 示…

iCopy for Mac 剪切板 粘贴工具 历史记录 安装(保姆级教程,新手小白轻松上手)

Mac分享吧 文章目录 效果可留存文本、图片、文件等复制历史记录也可根据关键字进行历史记录检索点击一下&#xff0c;可复制双击两下&#xff0c;复制内容&#xff0c;并将信息粘贴至鼠标指针处 一、准备工作二、开始安装1、双击运行软件&#xff0c;将其从左侧拖入右侧文件夹…

Audio2Face相关建模BS绑定对应表

文章说明 相信大家都可以在网上看到52点位的ARKit绑定对照表&#xff0c;但英伟达旗下Audio2Face这款软件出来的数据应该如何映射到BS上边&#xff0c;都比较迷茫。 所以对于Unity方面的46点位在建模时的对照图&#xff0c;我这边总结了一下。发出来供大家参考&#xff0c;如果…

简易版 | 代码生成器(包含插件)

一、代码生成器 先导入依赖 <!-- Mybatis-Plus --> <dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.5.6</version> </dependency><!-- 代码生成器 --…

Cisco Packet Tracer实验(五)不同vlan间的通信简单配置

1&#xff0e;单臂路由(图) 环境&#xff1a;一台路由器&#xff0c;一台二层交换机&#xff0c;两台pc机 单臂路由&#xff08;Single Arm Routing&#xff09;是指在网络架构中&#xff0c;只有一个物理接口&#xff08;单臂&#xff09;连接到路由器三层交换机&#xff0c;而…

碉堡了!云原生大佬撰写的K8s学习指南,有点炸裂,建议运维都收藏!

在这个数字化转型的时代&#xff0c;容器化和云原生技术已成为软件开发的重要趋势。【Kubernetes】作为云原生领域的旗舰项目&#xff0c;不仅是一种容器编排工具&#xff0c;更是构建现代、弹性和可扩展应用程序的基础平台。 因此&#xff0c;对于运维人员来说&#xff0c;学…

基于51单片机的音乐彩灯设计

基于51单片机的音乐彩灯设计 &#xff08;程序&#xff0b;原理图&#xff0b;设计报告&#xff09; 功能介绍 具体功能&#xff1a; 由STC单片机ADC0809模块LM386功放模块喇叭音频接口发光二极管电源构成 1.通过音频线输入可以播放电脑、手机、MP3里面的音乐。 2.AD对音频…

17.零代码八爪鱼采集器数据采集与数据导出——如何导出不同格式数据和数据推送到数据库

首先&#xff0c;多数情况下免费版本的功能&#xff0c;已经可以满足绝大多数采集需求&#xff0c;想了解八爪鱼采集器版本区别的详情&#xff0c;请访问这篇帖子&#xff1a; 3.无代码爬虫八爪鱼采集器工具介绍——个人版本、团队版本的适用性_八爪鱼采集器 有单机版本吗-CSDN…

苹果电脑病毒怎么处理 苹果电脑病毒查杀用什么软件 苹果电脑病毒软件

苹果电脑并不是完全免疫于病毒的威胁&#xff0c;尤其是在使用了一些不安全的软件或网站后&#xff0c;可能会感染一些恶意程序&#xff0c;导致电脑运行缓慢&#xff0c;数据丢失&#xff0c;甚至被黑客控制。那么&#xff0c;苹果电脑病毒怎么处理呢&#xff1f;苹果电脑病毒…

vue分页

先看效果 再看代码 <!-- 分页 --><div v-if"pageParams.pageCount > 1" class"flex justify-end mt-6"><n-paginationv-model:page"pageParams.page" v-model:page-size"pageParams.pageSize" :page-count"pa…

Hazelcast 分布式缓存 在Seatunnel中的使用

1、背景 最近在调研seatunnel的时候&#xff0c;发现新版的seatunnel提供了一个web服务&#xff0c;可以用于图形化的创建数据同步任务&#xff0c;然后管理任务。这里面有个日志模块&#xff0c;可以查看任务的执行状态。其中有个取读数据条数和同步数据条数。很好奇这个数据…

羊城杯 2020 a_piece_of_java

考点:JDBC反序列化打CC链动态代理类触发readobject 一眼看过去 好像只有一个mysql-connector-java 可以利用jdbc 可能的攻击路径就有1) Mysql服务器任意文件读取 2) JDBC反序列化打依赖链 出现了一个不常见的依赖库 serialkiller 做了反序列化的过滤器 可以尝试查看其源码 htt…

2000-2022年上市公司员工、工资数据

2000-2022年上市公司员工、工资数据 1、时间&#xff1a;2000-2022年 2、来源&#xff1a;上市公司年报 3、指标&#xff1a;年份、股票代码、股票简称、行业名称、行业代码、省份、城市、区县、行政区划代码、城市代码、区县代码、首次上市年份、上市状态、员工人数_人、应…