想问下用mongoTemplate这个查询怎么写


db.getCollection("qidian_user_bind").aggregate([
    {
        $match: {
            oauthType: "SI_RUI",
            state: "ACTIVATED"
        }
    },
    {
        $lookup: {
            from: "qidian_user_info",
            localField: "qidianOpenId",
            foreignField: "openId",
            as: "userInfo"
        }
    },
    {
        $unwind: {
            path: "$userInfo",
            preserveNullAndEmptyArrays: true
        }
    },
    {
        $lookup: {
            from: "qidian_company",
            localField: "userInfo.authAppid",
            foreignField: "appId",
            as: "companyInfo"
        }
    },
    {
        $unwind: {
            path: "$companyInfo",
            preserveNullAndEmptyArrays: true
        }
    },
    {
        $project: {
            openId: "$qidianOpenId",
            name: "$userInfo.name",
            type: "$oauthType",
            companyName: "$companyInfo.companyData.companyShortName",
            version: {
                $cond: {
                    if : {
                        $eq: [
                            '$userInfo.sId',
                            '1300000535'
                        ]
                    },
                    then: '商通',
                    else : '个人'
                }
            },
            
        }
    }
])