├── .gitignore ├── README.md ├── openssp-adserving ├── pom.xml └── src │ └── main │ └── java │ └── ai │ └── houyi │ └── openssp │ └── adserving │ ├── Application.java │ ├── api │ ├── AdServeController.java │ └── package-info.java │ ├── model │ ├── AdRequest.java │ ├── AdResponse.java │ └── package-info.java │ ├── package-info.java │ └── service │ ├── AdServeService.java │ └── package-info.java ├── openssp-core ├── pom.xml └── src │ └── main │ └── java │ └── ai │ └── houyi │ └── openssp │ ├── core │ └── service │ │ ├── AdPositionService.java │ │ ├── AppAdPositionService.java │ │ ├── AppService.java │ │ ├── MediaFloorService.java │ │ ├── MediaService.java │ │ ├── MediaTrafficAttrService.java │ │ ├── PublisherService.java │ │ ├── SiteAdPositionService.java │ │ ├── TrafficAttrService.java │ │ ├── impl │ │ ├── AdPositionServiceImpl.java │ │ ├── AppAdPositionServiceImpl.java │ │ ├── AppServiceImpl.java │ │ ├── MediaFloorServiceImpl.java │ │ ├── MediaServiceImpl.java │ │ ├── MediaTrafficAttrServiceImpl.java │ │ ├── PublisherServiceImpl.java │ │ ├── SiteAdPositionServiceImpl.java │ │ ├── TrafficAttrServiceImpl.java │ │ └── package-info.java │ │ └── package-info.java │ └── package-info.java ├── openssp-dao ├── pom.xml └── src │ └── main │ ├── db │ └── openssp.sql │ ├── java │ └── ai │ │ └── houyi │ │ └── openssp │ │ ├── mapper │ │ ├── AdPositionMapper.java │ │ ├── AppAdPositionMapper.java │ │ ├── AppMapper.java │ │ ├── MediaAdPositionMapper.java │ │ ├── MediaFloorMapper.java │ │ ├── MediaFloorTrafficAttrMapper.java │ │ ├── MediaMapper.java │ │ ├── MediaTrafficAttrMapper.java │ │ ├── PublisherMapper.java │ │ ├── SiteAdPositionMapper.java │ │ ├── SiteMapper.java │ │ └── TrafficAttrMapper.java │ │ ├── model │ │ ├── AdPosition.java │ │ ├── App.java │ │ ├── AppAdPosition.java │ │ ├── Media.java │ │ ├── MediaAdPosition.java │ │ ├── MediaFloor.java │ │ ├── MediaFloorTrafficAttr.java │ │ ├── MediaTrafficAttr.java │ │ ├── Publisher.java │ │ ├── Site.java │ │ ├── SiteAdPosition.java │ │ ├── TrafficAttr.java │ │ └── example │ │ │ ├── AdPositionExample.java │ │ │ ├── AppAdPositionExample.java │ │ │ ├── AppExample.java │ │ │ ├── MediaAdPositionExample.java │ │ │ ├── MediaExample.java │ │ │ ├── MediaFloorExample.java │ │ │ ├── MediaFloorTrafficAttrExample.java │ │ │ ├── MediaTrafficAttrExample.java │ │ │ ├── PublisherExample.java │ │ │ ├── SiteAdPositionExample.java │ │ │ ├── SiteExample.java │ │ │ └── TrafficAttrExample.java │ │ └── package-info.java │ └── resources │ ├── generatorConfig.xml │ └── mybatis │ └── mapper │ ├── AdPositionMapper.xml │ ├── AppAdPositionMapper.xml │ ├── AppMapper.xml │ ├── MediaAdPositionMapper.xml │ ├── MediaFloorMapper.xml │ ├── MediaFloorTrafficAttrMapper.xml │ ├── MediaMapper.xml │ ├── MediaTrafficAttrMapper.xml │ ├── PublisherMapper.xml │ ├── SiteAdPositionMapper.xml │ ├── SiteMapper.xml │ └── TrafficAttrMapper.xml ├── openssp-dashboard-api ├── .factorypath ├── pom.xml └── src │ └── main │ ├── java │ └── ai │ │ └── houyi │ │ └── openssp │ │ └── dashboard │ │ ├── Application.java │ │ ├── controller │ │ ├── AdPositionController.java │ │ ├── AppController.java │ │ ├── MediaController.java │ │ ├── MediaFloorController.java │ │ ├── MediaTrafficAttrController.java │ │ ├── PublisherController.java │ │ ├── TrafficAttrController.java │ │ └── package-info.java │ │ ├── model │ │ ├── AdPositionSearchReq.java │ │ ├── MediaSearchReq.java │ │ ├── PublisherSearchReq.java │ │ ├── SearchReq.java │ │ ├── TrafficAttrSearchReq.java │ │ └── package-info.java │ │ └── package-info.java │ └── resources │ ├── application-dev.properties │ ├── application-prod.properties │ ├── application-test.properties │ └── application.properties ├── openssp-dashboard ├── pom.xml └── src │ └── main │ └── java │ └── ai │ └── houyi │ └── openssp │ └── package-info.java ├── openssp-router ├── pom.xml └── src │ └── main │ └── java │ └── ai │ └── houyi │ └── openssp │ └── router │ ├── BidderRouter.java │ ├── model │ ├── Bidder.java │ └── package-info.java │ └── package-info.java ├── openssp-rtb-proto ├── pom.xml └── src │ └── main │ ├── java │ └── ai │ │ └── houyi │ │ └── openssp │ │ └── rtb │ │ └── proto │ │ ├── OpenAdxExt.java │ │ └── OpenRtb.java │ └── proto │ ├── openadx-ext.proto │ └── openrtb.proto └── pom.xml /.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 | # openssp 2 | -------------------------------------------------------------------------------- /openssp-adserving/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | ai.houyi 5 | openssp 6 | 0.0.1-SNAPSHOT 7 | 8 | openssp-adserving 9 | openssp-adserving 10 | openssp-adserving module 11 | 12 | 13 | ai.houyi 14 | dorado-spring-boot-starter 15 | 16 | 17 | -------------------------------------------------------------------------------- /openssp-adserving/src/main/java/ai/houyi/openssp/adserving/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.adserving; 17 | 18 | import org.springframework.boot.SpringApplication; 19 | 20 | import ai.houyi.dorado.springboot.DoradoSpringBootApplication; 21 | 22 | /** 23 | * Ad server启动程序 24 | * 25 | * @author wangwp 26 | */ 27 | @DoradoSpringBootApplication 28 | public class Application { 29 | 30 | public static void main(String[] args) { 31 | SpringApplication.run(Application.class, args); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /openssp-adserving/src/main/java/ai/houyi/openssp/adserving/api/AdServeController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.adserving.api; 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.Path; 22 | import ai.houyi.dorado.rest.annotation.RequestBody; 23 | import ai.houyi.openssp.adserving.model.AdRequest; 24 | import ai.houyi.openssp.adserving.model.AdResponse; 25 | import ai.houyi.openssp.adserving.service.AdServeService; 26 | 27 | /** 28 | * 29 | * @author wangwp 30 | */ 31 | @Controller 32 | @Path("/adserve") 33 | public class AdServeController { 34 | @Autowired 35 | private AdServeService adServeService; 36 | 37 | @Path("/ad/imp") 38 | public void impAd() { 39 | } 40 | 41 | @Path("/ad/click") 42 | public void clickAd() { 43 | } 44 | 45 | @Path("/ads") 46 | public AdResponse getAds(@RequestBody AdRequest adReq) { 47 | return adServeService.getAds(adReq); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /openssp-adserving/src/main/java/ai/houyi/openssp/adserving/api/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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 wangwp 19 | */ 20 | package ai.houyi.openssp.adserving.api; -------------------------------------------------------------------------------- /openssp-adserving/src/main/java/ai/houyi/openssp/adserving/model/AdRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.adserving.model; 17 | 18 | /** 19 | * 广告请求 20 | * 21 | * @author wangwp 22 | */ 23 | public class AdRequest { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /openssp-adserving/src/main/java/ai/houyi/openssp/adserving/model/AdResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.adserving.model; 17 | 18 | /** 19 | * 广告响应 20 | * 21 | * @author wangwp 22 | */ 23 | public class AdResponse { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /openssp-adserving/src/main/java/ai/houyi/openssp/adserving/model/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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 wangwp 19 | */ 20 | package ai.houyi.openssp.adserving.model; -------------------------------------------------------------------------------- /openssp-adserving/src/main/java/ai/houyi/openssp/adserving/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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 wangwp 19 | */ 20 | package ai.houyi.openssp.adserving; -------------------------------------------------------------------------------- /openssp-adserving/src/main/java/ai/houyi/openssp/adserving/service/AdServeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.adserving.service; 17 | 18 | import ai.houyi.openssp.adserving.model.AdRequest; 19 | import ai.houyi.openssp.adserving.model.AdResponse; 20 | 21 | /** 22 | * 23 | * @author wangwp 24 | */ 25 | public interface AdServeService { 26 | 27 | void impAd(); 28 | 29 | void clickAd(); 30 | 31 | AdResponse getAds(AdRequest adReq); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /openssp-adserving/src/main/java/ai/houyi/openssp/adserving/service/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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 wangwp 19 | */ 20 | package ai.houyi.openssp.adserving.service; -------------------------------------------------------------------------------- /openssp-core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | ai.houyi 5 | openssp 6 | 0.0.1-SNAPSHOT 7 | 8 | openssp-core 9 | openssp-core 10 | the core module for openssp 11 | 12 | 13 | ai.houyi 14 | openssp-dao 15 | 0.0.1-SNAPSHOT 16 | 17 | 18 | org.springframework 19 | spring-context 20 | 21 | 22 | ai.houyi 23 | openads-commons 24 | 0.0.1-SNAPSHOT 25 | 26 | 27 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/AdPositionService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; 17 | 18 | import ai.houyi.openads.commons.PageResult; 19 | import ai.houyi.openssp.model.AdPosition; 20 | import ai.houyi.openssp.model.example.AdPositionExample; 21 | 22 | /** 23 | * @author weiping wang 24 | * 25 | */ 26 | public interface AdPositionService { 27 | void deleteAdPosition(int adPositionId); 28 | 29 | PageResult listAdPositions(int pageNo); 30 | 31 | PageResult listAdPositions(int pageNo, int pageSize); 32 | 33 | PageResult listAdPositions(int pageNo, int pageSize, AdPositionExample _example); 34 | 35 | AdPosition loadAdPosition(int adPositionId); 36 | 37 | void saveOrUpdateAdPosition(AdPosition adPosition); 38 | } 39 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/AppAdPositionService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; 17 | 18 | import java.util.List; 19 | 20 | import ai.houyi.openssp.model.AdPosition; 21 | 22 | /** 23 | * 24 | * @author wangwp 25 | */ 26 | public interface AppAdPositionService { 27 | void setAppAdPositions(int appId, List adPositionIds); 28 | 29 | List listAppAdPositions(int appId); 30 | } 31 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/AppService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; 17 | 18 | import ai.houyi.openads.commons.PageResult; 19 | import ai.houyi.openssp.model.App; 20 | import ai.houyi.openssp.model.example.AppExample; 21 | 22 | /** 23 | * App管理 24 | * 25 | * @author weiping wang 26 | * 27 | */ 28 | public interface AppService { 29 | void saveOrUpdateApp(App app); 30 | 31 | void deleteApp(int appId); 32 | 33 | App loadApp(int appId); 34 | 35 | PageResult listApps(int pageNo, int pageSize, AppExample _example); 36 | 37 | PageResult listApps(int pageNo, int pageSize); 38 | 39 | PageResult listApps(int pageNo); 40 | } 41 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/MediaFloorService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; 17 | 18 | import ai.houyi.openads.commons.PageResult; 19 | import ai.houyi.openssp.model.MediaFloor; 20 | import ai.houyi.openssp.model.example.MediaFloorExample; 21 | 22 | /** 23 | * @author weiping wang 24 | * 25 | */ 26 | public interface MediaFloorService { 27 | void saveOrUpdateMediaFloor(MediaFloor mediaFloor); 28 | 29 | void deleteMediaFloor(int mediaFloorId); 30 | 31 | MediaFloor loadMediaFloor(int mediaFloorId); 32 | 33 | PageResult listMediaFloors(int pageNo, int pageSize, MediaFloorExample _example); 34 | 35 | PageResult listMediaFloors(int pageNo,int pageSize); 36 | 37 | PageResult listMediaFloors(int pageNo); 38 | } 39 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/MediaService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; 17 | 18 | import ai.houyi.openads.commons.PageResult; 19 | import ai.houyi.openssp.model.Media; 20 | import ai.houyi.openssp.model.example.MediaExample; 21 | 22 | /** 23 | * 媒体管理 24 | * 25 | * @author weiping wang 26 | * 27 | */ 28 | public interface MediaService { 29 | void saveOrUpdateMedia(Media media); 30 | 31 | void deleteMedia(int mediaId); 32 | 33 | Media loadMedia(int mediaId); 34 | 35 | PageResult listMedias(int pageNo, int pageSize, MediaExample _example); 36 | 37 | PageResult listMedias(int pageNo); 38 | 39 | PageResult listMedias(int pageNo, int pageSize); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/MediaTrafficAttrService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; 17 | 18 | import java.util.List; 19 | 20 | import ai.houyi.openssp.model.MediaTrafficAttr; 21 | 22 | /** 23 | * @author weiping wang 24 | * 25 | */ 26 | public interface MediaTrafficAttrService { 27 | void addTrafficAttrsToMedia(int mediaId, List trafficAttrIds); 28 | 29 | List listTrafficAttrsByMediaId(int mediaId); 30 | 31 | void setMediaTrafficAttrValues(int mediaTrafficAttrId, List enumValues); 32 | } 33 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/PublisherService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; 17 | 18 | import ai.houyi.openads.commons.PageResult; 19 | import ai.houyi.openssp.model.Publisher; 20 | import ai.houyi.openssp.model.example.PublisherExample; 21 | 22 | /** 23 | * publisher管理 24 | * 25 | * @author weiping wang 26 | * 27 | */ 28 | public interface PublisherService { 29 | 30 | void saveOrUpdatePublisher(Publisher publisher); 31 | 32 | void deletePublisher(int publisherId); 33 | 34 | Publisher loadPublisher(int publisherId); 35 | 36 | PageResult listPublishers(int pageNo); 37 | 38 | PageResult listPublishers(int pageNo, int pageSize); 39 | 40 | PageResult listPublishers(int pageNo, int pageSize, PublisherExample example); 41 | } 42 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/SiteAdPositionService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; 17 | 18 | import java.util.List; 19 | 20 | import ai.houyi.openssp.model.AdPosition; 21 | 22 | /** 23 | * 24 | * @author wangwp 25 | */ 26 | public interface SiteAdPositionService { 27 | void setSiteAdPositions(int siteId, List adPositionIds); 28 | 29 | List listSiteAdPositions(int siteId); 30 | } 31 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/TrafficAttrService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; 17 | 18 | import java.util.List; 19 | 20 | import ai.houyi.openads.commons.PageResult; 21 | import ai.houyi.openssp.model.TrafficAttr; 22 | import ai.houyi.openssp.model.example.TrafficAttrExample; 23 | 24 | /** 25 | * @author weiping wang 26 | * 27 | */ 28 | public interface TrafficAttrService { 29 | void saveOrUpdateTrafficAttr(TrafficAttr trafficAttr); 30 | 31 | void deleteTrafficAttr(int trafficAttrId); 32 | 33 | TrafficAttr loadTrafficAttr(int trafficAttrId); 34 | 35 | PageResult listTrafficAttrs(int pageNo, int pageSize, TrafficAttrExample _example); 36 | 37 | PageResult listTrafficAttrs(int pageNo, int pageSize); 38 | 39 | PageResult listTrafficAttrs(int pageNo); 40 | 41 | void batchDeleteTrafficAttrs(List trafficAttrIds); 42 | } 43 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/AdPositionServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service.impl; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.stereotype.Service; 22 | 23 | import ai.houyi.openads.commons.Constants; 24 | import ai.houyi.openads.commons.PageResult; 25 | import ai.houyi.openssp.core.service.AdPositionService; 26 | import ai.houyi.openssp.mapper.AdPositionMapper; 27 | import ai.houyi.openssp.model.AdPosition; 28 | import ai.houyi.openssp.model.example.AdPositionExample; 29 | 30 | /** 31 | * 32 | * @author wangwp 33 | */ 34 | @Service 35 | public class AdPositionServiceImpl implements AdPositionService { 36 | @Autowired 37 | private AdPositionMapper adPositionMapper; 38 | 39 | @Override 40 | public void saveOrUpdateAdPosition(AdPosition adPosition) { 41 | if (adPosition.getId() == null) { 42 | adPositionMapper.insertSelective(adPosition); 43 | } else { 44 | adPositionMapper.updateByPrimaryKeySelective(adPosition); 45 | } 46 | } 47 | 48 | @Override 49 | public void deleteAdPosition(int adPositionId) { 50 | adPositionMapper.deleteByPrimaryKey(adPositionId); 51 | } 52 | 53 | @Override 54 | public AdPosition loadAdPosition(int adPositionId) { 55 | return adPositionMapper.selectByPrimaryKey(adPositionId); 56 | } 57 | 58 | @Override 59 | public PageResult listAdPositions(int pageNo, int pageSize, AdPositionExample _example) { 60 | AdPositionExample example = _example == null ? new AdPositionExample() : _example; 61 | int total = (int) adPositionMapper.countByExample(example); 62 | 63 | example.limit((pageNo - 1) * pageSize, pageSize); 64 | List dataList = adPositionMapper.selectByExample(example); 65 | 66 | PageResult.Builder builder = PageResult.builder(); 67 | builder.withDataList(dataList).withPageNo(pageNo).withPageSize(pageSize).withTotal(total); 68 | 69 | return builder.build(); 70 | } 71 | 72 | @Override 73 | public PageResult listAdPositions(int pageNo, int pageSize) { 74 | return listAdPositions(pageNo, pageSize, null); 75 | } 76 | 77 | @Override 78 | public PageResult listAdPositions(int pageNo) { 79 | return listAdPositions(pageNo, Constants.DEFAULT_PAGE_SIZE, null); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/AppAdPositionServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service.impl; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import org.springframework.beans.factory.annotation.Autowired; 22 | import org.springframework.stereotype.Service; 23 | 24 | import ai.houyi.openssp.core.service.AppAdPositionService; 25 | import ai.houyi.openssp.mapper.AdPositionMapper; 26 | import ai.houyi.openssp.mapper.AppAdPositionMapper; 27 | import ai.houyi.openssp.model.AdPosition; 28 | import ai.houyi.openssp.model.AppAdPosition; 29 | import ai.houyi.openssp.model.example.AdPositionExample; 30 | import ai.houyi.openssp.model.example.AppAdPositionExample; 31 | 32 | /** 33 | * 34 | * @author wangwp 35 | */ 36 | @Service 37 | public class AppAdPositionServiceImpl implements AppAdPositionService { 38 | @Autowired 39 | private AppAdPositionMapper appAdPositionMapper; 40 | @Autowired 41 | private AdPositionMapper adPositionMapper; 42 | 43 | @Override 44 | public void setAppAdPositions(int appId, List adPositionIds) { 45 | List appAdPositions = new ArrayList<>(); 46 | 47 | adPositionIds.forEach(adPositionId -> { 48 | AppAdPosition appAdPosition = new AppAdPosition(); 49 | appAdPosition.setAdPositionId(adPositionId); 50 | appAdPosition.setAppId(appId); 51 | appAdPositions.add(appAdPosition); 52 | }); 53 | 54 | appAdPositionMapper.batchInsert(appAdPositions); 55 | } 56 | 57 | @Override 58 | public List listAppAdPositions(int appId) { 59 | List appAdPositions = appAdPositionMapper 60 | .selectByExample(new AppAdPositionExample().createCriteria().andAppIdEqualTo(appId).example()); 61 | if (appAdPositions == null || appAdPositions.isEmpty()) { 62 | return null; 63 | } 64 | 65 | List adPositionIds = new ArrayList<>(); 66 | appAdPositions.forEach(e -> adPositionIds.add(e.getAdPositionId())); 67 | 68 | return adPositionMapper 69 | .selectByExample(new AdPositionExample().createCriteria().andIdIn(adPositionIds).example()); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/AppServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service.impl; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.stereotype.Service; 22 | 23 | import ai.houyi.openads.commons.Constants; 24 | import ai.houyi.openads.commons.PageResult; 25 | import ai.houyi.openssp.core.service.AppService; 26 | import ai.houyi.openssp.mapper.AppMapper; 27 | import ai.houyi.openssp.model.App; 28 | import ai.houyi.openssp.model.example.AppExample; 29 | 30 | /** 31 | * 32 | * @author wangwp 33 | */ 34 | @Service 35 | public class AppServiceImpl implements AppService { 36 | @Autowired 37 | private AppMapper appMapper; 38 | 39 | @Override 40 | public void saveOrUpdateApp(App app) { 41 | if (app.getId() == null) { 42 | appMapper.insertSelective(app); 43 | } else { 44 | appMapper.updateByPrimaryKeySelective(app); 45 | } 46 | } 47 | 48 | @Override 49 | public void deleteApp(int appId) { 50 | appMapper.deleteByPrimaryKey(appId); 51 | } 52 | 53 | @Override 54 | public App loadApp(int appId) { 55 | return appMapper.selectByPrimaryKey(appId); 56 | } 57 | 58 | @Override 59 | public PageResult listApps(int pageNo, int pageSize, AppExample _example) { 60 | AppExample example = _example == null ? new AppExample() : _example; 61 | long total = appMapper.countByExample(example); 62 | example.limit((pageNo - 1) * pageSize, pageSize); 63 | 64 | List dataList = appMapper.selectByExample(example); 65 | 66 | PageResult.Builder builder = PageResult.builder(); 67 | builder.withDataList(dataList).withPageNo(pageNo).withPageSize(pageSize).withTotal((int) total); 68 | 69 | return builder.build(); 70 | } 71 | 72 | @Override 73 | public PageResult listApps(int pageNo, int pageSize) { 74 | return listApps(pageNo, pageSize, null); 75 | } 76 | 77 | @Override 78 | public PageResult listApps(int pageNo) { 79 | return listApps(pageNo, Constants.DEFAULT_PAGE_SIZE, null); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/MediaFloorServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service.impl; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.stereotype.Service; 22 | 23 | import ai.houyi.openads.commons.Constants; 24 | import ai.houyi.openads.commons.PageResult; 25 | import ai.houyi.openssp.core.service.MediaFloorService; 26 | import ai.houyi.openssp.mapper.MediaFloorMapper; 27 | import ai.houyi.openssp.model.MediaFloor; 28 | import ai.houyi.openssp.model.example.MediaFloorExample; 29 | 30 | /** 31 | * 32 | * @author wangwp 33 | */ 34 | @Service 35 | public class MediaFloorServiceImpl implements MediaFloorService { 36 | @Autowired 37 | private MediaFloorMapper mediaFloorMapper; 38 | 39 | @Override 40 | public void saveOrUpdateMediaFloor(MediaFloor mediaFloor) { 41 | if (mediaFloor.getId() == null) { 42 | mediaFloorMapper.insertSelective(mediaFloor); 43 | } else { 44 | mediaFloorMapper.updateByPrimaryKeySelective(mediaFloor); 45 | } 46 | } 47 | 48 | @Override 49 | public void deleteMediaFloor(int mediaFloorId) { 50 | mediaFloorMapper.deleteByPrimaryKey(mediaFloorId); 51 | } 52 | 53 | @Override 54 | public MediaFloor loadMediaFloor(int mediaFloorId) { 55 | return mediaFloorMapper.selectByPrimaryKey(mediaFloorId); 56 | } 57 | 58 | @Override 59 | public PageResult listMediaFloors(int pageNo, int pageSize, MediaFloorExample _example) { 60 | MediaFloorExample example = _example == null ? new MediaFloorExample() : _example; 61 | int total = (int) mediaFloorMapper.countByExample(example); 62 | 63 | example.limit((pageNo - 1) * pageSize, pageSize); 64 | List dataList = mediaFloorMapper.selectByExample(example); 65 | 66 | PageResult.Builder builder = PageResult.builder(); 67 | builder.withDataList(dataList).withPageNo(pageNo).withPageSize(pageSize).withTotal(total); 68 | 69 | return builder.build(); 70 | } 71 | 72 | @Override 73 | public PageResult listMediaFloors(int pageNo, int pageSize) { 74 | return listMediaFloors(pageNo, pageSize, null); 75 | } 76 | 77 | @Override 78 | public PageResult listMediaFloors(int pageNo) { 79 | return listMediaFloors(pageNo, Constants.DEFAULT_PAGE_SIZE, null); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/MediaServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service.impl; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.stereotype.Service; 22 | 23 | import ai.houyi.openads.commons.Constants; 24 | import ai.houyi.openads.commons.PageResult; 25 | import ai.houyi.openssp.core.service.MediaService; 26 | import ai.houyi.openssp.mapper.MediaMapper; 27 | import ai.houyi.openssp.model.Media; 28 | import ai.houyi.openssp.model.example.MediaExample; 29 | 30 | /** 31 | * 32 | * @author wangwp 33 | */ 34 | @Service 35 | public class MediaServiceImpl implements MediaService { 36 | @Autowired 37 | private MediaMapper mediaMapper; 38 | 39 | @Override 40 | public void saveOrUpdateMedia(Media media) { 41 | mediaMapper.insertSelective(media); 42 | } 43 | 44 | @Override 45 | public void deleteMedia(int mediaId) { 46 | mediaMapper.deleteByPrimaryKey(mediaId); 47 | } 48 | 49 | @Override 50 | public Media loadMedia(int mediaId) { 51 | return mediaMapper.selectByPrimaryKey(mediaId); 52 | } 53 | 54 | @Override 55 | public PageResult listMedias(int pageNo, int pageSize, MediaExample _example) { 56 | MediaExample example = _example == null ? new MediaExample() : _example; 57 | long total = mediaMapper.countByExample(example); 58 | example.limit((pageNo - 1) * pageSize, pageSize); 59 | 60 | List dataList = mediaMapper.selectByExample(example); 61 | 62 | PageResult.Builder builder = PageResult.builder(); 63 | builder.withDataList(dataList).withPageNo(pageNo).withPageSize(pageSize).withTotal((int) total); 64 | 65 | return builder.build(); 66 | } 67 | 68 | @Override 69 | public PageResult listMedias(int pageNo) { 70 | return listMedias(pageNo, Constants.DEFAULT_PAGE_SIZE, null); 71 | } 72 | 73 | @Override 74 | public PageResult listMedias(int pageNo, int pageSize) { 75 | return listMedias(pageNo, pageSize, null); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/MediaTrafficAttrServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service.impl; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import org.springframework.beans.factory.annotation.Autowired; 22 | import org.springframework.stereotype.Service; 23 | 24 | import com.alibaba.fastjson.JSON; 25 | 26 | import ai.houyi.openssp.core.service.MediaTrafficAttrService; 27 | import ai.houyi.openssp.mapper.MediaTrafficAttrMapper; 28 | import ai.houyi.openssp.model.MediaTrafficAttr; 29 | import ai.houyi.openssp.model.example.MediaTrafficAttrExample; 30 | 31 | /** 32 | * 33 | * @author wangwp 34 | */ 35 | @Service 36 | public class MediaTrafficAttrServiceImpl implements MediaTrafficAttrService { 37 | @Autowired 38 | private MediaTrafficAttrMapper mediaTrafficAttrMapper; 39 | 40 | @Override 41 | public void addTrafficAttrsToMedia(int mediaId, List trafficAttrIds) { 42 | List mediaTrafficAttrs = new ArrayList<>(); 43 | 44 | trafficAttrIds.forEach(trafficAttrId -> { 45 | MediaTrafficAttr mediaTrafficAttr = new MediaTrafficAttr(); 46 | mediaTrafficAttr.setMediaId(mediaId); 47 | mediaTrafficAttr.setTrafficAttrId(trafficAttrId); 48 | 49 | mediaTrafficAttrs.add(mediaTrafficAttr); 50 | }); 51 | 52 | mediaTrafficAttrMapper.batchInsert(mediaTrafficAttrs); 53 | } 54 | 55 | @Override 56 | public List listTrafficAttrsByMediaId(int mediaId) { 57 | return mediaTrafficAttrMapper 58 | .selectByExample(new MediaTrafficAttrExample().createCriteria().andMediaIdEqualTo(mediaId).example()); 59 | } 60 | 61 | @Override 62 | public void setMediaTrafficAttrValues(int mediaTrafficAttrId, List enumValues) { 63 | MediaTrafficAttr mediaTrafficAttr = new MediaTrafficAttr(); 64 | mediaTrafficAttr.setId(mediaTrafficAttrId); 65 | mediaTrafficAttr.setEnumValues(JSON.toJSONString(enumValues)); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/PublisherServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service.impl; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.stereotype.Service; 22 | 23 | import ai.houyi.openads.commons.Constants; 24 | import ai.houyi.openads.commons.PageResult; 25 | import ai.houyi.openssp.core.service.PublisherService; 26 | import ai.houyi.openssp.mapper.PublisherMapper; 27 | import ai.houyi.openssp.model.Publisher; 28 | import ai.houyi.openssp.model.example.PublisherExample; 29 | 30 | /** 31 | * 32 | * @author wangwp 33 | */ 34 | @Service 35 | public class PublisherServiceImpl implements PublisherService { 36 | @Autowired 37 | private PublisherMapper publisherMapper; 38 | 39 | @Override 40 | public void saveOrUpdatePublisher(Publisher publisher) { 41 | if (publisher.getId() == null) { 42 | publisherMapper.insertSelective(publisher); 43 | } else { 44 | publisherMapper.updateByPrimaryKeySelective(publisher); 45 | } 46 | } 47 | 48 | @Override 49 | public void deletePublisher(int publisherId) { 50 | publisherMapper.deleteByPrimaryKey(publisherId); 51 | } 52 | 53 | @Override 54 | public Publisher loadPublisher(int publisherId) { 55 | return publisherMapper.selectByPrimaryKey(publisherId); 56 | } 57 | 58 | @Override 59 | public PageResult listPublishers(int pageNo, int pageSize) { 60 | return listPublishers(pageNo, pageSize, null); 61 | } 62 | 63 | @Override 64 | public PageResult listPublishers(int pageNo) { 65 | return listPublishers(pageNo, Constants.DEFAULT_PAGE_SIZE); 66 | } 67 | 68 | @Override 69 | public PageResult listPublishers(int pageNo, int pageSize, PublisherExample example) { 70 | PublisherExample _example = example == null ? new PublisherExample() : example; 71 | long total = publisherMapper.countByExample(_example); 72 | _example.limit((pageNo - 1) * pageSize, pageSize); 73 | 74 | List dataList = publisherMapper.selectByExample(_example); 75 | 76 | PageResult.Builder builder = PageResult.builder(); 77 | builder.withDataList(dataList).withPageNo(pageNo).withPageSize(pageSize).withTotal((int) total); 78 | 79 | return builder.build(); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/SiteAdPositionServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service.impl; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import org.springframework.beans.factory.annotation.Autowired; 22 | import org.springframework.stereotype.Service; 23 | 24 | import ai.houyi.openssp.core.service.SiteAdPositionService; 25 | import ai.houyi.openssp.mapper.AdPositionMapper; 26 | import ai.houyi.openssp.mapper.SiteAdPositionMapper; 27 | import ai.houyi.openssp.model.AdPosition; 28 | import ai.houyi.openssp.model.SiteAdPosition; 29 | import ai.houyi.openssp.model.example.AdPositionExample; 30 | import ai.houyi.openssp.model.example.SiteAdPositionExample; 31 | 32 | /** 33 | * 34 | * @author wangwp 35 | */ 36 | @Service 37 | public class SiteAdPositionServiceImpl implements SiteAdPositionService { 38 | @Autowired 39 | private SiteAdPositionMapper siteAdPositionMapper; 40 | @Autowired 41 | private AdPositionMapper adPositionMapper; 42 | 43 | @Override 44 | public void setSiteAdPositions(int siteId, List adPositionIds) { 45 | List siteAdPositions = new ArrayList<>(); 46 | 47 | adPositionIds.forEach(adPositionId -> { 48 | SiteAdPosition siteAdPosition = new SiteAdPosition(); 49 | siteAdPosition.setAdPositionId(adPositionId); 50 | siteAdPosition.setSiteId(siteId); 51 | siteAdPositions.add(siteAdPosition); 52 | }); 53 | 54 | siteAdPositionMapper.batchInsert(siteAdPositions); 55 | } 56 | 57 | @Override 58 | public List listSiteAdPositions(int siteId) { 59 | List siteAdPositions = siteAdPositionMapper 60 | .selectByExample(new SiteAdPositionExample().createCriteria().andSiteIdEqualTo(siteId).example()); 61 | if (siteAdPositions == null || siteAdPositions.isEmpty()) { 62 | return null; 63 | } 64 | 65 | List adPositionIds = new ArrayList<>(); 66 | siteAdPositions.forEach(e -> adPositionIds.add(e.getAdPositionId())); 67 | 68 | return adPositionMapper 69 | .selectByExample(new AdPositionExample().createCriteria().andIdIn(adPositionIds).example()); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/TrafficAttrServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.core.service.impl; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.stereotype.Service; 22 | 23 | import ai.houyi.openads.commons.Constants; 24 | import ai.houyi.openads.commons.PageResult; 25 | import ai.houyi.openssp.core.service.TrafficAttrService; 26 | import ai.houyi.openssp.mapper.TrafficAttrMapper; 27 | import ai.houyi.openssp.model.TrafficAttr; 28 | import ai.houyi.openssp.model.example.TrafficAttrExample; 29 | 30 | /** 31 | * 32 | * @author wangwp 33 | */ 34 | @Service 35 | public class TrafficAttrServiceImpl implements TrafficAttrService { 36 | @Autowired 37 | private TrafficAttrMapper trafficAttrMapper; 38 | 39 | @Override 40 | public void saveOrUpdateTrafficAttr(TrafficAttr trafficAttr) { 41 | if (trafficAttr.getId() == null) { 42 | trafficAttrMapper.insertSelective(trafficAttr); 43 | } else { 44 | trafficAttrMapper.updateByPrimaryKeySelective(trafficAttr); 45 | } 46 | } 47 | 48 | @Override 49 | public void deleteTrafficAttr(int trafficAttrId) { 50 | trafficAttrMapper.deleteByPrimaryKey(trafficAttrId); 51 | } 52 | 53 | @Override 54 | public TrafficAttr loadTrafficAttr(int trafficAttrId) { 55 | return trafficAttrMapper.selectByPrimaryKey(trafficAttrId); 56 | } 57 | 58 | @Override 59 | public PageResult listTrafficAttrs(int pageNo, int pageSize, TrafficAttrExample _example) { 60 | TrafficAttrExample example = _example == null ? new TrafficAttrExample() : _example; 61 | int total = (int) trafficAttrMapper.countByExample(example); 62 | 63 | example.limit((pageNo - 1) * pageSize, pageSize); 64 | List dataList = trafficAttrMapper.selectByExample(example); 65 | 66 | PageResult.Builder builder = PageResult.builder(); 67 | builder.withDataList(dataList).withPageNo(pageNo).withPageSize(pageSize).withTotal(total); 68 | 69 | return builder.build(); 70 | } 71 | 72 | @Override 73 | public PageResult listTrafficAttrs(int pageNo, int pageSize) { 74 | return listTrafficAttrs(pageNo, pageSize, null); 75 | } 76 | 77 | @Override 78 | public PageResult listTrafficAttrs(int pageNo) { 79 | return listTrafficAttrs(pageNo, Constants.DEFAULT_PAGE_SIZE, null); 80 | } 81 | 82 | @Override 83 | public void batchDeleteTrafficAttrs(List trafficAttrIds) { 84 | TrafficAttrExample example = TrafficAttrExample.newAndCreateCriteria().andIdIn(trafficAttrIds).example(); 85 | trafficAttrMapper.deleteByExample(example); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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 wangwp 19 | */ 20 | package ai.houyi.openssp.core.service.impl; -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/core/service/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.core.service; -------------------------------------------------------------------------------- /openssp-core/src/main/java/ai/houyi/openssp/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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 wangwp 19 | */ 20 | package ai.houyi.openssp; -------------------------------------------------------------------------------- /openssp-dao/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | ai.houyi 5 | openssp 6 | 0.0.1-SNAPSHOT 7 | 8 | openssp-dao 9 | openssp-dao 10 | the dao module for openssp 11 | 12 | 13 | org.mybatis 14 | mybatis 15 | 16 | 17 | -------------------------------------------------------------------------------- /openssp-dao/src/main/db/openssp.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat MySQL Data Transfer 3 | 4 | Source Server : localhost 5 | Source Server Version : 50717 6 | Source Host : localhost:3306 7 | Source Database : openssp 8 | 9 | Target Server Type : MYSQL 10 | Target Server Version : 50717 11 | File Encoding : 65001 12 | 13 | Date: 2018-12-04 21:38:29 14 | */ 15 | 16 | SET FOREIGN_KEY_CHECKS=0; 17 | 18 | -- ---------------------------- 19 | -- Table structure for ad_position 20 | -- ---------------------------- 21 | DROP TABLE IF EXISTS `ad_position`; 22 | CREATE TABLE `ad_position` ( 23 | `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '广告位模板id', 24 | `name` varchar(128) DEFAULT NULL COMMENT '模板名称', 25 | `type` int(11) unsigned DEFAULT NULL COMMENT '模板类型,1-图片; 2-视频,3-信息流', 26 | `spec` varchar(4096) DEFAULT NULL COMMENT '模板定义JSON', 27 | `status` int(11) DEFAULT NULL, 28 | `create_time` datetime DEFAULT NULL, 29 | `update_time` datetime DEFAULT NULL, 30 | PRIMARY KEY (`id`) 31 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='广告位模板'; 32 | 33 | -- ---------------------------- 34 | -- Records of ad_position 35 | -- ---------------------------- 36 | 37 | -- ---------------------------- 38 | -- Table structure for app 39 | -- ---------------------------- 40 | DROP TABLE IF EXISTS `app`; 41 | CREATE TABLE `app` ( 42 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 43 | `name` varchar(100) DEFAULT NULL COMMENT 'app名称', 44 | `description` varchar(255) DEFAULT NULL COMMENT '应用描述', 45 | `keywords` varchar(255) DEFAULT NULL COMMENT '应用关键字,多个字段用逗号分隔', 46 | `media_id` int(10) unsigned DEFAULT NULL COMMENT '媒体id', 47 | `app_id` varchar(64) DEFAULT NULL COMMENT 'ios/安卓市场app_id/非第三方app的app_id', 48 | `media_app_id` varchar(64) DEFAULT NULL COMMENT '媒体端app_id', 49 | `pkg_name` varchar(128) DEFAULT NULL COMMENT '安卓包名/ios bundle_id', 50 | `download_url` varchar(255) DEFAULT NULL COMMENT 'app下载地址', 51 | `paid` int(11) DEFAULT NULL COMMENT '付费类型,0-免费; 1-付费', 52 | `category` int(10) unsigned DEFAULT NULL COMMENT 'app分类id', 53 | `os` int(11) DEFAULT NULL COMMENT '操作系统', 54 | `create_time` datetime DEFAULT NULL, 55 | `update_time` datetime DEFAULT NULL, 56 | `status` int(10) unsigned DEFAULT '1' COMMENT 'app状态', 57 | `ext` varchar(1024) DEFAULT NULL COMMENT '扩展字段,JSON表示', 58 | PRIMARY KEY (`id`) 59 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ios/android应用'; 60 | 61 | -- ---------------------------- 62 | -- Records of app 63 | -- ---------------------------- 64 | 65 | -- ---------------------------- 66 | -- Table structure for app_ad_position 67 | -- ---------------------------- 68 | DROP TABLE IF EXISTS `app_ad_position`; 69 | CREATE TABLE `app_ad_position` ( 70 | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, 71 | `ad_position_id` int(11) unsigned DEFAULT NULL, 72 | `app_id` int(11) DEFAULT NULL, 73 | PRIMARY KEY (`id`) 74 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app和广告位关联表'; 75 | 76 | -- ---------------------------- 77 | -- Records of app_ad_position 78 | -- ---------------------------- 79 | 80 | -- ---------------------------- 81 | -- Table structure for media 82 | -- ---------------------------- 83 | DROP TABLE IF EXISTS `media`; 84 | CREATE TABLE `media` ( 85 | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, 86 | `uuid` varchar(32) DEFAULT NULL COMMENT '媒体uuid,由平台生成', 87 | `publisher_id` int(11) DEFAULT NULL, 88 | `name` varchar(255) DEFAULT NULL COMMENT '媒体名称', 89 | `type` int(11) unsigned DEFAULT NULL COMMENT '媒体类型, 1-app; 2-site; 3-adx/ssp', 90 | `status` int(10) unsigned DEFAULT NULL COMMENT '媒体状态', 91 | `create_time` datetime DEFAULT NULL, 92 | `update_time` datetime DEFAULT NULL, 93 | PRIMARY KEY (`id`) 94 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='媒体/流量源, 类型包括独立的app,流量聚合平台,站点'; 95 | 96 | -- ---------------------------- 97 | -- Records of media 98 | -- ---------------------------- 99 | 100 | -- ---------------------------- 101 | -- Table structure for media_ad_position 102 | -- ---------------------------- 103 | DROP TABLE IF EXISTS `media_ad_position`; 104 | CREATE TABLE `media_ad_position` ( 105 | `id` int(11) NOT NULL, 106 | `media_id` int(10) unsigned DEFAULT NULL COMMENT '媒体id', 107 | `ad_position_id` int(11) DEFAULT NULL COMMENT '广告位id', 108 | `status` int(10) unsigned DEFAULT NULL COMMENT '媒体广告位id', 109 | PRIMARY KEY (`id`) 110 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='媒体广告位'; 111 | 112 | -- ---------------------------- 113 | -- Records of media_ad_position 114 | -- ---------------------------- 115 | 116 | -- ---------------------------- 117 | -- Table structure for media_floor 118 | -- ---------------------------- 119 | DROP TABLE IF EXISTS `media_floor`; 120 | CREATE TABLE `media_floor` ( 121 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 122 | `media_id` int(10) unsigned DEFAULT NULL COMMENT '媒体id', 123 | `ad_position_id` int(11) unsigned DEFAULT NULL COMMENT '广告位id', 124 | `traffic_attrs` varchar(1024) DEFAULT NULL COMMENT '底价依赖流量属性配置', 125 | `floor` int(11) DEFAULT NULL COMMENT '底价,单位是分', 126 | `status` int(11) DEFAULT NULL COMMENT '底价状态,0-无效;1-有效', 127 | PRIMARY KEY (`id`) 128 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='媒体刊例价配置'; 129 | 130 | -- ---------------------------- 131 | -- Records of media_floor 132 | -- ---------------------------- 133 | 134 | -- ---------------------------- 135 | -- Table structure for media_floor_traffic_attr 136 | -- ---------------------------- 137 | DROP TABLE IF EXISTS `media_floor_traffic_attr`; 138 | CREATE TABLE `media_floor_traffic_attr` ( 139 | `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id,主键', 140 | `media_id` int(11) unsigned DEFAULT NULL COMMENT '媒体id', 141 | `traffic_attr_id` int(11) unsigned DEFAULT NULL COMMENT '媒体流量属性id', 142 | PRIMARY KEY (`id`) 143 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='媒体底价配置流量属性配置'; 144 | 145 | -- ---------------------------- 146 | -- Records of media_floor_traffic_attr 147 | -- ---------------------------- 148 | 149 | -- ---------------------------- 150 | -- Table structure for media_traffic_attr 151 | -- ---------------------------- 152 | DROP TABLE IF EXISTS `media_traffic_attr`; 153 | CREATE TABLE `media_traffic_attr` ( 154 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 155 | `media_id` int(10) unsigned NOT NULL, 156 | `traffic_attr_id` int(10) unsigned NOT NULL, 157 | `enum_values` varchar(1024) DEFAULT NULL COMMENT '属性取值列表定义', 158 | PRIMARY KEY (`id`) 159 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='媒体流量属性定义'; 160 | 161 | -- ---------------------------- 162 | -- Records of media_traffic_attr 163 | -- ---------------------------- 164 | 165 | -- ---------------------------- 166 | -- Table structure for publisher 167 | -- ---------------------------- 168 | DROP TABLE IF EXISTS `publisher`; 169 | CREATE TABLE `publisher` ( 170 | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, 171 | `name` varchar(255) DEFAULT NULL COMMENT '开发者名称', 172 | `login_name` varchar(64) DEFAULT NULL COMMENT '登录名', 173 | `password` varchar(32) DEFAULT NULL COMMENT '开发者登陆密码', 174 | `contact` varchar(100) DEFAULT NULL COMMENT '联系人', 175 | `email` varchar(64) DEFAULT NULL COMMENT '邮件地址', 176 | `qq` varchar(32) DEFAULT NULL, 177 | `telephone` varchar(32) DEFAULT NULL COMMENT '联系电话', 178 | `bank_account` varchar(20) DEFAULT NULL COMMENT '银行账号', 179 | `bank_name` varchar(255) DEFAULT NULL COMMENT '开户行', 180 | `account_name` varchar(64) DEFAULT NULL COMMENT '开户名', 181 | `currency` int(11) unsigned DEFAULT '0' COMMENT '结算货币类型, 1-RMB, 2-USD', 182 | `status` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '开发者状态,0-无效; 1-有效;', 183 | `audit_status` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '审核状态,0-待审核;1-审核通过; 2-审核拒绝', 184 | `create_time` datetime DEFAULT NULL, 185 | `update_time` datetime DEFAULT NULL, 186 | PRIMARY KEY (`id`) 187 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='开发者/站长'; 188 | 189 | -- ---------------------------- 190 | -- Records of publisher 191 | -- ---------------------------- 192 | 193 | -- ---------------------------- 194 | -- Table structure for site 195 | -- ---------------------------- 196 | DROP TABLE IF EXISTS `site`; 197 | CREATE TABLE `site` ( 198 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 199 | `domain` varchar(64) DEFAULT NULL COMMENT '站点域名', 200 | `name` varchar(64) DEFAULT NULL COMMENT '站点名称', 201 | `category` int(11) DEFAULT NULL COMMENT '站点分类', 202 | `description` varchar(255) DEFAULT NULL COMMENT '站点描述', 203 | `keywords` varchar(255) DEFAULT NULL COMMENT '关键字列表', 204 | `create_time` datetime DEFAULT CURRENT_TIMESTAMP, 205 | `update_time` datetime DEFAULT NULL, 206 | `ext` varchar(1024) DEFAULT NULL, 207 | `status` int(11) DEFAULT NULL COMMENT '站点状态,0-无效;1-有效', 208 | PRIMARY KEY (`id`) 209 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 210 | 211 | -- ---------------------------- 212 | -- Records of site 213 | -- ---------------------------- 214 | 215 | -- ---------------------------- 216 | -- Table structure for site_ad_position 217 | -- ---------------------------- 218 | DROP TABLE IF EXISTS `site_ad_position`; 219 | CREATE TABLE `site_ad_position` ( 220 | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, 221 | `site_id` int(11) unsigned DEFAULT NULL COMMENT '站点id', 222 | `ad_position_id` int(11) unsigned DEFAULT NULL, 223 | PRIMARY KEY (`id`) 224 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 225 | 226 | -- ---------------------------- 227 | -- Records of site_ad_position 228 | -- ---------------------------- 229 | 230 | -- ---------------------------- 231 | -- Table structure for traffic_attr 232 | -- ---------------------------- 233 | DROP TABLE IF EXISTS `traffic_attr`; 234 | CREATE TABLE `traffic_attr` ( 235 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 236 | `name` varchar(64) DEFAULT NULL COMMENT '属性中文名', 237 | `en_name` varchar(64) DEFAULT NULL COMMENT '属性英文名', 238 | `component_type` int(11) unsigned DEFAULT NULL COMMENT '组件类型', 239 | `data_type` int(11) unsigned DEFAULT NULL COMMENT '数据类型', 240 | PRIMARY KEY (`id`) 241 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流量属性定义'; 242 | 243 | -- ---------------------------- 244 | -- Records of traffic_attr 245 | -- ---------------------------- 246 | -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/AdPositionMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.AdPosition; 4 | import ai.houyi.openssp.model.example.AdPositionExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface AdPositionMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table ad_position 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(AdPositionExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table ad_position 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(AdPositionExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table ad_position 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table ad_position 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(AdPosition record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table ad_position 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(AdPosition record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table ad_position 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | AdPosition selectOneByExample(AdPositionExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table ad_position 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(AdPositionExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table ad_position 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | AdPosition selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table ad_position 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") AdPosition record, @Param("example") AdPositionExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table ad_position 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") AdPosition record, @Param("example") AdPositionExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table ad_position 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(AdPosition record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table ad_position 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(AdPosition record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table ad_position 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table ad_position 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") AdPosition.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/AppAdPositionMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.AppAdPosition; 4 | import ai.houyi.openssp.model.example.AppAdPositionExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface AppAdPositionMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table app_ad_position 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(AppAdPositionExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table app_ad_position 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(AppAdPositionExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table app_ad_position 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table app_ad_position 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(AppAdPosition record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table app_ad_position 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(AppAdPosition record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table app_ad_position 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | AppAdPosition selectOneByExample(AppAdPositionExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table app_ad_position 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(AppAdPositionExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table app_ad_position 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | AppAdPosition selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table app_ad_position 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") AppAdPosition record, @Param("example") AppAdPositionExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table app_ad_position 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") AppAdPosition record, @Param("example") AppAdPositionExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table app_ad_position 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(AppAdPosition record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table app_ad_position 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(AppAdPosition record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table app_ad_position 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table app_ad_position 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") AppAdPosition.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/AppMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.App; 4 | import ai.houyi.openssp.model.example.AppExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface AppMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table app 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(AppExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table app 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(AppExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table app 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table app 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(App record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table app 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(App record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table app 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | App selectOneByExample(AppExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table app 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(AppExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table app 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | App selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table app 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") App record, @Param("example") AppExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table app 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") App record, @Param("example") AppExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table app 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(App record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table app 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(App record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table app 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table app 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") App.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/MediaAdPositionMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.MediaAdPosition; 4 | import ai.houyi.openssp.model.example.MediaAdPositionExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface MediaAdPositionMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table media_ad_position 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(MediaAdPositionExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table media_ad_position 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(MediaAdPositionExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table media_ad_position 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table media_ad_position 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(MediaAdPosition record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table media_ad_position 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(MediaAdPosition record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table media_ad_position 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | MediaAdPosition selectOneByExample(MediaAdPositionExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table media_ad_position 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(MediaAdPositionExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table media_ad_position 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | MediaAdPosition selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table media_ad_position 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") MediaAdPosition record, @Param("example") MediaAdPositionExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table media_ad_position 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") MediaAdPosition record, @Param("example") MediaAdPositionExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table media_ad_position 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(MediaAdPosition record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table media_ad_position 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(MediaAdPosition record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table media_ad_position 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table media_ad_position 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") MediaAdPosition.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/MediaFloorMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.MediaFloor; 4 | import ai.houyi.openssp.model.example.MediaFloorExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface MediaFloorMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table media_floor 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(MediaFloorExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table media_floor 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(MediaFloorExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table media_floor 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table media_floor 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(MediaFloor record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table media_floor 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(MediaFloor record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table media_floor 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | MediaFloor selectOneByExample(MediaFloorExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table media_floor 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(MediaFloorExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table media_floor 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | MediaFloor selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table media_floor 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") MediaFloor record, @Param("example") MediaFloorExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table media_floor 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") MediaFloor record, @Param("example") MediaFloorExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table media_floor 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(MediaFloor record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table media_floor 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(MediaFloor record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table media_floor 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table media_floor 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") MediaFloor.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/MediaFloorTrafficAttrMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.MediaFloorTrafficAttr; 4 | import ai.houyi.openssp.model.example.MediaFloorTrafficAttrExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface MediaFloorTrafficAttrMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table media_floor_traffic_attr 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(MediaFloorTrafficAttrExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table media_floor_traffic_attr 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(MediaFloorTrafficAttrExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table media_floor_traffic_attr 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table media_floor_traffic_attr 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(MediaFloorTrafficAttr record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table media_floor_traffic_attr 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(MediaFloorTrafficAttr record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table media_floor_traffic_attr 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | MediaFloorTrafficAttr selectOneByExample(MediaFloorTrafficAttrExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table media_floor_traffic_attr 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(MediaFloorTrafficAttrExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table media_floor_traffic_attr 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | MediaFloorTrafficAttr selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table media_floor_traffic_attr 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") MediaFloorTrafficAttr record, @Param("example") MediaFloorTrafficAttrExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table media_floor_traffic_attr 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") MediaFloorTrafficAttr record, @Param("example") MediaFloorTrafficAttrExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table media_floor_traffic_attr 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(MediaFloorTrafficAttr record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table media_floor_traffic_attr 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(MediaFloorTrafficAttr record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table media_floor_traffic_attr 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table media_floor_traffic_attr 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") MediaFloorTrafficAttr.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/MediaMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.Media; 4 | import ai.houyi.openssp.model.example.MediaExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface MediaMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table media 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(MediaExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table media 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(MediaExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table media 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table media 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(Media record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table media 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(Media record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table media 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | Media selectOneByExample(MediaExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table media 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(MediaExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table media 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | Media selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table media 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") Media record, @Param("example") MediaExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table media 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") Media record, @Param("example") MediaExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table media 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(Media record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table media 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(Media record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table media 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table media 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") Media.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/MediaTrafficAttrMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.MediaTrafficAttr; 4 | import ai.houyi.openssp.model.example.MediaTrafficAttrExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface MediaTrafficAttrMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table media_traffic_attr 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(MediaTrafficAttrExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table media_traffic_attr 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(MediaTrafficAttrExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table media_traffic_attr 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table media_traffic_attr 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(MediaTrafficAttr record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table media_traffic_attr 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(MediaTrafficAttr record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table media_traffic_attr 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | MediaTrafficAttr selectOneByExample(MediaTrafficAttrExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table media_traffic_attr 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(MediaTrafficAttrExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table media_traffic_attr 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | MediaTrafficAttr selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table media_traffic_attr 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") MediaTrafficAttr record, @Param("example") MediaTrafficAttrExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table media_traffic_attr 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") MediaTrafficAttr record, @Param("example") MediaTrafficAttrExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table media_traffic_attr 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(MediaTrafficAttr record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table media_traffic_attr 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(MediaTrafficAttr record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table media_traffic_attr 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table media_traffic_attr 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") MediaTrafficAttr.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/PublisherMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.Publisher; 4 | import ai.houyi.openssp.model.example.PublisherExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface PublisherMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table publisher 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(PublisherExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table publisher 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(PublisherExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table publisher 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table publisher 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(Publisher record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table publisher 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(Publisher record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table publisher 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | Publisher selectOneByExample(PublisherExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table publisher 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(PublisherExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table publisher 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | Publisher selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table publisher 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") Publisher record, @Param("example") PublisherExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table publisher 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") Publisher record, @Param("example") PublisherExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table publisher 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(Publisher record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table publisher 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(Publisher record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table publisher 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table publisher 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") Publisher.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/SiteAdPositionMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.SiteAdPosition; 4 | import ai.houyi.openssp.model.example.SiteAdPositionExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface SiteAdPositionMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table site_ad_position 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(SiteAdPositionExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table site_ad_position 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(SiteAdPositionExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table site_ad_position 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table site_ad_position 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(SiteAdPosition record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table site_ad_position 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(SiteAdPosition record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table site_ad_position 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | SiteAdPosition selectOneByExample(SiteAdPositionExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table site_ad_position 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(SiteAdPositionExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table site_ad_position 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | SiteAdPosition selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table site_ad_position 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") SiteAdPosition record, @Param("example") SiteAdPositionExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table site_ad_position 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") SiteAdPosition record, @Param("example") SiteAdPositionExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table site_ad_position 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(SiteAdPosition record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table site_ad_position 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(SiteAdPosition record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table site_ad_position 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table site_ad_position 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") SiteAdPosition.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/SiteMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.Site; 4 | import ai.houyi.openssp.model.example.SiteExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface SiteMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table site 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(SiteExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table site 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(SiteExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table site 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table site 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(Site record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table site 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(Site record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table site 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | Site selectOneByExample(SiteExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table site 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(SiteExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table site 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | Site selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table site 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") Site record, @Param("example") SiteExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table site 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") Site record, @Param("example") SiteExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table site 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(Site record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table site 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(Site record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table site 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table site 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") Site.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/mapper/TrafficAttrMapper.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.mapper; 2 | 3 | import ai.houyi.openssp.model.TrafficAttr; 4 | import ai.houyi.openssp.model.example.TrafficAttrExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface TrafficAttrMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table traffic_attr 12 | * 13 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 14 | */ 15 | long countByExample(TrafficAttrExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table traffic_attr 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | int deleteByExample(TrafficAttrExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table traffic_attr 28 | * 29 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 30 | */ 31 | int deleteByPrimaryKey(Integer id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table traffic_attr 36 | * 37 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 38 | */ 39 | int insert(TrafficAttr record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table traffic_attr 44 | * 45 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 46 | */ 47 | int insertSelective(TrafficAttr record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table traffic_attr 52 | * 53 | * @mbg.generated 54 | * @project https://github.com/itfsw/mybatis-generator-plugin 55 | */ 56 | TrafficAttr selectOneByExample(TrafficAttrExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table traffic_attr 61 | * 62 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 63 | */ 64 | List selectByExample(TrafficAttrExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table traffic_attr 69 | * 70 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 71 | */ 72 | TrafficAttr selectByPrimaryKey(Integer id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table traffic_attr 77 | * 78 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 79 | */ 80 | int updateByExampleSelective(@Param("record") TrafficAttr record, @Param("example") TrafficAttrExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table traffic_attr 85 | * 86 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 87 | */ 88 | int updateByExample(@Param("record") TrafficAttr record, @Param("example") TrafficAttrExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table traffic_attr 93 | * 94 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 95 | */ 96 | int updateByPrimaryKeySelective(TrafficAttr record); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table traffic_attr 101 | * 102 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 103 | */ 104 | int updateByPrimaryKey(TrafficAttr record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table traffic_attr 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | int batchInsert(@Param("list") List list); 114 | 115 | /** 116 | * This method was generated by MyBatis Generator. 117 | * This method corresponds to the database table traffic_attr 118 | * 119 | * @mbg.generated 120 | * @project https://github.com/itfsw/mybatis-generator-plugin 121 | */ 122 | int batchInsertSelective(@Param("list") List list, @Param("selective") TrafficAttr.Column ... selective); 123 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/model/AppAdPosition.java: -------------------------------------------------------------------------------- 1 | package ai.houyi.openssp.model; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | 6 | public class AppAdPosition { 7 | /** 8 | * 9 | * This field was generated by MyBatis Generator. 10 | * This field corresponds to the database column app_ad_position.id 11 | * 12 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 13 | */ 14 | private Integer id; 15 | 16 | /** 17 | * 18 | * This field was generated by MyBatis Generator. 19 | * This field corresponds to the database column app_ad_position.ad_position_id 20 | * 21 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 22 | */ 23 | private Integer adPositionId; 24 | 25 | /** 26 | * 27 | * This field was generated by MyBatis Generator. 28 | * This field corresponds to the database column app_ad_position.app_id 29 | * 30 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 31 | */ 32 | private Integer appId; 33 | 34 | /** 35 | * This method was generated by MyBatis Generator. 36 | * This method returns the value of the database column app_ad_position.id 37 | * 38 | * @return the value of app_ad_position.id 39 | * 40 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 41 | */ 42 | public Integer getId() { 43 | return id; 44 | } 45 | 46 | /** 47 | * This method was generated by MyBatis Generator. 48 | * This method sets the value of the database column app_ad_position.id 49 | * 50 | * @param id the value for app_ad_position.id 51 | * 52 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 53 | */ 54 | public void setId(Integer id) { 55 | this.id = id; 56 | } 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method returns the value of the database column app_ad_position.ad_position_id 61 | * 62 | * @return the value of app_ad_position.ad_position_id 63 | * 64 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 65 | */ 66 | public Integer getAdPositionId() { 67 | return adPositionId; 68 | } 69 | 70 | /** 71 | * This method was generated by MyBatis Generator. 72 | * This method sets the value of the database column app_ad_position.ad_position_id 73 | * 74 | * @param adPositionId the value for app_ad_position.ad_position_id 75 | * 76 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 77 | */ 78 | public void setAdPositionId(Integer adPositionId) { 79 | this.adPositionId = adPositionId; 80 | } 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method returns the value of the database column app_ad_position.app_id 85 | * 86 | * @return the value of app_ad_position.app_id 87 | * 88 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 89 | */ 90 | public Integer getAppId() { 91 | return appId; 92 | } 93 | 94 | /** 95 | * This method was generated by MyBatis Generator. 96 | * This method sets the value of the database column app_ad_position.app_id 97 | * 98 | * @param appId the value for app_ad_position.app_id 99 | * 100 | * @mbg.generated Tue Dec 04 19:59:17 CST 2018 101 | */ 102 | public void setAppId(Integer appId) { 103 | this.appId = appId; 104 | } 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table app_ad_position 109 | * 110 | * @mbg.generated 111 | * @project https://github.com/itfsw/mybatis-generator-plugin 112 | */ 113 | public static AppAdPosition.Builder builder() { 114 | return new AppAdPosition.Builder(); 115 | } 116 | 117 | /** 118 | * This class was generated by MyBatis Generator. 119 | * This class corresponds to the database table app_ad_position 120 | * 121 | * @mbg.generated 122 | * @project https://github.com/itfsw/mybatis-generator-plugin 123 | */ 124 | public static class Builder { 125 | /** 126 | * This field was generated by MyBatis Generator. 127 | * This field corresponds to the database table app_ad_position 128 | * 129 | * @mbg.generated 130 | * @project https://github.com/itfsw/mybatis-generator-plugin 131 | */ 132 | private AppAdPosition obj; 133 | 134 | /** 135 | * This method was generated by MyBatis Generator. 136 | * This method corresponds to the database table app_ad_position 137 | * 138 | * @mbg.generated 139 | * @project https://github.com/itfsw/mybatis-generator-plugin 140 | */ 141 | public Builder() { 142 | this.obj = new AppAdPosition(); 143 | } 144 | 145 | /** 146 | * This method was generated by MyBatis Generator. 147 | * This method sets the value of the database column app_ad_position.id 148 | * 149 | * @param id the value for app_ad_position.id 150 | * 151 | * @mbg.generated 152 | * @project https://github.com/itfsw/mybatis-generator-plugin 153 | */ 154 | public Builder id(Integer id) { 155 | obj.setId(id); 156 | return this; 157 | } 158 | 159 | /** 160 | * This method was generated by MyBatis Generator. 161 | * This method sets the value of the database column app_ad_position.ad_position_id 162 | * 163 | * @param adPositionId the value for app_ad_position.ad_position_id 164 | * 165 | * @mbg.generated 166 | * @project https://github.com/itfsw/mybatis-generator-plugin 167 | */ 168 | public Builder adPositionId(Integer adPositionId) { 169 | obj.setAdPositionId(adPositionId); 170 | return this; 171 | } 172 | 173 | /** 174 | * This method was generated by MyBatis Generator. 175 | * This method sets the value of the database column app_ad_position.app_id 176 | * 177 | * @param appId the value for app_ad_position.app_id 178 | * 179 | * @mbg.generated 180 | * @project https://github.com/itfsw/mybatis-generator-plugin 181 | */ 182 | public Builder appId(Integer appId) { 183 | obj.setAppId(appId); 184 | return this; 185 | } 186 | 187 | /** 188 | * This method was generated by MyBatis Generator. 189 | * This method corresponds to the database table app_ad_position 190 | * 191 | * @mbg.generated 192 | * @project https://github.com/itfsw/mybatis-generator-plugin 193 | */ 194 | public AppAdPosition build() { 195 | return this.obj; 196 | } 197 | } 198 | 199 | /** 200 | * This enum was generated by MyBatis Generator. 201 | * This enum corresponds to the database table app_ad_position 202 | * 203 | * @mbg.generated 204 | * @project https://github.com/itfsw/mybatis-generator-plugin 205 | */ 206 | public enum Column { 207 | id("id", "id", "INTEGER", false), 208 | adPositionId("ad_position_id", "adPositionId", "INTEGER", false), 209 | appId("app_id", "appId", "INTEGER", false); 210 | 211 | /** 212 | * This field was generated by MyBatis Generator. 213 | * This field corresponds to the database table app_ad_position 214 | * 215 | * @mbg.generated 216 | * @project https://github.com/itfsw/mybatis-generator-plugin 217 | */ 218 | private static final String BEGINNING_DELIMITER = "\""; 219 | 220 | /** 221 | * This field was generated by MyBatis Generator. 222 | * This field corresponds to the database table app_ad_position 223 | * 224 | * @mbg.generated 225 | * @project https://github.com/itfsw/mybatis-generator-plugin 226 | */ 227 | private static final String ENDING_DELIMITER = "\""; 228 | 229 | /** 230 | * This field was generated by MyBatis Generator. 231 | * This field corresponds to the database table app_ad_position 232 | * 233 | * @mbg.generated 234 | * @project https://github.com/itfsw/mybatis-generator-plugin 235 | */ 236 | private final String column; 237 | 238 | /** 239 | * This field was generated by MyBatis Generator. 240 | * This field corresponds to the database table app_ad_position 241 | * 242 | * @mbg.generated 243 | * @project https://github.com/itfsw/mybatis-generator-plugin 244 | */ 245 | private final boolean isColumnNameDelimited; 246 | 247 | /** 248 | * This field was generated by MyBatis Generator. 249 | * This field corresponds to the database table app_ad_position 250 | * 251 | * @mbg.generated 252 | * @project https://github.com/itfsw/mybatis-generator-plugin 253 | */ 254 | private final String javaProperty; 255 | 256 | /** 257 | * This field was generated by MyBatis Generator. 258 | * This field corresponds to the database table app_ad_position 259 | * 260 | * @mbg.generated 261 | * @project https://github.com/itfsw/mybatis-generator-plugin 262 | */ 263 | private final String jdbcType; 264 | 265 | /** 266 | * This method was generated by MyBatis Generator. 267 | * This method corresponds to the database table app_ad_position 268 | * 269 | * @mbg.generated 270 | * @project https://github.com/itfsw/mybatis-generator-plugin 271 | */ 272 | public String value() { 273 | return this.column; 274 | } 275 | 276 | /** 277 | * This method was generated by MyBatis Generator. 278 | * This method corresponds to the database table app_ad_position 279 | * 280 | * @mbg.generated 281 | * @project https://github.com/itfsw/mybatis-generator-plugin 282 | */ 283 | public String getValue() { 284 | return this.column; 285 | } 286 | 287 | /** 288 | * This method was generated by MyBatis Generator. 289 | * This method corresponds to the database table app_ad_position 290 | * 291 | * @mbg.generated 292 | * @project https://github.com/itfsw/mybatis-generator-plugin 293 | */ 294 | public String getJavaProperty() { 295 | return this.javaProperty; 296 | } 297 | 298 | /** 299 | * This method was generated by MyBatis Generator. 300 | * This method corresponds to the database table app_ad_position 301 | * 302 | * @mbg.generated 303 | * @project https://github.com/itfsw/mybatis-generator-plugin 304 | */ 305 | public String getJdbcType() { 306 | return this.jdbcType; 307 | } 308 | 309 | /** 310 | * This method was generated by MyBatis Generator. 311 | * This method corresponds to the database table app_ad_position 312 | * 313 | * @mbg.generated 314 | * @project https://github.com/itfsw/mybatis-generator-plugin 315 | */ 316 | Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { 317 | this.column = column; 318 | this.javaProperty = javaProperty; 319 | this.jdbcType = jdbcType; 320 | this.isColumnNameDelimited = isColumnNameDelimited; 321 | } 322 | 323 | /** 324 | * This method was generated by MyBatis Generator. 325 | * This method corresponds to the database table app_ad_position 326 | * 327 | * @mbg.generated 328 | * @project https://github.com/itfsw/mybatis-generator-plugin 329 | */ 330 | public String desc() { 331 | return this.getEscapedColumnName() + " DESC"; 332 | } 333 | 334 | /** 335 | * This method was generated by MyBatis Generator. 336 | * This method corresponds to the database table app_ad_position 337 | * 338 | * @mbg.generated 339 | * @project https://github.com/itfsw/mybatis-generator-plugin 340 | */ 341 | public String asc() { 342 | return this.getEscapedColumnName() + " ASC"; 343 | } 344 | 345 | /** 346 | * This method was generated by MyBatis Generator. 347 | * This method corresponds to the database table app_ad_position 348 | * 349 | * @mbg.generated 350 | * @project https://github.com/itfsw/mybatis-generator-plugin 351 | */ 352 | public static Column[] excludes(Column ... excludes) { 353 | ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); 354 | if (excludes != null && excludes.length > 0) { 355 | columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); 356 | } 357 | return columns.toArray(new Column[]{}); 358 | } 359 | 360 | /** 361 | * This method was generated by MyBatis Generator. 362 | * This method corresponds to the database table app_ad_position 363 | * 364 | * @mbg.generated 365 | * @project https://github.com/itfsw/mybatis-generator-plugin 366 | */ 367 | public String getEscapedColumnName() { 368 | if (this.isColumnNameDelimited) { 369 | return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); 370 | } else { 371 | return this.column; 372 | } 373 | } 374 | } 375 | } -------------------------------------------------------------------------------- /openssp-dao/src/main/java/ai/houyi/openssp/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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 wangwp 19 | */ 20 | package ai.houyi.openssp; -------------------------------------------------------------------------------- /openssp-dao/src/main/resources/generatorConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 30 | 32 | 33 | 34 | 35 | 37 | 38 | 39 | 40 | 41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 | 51 |
52 | 53 | 54 |
55 | 56 | 57 |
58 | 59 | 60 |
61 | 62 |
63 | 64 |
65 | 66 |
67 | 68 |
69 | 70 |
71 |
72 |
-------------------------------------------------------------------------------- /openssp-dao/src/main/resources/mybatis/mapper/AppAdPositionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | and ${criterion.condition} 28 | 29 | 30 | and ${criterion.condition} #{criterion.value} 31 | 32 | 33 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 34 | 35 | 36 | and ${criterion.condition} 37 | 38 | #{listItem} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | and ${criterion.condition} 62 | 63 | 64 | and ${criterion.condition} #{criterion.value} 65 | 66 | 67 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 68 | 69 | 70 | and ${criterion.condition} 71 | 72 | #{listItem} 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 88 | id, ad_position_id, app_id 89 | 90 | 117 | 128 | 129 | 134 | delete from app_ad_position 135 | where id = #{id,jdbcType=INTEGER} 136 | 137 | 138 | 143 | delete from app_ad_position 144 | 145 | 146 | 147 | 148 | 149 | 154 | insert into app_ad_position (id, ad_position_id, app_id 155 | ) 156 | values (#{id,jdbcType=INTEGER}, #{adPositionId,jdbcType=INTEGER}, #{appId,jdbcType=INTEGER} 157 | ) 158 | 159 | 160 | 165 | insert into app_ad_position 166 | 167 | 168 | id, 169 | 170 | 171 | ad_position_id, 172 | 173 | 174 | app_id, 175 | 176 | 177 | 178 | 179 | #{id,jdbcType=INTEGER}, 180 | 181 | 182 | #{adPositionId,jdbcType=INTEGER}, 183 | 184 | 185 | #{appId,jdbcType=INTEGER}, 186 | 187 | 188 | 189 | 200 | 201 | 206 | update app_ad_position 207 | 208 | 209 | id = #{record.id,jdbcType=INTEGER}, 210 | 211 | 212 | ad_position_id = #{record.adPositionId,jdbcType=INTEGER}, 213 | 214 | 215 | app_id = #{record.appId,jdbcType=INTEGER}, 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 228 | update app_ad_position 229 | set id = #{record.id,jdbcType=INTEGER}, 230 | ad_position_id = #{record.adPositionId,jdbcType=INTEGER}, 231 | app_id = #{record.appId,jdbcType=INTEGER} 232 | 233 | 234 | 235 | 236 | 237 | 242 | update app_ad_position 243 | 244 | 245 | ad_position_id = #{adPositionId,jdbcType=INTEGER}, 246 | 247 | 248 | app_id = #{appId,jdbcType=INTEGER}, 249 | 250 | 251 | where id = #{id,jdbcType=INTEGER} 252 | 253 | 254 | 259 | update app_ad_position 260 | set ad_position_id = #{adPositionId,jdbcType=INTEGER}, 261 | app_id = #{appId,jdbcType=INTEGER} 262 | where id = #{id,jdbcType=INTEGER} 263 | 264 | 281 | 282 | 287 | insert into app_ad_position 288 | (id, ad_position_id, app_id) 289 | values 290 | 291 | (#{item.id,jdbcType=INTEGER}, #{item.adPositionId,jdbcType=INTEGER}, #{item.appId,jdbcType=INTEGER} 292 | ) 293 | 294 | 295 | 296 | 301 | insert into app_ad_position ( 302 | 303 | ${column.escapedColumnName} 304 | 305 | ) 306 | values 307 | 308 | ( 309 | 310 | 311 | #{item.id,jdbcType=INTEGER} 312 | 313 | 314 | #{item.adPositionId,jdbcType=INTEGER} 315 | 316 | 317 | #{item.appId,jdbcType=INTEGER} 318 | 319 | 320 | ) 321 | 322 | 323 | -------------------------------------------------------------------------------- /openssp-dao/src/main/resources/mybatis/mapper/MediaFloorTrafficAttrMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | and ${criterion.condition} 28 | 29 | 30 | and ${criterion.condition} #{criterion.value} 31 | 32 | 33 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 34 | 35 | 36 | and ${criterion.condition} 37 | 38 | #{listItem} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | and ${criterion.condition} 62 | 63 | 64 | and ${criterion.condition} #{criterion.value} 65 | 66 | 67 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 68 | 69 | 70 | and ${criterion.condition} 71 | 72 | #{listItem} 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 88 | id, media_id, traffic_attr_id 89 | 90 | 117 | 128 | 129 | 134 | delete from media_floor_traffic_attr 135 | where id = #{id,jdbcType=INTEGER} 136 | 137 | 138 | 143 | delete from media_floor_traffic_attr 144 | 145 | 146 | 147 | 148 | 149 | 154 | insert into media_floor_traffic_attr (id, media_id, traffic_attr_id 155 | ) 156 | values (#{id,jdbcType=INTEGER}, #{mediaId,jdbcType=INTEGER}, #{trafficAttrId,jdbcType=INTEGER} 157 | ) 158 | 159 | 160 | 165 | insert into media_floor_traffic_attr 166 | 167 | 168 | id, 169 | 170 | 171 | media_id, 172 | 173 | 174 | traffic_attr_id, 175 | 176 | 177 | 178 | 179 | #{id,jdbcType=INTEGER}, 180 | 181 | 182 | #{mediaId,jdbcType=INTEGER}, 183 | 184 | 185 | #{trafficAttrId,jdbcType=INTEGER}, 186 | 187 | 188 | 189 | 200 | 201 | 206 | update media_floor_traffic_attr 207 | 208 | 209 | id = #{record.id,jdbcType=INTEGER}, 210 | 211 | 212 | media_id = #{record.mediaId,jdbcType=INTEGER}, 213 | 214 | 215 | traffic_attr_id = #{record.trafficAttrId,jdbcType=INTEGER}, 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 228 | update media_floor_traffic_attr 229 | set id = #{record.id,jdbcType=INTEGER}, 230 | media_id = #{record.mediaId,jdbcType=INTEGER}, 231 | traffic_attr_id = #{record.trafficAttrId,jdbcType=INTEGER} 232 | 233 | 234 | 235 | 236 | 237 | 242 | update media_floor_traffic_attr 243 | 244 | 245 | media_id = #{mediaId,jdbcType=INTEGER}, 246 | 247 | 248 | traffic_attr_id = #{trafficAttrId,jdbcType=INTEGER}, 249 | 250 | 251 | where id = #{id,jdbcType=INTEGER} 252 | 253 | 254 | 259 | update media_floor_traffic_attr 260 | set media_id = #{mediaId,jdbcType=INTEGER}, 261 | traffic_attr_id = #{trafficAttrId,jdbcType=INTEGER} 262 | where id = #{id,jdbcType=INTEGER} 263 | 264 | 281 | 282 | 287 | insert into media_floor_traffic_attr 288 | (id, media_id, traffic_attr_id) 289 | values 290 | 291 | (#{item.id,jdbcType=INTEGER}, #{item.mediaId,jdbcType=INTEGER}, #{item.trafficAttrId,jdbcType=INTEGER} 292 | ) 293 | 294 | 295 | 296 | 301 | insert into media_floor_traffic_attr ( 302 | 303 | ${column.escapedColumnName} 304 | 305 | ) 306 | values 307 | 308 | ( 309 | 310 | 311 | #{item.id,jdbcType=INTEGER} 312 | 313 | 314 | #{item.mediaId,jdbcType=INTEGER} 315 | 316 | 317 | #{item.trafficAttrId,jdbcType=INTEGER} 318 | 319 | 320 | ) 321 | 322 | 323 | -------------------------------------------------------------------------------- /openssp-dao/src/main/resources/mybatis/mapper/SiteAdPositionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | and ${criterion.condition} 28 | 29 | 30 | and ${criterion.condition} #{criterion.value} 31 | 32 | 33 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 34 | 35 | 36 | and ${criterion.condition} 37 | 38 | #{listItem} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | and ${criterion.condition} 62 | 63 | 64 | and ${criterion.condition} #{criterion.value} 65 | 66 | 67 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 68 | 69 | 70 | and ${criterion.condition} 71 | 72 | #{listItem} 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 88 | id, site_id, ad_position_id 89 | 90 | 117 | 128 | 129 | 134 | delete from site_ad_position 135 | where id = #{id,jdbcType=INTEGER} 136 | 137 | 138 | 143 | delete from site_ad_position 144 | 145 | 146 | 147 | 148 | 149 | 154 | insert into site_ad_position (id, site_id, ad_position_id 155 | ) 156 | values (#{id,jdbcType=INTEGER}, #{siteId,jdbcType=INTEGER}, #{adPositionId,jdbcType=INTEGER} 157 | ) 158 | 159 | 160 | 165 | insert into site_ad_position 166 | 167 | 168 | id, 169 | 170 | 171 | site_id, 172 | 173 | 174 | ad_position_id, 175 | 176 | 177 | 178 | 179 | #{id,jdbcType=INTEGER}, 180 | 181 | 182 | #{siteId,jdbcType=INTEGER}, 183 | 184 | 185 | #{adPositionId,jdbcType=INTEGER}, 186 | 187 | 188 | 189 | 200 | 201 | 206 | update site_ad_position 207 | 208 | 209 | id = #{record.id,jdbcType=INTEGER}, 210 | 211 | 212 | site_id = #{record.siteId,jdbcType=INTEGER}, 213 | 214 | 215 | ad_position_id = #{record.adPositionId,jdbcType=INTEGER}, 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 228 | update site_ad_position 229 | set id = #{record.id,jdbcType=INTEGER}, 230 | site_id = #{record.siteId,jdbcType=INTEGER}, 231 | ad_position_id = #{record.adPositionId,jdbcType=INTEGER} 232 | 233 | 234 | 235 | 236 | 237 | 242 | update site_ad_position 243 | 244 | 245 | site_id = #{siteId,jdbcType=INTEGER}, 246 | 247 | 248 | ad_position_id = #{adPositionId,jdbcType=INTEGER}, 249 | 250 | 251 | where id = #{id,jdbcType=INTEGER} 252 | 253 | 254 | 259 | update site_ad_position 260 | set site_id = #{siteId,jdbcType=INTEGER}, 261 | ad_position_id = #{adPositionId,jdbcType=INTEGER} 262 | where id = #{id,jdbcType=INTEGER} 263 | 264 | 281 | 282 | 287 | insert into site_ad_position 288 | (id, site_id, ad_position_id) 289 | values 290 | 291 | (#{item.id,jdbcType=INTEGER}, #{item.siteId,jdbcType=INTEGER}, #{item.adPositionId,jdbcType=INTEGER} 292 | ) 293 | 294 | 295 | 296 | 301 | insert into site_ad_position ( 302 | 303 | ${column.escapedColumnName} 304 | 305 | ) 306 | values 307 | 308 | ( 309 | 310 | 311 | #{item.id,jdbcType=INTEGER} 312 | 313 | 314 | #{item.siteId,jdbcType=INTEGER} 315 | 316 | 317 | #{item.adPositionId,jdbcType=INTEGER} 318 | 319 | 320 | ) 321 | 322 | 323 | -------------------------------------------------------------------------------- /openssp-dashboard-api/.factorypath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /openssp-dashboard-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | ai.houyi 5 | openssp 6 | 0.0.1-SNAPSHOT 7 | 8 | openssp-dashboard-api 9 | openssp-dashboard-api 10 | the dashboard api module for openssp 11 | 12 | 13 | ai.houyi 14 | dorado-spring-boot-starter 15 | 16 | 17 | ai.houyi 18 | openssp-core 19 | 0.0.1-SNAPSHOT 20 | 21 | 22 | org.apache.commons 23 | commons-lang3 24 | 25 | 26 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 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.openssp.dashboard; 17 | 18 | import org.springframework.boot.SpringApplication; 19 | 20 | import ai.houyi.dorado.springboot.DoradoSpringBootApplication; 21 | 22 | /** 23 | * @author weiping wang 24 | * 25 | */ 26 | @DoradoSpringBootApplication 27 | public class Application { 28 | 29 | public static void main(String[] args) { 30 | SpringApplication.run(Application.class, args); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/controller/AdPositionController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard.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.GET; 22 | import ai.houyi.dorado.rest.annotation.POST; 23 | import ai.houyi.dorado.rest.annotation.Path; 24 | import ai.houyi.dorado.rest.annotation.PathVariable; 25 | import ai.houyi.dorado.rest.annotation.RequestBody; 26 | import ai.houyi.openads.commons.PageResult; 27 | import ai.houyi.openssp.core.service.AdPositionService; 28 | import ai.houyi.openssp.dashboard.model.AdPositionSearchReq; 29 | import ai.houyi.openssp.model.AdPosition; 30 | 31 | /** 32 | * @author weiping wang 33 | * 34 | */ 35 | @Controller 36 | @Path("/adposition") 37 | public class AdPositionController { 38 | @Autowired 39 | private AdPositionService adPositionService; 40 | 41 | @POST 42 | @Path 43 | public void saveOrUpdateAdPosition(@RequestBody AdPosition adPosition) { 44 | adPositionService.saveOrUpdateAdPosition(adPosition); 45 | } 46 | 47 | @GET 48 | @Path("/{adPositionId}") 49 | public AdPosition getAdPosition(@PathVariable int adPositionId) { 50 | return adPositionService.loadAdPosition(adPositionId); 51 | } 52 | 53 | @POST 54 | @Path("/list") 55 | public PageResult listAdPositions(@RequestBody AdPositionSearchReq searchReq) { 56 | return adPositionService.listAdPositions(searchReq.getPageNo(), searchReq.getPageSize(), searchReq.toExample()); 57 | } 58 | 59 | @POST 60 | @Path("/{adPositionId}") 61 | public void deleteAdPosition(@PathVariable int adPositionId) { 62 | adPositionService.deleteAdPosition(adPositionId); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/controller/AppController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard.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.dorado.rest.annotation.RequestBody; 24 | import ai.houyi.openssp.core.service.AppService; 25 | import ai.houyi.openssp.model.App; 26 | 27 | /** 28 | * @author weiping wang 29 | * 30 | */ 31 | @Controller 32 | @Path("/app") 33 | public class AppController { 34 | @Autowired 35 | private AppService appService; 36 | 37 | @POST 38 | @Path 39 | public void saveOrUpdateApp(@RequestBody App app) { 40 | appService.saveOrUpdateApp(app); 41 | } 42 | 43 | @POST 44 | @Path("/{appId}") 45 | public void deleteApp(int appId) { 46 | appService.deleteApp(appId); 47 | } 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/controller/MediaController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard.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.GET; 22 | import ai.houyi.dorado.rest.annotation.POST; 23 | import ai.houyi.dorado.rest.annotation.Path; 24 | import ai.houyi.dorado.rest.annotation.PathVariable; 25 | import ai.houyi.dorado.rest.annotation.RequestBody; 26 | import ai.houyi.openads.commons.PageResult; 27 | import ai.houyi.openssp.core.service.MediaService; 28 | import ai.houyi.openssp.dashboard.model.MediaSearchReq; 29 | import ai.houyi.openssp.model.Media; 30 | 31 | /** 32 | * @author weiping wang 33 | * 34 | */ 35 | @Controller 36 | @Path("/media") 37 | public class MediaController { 38 | @Autowired 39 | private MediaService mediaService; 40 | 41 | @POST 42 | @Path 43 | public void saveOrUpdateMedia(@RequestBody Media media) { 44 | mediaService.saveOrUpdateMedia(media); 45 | } 46 | 47 | @POST 48 | @Path("/{mediaId}") 49 | public void deleteMedia(@PathVariable int mediaId) { 50 | mediaService.deleteMedia(mediaId); 51 | } 52 | 53 | @GET 54 | @Path("/{mediaId}") 55 | public Media getMedia(@PathVariable int mediaId) { 56 | return mediaService.loadMedia(mediaId); 57 | } 58 | 59 | @POST 60 | @Path("/list") 61 | public PageResult listMedias(@RequestBody MediaSearchReq req) { 62 | return mediaService.listMedias(req.getPageNo(), req.getPageSize(), req.toExample()); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/controller/MediaFloorController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard.controller; 17 | 18 | import ai.houyi.dorado.rest.annotation.Controller; 19 | import ai.houyi.dorado.rest.annotation.Path; 20 | 21 | /** 22 | * @author weiping wang 23 | * 24 | */ 25 | @Controller 26 | @Path("/mediafloor") 27 | public class MediaFloorController { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/controller/MediaTrafficAttrController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard.controller; 17 | 18 | import ai.houyi.dorado.rest.annotation.Controller; 19 | import ai.houyi.dorado.rest.annotation.POST; 20 | import ai.houyi.dorado.rest.annotation.Path; 21 | 22 | /** 23 | * @author weiping wang 24 | * 25 | */ 26 | @Controller 27 | @Path("/trafficattr/media") 28 | public class MediaTrafficAttrController { 29 | 30 | @POST 31 | @Path 32 | public void addTrafficAttrsToMedia() { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/controller/PublisherController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard.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.GET; 22 | import ai.houyi.dorado.rest.annotation.POST; 23 | import ai.houyi.dorado.rest.annotation.Path; 24 | import ai.houyi.dorado.rest.annotation.PathVariable; 25 | import ai.houyi.dorado.rest.annotation.RequestBody; 26 | import ai.houyi.openads.commons.PageResult; 27 | import ai.houyi.openssp.core.service.PublisherService; 28 | import ai.houyi.openssp.dashboard.model.PublisherSearchReq; 29 | import ai.houyi.openssp.model.Publisher; 30 | 31 | /** 32 | * @author weiping wang 33 | * 34 | */ 35 | @Controller 36 | @Path("/publisher") 37 | public class PublisherController { 38 | @Autowired 39 | private PublisherService publisherService; 40 | 41 | @POST 42 | @Path 43 | public void saveOrUpdatePublisher(@RequestBody Publisher publisher) { 44 | publisherService.saveOrUpdatePublisher(publisher); 45 | } 46 | 47 | @GET 48 | @Path("/{publisherId}") 49 | public Publisher getPublisher(@PathVariable int publisherId) { 50 | return publisherService.loadPublisher(publisherId); 51 | } 52 | 53 | @POST 54 | @Path("/list") 55 | public PageResult listPublishers(@RequestBody PublisherSearchReq req) { 56 | return publisherService.listPublishers(req.getPageNo(), req.getPageSize(),req.toExample()); 57 | } 58 | 59 | @POST 60 | @Path("/{publisherId}") 61 | public void deletePublisher(@PathVariable int publisherId) { 62 | publisherService.deletePublisher(publisherId); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/controller/TrafficAttrController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard.controller; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | 22 | import ai.houyi.dorado.rest.annotation.Controller; 23 | import ai.houyi.dorado.rest.annotation.GET; 24 | import ai.houyi.dorado.rest.annotation.POST; 25 | import ai.houyi.dorado.rest.annotation.Path; 26 | import ai.houyi.dorado.rest.annotation.PathVariable; 27 | import ai.houyi.dorado.rest.annotation.RequestBody; 28 | import ai.houyi.openads.commons.PageResult; 29 | import ai.houyi.openssp.core.service.TrafficAttrService; 30 | import ai.houyi.openssp.dashboard.model.TrafficAttrSearchReq; 31 | import ai.houyi.openssp.model.TrafficAttr; 32 | 33 | /** 34 | * @author weiping wang 35 | * 36 | */ 37 | @Controller 38 | @Path("/trafficattr") 39 | public class TrafficAttrController { 40 | @Autowired 41 | private TrafficAttrService trafficAttrService; 42 | 43 | @POST 44 | @Path 45 | public void saveOrUpdateTrafficAttr(@RequestBody TrafficAttr trafficAttr) { 46 | trafficAttrService.saveOrUpdateTrafficAttr(trafficAttr); 47 | } 48 | 49 | @GET 50 | @Path("/{trafficAttrId}") 51 | public TrafficAttr getTrafficAttr(@PathVariable int trafficAttrId) { 52 | return trafficAttrService.loadTrafficAttr(trafficAttrId); 53 | } 54 | 55 | @POST 56 | @Path("/list") 57 | public PageResult listTrafficAttrs(@RequestBody TrafficAttrSearchReq searchReq) { 58 | return trafficAttrService.listTrafficAttrs(searchReq.getPageNo(), searchReq.getPageSize(), 59 | searchReq.toExample()); 60 | } 61 | 62 | @POST 63 | @Path("/{trafficAttrId}") 64 | public void deleteTrafficAttr(int trafficAttrId) { 65 | trafficAttrService.deleteTrafficAttr(trafficAttrId); 66 | } 67 | 68 | @POST 69 | @Path("/delete") 70 | public void deleteTrafficAttrs(List trafficAttrIds) { 71 | trafficAttrService.batchDeleteTrafficAttrs(trafficAttrIds); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/controller/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard.controller; -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/model/AdPositionSearchReq.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 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.openssp.dashboard.model; 17 | 18 | import org.apache.commons.lang3.StringUtils; 19 | 20 | import ai.houyi.openssp.model.example.AdPositionExample; 21 | 22 | /** 23 | * 24 | * @author wangwp 25 | */ 26 | public class AdPositionSearchReq extends SearchReq { 27 | private String name; 28 | private Integer type; 29 | 30 | public AdPositionExample toExample() { 31 | AdPositionExample example = new AdPositionExample(); 32 | AdPositionExample.Criteria criteria = example.createCriteria(); 33 | 34 | if (StringUtils.isNotBlank(name)) { 35 | criteria.andNameLike("%" + name + "%"); 36 | } 37 | 38 | if (type != null) { 39 | criteria.andTypeEqualTo(type); 40 | } 41 | 42 | return example; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/model/MediaSearchReq.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 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.openssp.dashboard.model; 17 | 18 | import org.apache.commons.lang3.StringUtils; 19 | 20 | import ai.houyi.openssp.model.example.MediaExample; 21 | 22 | /** 23 | * @author weiping wang 24 | * 25 | */ 26 | public class MediaSearchReq extends SearchReq { 27 | private String name; 28 | private Integer type; 29 | private Integer status; 30 | private Integer publisherId; 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public void setName(String name) { 37 | this.name = name; 38 | } 39 | 40 | public Integer getPublisherId() { 41 | return publisherId; 42 | } 43 | 44 | public void setPublisherId(Integer publisherId) { 45 | this.publisherId = publisherId; 46 | } 47 | 48 | public int getType() { 49 | return type; 50 | } 51 | 52 | public void setType(int type) { 53 | this.type = type; 54 | } 55 | 56 | public int getStatus() { 57 | return status; 58 | } 59 | 60 | public void setStatus(int status) { 61 | this.status = status; 62 | } 63 | 64 | public MediaExample toExample() { 65 | MediaExample example = new MediaExample(); 66 | MediaExample.Criteria criteria = example.createCriteria(); 67 | 68 | if (StringUtils.isNotBlank(name)) { 69 | criteria.andNameLike("%" + name + "%"); 70 | } 71 | 72 | if (type != null) { 73 | criteria.andTypeEqualTo(type); 74 | } 75 | 76 | if (status != null) { 77 | criteria.andStatusEqualTo(status); 78 | } 79 | 80 | if (publisherId != null) { 81 | criteria.andPublisherIdEqualTo(publisherId); 82 | } 83 | return example; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/model/PublisherSearchReq.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 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.openssp.dashboard.model; 17 | 18 | import org.apache.commons.lang3.StringUtils; 19 | 20 | import ai.houyi.openssp.model.example.PublisherExample; 21 | 22 | /** 23 | * @author weiping wang 24 | * 25 | */ 26 | public class PublisherSearchReq extends SearchReq { 27 | private String name; 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | public PublisherExample toExample() { 38 | if (StringUtils.isBlank(name)) { 39 | return null; 40 | } 41 | PublisherExample example = new PublisherExample().createCriteria().andNameLike("%" + name + "%").example(); 42 | return example; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/model/SearchReq.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 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.openssp.dashboard.model; 17 | 18 | /** 19 | * @author weiping wang 20 | * 21 | */ 22 | public class SearchReq { 23 | protected int pageNo; 24 | protected int pageSize; 25 | 26 | public int getPageNo() { 27 | return pageNo; 28 | } 29 | 30 | public void setPageNo(int pageNo) { 31 | this.pageNo = pageNo; 32 | } 33 | 34 | public int getPageSize() { 35 | return pageSize; 36 | } 37 | 38 | public void setPageSize(int pageSize) { 39 | this.pageSize = pageSize; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/model/TrafficAttrSearchReq.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 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.openssp.dashboard.model; 17 | 18 | import org.apache.commons.lang3.StringUtils; 19 | 20 | import ai.houyi.openssp.model.example.TrafficAttrExample; 21 | 22 | /** 23 | * @author weiping wang 24 | * 25 | */ 26 | public class TrafficAttrSearchReq extends SearchReq { 27 | private String name; 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | public TrafficAttrExample toExample() { 38 | if (StringUtils.isNotBlank(name)) { 39 | return TrafficAttrExample.newAndCreateCriteria().andNameLike("%" + name + "%").example(); 40 | } 41 | return null; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/model/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard.model; -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/java/ai/houyi/openssp/dashboard/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenAds Project 3 | * 4 | * The OpenDSP 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.openssp.dashboard; -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javagossip/openssp/6a6dd5efed7e2ad5030f95c6e6d437f86c759cd4/openssp-dashboard-api/src/main/resources/application-dev.properties -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javagossip/openssp/6a6dd5efed7e2ad5030f95c6e6d437f86c759cd4/openssp-dashboard-api/src/main/resources/application-prod.properties -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/resources/application-test.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javagossip/openssp/6a6dd5efed7e2ad5030f95c6e6d437f86c759cd4/openssp-dashboard-api/src/main/resources/application-test.properties -------------------------------------------------------------------------------- /openssp-dashboard-api/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javagossip/openssp/6a6dd5efed7e2ad5030f95c6e6d437f86c759cd4/openssp-dashboard-api/src/main/resources/application.properties -------------------------------------------------------------------------------- /openssp-dashboard/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | ai.houyi 5 | openssp 6 | 0.0.1-SNAPSHOT 7 | 8 | openssp-dashboard 9 | openssp-dashboard 10 | the dashboard module for openssp 11 | -------------------------------------------------------------------------------- /openssp-dashboard/src/main/java/ai/houyi/openssp/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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 wangwp 19 | */ 20 | package ai.houyi.openssp; -------------------------------------------------------------------------------- /openssp-router/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | ai.houyi 5 | openssp 6 | 0.0.1-SNAPSHOT 7 | 8 | openssp-router 9 | openssp-router 10 | router module for openssp 11 | 12 | 13 | ai.houyi 14 | openssp-dao 15 | 0.0.1-SNAPSHOT 16 | 17 | 18 | ai.houyi 19 | openssp-rtb-proto 20 | 0.0.1-SNAPSHOT 21 | 22 | 23 | -------------------------------------------------------------------------------- /openssp-router/src/main/java/ai/houyi/openssp/router/BidderRouter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.router; 17 | 18 | import java.util.List; 19 | 20 | import ai.houyi.openssp.router.model.Bidder; 21 | import ai.houyi.openssp.rtb.proto.OpenRtb.BidRequest; 22 | import ai.houyi.openssp.rtb.proto.OpenRtb.BidResponse; 23 | 24 | /** 25 | * 26 | * @author wangwp 27 | */ 28 | public abstract class BidderRouter { 29 | 30 | public final BidResponse bid(BidRequest bidRequest) { 31 | List bidders = getBidders(bidRequest); 32 | 33 | return null; 34 | } 35 | 36 | protected abstract List getBidders(BidRequest bidRequest); 37 | } 38 | -------------------------------------------------------------------------------- /openssp-router/src/main/java/ai/houyi/openssp/router/model/Bidder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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.openssp.router.model; 17 | 18 | /** 19 | * 20 | * @author wangwp 21 | */ 22 | public class Bidder { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /openssp-router/src/main/java/ai/houyi/openssp/router/model/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 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.openssp.router.model; -------------------------------------------------------------------------------- /openssp-router/src/main/java/ai/houyi/openssp/router/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The OpenDSP Project 3 | * 4 | * The OpenDSP 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 wangwp 19 | */ 20 | package ai.houyi.openssp.router; -------------------------------------------------------------------------------- /openssp-rtb-proto/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | ai.houyi 5 | openssp 6 | 0.0.1-SNAPSHOT 7 | 8 | openssp-rtb-proto 9 | openssp-rtb-proto 10 | openssp rtb proto definition 11 | 12 | 13 | 14 | com.google.protobuf 15 | protobuf-java 16 | 17 | 18 | 19 | 20 | 21 | 22 | com.github.os72 23 | protoc-jar-maven-plugin 24 | 2.6.1.4 25 | 26 | 2.6.1 27 | true 28 | 29 | src/main/proto 30 | 31 | 34 | src/main/java 35 | true 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /openssp-rtb-proto/src/main/proto/openadx-ext.proto: -------------------------------------------------------------------------------- 1 | option java_outer_classname = "OpenAdxExt"; 2 | option java_package = "ai.houyi.openssp.rtb.proto"; 3 | 4 | package openadx; 5 | 6 | import "openrtb.proto"; 7 | 8 | 9 | extend openrtb.BidResponse.SeatBid.Bid { 10 | optional BidExt ext = 201; 11 | } 12 | 13 | message BidExt { 14 | //曝光监测地址,支持宏 15 | repeated string imp_trackers = 1; 16 | //点击监测地址,支持宏 17 | repeated string clk_trackers = 2; 18 | } -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | openssp 5 | 0.0.1-SNAPSHOT 6 | pom 7 | openssp 8 | openssp 9 | 10 | 11 | ai.houyi 12 | houyi-parent 13 | 0.0.4-SNAPSHOT 14 | 15 | 16 | 17 | openssp-dao 18 | openssp-dashboard 19 | openssp-dashboard-api 20 | openssp-core 21 | openssp-router 22 | openssp-rtb-proto 23 | openssp-adserving 24 | 25 | --------------------------------------------------------------------------------