FrequentPhrasesServiceImpl.java
879 Bytes
package com.bsth.service.realcontrol.impl;
import com.bsth.entity.realcontrol.FrequentPhrases;
import com.bsth.security.util.SecurityUtils;
import com.bsth.service.impl.BaseServiceImpl;
import com.bsth.service.realcontrol.FrequentPhrasesService;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* Created by panzhao on 2017/9/17.
*/
@Service
public class FrequentPhrasesServiceImpl extends BaseServiceImpl<FrequentPhrases, Integer> implements FrequentPhrasesService {
@Override
public Map<String, Object> save(FrequentPhrases fp) {
fp.setUserName(SecurityUtils.getCurrentUser().getUserName());
return super.save(fp);
}
@Override
public Iterable<FrequentPhrases> list(Map<String, Object> map) {
map.put("userName_eq", SecurityUtils.getCurrentUser().getUserName());
return super.list(map);
}
}