Yes, the DJI Mic 2 is compatible with the Panasonic LUMIX GH7.
DJI Mic 2 ships with a 3.5mm TRS Camera Audio Cable included in the box (DJI's own product page, 'In the Box' section). Panasonic LUMIX GH7 has a dedicated 3.5mm microphone input jack. Direct connector match, no separate purchase required.
“[MIC] 3.5 mm stereo mini jack Mic Input (Plug-in Power) / Mic Input / Line Input”
“DJI Mic 2 Camera Audio Cable (3.5mm TRS)”
Last verified:
Compatibility inferred from spec rule (citations above are manufacturer-verified)