├── .gitignore
├── LICENSE
├── README.md
├── codetemplates.xml
├── pom.xml
├── zhuque-adserv-ngx
├── pom.xml
├── zhuque-adserv-ngx-core
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── ai
│ │ └── houyi
│ │ └── zhuque
│ │ └── adserv
│ │ └── ngx
│ │ ├── package-info.java
│ │ └── service
│ │ ├── BiddingServiceImpl.java
│ │ └── package-info.java
├── zhuque-adserv-ngx-proto
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── ai
│ │ │ └── houyi
│ │ │ └── adserv
│ │ │ └── ngx
│ │ │ └── proto
│ │ │ ├── BiddingProto.java
│ │ │ ├── CommonProto.java
│ │ │ └── ModelProto.java
│ │ └── proto
│ │ ├── bidding.proto
│ │ ├── common.proto
│ │ └── model.proto
└── zhuque-adserv-ngx-server
│ ├── pom.xml
│ └── src
│ └── main
│ └── java
│ └── ai
│ └── houyi
│ └── zhuque
│ └── adserv
│ └── ngx
│ └── server
│ ├── Application.java
│ └── package-info.java
├── zhuque-adx-connector
├── pom.xml
├── zhuque-adx-connector-api
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── ai
│ │ └── houyi
│ │ └── zhuque
│ │ └── adx
│ │ └── connector
│ │ └── api
│ │ ├── RtbMsgMapper.java
│ │ └── package-info.java
└── zhuque-adx-connector-builtin
│ ├── pom.xml
│ └── src
│ └── main
│ └── java
│ └── ai
│ └── houyi
│ └── zhuque
│ └── adx
│ └── connector
│ └── builtin
│ └── package-info.java
├── zhuque-auth
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── ai
│ │ └── houyi
│ │ └── zhuque
│ │ └── auth
│ │ ├── Application.java
│ │ ├── controller
│ │ ├── AuthController.java
│ │ ├── MenuController.java
│ │ ├── PermissionController.java
│ │ ├── RoleController.java
│ │ ├── UserController.java
│ │ └── package-info.java
│ │ ├── model
│ │ ├── AuthReq.java
│ │ ├── ChangePwdReq.java
│ │ ├── ResetPasswdReq.java
│ │ ├── Subject.java
│ │ └── package-info.java
│ │ ├── package-info.java
│ │ └── service
│ │ ├── AuthService.java
│ │ ├── MenuService.java
│ │ ├── PermissionService.java
│ │ ├── RoleService.java
│ │ ├── SessionService.java
│ │ ├── UserService.java
│ │ ├── impl
│ │ ├── AuthServiceImpl.java
│ │ ├── MenuServiceImpl.java
│ │ ├── PermissionServiceImpl.java
│ │ ├── RoleServiceImpl.java
│ │ ├── SessionServiceImpl.java
│ │ ├── UserServiceImpl.java
│ │ └── package-info.java
│ │ └── package-info.java
│ └── resources
│ ├── application-dev.properties
│ ├── application-prod.properties
│ └── application.properties
├── zhuque-commons-web
├── pom.xml
└── src
│ └── main
│ └── java
│ └── ai
│ └── houyi
│ └── zhuque
│ └── commons
│ └── web
│ ├── AuthFailedException.java
│ ├── IController.java
│ ├── Response.java
│ ├── ZhuqueExceptionAdvisor.java
│ ├── ZhuqueMethodReturnValueHandler.java
│ └── package-info.java
├── zhuque-commons
├── pom.xml
└── src
│ └── main
│ └── java
│ └── ai
│ └── houyi
│ └── zhuque
│ └── commons
│ ├── ClassLoaderUtils.java
│ ├── Constants.java
│ ├── SQLUtils.java
│ ├── UUIDUtils.java
│ ├── exception
│ ├── ExceptionUtils.java
│ ├── ZhuqueException.java
│ └── package-info.java
│ ├── model
│ ├── QueryReq.java
│ └── package-info.java
│ ├── package-info.java
│ ├── page
│ ├── Page.java
│ └── package-info.java
│ └── redis
│ ├── RedisCallback.java
│ ├── RedisConfig.java
│ ├── RedisConfiguration.java
│ ├── RedisTemplate.java
│ ├── RedisUtils.java
│ └── package-info.java
├── zhuque-core
├── pom.xml
└── src
│ └── main
│ └── java
│ └── ai
│ └── houyi
│ └── zhuque
│ └── core
│ ├── IService.java
│ ├── model
│ ├── AuthContext.java
│ ├── AuthInfo.java
│ └── query
│ │ ├── AdGroupQueryReq.java
│ │ ├── AdvertiserQueryReq.java
│ │ ├── AgentQueryReq.java
│ │ ├── AuditAdvertiserQueryReq.java
│ │ ├── CampaignQueryReq.java
│ │ ├── CreativeQueryReq.java
│ │ ├── DspQueryReq.java
│ │ ├── MaterialQueryReq.java
│ │ ├── MenuQueryReq.java
│ │ ├── PermissionQueryReq.java
│ │ ├── RoleQueryReq.java
│ │ ├── TemplateQueryReq.java
│ │ ├── UserQueryReq.java
│ │ └── package-info.java
│ ├── package-info.java
│ └── service
│ ├── AdGroupService.java
│ ├── AdvertiserService.java
│ ├── AgentService.java
│ ├── AuditAdvertiserService.java
│ ├── CampaignService.java
│ ├── CreativeService.java
│ ├── DspService.java
│ ├── MaterialService.java
│ ├── TemplateService.java
│ ├── impl
│ ├── AdGroupServiceImpl.java
│ ├── AdvertiserServiceImpl.java
│ ├── AgentServiceImpl.java
│ ├── AuditAdvertiserServiceImpl.java
│ ├── CampaignServiceImpl.java
│ ├── CreativeServiceImpl.java
│ ├── DspServiceImpl.java
│ ├── MaterialServiceImpl.java
│ ├── TemplateServiceImpl.java
│ └── package-info.java
│ └── package-info.java
├── zhuque-crontab
├── pom.xml
└── src
│ └── main
│ └── java
│ └── ai
│ └── houyi
│ └── zhuque
│ └── crontab
│ └── package-info.java
├── zhuque-dao
├── pom.xml
└── src
│ └── main
│ ├── db
│ └── zhuque.sql
│ ├── java
│ └── ai
│ │ └── houyi
│ │ └── zhuque
│ │ └── dao
│ │ ├── AdGroupMapper.java
│ │ ├── AdPositionMapper.java
│ │ ├── AdvertiserBillMapper.java
│ │ ├── AdvertiserMapper.java
│ │ ├── AdvertiserQualificationMapper.java
│ │ ├── AgentBillMapper.java
│ │ ├── AgentMapper.java
│ │ ├── AuditAdvertiserMapper.java
│ │ ├── CampaignMapper.java
│ │ ├── CreativeMapper.java
│ │ ├── DspMapper.java
│ │ ├── MaterialMapper.java
│ │ ├── MenuMapper.java
│ │ ├── PermissionMapper.java
│ │ ├── RoleMapper.java
│ │ ├── RolePermissionMapper.java
│ │ ├── SessionMapper.java
│ │ ├── TemplateMapper.java
│ │ ├── UserMapper.java
│ │ ├── UserRoleMapper.java
│ │ ├── model
│ │ ├── AdGroup.java
│ │ ├── AdGroupExample.java
│ │ ├── AdPosition.java
│ │ ├── AdPositionExample.java
│ │ ├── Advertiser.java
│ │ ├── AdvertiserBill.java
│ │ ├── AdvertiserBillExample.java
│ │ ├── AdvertiserExample.java
│ │ ├── AdvertiserQualification.java
│ │ ├── AdvertiserQualificationExample.java
│ │ ├── Agent.java
│ │ ├── AgentBill.java
│ │ ├── AgentBillExample.java
│ │ ├── AgentExample.java
│ │ ├── AuditAdvertiser.java
│ │ ├── AuditAdvertiserExample.java
│ │ ├── Campaign.java
│ │ ├── CampaignExample.java
│ │ ├── Creative.java
│ │ ├── CreativeExample.java
│ │ ├── Dsp.java
│ │ ├── DspExample.java
│ │ ├── Material.java
│ │ ├── MaterialExample.java
│ │ ├── Menu.java
│ │ ├── MenuExample.java
│ │ ├── Permission.java
│ │ ├── PermissionExample.java
│ │ ├── Role.java
│ │ ├── RoleExample.java
│ │ ├── RolePermission.java
│ │ ├── RolePermissionExample.java
│ │ ├── Session.java
│ │ ├── SessionExample.java
│ │ ├── Template.java
│ │ ├── TemplateExample.java
│ │ ├── User.java
│ │ ├── UserExample.java
│ │ ├── UserRole.java
│ │ ├── UserRoleExample.java
│ │ └── ext
│ │ │ ├── ExtAdGroupExample.java
│ │ │ └── package-info.java
│ │ └── package-info.java
│ └── resources
│ ├── mapper
│ ├── AdGroupMapper.xml
│ ├── AdPositionMapper.xml
│ ├── AdvertiserBillMapper.xml
│ ├── AdvertiserMapper.xml
│ ├── AdvertiserQualificationMapper.xml
│ ├── AgentBillMapper.xml
│ ├── AgentMapper.xml
│ ├── AuditAdvertiserMapper.xml
│ ├── CampaignMapper.xml
│ ├── CreativeMapper.xml
│ ├── DspMapper.xml
│ ├── MaterialMapper.xml
│ ├── MenuMapper.xml
│ ├── PermissionMapper.xml
│ ├── RoleMapper.xml
│ ├── RolePermissionMapper.xml
│ ├── SessionMapper.xml
│ ├── TemplateMapper.xml
│ ├── UserMapper.xml
│ └── UserRoleMapper.xml
│ ├── mybatis-generator.xml
│ └── mybatis
│ └── mybatis-config.xml
├── zhuque-dashboard
├── pom.xml
├── zhuque-dashboard-api
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── ai
│ │ │ └── houyi
│ │ │ └── zhuque
│ │ │ └── dashboard
│ │ │ ├── Application.java
│ │ │ ├── controller
│ │ │ ├── AdGroupController.java
│ │ │ ├── AdvertiserController.java
│ │ │ ├── AgentController.java
│ │ │ ├── AuditAdvertiserController.java
│ │ │ ├── AuthController.java
│ │ │ ├── CampaignController.java
│ │ │ ├── CreativeController.java
│ │ │ ├── DspController.java
│ │ │ ├── MaterialController.java
│ │ │ ├── TemplateController.java
│ │ │ └── package-info.java
│ │ │ └── filter
│ │ │ ├── AuthFilter.java
│ │ │ ├── MockAuthFilter.java
│ │ │ └── package-info.java
│ │ └── resources
│ │ ├── application-dev.properties
│ │ ├── application-prod.properties
│ │ └── application.properties
└── zhuque-dashboard-fe
│ ├── .babelrc
│ ├── .editorconfig
│ ├── .eslintignore
│ ├── .eslintrc.js
│ ├── .gitignore
│ ├── .postcssrc.js
│ ├── .travis.yml
│ ├── LICENSE
│ ├── README-zh.md
│ ├── README.md
│ ├── build
│ ├── build.js
│ ├── check-versions.js
│ ├── logo.png
│ ├── utils.js
│ ├── vue-loader.conf.js
│ ├── webpack.base.conf.js
│ ├── webpack.dev.conf.js
│ └── webpack.prod.conf.js
│ ├── config
│ ├── dev.env.js
│ ├── index.js
│ └── prod.env.js
│ ├── favicon.ico
│ ├── index.html
│ ├── package.json
│ ├── src
│ ├── App.vue
│ ├── api
│ │ ├── login.js
│ │ └── table.js
│ ├── assets
│ │ └── 404_images
│ │ │ ├── 404.png
│ │ │ └── 404_cloud.png
│ ├── components
│ │ ├── Breadcrumb
│ │ │ └── index.vue
│ │ ├── Hamburger
│ │ │ └── index.vue
│ │ └── SvgIcon
│ │ │ └── index.vue
│ ├── icons
│ │ ├── index.js
│ │ ├── svg
│ │ │ ├── example.svg
│ │ │ ├── eye-open.svg
│ │ │ ├── eye.svg
│ │ │ ├── form.svg
│ │ │ ├── link.svg
│ │ │ ├── nested.svg
│ │ │ ├── password.svg
│ │ │ ├── table.svg
│ │ │ ├── tree.svg
│ │ │ └── user.svg
│ │ └── svgo.yml
│ ├── main.js
│ ├── permission.js
│ ├── router
│ │ └── index.js
│ ├── store
│ │ ├── getters.js
│ │ ├── index.js
│ │ └── modules
│ │ │ ├── app.js
│ │ │ └── user.js
│ ├── styles
│ │ ├── element-ui.scss
│ │ ├── index.scss
│ │ ├── mixin.scss
│ │ ├── sidebar.scss
│ │ ├── transition.scss
│ │ └── variables.scss
│ ├── utils
│ │ ├── auth.js
│ │ ├── index.js
│ │ ├── request.js
│ │ └── validate.js
│ └── views
│ │ ├── 404.vue
│ │ ├── dashboard
│ │ └── index.vue
│ │ ├── form
│ │ └── index.vue
│ │ ├── layout
│ │ ├── Layout.vue
│ │ ├── components
│ │ │ ├── AppMain.vue
│ │ │ ├── Navbar.vue
│ │ │ ├── Sidebar
│ │ │ │ ├── Item.vue
│ │ │ │ ├── Link.vue
│ │ │ │ ├── SidebarItem.vue
│ │ │ │ └── index.vue
│ │ │ └── index.js
│ │ └── mixin
│ │ │ └── ResizeHandler.js
│ │ ├── login
│ │ └── index.vue
│ │ ├── nested
│ │ ├── menu1
│ │ │ ├── index.vue
│ │ │ ├── menu1-1
│ │ │ │ └── index.vue
│ │ │ ├── menu1-2
│ │ │ │ ├── index.vue
│ │ │ │ ├── menu1-2-1
│ │ │ │ │ └── index.vue
│ │ │ │ └── menu1-2-2
│ │ │ │ │ └── index.vue
│ │ │ └── menu1-3
│ │ │ │ └── index.vue
│ │ └── menu2
│ │ │ └── index.vue
│ │ ├── table
│ │ └── index.vue
│ │ └── tree
│ │ └── index.vue
│ └── static
│ └── .gitkeep
├── zhuque-openapi
├── pom.xml
├── zhuque-openapi-dsp
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── ai
│ │ └── houyi
│ │ └── zhuque
│ │ └── openapi
│ │ └── dsp
│ │ └── package-info.java
└── zhuque-openapi-ssp
│ ├── pom.xml
│ └── src
│ └── main
│ └── java
│ └── ai
│ └── houyi
│ └── zhuque
│ └── openapi
│ └── ssp
│ └── package-info.java
├── zhuque-pixel-services
├── pom.xml
├── zhuque-pixel-service-click
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── ai
│ │ └── houyi
│ │ └── zhuque
│ │ └── pixel
│ │ └── click
│ │ └── package-info.java
└── zhuque-pixel-service-imp
│ ├── pom.xml
│ └── src
│ └── main
│ └── java
│ └── ai
│ └── houiyi
│ └── zhuque
│ └── pixel
│ └── imp
│ └── package-info.java
└── zhuque-rtb-proto
├── pom.xml
└── src
└── main
├── java
└── ai
│ └── houyi
│ └── zhuque
│ └── rtb
│ └── proto
│ └── ZhuqueRtb.java
└── proto
└── zhuque-rtb.proto
/.gitignore:
--------------------------------------------------------------------------------
1 | .target/
2 | .logs/
3 | */logs/
4 | */*/logs/
5 | */target/
6 |
7 | # maven ignore
8 | target/
9 | *.war
10 | *.zip
11 | *.tar
12 | *.tar.gz
13 |
14 | # eclipse ignore
15 | .settings/
16 | .project
17 | .classpath
18 |
19 | # idea ignore
20 | .idea/
21 | *.ipr
22 | *.iml
23 | *.iws
24 |
25 | # temp ignore
26 | *.log
27 | *.cache
28 | *.diff
29 | *.patch
30 | *.tmp
31 |
32 | # system ignore
33 | .DS_Store
34 | Thumbs.db
35 | logs/
36 | bin/
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # zhuque
2 | 开发源码的一站式广告平台,包含ssp/adx/dsp/dmp模块
3 |
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 | ai.houyi
5 | zhuque-all
6 | 0.0.1-SNAPSHOT
7 |
8 | zhuque-adserv-ngx
9 | pom
10 | zhuque-adserv-ngx
11 | the adserv engine module for zhuque
12 |
13 | zhuque-adserv-ngx-proto
14 | zhuque-adserv-ngx-core
15 | zhuque-adserv-ngx-server
16 |
17 |
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/zhuque-adserv-ngx-core/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 | ai.houyi
5 | zhuque-adserv-ngx
6 | 0.0.1-SNAPSHOT
7 |
8 | zhuque-adserv-ngx-core
9 | zhuque-adserv-ngx-core
10 | zhuque-adserv-ngx-core
11 |
12 |
13 | ai.houyi
14 | zhuque-adserv-ngx-proto
15 | 0.0.1-SNAPSHOT
16 |
17 |
18 | com.f2time.albatross
19 | albatross-rpc
20 |
21 |
22 | org.apache.commons
23 | commons-lang3
24 |
25 |
26 |
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/zhuque-adserv-ngx-core/src/main/java/ai/houyi/zhuque/adserv/ngx/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | /**
17 | * @author weiping wang
18 | *
19 | */
20 | package ai.houyi.zhuque.adserv.ngx;
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/zhuque-adserv-ngx-core/src/main/java/ai/houyi/zhuque/adserv/ngx/service/BiddingServiceImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.adserv.ngx.service;
17 |
18 | import org.slf4j.Logger;
19 | import org.slf4j.LoggerFactory;
20 |
21 | import com.google.protobuf.RpcCallback;
22 | import com.google.protobuf.RpcController;
23 | import com.google.protobuf.ServiceException;
24 |
25 | import ai.houyi.adserv.ngx.proto.BiddingProto.BiddingReq;
26 | import ai.houyi.adserv.ngx.proto.BiddingProto.BiddingRsp;
27 | import ai.houyi.adserv.ngx.proto.BiddingProto.BiddingService;
28 | import ai.houyi.adserv.ngx.proto.BiddingProto.BiddingService.BlockingInterface;
29 | import ai.houyi.adserv.ngx.proto.BiddingProto.BiddingService.Interface;
30 |
31 | /**
32 | *
33 | * @author weiping wang
34 | */
35 | public class BiddingServiceImpl implements BlockingInterface, Interface {
36 | private static final Logger LOG = LoggerFactory.getLogger(BiddingService.class);
37 |
38 | @Override
39 | public void search(RpcController controller, BiddingReq request, RpcCallback done) {
40 | try {
41 | done.run(search(controller, request));
42 | } catch (ServiceException ex) {
43 | LOG.error("handle search ad request error, cause: "+ex.getMessage(),ex);
44 | }
45 | }
46 |
47 | @Override
48 | public BiddingRsp search(RpcController controller, BiddingReq request) throws ServiceException {
49 | //TODO
50 | return null;
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/zhuque-adserv-ngx-core/src/main/java/ai/houyi/zhuque/adserv/ngx/service/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | /**
17 | *
18 | * @author weiping wang
19 | */
20 | package ai.houyi.zhuque.adserv.ngx.service;
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/zhuque-adserv-ngx-proto/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | ai.houyi
7 | zhuque-adserv-ngx
8 | 0.0.1-SNAPSHOT
9 |
10 | zhuque-adserv-ngx-proto
11 | zhuque-adserv-ngx-proto
12 | the adserv ngx proto module for zhuque
13 |
14 |
15 | com.google.protobuf
16 | protobuf-java
17 |
18 |
19 |
20 |
21 |
22 |
23 | com.github.os72
24 | protoc-jar-maven-plugin
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/zhuque-adserv-ngx-proto/src/main/proto/model.proto:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | syntax = "proto2";
17 |
18 | package ai.houyi.adserv.ngx.proto;
19 |
20 | import "common.proto";
21 |
22 | option java_outer_classname = "ModelProto";
23 |
24 | option optimize_for = SPEED;
25 |
26 | //推广活动/计划
27 | message Campaign{
28 | optional uint32 campaign_id = 1;
29 | optional uint32 advertiser_id = 2;
30 | optional string name = 3;
31 | optional uint32 status = 4;
32 | }
33 |
34 | //广告组
35 | message AdGroup{
36 | optional uint32 group_id = 1;
37 | optional uint32 campaign_id = 2;
38 | optional DeliveryMethod delivery_method = 3;
39 | optional PromotionType promotion_type = 4;
40 | optional string landing_page = 5;
41 | optional CostType cost_type = 6;
42 | optional string app_id = 7;
43 | optional string pkg_name = 8;
44 | optional BidStrategy bid_strategy = 9;
45 | optional FreqCapping freq_capping = 10;
46 |
47 | optional TimeTarget time_target = 4;
48 | }
49 |
50 | //推广创意
51 | message Creative {
52 | }
53 |
54 | //代理商
55 | message Agent{
56 | }
57 |
58 | //广告主
59 | message Advertiser{
60 | }
61 |
62 | //代理商底价
63 | message AgentFloor {
64 | }
65 |
66 | //广告位底价
67 | message AdPositionFloor {
68 | }
69 |
70 | //第三方广告平台
71 | message Dsp {
72 | }
73 |
74 | //第三方广告平台创意
75 | message DspCreative {
76 | }
77 |
78 | //联盟媒体app
79 | message App {}
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/zhuque-adserv-ngx-server/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 | ai.houyi
5 | zhuque-adserv-ngx
6 | 0.0.1-SNAPSHOT
7 |
8 | zhuque-adserv-ngx-server
9 | zhuque-adserv-ngx-server
10 | zhuque-adserv-ngx-server
11 |
12 |
13 | com.f2time.albatross
14 | albatross-rpc
15 |
16 |
17 | ai.houyi
18 | zhuque-adserv-ngx-core
19 | 0.0.1-SNAPSHOT
20 |
21 |
22 |
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/zhuque-adserv-ngx-server/src/main/java/ai/houyi/zhuque/adserv/ngx/server/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.adserv.ngx.server;
17 |
18 | import org.apache.commons.lang3.math.NumberUtils;
19 |
20 | import com.f2time.albatross.rpc.server.AlbatrossRpcServer;
21 |
22 | import ai.houyi.zhuque.adserv.ngx.service.BiddingServiceImpl;
23 |
24 | /**
25 | * @author weiping wang
26 | */
27 | public class Application {
28 | private static final int DEFAULT_PORT = 16888;
29 |
30 | public static void main(String[] args) throws Exception {
31 | int port = DEFAULT_PORT;
32 | if (args.length > 0) {
33 | port = NumberUtils.toInt(args[0], DEFAULT_PORT);
34 | }
35 |
36 | AlbatrossRpcServer adservNgxServer = new AlbatrossRpcServer(port);
37 | adservNgxServer.registerRpcService(new BiddingServiceImpl());
38 |
39 | adservNgxServer.start();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/zhuque-adserv-ngx/zhuque-adserv-ngx-server/src/main/java/ai/houyi/zhuque/adserv/ngx/server/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | /**
17 | * @author weiping wang
18 | *
19 | */
20 | package ai.houyi.zhuque.adserv.ngx.server;
--------------------------------------------------------------------------------
/zhuque-adx-connector/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 | ai.houyi
5 | zhuque-all
6 | 0.0.1-SNAPSHOT
7 |
8 | zhuque-adx-connector
9 | pom
10 | zhuque-adx-connector
11 | the ad-exchange connector module for zhuque
12 |
13 | zhuque-adx-connector-api
14 | zhuque-adx-connector-builtin
15 |
16 |
--------------------------------------------------------------------------------
/zhuque-adx-connector/zhuque-adx-connector-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 | ai.houyi
5 | zhuque-adx-connector
6 | 0.0.1-SNAPSHOT
7 |
8 | zhuque-adx-connector-api
9 | zhuque-adx-connector-api
10 | zhuque-adx-connector-api
11 |
--------------------------------------------------------------------------------
/zhuque-adx-connector/zhuque-adx-connector-api/src/main/java/ai/houyi/zhuque/adx/connector/api/RtbMsgMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.adx.connector.api;
17 |
18 | /**
19 | * @author weiping wang
20 | */
21 | public interface RtbMsgMapper {
22 | BidRequest toBidRequest(AdxRequest in);
23 |
24 | AdxResponse toAdxResponse(BidResponse bidResponse, BidRequest bidRequest);
25 | }
26 |
--------------------------------------------------------------------------------
/zhuque-adx-connector/zhuque-adx-connector-api/src/main/java/ai/houyi/zhuque/adx/connector/api/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | /**
17 | * @author weiping wang
18 | *
19 | */
20 | package ai.houyi.zhuque.adx.connector.api;
--------------------------------------------------------------------------------
/zhuque-adx-connector/zhuque-adx-connector-builtin/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 | ai.houyi
5 | zhuque-adx-connector
6 | 0.0.1-SNAPSHOT
7 |
8 | zhuque-adx-connector-builtin
9 | zhuque-adx-connector-builtin
10 | zhuque-adx-connector-builtin
11 |
--------------------------------------------------------------------------------
/zhuque-adx-connector/zhuque-adx-connector-builtin/src/main/java/ai/houyi/zhuque/adx/connector/builtin/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | /**
17 | * @author weiping wang
18 | *
19 | */
20 | package ai.houyi.zhuque.adx.connector.builtin;
--------------------------------------------------------------------------------
/zhuque-auth/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | ai.houyi
7 | zhuque-all
8 | 0.0.1-SNAPSHOT
9 |
10 | zhuque-auth
11 | zhuque-auth
12 | 认证&授权服务模块
13 |
14 |
15 | ai.houyi
16 | zhuque-commons
17 | 0.0.1-SNAPSHOT
18 |
19 |
20 | ai.houyi
21 | dorado-spring-boot-starter
22 |
23 |
24 | org.springframework.boot
25 | spring-boot-starter-log4j2
26 |
27 |
28 | ai.houyi
29 | zhuque-dao
30 | 0.0.1-SNAPSHOT
31 |
32 |
33 | ai.houyi
34 | zhuque-core
35 | 0.0.1-SNAPSHOT
36 |
37 |
38 | commons-codec
39 | commons-codec
40 |
41 |
42 | ai.houyi
43 | zhuque-commons-web
44 | 0.0.1-SNAPSHOT
45 |
46 |
47 | ai.houyi
48 | dorado-swagger-ui
49 |
50 |
51 | org.mybatis.spring.boot
52 | mybatis-spring-boot-starter
53 |
54 |
55 | ai.houyi
56 | dorado-swagger-spring-boot-starter
57 |
58 |
59 |
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.auth;
17 |
18 | import org.mybatis.spring.annotation.MapperScan;
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.context.annotation.ComponentScan;
21 |
22 | import ai.houyi.dorado.springboot.DoradoSpringBootApplication;
23 |
24 | /**
25 | *
26 | * @author weiping wang
27 | */
28 | @DoradoSpringBootApplication
29 | @MapperScan("ai.houyi.zhuque.dao")
30 | @ComponentScan(basePackages= {"ai.houyi.zhuque"})
31 | public class Application {
32 |
33 | public static void main(String[] args) {
34 | SpringApplication.run(Application.class, args);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/controller/AuthController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.auth.controller;
17 |
18 | import org.springframework.beans.factory.annotation.Autowired;
19 |
20 | import ai.houyi.dorado.rest.annotation.Controller;
21 | import ai.houyi.dorado.rest.annotation.POST;
22 | import ai.houyi.dorado.rest.annotation.Path;
23 | import ai.houyi.zhuque.auth.model.AuthReq;
24 | import ai.houyi.zhuque.auth.model.Subject;
25 | import ai.houyi.zhuque.auth.service.AuthService;
26 | import io.swagger.annotations.Api;
27 |
28 | /**
29 | *
30 | * @author weiping wang
31 | */
32 | @Controller
33 | @Path("/auth")
34 | @Api(tags="用户认证api")
35 | public class AuthController {
36 | @Autowired
37 | private AuthService authService;
38 |
39 | @POST
40 | public Subject auth(AuthReq authReq) {
41 | return authService.auth(authReq);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/controller/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | /**
17 | *
18 | * @author weiping wang
19 | */
20 | package ai.houyi.zhuque.auth.controller;
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/model/AuthReq.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.auth.model;
17 |
18 | /**
19 | *
20 | * @author weiping wang
21 | */
22 | public class AuthReq {
23 | private String userName;
24 | private String passwd;
25 | /**
26 | * @return the userName
27 | */
28 | public String getUserName() {
29 | return userName;
30 | }
31 | /**
32 | * @param userName the userName to set
33 | */
34 | public void setUserName(String userName) {
35 | this.userName = userName;
36 | }
37 | /**
38 | * @return the passwd
39 | */
40 | public String getPasswd() {
41 | return passwd;
42 | }
43 | /**
44 | * @param passwd the passwd to set
45 | */
46 | public void setPasswd(String passwd) {
47 | this.passwd = passwd;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/model/ChangePwdReq.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.auth.model;
17 |
18 | /**
19 | * @author weiping wang
20 | */
21 | public class ChangePwdReq {
22 | private Integer userId;
23 | private String oldPasswd;
24 | private String passwd;
25 |
26 | public Integer getUserId() {
27 | return userId;
28 | }
29 |
30 | public void setUserId(Integer userId) {
31 | this.userId = userId;
32 | }
33 |
34 | public String getOldPasswd() {
35 | return oldPasswd;
36 | }
37 |
38 | public void setOldPasswd(String oldPasswd) {
39 | this.oldPasswd = oldPasswd;
40 | }
41 |
42 | public String getPasswd() {
43 | return passwd;
44 | }
45 |
46 | public void setPasswd(String passwd) {
47 | this.passwd = passwd;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/model/ResetPasswdReq.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.auth.model;
17 |
18 | /**
19 | * @author weiping wang
20 | */
21 | public class ResetPasswdReq {
22 | private Integer userId;
23 | private String passwd;
24 |
25 | public Integer getUserId() {
26 | return userId;
27 | }
28 |
29 | public void setUserId(Integer userId) {
30 | this.userId = userId;
31 | }
32 |
33 | public String getPasswd() {
34 | return passwd;
35 | }
36 |
37 | public void setPasswd(String passwd) {
38 | this.passwd = passwd;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/model/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | /**
17 | * @author weiping wang
18 | *
19 | */
20 | package ai.houyi.zhuque.auth.model;
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | /**
17 | *
18 | * @author weiping wang
19 | */
20 | package ai.houyi.zhuque.auth;
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/service/AuthService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.auth.service;
17 |
18 | import ai.houyi.zhuque.auth.model.AuthReq;
19 | import ai.houyi.zhuque.auth.model.Subject;
20 |
21 | /**
22 | *
23 | * @author weiping wang
24 | */
25 | public interface AuthService {
26 |
27 | Subject auth(AuthReq authReq);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/zhuque-auth/src/main/java/ai/houyi/zhuque/auth/service/MenuService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2019 The OpenAds Project
3 | *
4 | * The OpenAds Project licenses this file to you under the Apache License,
5 | * version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at:
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 | package ai.houyi.zhuque.auth.service;
17 |
18 | import java.util.List;
19 |
20 | import ai.houyi.zhuque.core.IService;
21 | import ai.houyi.zhuque.core.model.query.MenuQueryReq;
22 | import ai.houyi.zhuque.dao.model.Menu;
23 |
24 | /**
25 | * @author weiping wang
26 | *
27 | */
28 | public interface MenuService extends IService