'use strict';
exports.main = async (event, context) => {
	const param = {
		"classify_id": event.classify_id,
		"system_id": event.system_id,
		"brand_id": event.brand_id
	}
	const db = uniCloud.database()
	let res = await db.collection("standardV2").aggregate().match(param).group({
		_id: "$" + event.field
	}).end();
	res = await db.collection('dictionary').field({
		"_id": true,
		"name": true
	}).where({
		_id: db.command.in(Array.from(res.data, item => item._id))
	}).get()
	return res.data
};
