UserFaceInfoServiceImpl.java
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.itboyst.facedemo.service.impl;
import com.itboyst.facedemo.mapper.MybatisUserFaceInfoMapper;
import com.itboyst.facedemo.domain.UserFaceInfo;
import com.itboyst.facedemo.service.UserFaceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class UserFaceInfoServiceImpl implements UserFaceInfoService {
@Autowired
private MybatisUserFaceInfoMapper userFaceInfoMapper;
@Override
public void insertSelective(UserFaceInfo userFaceInfo) {
userFaceInfoMapper.insertUserFaceInfo(userFaceInfo);
}
@Override
public UserFaceInfo getUserFaceByName(String name) {
UserFaceInfo mUserFaceInfo = null;
List<UserFaceInfo> userFaceInfoList = userFaceInfoMapper.findUserFaceInfoList();
if(userFaceInfoList != null && userFaceInfoList.size() > 0) {
for (UserFaceInfo userFaceInfo : userFaceInfoList) {
if(userFaceInfo.getName().equals(name)) {
mUserFaceInfo = userFaceInfo;
break;
}
}
}
return mUserFaceInfo;
}
@Override
public boolean updateUserFaceInfo(UserFaceInfo userFaceInfo) {
return userFaceInfoMapper.updateUserFaceInfo(userFaceInfo);
}
}