admin
2021-04-28 a7454d8a6325566753358b37ffabfae2faa0ca7f
fanli/src/main/java/com/yeshi/fanli/service/impl/user/HistorySearchServiceImpl.java
@@ -1,29 +1,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);
   }
}
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);
   }
}