|
@@ -1,8 +1,11 @@
|
|
package com.hssx.cloudmodel;
|
|
package com.hssx.cloudmodel;
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.hssx.cloudmodel.entity.CustomCompany;
|
|
import com.hssx.cloudmodel.entity.CustomCompany;
|
|
|
|
+import com.hssx.cloudmodel.entity.MouldHistoryTime;
|
|
import com.hssx.cloudmodel.entity.vo.ProjectVO;
|
|
import com.hssx.cloudmodel.entity.vo.ProjectVO;
|
|
import com.hssx.cloudmodel.entity.vo.UserVO;
|
|
import com.hssx.cloudmodel.entity.vo.UserVO;
|
|
|
|
+import com.hssx.cloudmodel.mapper.MouldHistoryTimeMapper;
|
|
import com.hssx.cloudmodel.mapper.ProjectMapper;
|
|
import com.hssx.cloudmodel.mapper.ProjectMapper;
|
|
import com.hssx.cloudmodel.mapper.ProjectUserMapper;
|
|
import com.hssx.cloudmodel.mapper.ProjectUserMapper;
|
|
import com.hssx.cloudmodel.mapper.UserMapper;
|
|
import com.hssx.cloudmodel.mapper.UserMapper;
|
|
@@ -10,8 +13,10 @@ import org.junit.Test;
|
|
import org.junit.runner.RunWith;
|
|
import org.junit.runner.RunWith;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@RunWith(SpringRunner.class)
|
|
@RunWith(SpringRunner.class)
|
|
@@ -23,18 +28,27 @@ public class CloudModelApplicationTests {
|
|
@Resource
|
|
@Resource
|
|
UserMapper userMapper;
|
|
UserMapper userMapper;
|
|
@Resource
|
|
@Resource
|
|
|
|
+ MouldHistoryTimeMapper mouldHistoryTimeMapper;
|
|
|
|
+ @Resource
|
|
ProjectMapper projectMapper;
|
|
ProjectMapper projectMapper;
|
|
@Test
|
|
@Test
|
|
public void contextLoads() {
|
|
public void contextLoads() {
|
|
|
|
+// List<MouldHistoryTime> mouldHistoryTimes;
|
|
|
|
+ System.out.println(mouldHistoryTimeMapper.selectList(new QueryWrapper<MouldHistoryTime>().apply("date_format(open_time,'%H') between '23' and '24'")));
|
|
|
|
+// mouldHistoryTimes = null;
|
|
|
|
+// System.out.println(CollectionUtils.isEmpty(mouldHistoryTimes));
|
|
|
|
+// mouldHistoryTimes = new ArrayList<>();
|
|
|
|
+// System.out.println(CollectionUtils.isEmpty(mouldHistoryTimes));
|
|
|
|
+// System.out.println(mouldHistoryTimeMapper.selectList(new QueryWrapper<MouldHistoryTime>().apply("date_format(open_time,'%H') between '23' and '24'")));
|
|
|
|
|
|
- CustomCompany customCompany = new CustomCompany();
|
|
|
|
- UserVO vo = new UserVO();
|
|
|
|
- vo.setProjectId(5);
|
|
|
|
- vo.setId(165);
|
|
|
|
-// vo.setCompanyId(9);
|
|
|
|
- vo.setKeyName("111");
|
|
|
|
- List<ProjectVO> projectVOS = projectMapper.selectUserPowerList1(vo, 0);
|
|
|
|
- System.out.println(projectVOS);
|
|
|
|
|
|
+// CustomCompany customCompany = new CustomCompany();
|
|
|
|
+// UserVO vo = new UserVO();
|
|
|
|
+// vo.setProjectId(5);
|
|
|
|
+// vo.setId(165);
|
|
|
|
+//// vo.setCompanyId(9);
|
|
|
|
+// vo.setKeyName("111");
|
|
|
|
+// List<ProjectVO> projectVOS = projectMapper.selectUserPowerList1(vo, 0);
|
|
|
|
+// System.out.println(projectVOS);
|
|
// customCompany.setCompanyId(10);
|
|
// customCompany.setCompanyId(10);
|
|
// customCompany.setProjectId(4);
|
|
// customCompany.setProjectId(4);
|
|
// customCompanyMapper.update(customCompany,new QueryWrapper<CustomCompany>().eq("company_id",10));
|
|
// customCompanyMapper.update(customCompany,new QueryWrapper<CustomCompany>().eq("company_id",10));
|