1、biginteger比较大小用 compareTo
2、中断当前循环,循环下个数,continue,跳出循环 break
3、int转biginteger new BigInteger(String.valueOf(5));
4、查数据库,查出多条数据,resultMap="hashmap"的处理
<select id="groupItemByDay" resultType="hashmap"> select sum(duration),item_id from timemanage where create_time like '${dayTime}%' and user_no='dabai' group by item_id order by item_id; </select>
这样接,就可以接到多个hashmap了(报错信息exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne())
List<Map<String, BigInteger>> groupItemByDay(@Param("dayTime") String dayTime);
5、Result Maps collection does not contain value for com.beauty.time.dao.TimeManageMapper.map
报这个错误,不要死盯着你那个mybatis的select语句,可能是他上边的select语句resultMap或者resultType有问题
6、单元测试service为null
测试类加上这个注释
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
@RunWith(SpringRunner.class) @SpringBootTest
还有 @test注释要用这个的哦
import org.junit.Test;