Commit 84dcb2ef authored by wujipeng's avatar wujipeng
Browse files

优化

parent 0cb3dc3c
...@@ -39,7 +39,12 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity ...@@ -39,7 +39,12 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity
@Override @Override
public List<ContractVO> listSecondLevel(String homId) { public List<ContractVO> listSecondLevel(String homId) {
return baseMapper.listSecondLevel(homId); List<ContractVO> list = baseMapper.listSecondLevel(homId);
for (ContractVO contractVO : list) {
int l = (int) DateUtils.daysBetween(new Date(), contractVO.getEndTime());
contractVO.setRemainingDays(l);
}
return list;
} }
@Override @Override
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
contract contract
where where
parent_id is null parent_id is null
and
user_id = #{userId}
order by order by
begin_time begin_time
desc desc
......
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