Commit 40928ed9 by 杨林龙

测试广告插入与更新接口 yangll

1 parent 35ba3dfb
...@@ -39,13 +39,13 @@ public class PlatformAd implements Serializable { ...@@ -39,13 +39,13 @@ public class PlatformAd implements Serializable {
/** /**
* 位置 1 商城banner 2 智能-家 3 启动页 * 位置 1 商城banner 2 智能-家 3 启动页
*/ */
private Byte position; private Integer position;
/** /**
* 界面类型 1 APP 2 H5 * 界面类型 1 APP 2 H5
*/ */
@Column(name = "interface_type") @Column(name = "interface_type")
private Byte interfaceType; private Integer interfaceType;
/** /**
* 界面参数 * 界面参数
...@@ -115,19 +115,19 @@ public class PlatformAd implements Serializable { ...@@ -115,19 +115,19 @@ public class PlatformAd implements Serializable {
this.image = image; this.image = image;
} }
public Byte getPosition() { public Integer getPosition() {
return position; return position;
} }
public void setPosition(Byte position) { public void setPosition(Integer position) {
this.position = position; this.position = position;
} }
public Byte getInterfaceType() { public Integer getInterfaceType() {
return interfaceType; return interfaceType;
} }
public void setInterfaceType(Byte interfaceType) { public void setInterfaceType(Integer interfaceType) {
this.interfaceType = interfaceType; this.interfaceType = interfaceType;
} }
......
package cn.com.glsx.openplatform.service;
import cn.com.glsx.openplatform.Main;
import cn.com.glsx.openplatform.model.PlatformAd;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import javax.annotation.Resource;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Main.class)
public class AdMgrServiceImplTest {
@Resource
private AdMgrService adMgrService;
@Test
public void insertAd() {
PlatformAd ad = new PlatformAd();
ad.setImage("1");
ad.setInterfaceType(1);
adMgrService.insertAd(ad);
}
@Test
public void updateAd() {
PlatformAd ad = new PlatformAd();
ad.setId(1);
ad.setImage("1");
ad.setInterfaceType(1);
adMgrService.updateAd(ad);
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!