提交 b209085f authored 作者: lvwei's avatar lvwei

--no commit message

上级 8c7b8dca
package com.zrqx.fg.sysuser.controller.recommend;
import java.util.List;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -23,7 +25,7 @@ public class FgRecommendController {
@ApiOperation("根据推荐位代码code查一定数量的列表")
@GetMapping(SysUserRequestPath.GET)
public CallBack<RecommendGoods> get(Integer num,String code){
public CallBack<List<RecommendGoods>> get(Integer num,String code){
return CallBack.success(fgRecommendService.selectByCode(num,code));
}
}
......
package com.zrqx.fg.sysuser.mapper.recommend;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
......@@ -26,6 +28,6 @@ public interface FgRecommendMapper extends BaseMapper<Recommend>{
+ " ORDER BY sort ASC "
+ " LIMIT #{num} "
+ " </script> ")
RecommendGoods selectByCode(@Param("num") Integer num, @Param("code") String code);
List<RecommendGoods> selectByCode(@Param("num") Integer num, @Param("code") String code);
}
package com.zrqx.fg.sysuser.service.recommend;
import java.util.List;
import com.zrqx.core.model.sysuser.recommend.Recommend;
import com.zrqx.core.model.sysuser.recommend.RecommendGoods;
import com.zrqx.core.service.BaseService;
......@@ -14,7 +16,7 @@ public interface FgRecommendService extends BaseService<Recommend, Integer>{
* @author chyj
* @date: 2019年4月22日 下午6:05:06
*/
RecommendGoods selectByCode(Integer num, String code);
List<RecommendGoods> selectByCode(Integer num, String code);
}
package com.zrqx.fg.sysuser.service.recommend;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -29,7 +31,7 @@ public class FgRecommendServiceImpl extends BaseServiceImpl<Recommend, Integer>
* @date: 2019年4月22日 下午6:05:34
*/
@Override
public RecommendGoods selectByCode(Integer num, String code) {
public List<RecommendGoods> selectByCode(Integer num, String code) {
return fgRecommendMapper.selectByCode(num,code);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论