import json from typing import List, Dict from pilot.pojo.request.buryMessage import…
- User
import json from typing import List, Dict
from pilot.pojo.request.bury_Message import BuryMessage
class CommonAttributeRequest: def init(self, userName="", needAddDimension=True, attributeSessionId="", enterType=0, subjectId="0", row=None, column=None, magnanimity=None, filter=None, stepList=None, dimensionJson=None, buryMessage=None, analysisId=0, attriMagnanimity="", crossRow=None, **kwargs): self.user_name: str = userName # 是否需要补充维度 self.need_add_dimension: bool = needAddDimension self.attribute_session_id: str = attributeSessionId # 入口 1:任务列表界面,2:小助手自动触发,3:整列数据触发,4:查询页面单个单元格 self.enter_type: int = enterType self.subject_id: str = subjectId
codeself.row: List = row if row else [] self.column: List = column if column else [] self.magnanimity: List = magnanimity if magnanimity else [] self.filter: List = filter if filter else [] self.stepList: List = stepList if stepList else [] self.dimensionJson: Dict = dimensionJson if dimensionJson else {} self.buryMessage: BuryMessage = BuryMessage(**buryMessage) if buryMessage else BuryMessage() # 埋点用户的分析url的id self.analysisId: int = analysisId # 用户选定的一个归因指标 self.attriMagnanimity: str = attriMagnanimity self.crossRow:List = crossRow if crossRow else [] self.verify_param() def verify_param(self): assert self.user_name, "userName should not None" assert self.enter_type in [1, 2, 3, 4], "enterType not in [1,2,3,4]" assert self.subject_id, "subjectId is empty" assert self.row or self.column, "row and column can not be empty at same time" assert self.magnanimity, "magnanimity is empty" assert self.filter, "filter is empty" # 如果存在,一定要符合类型 assert not self.stepList or isinstance(self.stepList, list), "stepList should be list" assert not self.dimensionJson or isinstance(self.dimensionJson, dict), "dimensionJson should be map" # 如果归因指标存在,则一定可以转换成整数 assert self.attriMagnanimity, "attriMagnanimity is empty" assert isinstance(self.crossRow, list), "crossRow should be list" def __repr__(self): return f"CommonAttributeRequest({self.__dict__})" - Assistant
- User
1258, 1262, 1277, 1761, 1274, 1375, 207, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 552, 553, 554, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 961, 962, 963, 964, 965, 966, 968, 970, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 986, 987, 993, 994, 995, 996, 997, 998, 999, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1012, 1018, 1019, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1033, 1034, 1036, 1037, 1038, 1039, 1040, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1279, 1280, 1281, 1282, 1283, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1307, 1308, 1309, 1310, 1313, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1334, 1335, 1336, 1337, 1338, 1374, 1375, 1506, 1508, 1509, 1511, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1533, 1541, 1562, 1564, 1566, 1568, 1570, 1572, 1573, 1574, 1576, 1577, 1578, 1579, 1587, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1736, 1737, 1738, 1740, 1741, 1742, 1744, 1745, 1746, 1749, 1750, 1757, 1759, 1761, 1898, 1960, 2067, 2068, 2204, 2311, 2312, 2313, 2314, 2315, 2687, 2715, 2716, 2717, 2718, 2957, 2966, 2967, 2968, 2970, 2971, 2972, 2973, 2974, 2975, 2977, 2995, 2997, 3000, 3003, 3004, 3005, 3006, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3511, 3514, 3515, 3516, 3579, 3619, 3747, 3749, 3750, 3751, 3752, 3753, 3755, 3757, 3758, 3759, 3760, 3761, 3830, 3833, 3836, 3839, 3841, 3845, 3848, 3850, 3851, 3885, 4014, 4026, 4028, 4030, 4031, 4033, 4035, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 4053, 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 4070, 4071, 4072, 4073, 4304, 4305, 4306, 4402, 4403, 4408, 4418, 4421, 4438, 4443, 4444, 4457, 4458, 4459, 4460, 4461, 4463, 4464, 4465, 4466, 4467, 4469, 4470, 4471, 4751, 4776, 4777, 4778, 4779, 4780, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 4788, 4789, 4790, 4791, 4792, 4793, 4796, 4832, 4837, 4846, 4849, 4853, 4854, 4855, 4856, 4857, 4858, 4859, 4860, 4861, 4862, 4863, 4864, 4902, 4904, 4906, 4907, 4908, 4911, 4913, 4914, 4919, 4920, 4924, 4925, 5467, 5716, 5722, 5937, 6112, 6113, 6114, 6115, 6257, 6258, 6259, 6260, 6261, 6262, 6937, 7289
- Assistant