## 4 Conclusions  
In conclusion, this study successfully synthesized CdS/porous C\({}_{3}\)N\({}_{4}\) heterostructures capable of effectively degrading tetracycline hydrochloride (TCH) wastewater under visible light, using an in situ co-precipitation method. The composite material, with a mass ratio of 1:2 between porous g-C\({}_{3}\)N\({}_{4}\) and CdS, exhibits optimal degradation performance, with adsorption and degradation rates being 4-fold and 9.64-fold higher, respectively, compared to pure porous g-C\({}_{3}\)N\({}_{4}\). Unlike other studies, our research optimizes the addition of CdS, which significantly enhances the material's specific surface area and adsorption sites, thereby improving its adsorption capacity. Furthermore, this research provides valuable mechanistic insights by identifying h\({}^{+}\) and-O\({}_{2}\)\({}^{-}\) as the primary active species, with hydroxyl radicals (-OH) playing a negligible role. These findings deepen the understanding of the photocatalytic degradation process and demonstrate the advantages of the Z-scheme charge transfer mechanism in improving charge utilization and efficiency. The long-term stability and reusability of the CdS/g-C\({}_{3}\)N\({}_{4}\) composite further underscore its potential for practical applications. Even after five cycles of use, the degradation efficiency remains above 70.19%, illustrating its robust structural and chemical properties. However, minor performance declines due to partial adsorption site blockage and photocorrosion effects indicate the need for further optimization to reduce Cd\({}^{2+}\) leaching and enhance the catalyst's operational lifespan. Future research should focus on applying this photocatalyst to more complex and multi-component wastewater systems to validate its versatility and scalability. Additionally, exploring advanced regeneration strategies and optimizing the material structure will be critical for improving its practical utility in industrial settings. In summary, the CdS/g-C\({}_{3}\)N\({}_{4}\) composite photocatalyst offers a stable, efficient, and multifunctional solution for treating refractory organic pollutants in wastewater. Its innovations in material design and mechanistic understanding provide a competitive advantage in photocatalysis research and a promising foundation for future applications in environmental remediation. The following supporting information can be downloaded at: [[https://www.mdpi.com/article/10.3390/app142311372/s1](https://www.mdpi.com/article/10.3390/app142311372/s1)]([https://www.mdpi.com/article/10.3390/app142311372/s1](https://www.mdpi.com/article/10.3390/app142311372/s1)), Figure S1: Diagram of the photochemical reactor; Figure S2: SEM image of (a) porous g-C\({}_{3}\)N\({}_{4}\) and (b) SEM image of bulk g-C\({}_{3}\)N\({}_{4}\); Figure S3: Nitrogen adsorption-desorption isotherms of porous g-C\({}_{3}\)N\({}_{4}\) and bulk g-C\({}_{3}\)N\({}_{4}\); Figure S4: Elemental mapping images and overall spectrum of g-C\({}_{3}\)N\({}_{4}\)-CdS (1:2) composite material; Figure S5: Effect of catalyst dosage (a) on adsorption and degradation of TCH and (b) fitting curve of pseudo-first-order kinetic model; Figure S6: Effect of Initial pH on the TCH Degradation Performance of CdS/C\({}_{3}\)N\({}_{4}\)-2; Figure S7: MB continuous degradation system effluent C/C\({}_{0}\) variation curve over time. Table S1: Leading Concentration of Cd\({}^{2+}\) under Different pH Condition. Conceptualization, R.Y., Y.M., and M.Z. ; methodology, R.Y. and Y.M. ; software, C.W. and J.Q. ; validation, R.Y., Y.M., C.W., W.Z. ([PERSON]), C.Z. and W.Z. ([PERSON]); formal analysis, M.Z. ; investigation, Y.T. ; resources, C.W. and W.Z. ([PERSON]); data curation, C.Z. and Y.T. ; writing--original draft preparation, R.Y. and M.Z. ; writing--review and editing, R.Y., Y.M., W.Z. ([PERSON]), C.W. and W.Z. ([PERSON]); visualization, W.Z. ([PERSON]) and J.Z. ; supervision, W.Z. ([PERSON]); project administration, W.Z. ([PERSON]); funding acquisition, Y.M. and C.W.