|
|
@@ -1,60 +0,0 @@
|
|
|
-package com.uas.platform.b2c.storecms.dao;
|
|
|
-
|
|
|
-import com.uas.platform.b2c.SpringBaseTest;
|
|
|
-
|
|
|
-import com.uas.platform.b2c.advertise.ad.dao.StoreContentDao;
|
|
|
-import com.uas.platform.b2c.advertise.ad.model.ContentType;
|
|
|
-import com.uas.platform.b2c.advertise.ad.model.StoreContent;
|
|
|
-import com.uas.platform.b2c.core.utils.JacksonUtils;
|
|
|
-import com.uas.platform.b2c.prod.store.dao.StoreInDao;
|
|
|
-import com.uas.platform.b2c.prod.store.model.StoreIn;
|
|
|
-import com.uas.platform.b2c.advertise.ad.dao.StoreContentDao;
|
|
|
-import com.uas.platform.b2c.prod.store.dao.StoreInDao;
|
|
|
-import com.uas.platform.b2c.prod.store.model.StoreIn;
|
|
|
-import com.uas.platform.b2c.core.utils.JacksonUtils;
|
|
|
-import com.uas.platform.b2c.advertise.ad.model.ContentType;
|
|
|
-import com.uas.platform.b2c.advertise.ad.model.StoreContent;
|
|
|
-import org.junit.Test;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-
|
|
|
-public class StoreContentDaoTest extends SpringBaseTest {
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private StoreContentDao storeContentDao;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private StoreInDao storeInDao;
|
|
|
-
|
|
|
- @Test
|
|
|
- public void count() throws Exception {
|
|
|
- long count = storeContentDao.count();
|
|
|
- System.out.println(count);
|
|
|
- }
|
|
|
-
|
|
|
- @Test
|
|
|
- public void addContent() throws Exception {
|
|
|
- StoreIn storeIn = storeInDao.findByEnUU(10041559L).get(0);
|
|
|
- assert storeIn != null;
|
|
|
-
|
|
|
- StoreContent content = new StoreContent();
|
|
|
- content.setUuid(storeIn.getUuid());
|
|
|
- content.setType(ContentType.ORIGINAL_RECOMMEND);
|
|
|
-
|
|
|
- content = storeContentDao.save(content);
|
|
|
- System.out.println(content.toString());
|
|
|
- }
|
|
|
-
|
|
|
- @Test
|
|
|
- public void addContent1() throws Exception {
|
|
|
- StoreIn storeIn = storeInDao.findByEnUU(10041559L).get(0);
|
|
|
- assert storeIn != null;
|
|
|
- System.out.println(JacksonUtils.toJson(storeIn));
|
|
|
-
|
|
|
- StoreContent content = new StoreContent();
|
|
|
- content.setStore(storeIn);
|
|
|
- content.setType(ContentType.ORIGINAL_RECOMMEND);
|
|
|
-
|
|
|
- content = storeContentDao.save(content);
|
|
|
- System.out.println(content.toString());
|
|
|
- }
|
|
|
-}
|