# SnapWeight **Repository Path**: guanzi/snap-weight ## Basic Information - **Project Name**: SnapWeight - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-10-19 - **Last Updated**: 2023-10-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README https://ztfwjg.lhsr.sh.gov.cn/shcws/index.html#/login slifejlcx slife@123 mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar mvn install:install-file -Dfile=./log4j-core-2.17.1.jar -DgroupId=org.apache.logging.log4j -DartifactId=log4j-api -Dversion=2.17.1 -Dpackaging=jar https://blog.csdn.net/qq_38636782/article/details/124848636 CREATE SEQUENCE index_id_seq START 1; 然后再在字段默认值中设置nextval('park_id_seq') nextval('index_id_seq') 1. 删除主键约束 ALTER TABLE "table_name" DROP CONSTRAINT "table_name_pkey"; 2. 增加主键约束 ALTER TABLE "table_name" add primary key (xx,xx,xx); https://blog.csdn.net/u010410697/article/details/115111118 ALTER TABLE park_record add primary key (sid,siteid); alter table park_record add constraint uk_index unique (sid,siteid); 数据同步工具:https://www.symmetricds.org/doc/3.7/html/user-guide.html#_standalone_installation 参考1:https://blog.csdn.net/lemon_tree12138/article/details/51891291 https://blog.csdn.net/lemon_tree12138/article/details/51891291 创建数据库服务mysql1,创建数据库 crop 启动 ./bin/sym --engine corp-000 --port 8080 CREATE TABLE item( item_id INTEGER PRIMARY KEY, name VARCHAR(100) ); CREATE TABLE item_selling_price( item_id INTEGER REFERENCES item(item_id), store_id VARCHAR(5), price DECIMAL(10,2), cost DECIMAL(10,2), PRIMARY KEY(item_id, store_id) ); CREATE TABLE sale_transaction( tran_id INTEGER PRIMARY KEY, store_id VARCHAR(5) NOT NULL, workstation VARCHAR(3) NOT NULL, day VARCHAR(10) NOT NULL, seq INTEGER NOT NULL ); CREATE TABLE sale_return_line_item( tran_id INTEGER PRIMARY KEY REFERENCES sale_transaction(tran_id), item_id INTEGER NOT NULL REFERENCES item(item_id), price DECIMAL(10,2) NOT NULL, quantity INTEGER NOT NULL, returned_quantity INTEGER ); ./bin/symadmin --engine corp-000 create-sym-tables ./bin/dbimport --engine corp-000 ./samples/insert_sample.sql