From a6f34b99ee20e528b766c8ed5a61bd9c5aa0e7ae Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 16 十一月 2019 18:10:33 +0800 Subject: [PATCH] 淘宝相似商品推荐接口优化,根据商品ID搜索商品基本信息优化 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/SystemZnxServiceImpl.java | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/SystemZnxServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/SystemZnxServiceImpl.java index 9ae9386..4db5b03 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/SystemZnxServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/SystemZnxServiceImpl.java @@ -1,28 +1,35 @@ package com.yeshi.fanli.service.impl.user; -import java.io.Serializable; +import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; -import com.yeshi.fanli.dao.config.SystemZnxDao; +import com.yeshi.fanli.dao.mybatis.msg.SystemZnxMapper; import com.yeshi.fanli.entity.system.SystemZnx; import com.yeshi.fanli.service.inter.user.SystemZnxService; @Service public class SystemZnxServiceImpl implements SystemZnxService{ @Resource - private SystemZnxDao systemZnxDao; + private SystemZnxMapper systemZnxMapper; /** * 鎻掑叆鏁版嵁 */ @Override public void save(SystemZnx systemZnx) { - Serializable id = systemZnxDao.save(systemZnx); - if(id!=null) { - systemZnx.setId(Long.parseLong(id+"")); - } + systemZnxMapper.insertSelective(systemZnx); + } + + @Override + public List<SystemZnx> listbyCreateTime(long createTime){ + return systemZnxMapper.listbyCreateTime(createTime); + } + + @Override + public List<SystemZnx> listbyUidAndCreateTime(long uid, long createTime) { + return systemZnxMapper.listbyUidAndCreateTime(uid, createTime); } } -- Gitblit v1.8.0