package com.fuzamei.web; import java.util.Map; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import com.alibaba.fastjson.JSON; import com.fuzamei.baseTest.BaseJunit4Test; import com.fuzamei.entity.User; public class UserTest extends BaseJunit4Test{ @Autowired private ReceivingClerkAction receivingClerkAction; @Autowired private CarriersAction carriersAction; @Autowired private SupplierAction supplierAction; @Autowired private PlannerAction plannerAction; @Autowired private UserAction userAction; @Test public void test01(){ Map map = receivingClerkAction.queryReceivingClerk("{'user_id':1001,'username':'商应供'}"); System.out.println(JSON.toJSONString(map,true)); } @Test public void test02(){ Map map = carriersAction.queryCarriers("{'user_id':1001,'username':'王五'}"); System.out.println(JSON.toJSONString(map,true)); } @Test public void test03(){ Map map = supplierAction.queryPlannerBySupplierId("{'user_id':1001,'supplierId':'1006'}"); System.out.println(JSON.toJSONString(map,true)); } @Test public void test04(){ Map map = supplierAction.querySupplier("{'user_id':1001,'username':''}"); System.out.println(JSON.toJSONString(map,true)); } @Test public void test05(){ Map map = plannerAction.queryPlanner("{'user_id':1001,'username':''}"); System.out.println(JSON.toJSONString(map,true)); } @Test public void test06(){ Map map = plannerAction.queryYesOrNoSupplierByPlannerId("{'user_id':1001,'plannerId':'1002'}"); System.out.println(JSON.toJSONString(map,true)); } @Test public void test07(){ Map map = userAction.getAllRoles("{'user_id':1001}"); System.out.println(JSON.toJSONString(map,true)); } @Test public void test08(){ Map map = userAction.queryUsers("{'user_id':1001,'username':'','roleId':'3','personName':''}"); System.out.println(JSON.toJSONString(map,true)); } @Test public void test09(){ User user=new User(); user.setUserId(1000003); user.setUsername("jack1234"); user.setPassword("503621"); user.setRoleId(3); user.setPersonName("杰克"); Map result = userAction.insertUsers(user); String jsonString = JSON.toJSONString(result,true); System.out.println(jsonString); } @Test public void test10(){ User user=new User(); user.setUserId(1000003); user.setUsername("jack1234"); user.setPassword("503621"); user.setRoleId(3); user.setPersonName("杰克2"); Map result = userAction.updateAccountByUserId(user); String jsonString = JSON.toJSONString(result,true); System.out.println(jsonString); } @Test public void test11() { Map map =userAction.deleteFromUserId("{'userIds':'1990,503621'}"); System.out.println(JSON.toJSONString(map,true)); } }