shenwu %!s(int64=2) %!d(string=hai) anos
pai
achega
4863217084

+ 22 - 6
src/pages/launchSystemNew/adq/ad/index.tsx

@@ -1,7 +1,7 @@
 
 import { useAjax } from '@/Hook/useAjax'
 import { AdStatusEnum, PromotedObjectType } from '@/services/launchAdq/enum'
-import { Col, Row, Input, Select, message, Space, Button, Popconfirm, Switch, notification } from 'antd'
+import { Col, Row, Input, Select, message, Space, Button, Popconfirm, Switch, notification, Modal } from 'antd'
 import React, { useEffect, useCallback, useState } from 'react'
 import TableData from '../../components/TableData'
 import tableConfig from './tableConfig'
@@ -11,6 +11,7 @@ import UpdateAd from './updateAd'
 import Copy from './copy'
 import PlanDetail from '@/pages/adMonitor/adMonitorList/components/planDetail'
 import { txAdConfig } from '../config'
+import Log from '../log'
 
 type Props = {
     accountId: string,
@@ -46,6 +47,7 @@ const Ad: React.FC<Props> = (props) => {
     const [copyData, setCopyData] = useState<{ visible: boolean }>({ visible: false })
     const [detailShow, setDetailShow] = useState<boolean>(false)
     const [detailData, setDetailData] = useState<any>({})
+    const [czjlShow, setCzjlShow] = useState(false)
     const [queryFrom, set_queryFrom] = useState<{
         pageNum: number;
         pageSize: number;
@@ -96,16 +98,17 @@ const Ad: React.FC<Props> = (props) => {
     }, [userId, listAjax])
     // 同步 
     const sync = useCallback(() => {
-        if (!adAccountId) {
-            message.error('请先选要同步的广点通账号!')
+        if (selectedRows?.length === 0) {
+            message.error('请先选要同步的广点通账号!')
             return
         }
-        syncAjax.run({ adAccountId }).then(res => {
+        let arr = [...new Set(selectedRows?.map(item=>item.accountId))]
+        syncAjax.run({ accountIdList:arr }).then(res => {
             res && listAjax.refresh()
             res ? message.success('同步成功!') : message.error('同步失败!')
 
         })
-    }, [adAccountId, listAjax])
+    }, [listAjax,selectedRows])
 
     /** 删除 */
     const deleteHandle = (type: 0 | 1, adgroupId?: number) => {
@@ -200,7 +203,7 @@ const Ad: React.FC<Props> = (props) => {
         />}
         {/* 复制广告 */}
         {copyData.visible && <Copy selectedRows={selectedRows} {...copyData} onClose={() => setCopyData({ visible: false })} onChange={() => { setCopyData({ visible: false }); listAjax.refresh(); setSelectedRows([]) }} />}
-        <Row gutter={[6, 6]} align='middle' style={{marginBottom:15}}>
+        <Row gutter={[6, 6]} align='middle' style={{ marginBottom: 15 }}>
             <Col>
                 <Input
                     placeholder='广告账号'
@@ -392,6 +395,9 @@ const Ad: React.FC<Props> = (props) => {
                             </Popconfirm>
                         </Col>
                     </> : <Col><Button type='primary' icon={<TransactionOutlined />} disabled={selectedRows.length === 0} onClick={editDeepConversion}>修改深度优化ROI</Button></Col>}
+                    <Col>
+                        <Button type='dashed' onClick={() => { setCzjlShow(true) }}>操作记录</Button>
+                    </Col>
                 </Row>
             </Space>}
             rowSelection={{
@@ -418,6 +424,16 @@ const Ad: React.FC<Props> = (props) => {
             }}
         />
         {detailShow && <PlanDetail visible={detailShow} onClose={() => { setDetailShow(false) }} data={detailData} />}
+        {czjlShow && <Modal
+                visible={czjlShow}
+                onCancel={()=>{setCzjlShow(false)}}
+                onOk={()=>{setCzjlShow(false)}}
+                width={1200}
+                footer={null}
+                title={"广告操作记录"}
+            >
+                <Log {...props} />
+        </Modal>}
     </div>
 }
 export default Ad

+ 12 - 5
src/pages/launchSystemNew/adq/campaign/index.tsx

@@ -37,6 +37,7 @@ function Campaign(props: Props) {
     const listAjax = useAjax((params) => getAdqCampaignList(params), { formatResult: true })
     const syncAjax = useAjax((adAccountId) => putAdqCampaignPage(adAccountId))
     const switchAjax = useAjax((params) => putAdqCampaignConfigStatus(params))
+    const [selectedRows, setSelectedRows] = useState<any[]>([])
     const [queryFrom, set_queryFrom] = useState<{
         pageNum: number;
         pageSize: number;
@@ -61,17 +62,17 @@ function Campaign(props: Props) {
     }, [userId, listAjax,])
     // 同步 
     const sync = useCallback(() => {
-        if (!adAccountId) {
-            message.error('请先选要同步的广点通账号!')
+        if (selectedRows?.length === 0) {
+            message.error('请先选要同步的广点通账号!')
             return
         }
-        syncAjax.run(adAccountId).then(res => {
-            console.log(res)
+        let arr = [...new Set(selectedRows?.map(item=>item.accountId))]
+        syncAjax.run({ accountIdList:arr }).then(res => {
             res && listAjax.refresh()
             res ? message.success('同步成功!') : message.error('同步失败!')
 
         })
-    }, [adAccountId, listAjax])
+    }, [listAjax,selectedRows])
     // 启停
     const switchHandle = useCallback((data, checked) => {
         let { accountId, campaignId } = data
@@ -185,6 +186,12 @@ function Campaign(props: Props) {
                 set_queryFrom({ ...queryFrom, pageNum: current, pageSize })
                 getList({ ...queryFrom, pageNum: current, pageSize })
             }}
+            rowSelection={{
+                selectedRowKeys: selectedRows?.map(item => item?.campaignId?.toString()),
+                onChange: (selectedRowKeys: any, selectedRows: any) => {
+                    setSelectedRows(selectedRows)
+                }
+            }}
         />
     </div>
 }

+ 14 - 7
src/pages/launchSystemNew/adq/creative/index.tsx

@@ -5,7 +5,7 @@ import { Col, Row, Input, Select, message, Button } from 'antd'
 import React, { useEffect, useCallback, useState } from 'react'
 import TableData from '../../components/TableData'
 import tableConfig from './tableConfig'
-import { getAdqAdcreativeList, putAdqTargetingSyncAll } from '@/services/launchAdq/adq'
+import { adcreativeSyncAll, getAdqAdcreativeList } from '@/services/launchAdq/adq'
 type Props = {
     accountId: string,
     adAccountId: string,
@@ -33,7 +33,8 @@ function Creative(props: Props) {
     let { accountId, adAccountId, userId, tableIdClick, queryParmas } = props
     // api方法
     const listAjax = useAjax((params) => getAdqAdcreativeList(params), { formatResult: true })
-    const syncAjax = useAjax((adAccountId) => putAdqTargetingSyncAll(adAccountId))
+    const syncAjax = useAjax((adAccountId) => adcreativeSyncAll(adAccountId))
+    const [selectedRows, setSelectedRows] = useState<any[]>([])
     const [queryFrom,set_queryFrom]=useState<{
         pageNum: number;
         pageSize: number;
@@ -58,17 +59,17 @@ function Creative(props: Props) {
     }, [userId, listAjax])
     // 同步 
     const sync = useCallback(() => {
-        if (!adAccountId) {
-            message.error('请先选要同步的广点通账号!')
+        if (selectedRows?.length === 0) {
+            message.error('请先选要同步的广点通账号!')
             return
         }
-        syncAjax.run(adAccountId).then(res => {
-            console.log(res)
+        let arr = [...new Set(selectedRows?.map(item=>item.accountId))]
+        syncAjax.run({ accountIdList:arr }).then(res => {
             res && listAjax.refresh()
             res ? message.success('同步成功!') : message.error('同步失败!')
 
         })
-    }, [adAccountId, listAjax])
+    }, [listAjax,selectedRows])
     return <div>
         <TableData
             isCard={false}
@@ -142,6 +143,12 @@ function Creative(props: Props) {
                 set_queryFrom({...queryFrom,pageNum:current,pageSize})
                 getList({...queryFrom, pageNum: current, pageSize })
             }}
+            rowSelection={{
+                selectedRowKeys: selectedRows?.map(item => item?.adcreativeId?.toString()),
+                onChange: (selectedRowKeys: any, selectedRows: any) => {
+                    setSelectedRows(selectedRows)
+                }
+            }}
         />
     </div>
 }

+ 2 - 3
src/pages/launchSystemNew/adq/index.tsx

@@ -11,7 +11,7 @@ import Targeting from './targeting';
 import { useAjax } from '@/Hook/useAjax';
 import { IdcardFilled, MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
 import { useModel } from 'umi';
-import Log from './log';
+import Promoted from './promoted';
 const { TabPane } = Tabs;
 let Menus: any = Menu
 const tabsConfig = [
@@ -21,7 +21,7 @@ const tabsConfig = [
     { key: '4', tab: '创意', jsx: (props: any) => <Creative {...props} /> },
     { key: '5', tab: '落地页', jsx: (props: any) => <LandingPage {...props} /> },
     { key: '6', tab: '定向', jsx: (props: any) => <Targeting {...props} /> },
-    { key: '7', tab: '操作记录', jsx: (props: any) => <Log {...props} /> },
+    { key: '7', tab: '推广目标', jsx: (props: any) => <Promoted {...props} /> },
 ]
 function Adq() {
     const userInfo = useModel('@@initialState', model => model.initialState?.currentUser)
@@ -138,7 +138,6 @@ function Adq() {
             sessionStorage.removeItem('adqQuery')
         }
     }, [])
-
     return <div className={style.adq}>
         {!hide && <div className={style.left}>
             <Select

+ 12 - 5
src/pages/launchSystemNew/adq/landingPage/index.tsx

@@ -9,6 +9,7 @@ function LandingPage(props: { accountId: string, adAccountId: string, userId: st
     let { accountId, adAccountId, userId, tableIdClick } = props
     const listAjax = useAjax((params) => getAdqLandingPageList(params), { formatResult: true })
     const syncAjax = useAjax((adAccountId) => putAdqLandingPage(adAccountId))
+    const [selectedRows, setSelectedRows] = useState<any[]>([])
     const [queryFrom, set_queryFrom] = useState<{
         pageNum: number;
         pageSize: number;
@@ -39,17 +40,17 @@ function LandingPage(props: { accountId: string, adAccountId: string, userId: st
     }, [listAjax, userId])
     // 同步 
     const sync = useCallback(() => {
-        if (!adAccountId) {
-            message.error('请先选要同步的广点通账号!')
+        if (selectedRows?.length === 0) {
+            message.error('请先选要同步的广点通账号!')
             return
         }
-        syncAjax.run(adAccountId).then(res => {
-            console.log(res)
+        let arr = [...new Set(selectedRows?.map(item=>item.accountId))]
+        syncAjax.run({ accountIdList:arr }).then(res => {
             res && listAjax.refresh()
             res ? message.success('同步成功!') : message.error('同步失败!')
 
         })
-    }, [adAccountId, listAjax])
+    }, [listAjax,selectedRows])
 
     return <div>
         <TableData
@@ -113,6 +114,12 @@ function LandingPage(props: { accountId: string, adAccountId: string, userId: st
                 set_queryFrom({ ...queryFrom, pageNum: current, pageSize })
                 getList({ ...queryFrom, pageNum: current, pageSize })
             }}
+            rowSelection={{
+                selectedRowKeys: selectedRows?.map(item => item?.pageId?.toString()),
+                onChange: (selectedRowKeys: any, selectedRows: any) => {
+                    setSelectedRows(selectedRows)
+                }
+            }}
         />
     </div>
 }

+ 140 - 0
src/pages/launchSystemNew/adq/promoted/index.tsx

@@ -0,0 +1,140 @@
+import { useAjax } from "@/Hook/useAjax"
+import { getPromotedObjectList, putPromotedObjectSync } from "@/services/launchAdq/adq"
+import { PromotedObjectType } from "@/services/launchAdq/enum"
+import { Button, Col, Input, message, Row, Select } from "antd"
+import React, { useCallback, useEffect, useState } from "react"
+import TableData from "../../components/TableData"
+import tableConfig from "./tableConfig"
+
+type Props = {
+    accountId: string,
+    adAccountId: string,
+    userId: string,
+    queryParmas: {
+        accountId?: string,//账户ID
+        adgroupId?: string,//广告ID
+    },
+    tableIdClick: (props: {
+        activeKey: string, parma: {
+            accountId?: string,//账户ID
+            campaignId?: string,//计划ID
+            adgroupId?: string,//广告ID
+            adcreativeId?: string,//创意ID
+            pageId?: string,//落地页ID
+            targetingId?: string,//定向ID
+        }
+    }) => void
+}
+/**
+ * 操作记录
+ */
+const Promoted: React.FC<Props> = (props) => {
+    /**************************/
+    let { tableIdClick, queryParmas, userId } = props
+    const [queryparams, setQueryparams] = useState<{ accountIdList?: string, promotedObjectName?: string, promotedObjectType?: string, pageNum: number, pageSize: number, userId: string }>({ pageNum: 1, pageSize: 20, userId })
+
+    const getLogList = useAjax((params) => getPromotedObjectList(params), { formatResult: true })
+    const syncAjax = useAjax((adAccountId) => putPromotedObjectSync(adAccountId))
+    const [selectedRows, setSelectedRows] = useState<any[]>([])
+    /**************************/
+    useEffect(() => {
+        getList(queryparams)
+    }, [userId])
+
+    const getList = useCallback((params: any) => {
+        getLogList.run({ ...params, userId })
+    }, [userId])
+    // 同步 
+    const sync = useCallback(() => {
+        if (selectedRows?.length === 0) {
+            message.error('请先勾选要同步的广点通账号!')
+            return
+        }
+        let arr = [...new Set(selectedRows?.map(item => item.accountId))]
+        syncAjax.run({ accountIdList: arr }).then(res => {
+            res && getLogList.refresh()
+            res ? message.success('同步成功!') : message.error('同步失败!')
+
+        })
+    }, [getLogList, selectedRows])
+    return <div>
+        <TableData
+            isCard={false}
+            columns={() => tableConfig(tableIdClick)}
+            ajax={getLogList}
+            dataSource={getLogList?.data?.data?.records}
+            loading={getLogList?.data?.loading}
+            scroll={{ y: 550 }}
+            total={getLogList?.data?.data?.total}
+            page={getLogList?.data?.data?.current}
+            pageSize={getLogList?.data?.data?.size}
+            syncAjax={sync}
+            leftChild={<>
+                <Row gutter={[10, 10]}>
+                    <Col>
+                        <Input
+                            placeholder='广告账号'
+                            allowClear
+                            style={{ width: 150 }}
+                            onChange={(e) => {
+                                let value = e.target.value
+                                let arr: any = []
+                                if (value) {
+                                    value = value.replace(/[,,\s]/g, ',')
+                                    arr = value.split(',').filter((a: any) => a)
+                                }
+                                setQueryparams({ ...queryparams, accountIdList: arr })
+                            }}
+                        />
+                    </Col>
+                    <Col>
+                        <Input
+                            placeholder='推广目标名称'
+                            allowClear
+                            style={{ width: 150 }}
+                            value={queryparams.promotedObjectName}
+                            onChange={(e) => {
+                                setQueryparams({ ...queryparams, promotedObjectName: e.target.value })
+                            }}
+                        />
+                    </Col>
+                    <Col>
+                        <Select
+                            placeholder='推广目标选择'
+                            style={{ width: 120 }}
+                            showSearch
+                            filterOption={(input: any, option: any) =>
+                                (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                            }
+                            allowClear
+                            onChange={(value: any) => {
+                                setQueryparams({ ...queryparams, promotedObjectType: value })
+                            }}
+                        >
+                            {Object.keys(PromotedObjectType).map(key => {
+                                return <Select.Option value={key} key={key}>{PromotedObjectType[key]}</Select.Option>
+                            })}
+                        </Select>
+                    </Col>
+                    <Col>
+                        <Button type='primary' onClick={() => { getList({ ...queryparams, pageNum: 1 }) }}>搜索</Button>
+                    </Col>
+                </Row>
+            </>}
+            onChange={(props: any) => {
+                let { sortData, pagination } = props
+                let { current, pageSize } = pagination
+                setQueryparams({ ...queryparams, pageNum: current, pageSize })
+                getList({ ...queryparams, pageNum: current, pageSize })
+            }}
+            rowSelection={{
+                onChange: (selectedRowKeys: any, selectedRows: any) => {
+                    setSelectedRows(selectedRows)
+                }
+            }}
+        />
+    </div>
+}
+
+
+export default React.memo(Promoted)

+ 96 - 0
src/pages/launchSystemNew/adq/promoted/tableConfig.tsx

@@ -0,0 +1,96 @@
+import { PromotedObjectType } from "@/services/launchAdq/enum"
+import { copy } from "@/utils/utils"
+import { Image, Space } from "antd"
+import React from "react"
+
+
+
+function tableConfig(tableIdClick: (props: {
+    activeKey: string, parma: {
+        accountId?: string,//账户ID
+        campaignId?: string,//计划ID
+        adgroupId?: string,//广告ID
+        adcreativeId?: string,//创意ID
+        pageId?: string,//落地页ID
+        targetingId?: string,//定向ID
+    }
+}) => void): any {
+    return [
+        {
+            title: '所属账号',
+            dataIndex: 'accountId',
+            key: 'accountId',
+            align: 'center',
+            width: 80,
+            ellipsis: true,
+            render: (a: string) => {
+                return <Space>
+                    <a onClick={() => copy(a)} >{a}</a>
+                </Space>
+            }
+        },
+        {
+            title: '推广目标ID',
+            dataIndex: 'promotedObjectId',
+            key: 'promotedObjectId',
+            align: 'center',
+            width: 100,
+            fixed: 'left',
+            ellipsis: true,
+            render: (a: string) => {
+                return <Space>
+                    <a onClick={() => copy(a)} >{a}</a>
+                </Space>
+            }
+        },
+        {
+            title: '推广目标名称',
+            dataIndex: 'promotedObjectName',
+            key: 'promotedObjectName',
+            align: 'center',
+            width: 100,
+            ellipsis: true,
+            render: (a: string) => {
+                return <a style={{ wordBreak: 'break-all' }} onClick={() => { copy(a) }}>{a}</a>
+            }
+        },
+        {
+            title: '品牌形象',
+            dataIndex: 'promotedObjectSpec',
+            key: 'promotedObjectSpec',
+            align: 'center',
+            width: 50,
+            ellipsis: true,
+            render: (a: any) => {
+                return <Image src={a?.wechatOfficialAccountSpec?.icon} style={{width:20}}/>
+            }
+        },
+        {
+            title: '推广目标类型',
+            dataIndex: 'promotedObjectType',
+            key: 'promotedObjectType',
+            width: 140,
+            align: 'center',
+            render:(a:any)=>{
+                return <span>{PromotedObjectType[a]}</span>
+            }
+        },
+        {
+            title: '创建时间',
+            dataIndex: 'createdTime',
+            key: 'createdTime',
+            width: 200,
+            align: 'center'
+        },
+        {
+            title: '更新时间',
+            dataIndex: 'lastModifiedTime',
+            key: 'lastModifiedTime',
+            width: 200,
+            align: 'center'
+        },
+    ]
+}
+
+
+export default tableConfig

+ 12 - 5
src/pages/launchSystemNew/adq/targeting/index.tsx

@@ -9,6 +9,7 @@ function Targeting(props: { adAccountId: any, userId: string, accountId: any, ta
     let { accountId, adAccountId, userId, tableIdClick } = props
     const listAjax = useAjax((params) => getAdqTargetingList(params), { formatResult: true })
     const syncAjax = useAjax((adAccountId) => putAdqTargetingSyncAll(adAccountId))
+    const [selectedRows, setSelectedRows] = useState<any[]>([])
     const [queryFrom,set_queryFrom]=useState<{
         pageNum: number;
         pageSize: number;
@@ -30,17 +31,17 @@ function Targeting(props: { adAccountId: any, userId: string, accountId: any, ta
     }, [listAjax, userId])
     // 同步 
     const sync = useCallback(() => {
-        if (!adAccountId) {
-            message.error('请先选要同步的广点通账号!')
+        if (selectedRows?.length === 0) {
+            message.error('请先选要同步的广点通账号!')
             return
         }
-        syncAjax.run(adAccountId).then(res => {
-            console.log(res)
+        let arr = [...new Set(selectedRows?.map(item=>item.accountId))]
+        syncAjax.run({ accountIdList:arr }).then(res => {
             res && listAjax.refresh()
             res ? message.success('同步成功!') : message.error('同步失败!')
 
         })
-    }, [adAccountId, listAjax])
+    }, [listAjax,selectedRows])
     return <div>
         <TableData
             isCard={false}
@@ -90,6 +91,12 @@ function Targeting(props: { adAccountId: any, userId: string, accountId: any, ta
                 set_queryFrom({...queryFrom,pageNum:current,pageSize})
                 getList({...queryFrom, pageNum: current, pageSize })
             }}
+            rowSelection={{
+                selectedRowKeys: selectedRows?.map(item => item?.targetingId?.toString()),
+                onChange: (selectedRowKeys: any, selectedRows: any) => {
+                    setSelectedRows(selectedRows)
+                }
+            }}
         />
     </div>
 }

+ 13 - 12
src/pages/launchSystemNew/components/TableData/index.tsx

@@ -2,7 +2,7 @@ import CustomListModel from '@/components/CustomList'
 import Tables, { DataType } from '@/components/Tables'
 import { quanpin } from '@/utils/fullScreen'
 import { FullscreenExitOutlined, FullscreenOutlined, RedoOutlined, SettingOutlined, SyncOutlined } from '@ant-design/icons'
-import { Button, Card, Col, Row, Space, Spin, Tooltip, } from 'antd'
+import { Button, Card, Col, Input, Popconfirm, Row, Space, Spin, Tooltip, } from 'antd'
 import { ColumnsType } from 'antd/lib/table'
 import React, { useEffect, useRef, useState, useCallback } from 'react'
 import { useModel } from 'umi'
@@ -64,6 +64,7 @@ function TableData(props: Prosp) {
         syncAjaxShow: false,
         configShow: false,
     })
+    const [syncData,setSyncData]=useState('')
     const ref = useRef(null)
     const oldName = useRef(null)
     const version = '1.0.0'
@@ -198,17 +199,17 @@ function TableData(props: Prosp) {
                             size='small'
                             type='text'
                             style={{ display: 'flex', alignItems: 'center' }}
-                            onClick={() => {
-                                syncAjax()
-                            }}>
-                            <Tooltip
-                                title='同步最新'
-                                visible={tiptopShow.syncAjaxShow}
-                                onVisibleChange={(visible) => {
-                                    setTipTopShow({ ...tiptopShow, syncAjaxShow: visible })
-                                }}
-                            ><SyncOutlined style={{ color: 'red', fontSize: 17 }} /></Tooltip>
-                        </Button>
+                            onClick={syncAjax}
+                            >
+
+                                <Tooltip
+                                    title='同步最新'
+                                    visible={tiptopShow.syncAjaxShow}
+                                    onVisibleChange={(visible) => {
+                                        setTipTopShow({ ...tiptopShow, syncAjaxShow: visible })
+                                    }}
+                                ><SyncOutlined style={{ color: 'red', fontSize: 17 }} /></Tooltip>
+                            </Button>
                     }
                     {config && <Button
                         size='small'

+ 48 - 13
src/services/launchAdq/adq.ts

@@ -62,9 +62,10 @@ export async function getAdqCampaignList(params: {
  * 按账号同步计划
  * @param adAccountId 本地ID
  */
-export async function putAdqCampaignPage(adAccountId: any) {
-  return request(api + `/adq/campaign/syncAll/${adAccountId} `, {
+export async function putAdqCampaignPage(data: any) {
+  return request(api + `/adq/campaign/sync/all `, {
     method: 'PUT',
+    data
   });
 }
 /**
@@ -89,8 +90,10 @@ export async function getAdqAdgroupsList(params: {
  * 同步ADQ广告列表
  *@param adAccountId 本地ID
  */
-export async function putAdqAdgroupsSync(data: any) {
-  return request(api + `/adq/adgroups/sync`, {
+export async function putAdqAdgroupsSync(data: {
+  accountIdList: any[]
+}) {
+  return request(api + `/adq/adgroups/sync/all`, {
     method: 'PUT',
     data
   });
@@ -100,9 +103,9 @@ export async function putAdqAdgroupsSync(data: any) {
  * 同步ADQ广告列表
  *@param adAccountId 本地ID
  */
- export async function putAdqAdgroupsSyncBatch(data: {
-  adgroupIds:any[]
- }) {
+export async function putAdqAdgroupsSyncBatch(data: {
+  adgroupIds: any[]
+}) {
   return request(api + `/adq/adgroups/sync/batch`, {
     method: 'PUT',
     data
@@ -135,7 +138,7 @@ export async function delAdqAdgroupsApi({ adAccountId, adgroupId }: { adAccountI
 export interface EditAdqAdgroupsProps {
   /** 广告组id列表 */
   adgroupIds: number[],
-  /** 广告名称 */ 
+  /** 广告名称 */
   adgroupName?: string,
   /** 出价 */
   adgroupsUpdateBidAmountDTO?: {
@@ -182,7 +185,7 @@ export async function newEditAdqAdgroupsDataApi(data: EditAdqAdgroupsProps) {
     data
   });
 }
-export interface CopyAdProps{
+export interface CopyAdProps {
   adgroupIds: number[],   // 广告组id列表
   beginDate: string,
   endDate: string,
@@ -242,9 +245,10 @@ export async function getAdqLandingPageList(params: {
  * 按账号同步落地页
  * @param adAccountId 本地ID
  */
-export async function putAdqLandingPage(adAccountId: any) {
-  return request(api + `/adq/landingPageWechat/syncAll/${adAccountId} `, {
+export async function putAdqLandingPage(data: any) {
+  return request(api + `/adq/landingPageWechat/sync/all`, {
     method: 'PUT',
+    data
   });
 }
 /**
@@ -272,9 +276,19 @@ export async function getAdqTargetingList(params: {
  * 按账号同步ADQ定向列表
  * @param adAccountId 本地ID
  */
-export async function putAdqTargetingSyncAll(adAccountId: any) {
-  return request(api + `/adq/targeting/syncAll/${adAccountId} `, {
+export async function putAdqTargetingSyncAll(data: any) {
+  return request(api + `/adq/targeting/sync/all `, {
+    method: 'PUT',
+    data
+  });
+}
+// 同步创意
+export async function adcreativeSyncAll(data: {
+  accountIdList: any[]
+}) {
+  return request(api + `/adq/adcreative/sync/all `, {
     method: 'PUT',
+    data
   });
 }
 
@@ -309,4 +323,25 @@ export async function getLogListApi(data: { accountId?: number, adgroupId?: numb
     method: 'POST',
     data
   });
+}
+
+/**
+ * 获取推广目标列表
+ * */ 
+export async function getPromotedObjectList(data: { accountId?: number, promotedObjectType?: string, promotedObjectName?: string, pageNum: number, pageSize: number }) {
+  return request(api + `/adq/promotedObject/list`, {
+    method: 'POST',
+    data
+  });
+}
+
+/**
+ * 同步推广目标列表
+ * */ 
+
+export async function putPromotedObjectSync(data: any) {
+  return request(api + `/adq/promotedObject/sync/all`, {
+    method: 'PUT',
+    data
+  });
 }