| | |
| | | import com.yeshi.fanli.dao.goods.SuperHotSearchDao;
|
| | | import com.yeshi.fanli.entity.bus.search.HotSearch;
|
| | | import com.yeshi.fanli.entity.bus.su.search.SuperHotSearch;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.config.SuperHotSearchService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class SuperHotSearchSerivceImpl implements SuperHotSearchService {
|
| | |
| | | private SuperHotSearchDao superHotSearchDao;
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | | public List<SuperHotSearch> getSuperHotSearchBySystemId(long id) {
|
| | |
|
| | |
| | | return (Integer) superHotSearchDao.excute(new HibernateCallback<Integer>() {
|
| | |
|
| | | public Integer doInHibernate(Session session) throws HibernateException {
|
| | | System system = systemService.getSystem(platform, packageName);
|
| | | BusinessSystem system = businessSystemService.getBusinessSystem(platform, packageName);
|
| | | Transaction transaction = session.beginTransaction();
|
| | | Query query = session
|
| | | .createQuery("delete SuperHotSearch shs " + " where shs.hotSearch.id=? and shs.system.id=?");
|
| | |
| | | }
|
| | |
|
| | | public void addSuperHotSearch(long hsid, String platform, String packageName) {
|
| | | System system = systemService.getSystem(platform, packageName);
|
| | | BusinessSystem system = businessSystemService.getBusinessSystem(platform, packageName);
|
| | | SuperHotSearch superHotSearch = new SuperHotSearch();
|
| | | HotSearch hotSearch = new HotSearch();
|
| | | hotSearch.setId(hsid);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void addSuper(Long id, System system) {
|
| | | public void addSuper(Long id, BusinessSystem system) {
|
| | | SuperHotSearch superHotSearch = new SuperHotSearch();
|
| | | HotSearch hotSearch = new HotSearch();
|
| | | hotSearch.setId(id);
|