12 | <#include "components/topnav.ftl">
13 | <#include "components/leftmenu.ftl">
14 |
15 |
16 |
17 | 内容主体区域
18 |
19 |
20 | <#include "components/footer.ftl">
21 |
22 |
23 | <#include "components/script.ftl">
24 | <#--some js-->
25 |
--------------------------------------------------------------------------------
/src/main/resources/templates/components/footer.ftl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/main/resources/templates/components/header.ftl:
--------------------------------------------------------------------------------
1 |
13 | <#include "components/topnav.ftl">
14 | <#include "components/leftmenu.ftl">
15 |
31 | <#include "components/footer.ftl">
32 |
33 |
34 | <#include "components/script.ftl">
35 | <#--some js-->
36 |
37 |
--------------------------------------------------------------------------------
/src/test/java/com/jczc/operatorweb/OperatorWebApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.jczc.operatorweb;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class OperatorWebApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/test/java/com/jczc/operatorweb/dao/AreaDaoTest.java:
--------------------------------------------------------------------------------
1 | package com.jczc.operatorweb.dao;
2 |
3 | import com.alibaba.fastjson.JSON;
4 | import org.junit.Test;
5 | import org.junit.runner.RunWith;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.boot.test.context.SpringBootTest;
8 | import org.springframework.test.context.junit4.SpringRunner;
9 |
10 | import static org.junit.Assert.*;
11 |
12 |
13 | @RunWith(SpringRunner.class)
14 | @SpringBootTest
15 | public class AreaDaoTest {
16 | @Autowired
17 | AreaDao areaDao;
18 | @Test
19 | public void queryAreaById() throws Exception {
20 | System.out.println(JSON.toJSONString(areaDao.queryAreaById(110000)));
21 | }
22 |
23 | @Test
24 | public void queryAreaByParentId() throws Exception {
25 | System.out.println(JSON.toJSONString(areaDao.queryAreaByParentId(110000)));
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/src/test/java/com/jczc/operatorweb/dao/ChargedListDaoTest.java:
--------------------------------------------------------------------------------
1 | package com.jczc.operatorweb.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.boot.test.context.SpringBootTest;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | import com.jczc.operatorweb.model.ChargedListInfo;
10 |
11 | @RunWith(SpringRunner.class)
12 | @SpringBootTest
13 | public class ChargedListDaoTest {
14 | @Autowired
15 | private ChargedListDao chargedListDao;
16 | @Test
17 | public void testUnstart(){
18 | ChargedListInfo obj=chargedListDao.getUnstart("3000000001");
19 | System.out.println(obj);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/java/com/jczc/operatorweb/dao/ChargingPriceDaoTest.java:
--------------------------------------------------------------------------------
1 | package com.jczc.operatorweb.dao;
2 |
3 | import com.alibaba.fastjson.JSON;
4 | import org.junit.Test;
5 | import org.junit.runner.RunWith;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.boot.test.context.SpringBootTest;
8 | import org.springframework.test.context.junit4.SpringRunner;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | @RunWith(SpringRunner.class)
13 | @SpringBootTest
14 | public class ChargingPriceDaoTest {
15 |
16 | @Autowired
17 | ChargingPriceDao chargingPriceDao;
18 |
19 | @Test
20 | public void queryAllChargingPrice() throws Exception {
21 | Integer operatorId = 1;
22 | System.out.println(JSON.toJSONString(chargingPriceDao.queryAllChargingPrice(operatorId)));
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/src/test/java/com/jczc/operatorweb/dao/ChargingUserDaoTest.java:
--------------------------------------------------------------------------------
1 | package com.jczc.operatorweb.dao;
2 |
3 | import java.util.Date;
4 |
5 | import org.junit.Test;
6 | import org.junit.runner.RunWith;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.boot.test.context.SpringBootTest;
9 | import org.springframework.test.context.junit4.SpringRunner;
10 |
11 | import com.alibaba.fastjson.JSON;
12 | import com.jczc.operatorweb.model.AccountDetail;
13 | import com.jczc.operatorweb.model.ChargingUser;
14 | @RunWith(SpringRunner.class)
15 | @SpringBootTest
16 | public class ChargingUserDaoTest {
17 | @Autowired
18 | ChargingUserDao userDao;
19 | // @Test
20 | // public void testGetUserByToken(){
21 | // ChargingUser u=userDao.getUserByAccessToken("f19995a8b5814bcbad3147333d29817a");
22 | // System.out.println(JSON.toJSON(u));
23 | // }
24 | @Test
25 | public void testCreateAccountDetail(){
26 | AccountDetail detail=new AccountDetail();
27 | detail.setAmount(0.01d);
28 | detail.setChangeTime(new Date());
29 | detail.setRemark("充电费用");
30 | detail.setPayStatus(1);
31 | detail.setType(2);
32 | detail.setAccountId(46);
33 | Long detailId=userDao.createUserAccountDetail(detail);
34 | System.out.println("new detail id:"+detail.getId());
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/test/java/com/jczc/operatorweb/dao/GroupTypeDaoTest.java:
--------------------------------------------------------------------------------
1 | package com.jczc.operatorweb.dao;
2 |
3 | import com.alibaba.fastjson.JSON;
4 | import org.junit.Test;
5 | import org.junit.runner.RunWith;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.boot.test.context.SpringBootTest;
8 | import org.springframework.test.context.junit4.SpringRunner;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | @RunWith(SpringRunner.class)
13 | @SpringBootTest
14 | public class GroupTypeDaoTest {
15 | @Autowired
16 | GroupTypeDao groupTypeDao;
17 | @Test
18 | public void queryById() throws Exception {
19 | System.out.println(JSON.toJSONString(groupTypeDao.queryById(1)));
20 | }
21 |
22 | }
--------------------------------------------------------------------------------
/src/test/java/com/jczc/operatorweb/dao/PileDaoTest.java:
--------------------------------------------------------------------------------
1 | package com.jczc.operatorweb.dao;
2 |
3 | import com.alibaba.fastjson.JSON;
4 | import com.jczc.operatorweb.entity.Pile;
5 | import com.jczc.operatorweb.model.PileInfo;
6 | import org.junit.Test;
7 | import org.junit.runner.RunWith;
8 | import org.springframework.beans.factory.annotation.Autowired;
9 | import org.springframework.boot.test.context.SpringBootTest;
10 | import org.springframework.test.context.junit4.SpringRunner;
11 | import java.util.List;
12 |
13 | @RunWith(SpringRunner.class)
14 | @SpringBootTest
15 | public class PileDaoTest {
16 |
17 | @Autowired
18 | PileDao pileDao;
19 | @Test
20 | public void save() throws Exception {
21 | Pile pile = new Pile("3000000007",2,1,"车位07",1, 4 , 120.07, 30.666,1, 2, "正常","正常");
22 | System.out.println(pileDao.save(pile));
23 | System.out.println(pile.getId());
24 | }
25 |
26 | @Test
27 | public void queryOperatorAllPiles() throws Exception {
28 | List