It really depends on mission. In a hot battle where see first shoot first is the top priority, guns and SRAAM might not be useful at all.
However, if you have to use a 5th gen or 6th for CAP, where you might need visual identification of intruders, SRAAM would be needed, though I doubt PLAAF would use 5th or 6th jets for CAP mission, as there are still hundreds of J10/J11/J16 around beyond 2030.
If new SRAAM can be make to extend to 30km or so, that is another matter, but gun is definitely a dead weight for 5th and 6th gen jets.