Data sharing platforms built on the Hyperledger Fabric have gained popularity owing to the reliable performance and solid community support. To reduce user behavior risks, these platforms often incorporate trust and reputation models (TRM). To address the issues of existing TRMs, this paper presents a novel real-world blockchain-based trust and reputation model called RWS-BTRM. First, to address the issue of erroneous users who commit accidental errors being easily misclassified as malicious, by incorporating a punishment mechanism, RWS-BTRM achieves precise differentiation between erroneous users and malicious users. Second, to address forgery attacks targeting vulnerabilities in the Raft consensus used by fabric, this paper designed algorithms within RWS-BTRM to detect such attacks and implemented reputation-based improvements to the Raft consensus. The evaluation results show that RWS-BTRM accurately distinguishes between erroneous users and malicious users, achieving a precision of 0.94 and an F1 score of 0.95, surpassing other TRMs. Additionally, the improved Raft consensus resists forgery attacks, with throughput reduced by less than 10% and latency increased by less than 5% compared to the original.