| | |
| | | package com.hxh.spring.test; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.gson.Gson; |
| | | import com.yeshi.buwan.dao.system.DetailSystemConfigDao; |
| | | import com.yeshi.buwan.dao.system.SystemConfigDao; |
| | |
| | | import com.yeshi.buwan.job.AdJob; |
| | | import com.yeshi.buwan.service.imp.DetailSystemConfigService; |
| | | import com.yeshi.buwan.service.inter.system.SystemConfigService; |
| | | import org.json.JSONObject; |
| | | import com.yeshi.buwan.vo.ad.BannerVO; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.test.context.ContextConfiguration; |
| | |
| | | @Test |
| | | public void addConfig() { |
| | | |
| | | JumpDetail jumpDetail = new JumpDetail(); |
| | | jumpDetail.setType(JumpTypeEnum.web); |
| | | jumpDetail.setNeedLogin(true); |
| | | JSONObject params = new JSONObject(); |
| | | params.put("url", "http://wwww.baidu.com"); |
| | | |
| | | BannerVO bannerVO = new BannerVO(); |
| | | bannerVO.setJumpDetail(jumpDetail); |
| | | bannerVO.setParams(params.toString()); |
| | | bannerVO.setPicture("https://reviveimg.hellorf.com/www/images/b360addb728e079ffb082a161475b14e.png"); |
| | | bannerVO.setRatio(new BigDecimal("0.1691")); |
| | | |
| | | DetailSystemConfig config = new DetailSystemConfig(); |
| | | config.setKey("web_speed_up_host"); |
| | | config.setValue("vip.ysdq.yeshitv.com"); |
| | | config.setBeizhu("网页加速域名"); |
| | | config.setKey("mine_page_banner"); |
| | | config.setValue(new Gson().toJson(bannerVO)); |
| | | config.setBeizhu("我的页面广告banner"); |
| | | config.setSystemId(new BigInteger(44 + "")); |
| | | config.setMinVersion(106); |
| | | config.setMinVersion(109); |
| | | config.setCreatetime(System.currentTimeMillis() + ""); |
| | | detailSystemConfigDao.save(config); |
| | | |
| | | } |
| | | |
| | | |