##### Coverage Report - com.ctrip.apollo.biz.service.CommitService

Classes in this File | Line Coverage | Branch Coverage | Complexity
CommitService |
20% | 1/5
N/A | N/A
| 1.0;1

1 |  |
     package com.ctrip.apollo.biz.service;
2 |  |
3 |  |
     import com.ctrip.apollo.biz.entity.Commit;
4 |  |
     import com.ctrip.apollo.biz.repository.CommitRepository;
5 |  |
6 |  |
     import org.springframework.beans.factory.annotation.Autowired;
7 |  |
     import org.springframework.stereotype.Service;
8 |  |
9 |  |
     import java.util.Date;
10 |  |
11 |  |
     @Service
12 | 1 |
     public class CommitService {
13 |  |
14 |  |
       @Autowired
15 |  |
       private CommitRepository commitRepository;
16 |  |
17 |  |
       public void save(Commit commit, String user){
18 |  |
19 | 0 |
         commit.setDataChangeCreatedBy(user);
20 | 0 |
         commit.setDataChangeCreatedTime(new Date());
21 | 0 |
         commitRepository.save(commit);
22 | 0 |
       }
23 |  |
24 |  |
     }