修改

parent 4ac8aa40
......@@ -129,7 +129,6 @@ public class InnerController implements IBaseController {
@RequestMapping("/user/search/phoneNo")
@LogHttpCaller
@Cacheable(value = "usercache", key = "'userPhone' + #phoneNo", unless = "#result == null", cacheManager = "cacheManager")
public JsonResult findByPhoneNo(String phoneNo) {
User user = userService.findByPhoneInDb(phoneNo);
if (user == null) {
......
......@@ -81,6 +81,7 @@ public class UserServiceImpl implements IUserService {
private final static Random random = new Random();
@Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneInDb(String phone) {
return userRepository.findByPhoneNo(phone);
}
......
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