yujian
2020-05-09 7e7db2fa55a9a3af46d4fd8ede0dee147f101d64
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
package com.yeshi.fanli.service.impl.user;
 
import java.util.Date;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Service;
 
import com.yeshi.fanli.dao.mybatis.HistorySearchMapper;
import com.yeshi.fanli.entity.bus.search.HistorySearch;
import com.yeshi.fanli.service.inter.user.HistorySearchService;
 
@Service
public class HistorySearchServiceImpl implements HistorySearchService {
 
    @Resource
    private HistorySearchMapper historySearchMapper;
 
    public void addHistorySearch(String searchKey, String bid) {
        searchKey = searchKey != null && searchKey.length() > 64 ? searchKey.substring(0, 64) : searchKey;
        HistorySearch historySearch = new HistorySearch();
        historySearch.setName(searchKey);
        historySearch.setBusinessId(bid);
        historySearch.setCreatetime(new Date());
        historySearch.setState(0);
        historySearchMapper.insertSelective(historySearch);
    }
 
}