Commit fec26ba3 by 陶光胜

init

parent 9b7c1be9
......@@ -15,7 +15,7 @@ import java.util.List;
* @author zhiwj
* @date 2019/6/24
*/
@Service
@Service("storeRegionApiService")
public class StoreRegionApiServiceImpl implements StoreRegionApiService {
@Autowired
......
package com.gic;
import com.alibaba.fastjson.JSON;
import com.dexcoder.commons.utils.UUIDUtils;
import com.gic.demo.single.dao.mapper.DemoEnterpriseMapper;
import com.gic.demo.single.dao.mapper.DemoStoreMapper;
import com.gic.demo.single.entity.TabGicDemoEnterprise;
import com.gic.demo.single.entity.TabGicDemoStore;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* Unit test for simple App.
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath*:applicationContext-conf.xml"})
public class AppTest {
@Autowired
private DemoEnterpriseMapper enterpriseMapper;
@Autowired
private DemoStoreMapper storeMapper;
@Test
public void test1() {
TabGicDemoEnterprise tabGicDemoEnterprise = enterpriseMapper.selectByPrimaryKey("22323423");
System.out.println(JSON.toJSONString(tabGicDemoEnterprise, true));
}
@Test
public void test2() {
TabGicDemoStore tabGicDemoStore = storeMapper.selectByPrimaryKey("11b");
System.out.println(JSON.toJSONString(tabGicDemoStore, true));
}
@Test
public void test3() {
for (int i = 0; i < 10; i++) {
System.out.println("insert >> " + i);
TabGicDemoStore store = new TabGicDemoStore();
if (i % 2 == 0) {
store.setStoreId(UUIDUtils.getUUID32());
}
store.setStoreName(RandomStringUtils.random(10, "abcdefghigklmn0123456789"));
storeMapper.insertSelective(store);
System.out.println(JSON.toJSONString(store));
}
}
}
......@@ -15,7 +15,7 @@ import org.springframework.context.annotation.ImportResource;
@ImportResource(value = {
"classpath*:applicationContext-init.xml",
"classpath*:dubbo-setting.xml",
"classpath*:dubbo-gic-demo-web.xml",
"classpath*:dubbo-gic-store-web.xml",
"classpath*:spring-interceptor.xml"
})
public class Main {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment