diff --git a/crmeb/crmeb-admin/src/main/resources/application.yml b/crmeb/crmeb-admin/src/main/resources/application.yml index ee6e134..cad6256 100644 --- a/crmeb/crmeb-admin/src/main/resources/application.yml +++ b/crmeb/crmeb-admin/src/main/resources/application.yml @@ -7,7 +7,7 @@ crmeb: wechat-js-api-beta: true #微信js api是否是beta版本 asyncConfig: false #是否同步config表数据到redis asyncWeChatProgramTempList: false #是否同步小程序公共模板库 - imagePath: /当前项目更根目录的素材文件(绝对路径)/crmebimage/ # 服务器图片路径配置 斜杠结尾 + imagePath: /workspace/pro/Crmeb/crmeb/crmebimage/ # 服务器图片路径配置 斜杠结尾 database: mysql # 配置端口 diff --git a/crmeb/crmeb-common/src/main/java/com/zbkj/common/model/product/StoreProduct.java b/crmeb/crmeb-common/src/main/java/com/zbkj/common/model/product/StoreProduct.java index 375a978..f30c2ba 100644 --- a/crmeb/crmeb-common/src/main/java/com/zbkj/common/model/product/StoreProduct.java +++ b/crmeb/crmeb-common/src/main/java/com/zbkj/common/model/product/StoreProduct.java @@ -1,6 +1,5 @@ package com.zbkj.common.model.product; -import cn.hutool.core.date.DateTime; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; @@ -13,6 +12,7 @@ import lombok.experimental.Accessors; import java.io.Serializable; import java.math.BigDecimal; +import java.util.Date; /** * 商品表 @@ -132,8 +132,7 @@ public class StoreProduct implements Serializable { @ApiModelProperty(value = "砍价状态 0未开启 1开启") private Boolean isBargain; - //为你推荐使用该字段 - @ApiModelProperty(value = "是否优品推荐 0false不推荐 1true推荐") + @ApiModelProperty(value = "是否优品推荐") private Boolean isGood; @ApiModelProperty(value = "是否单独分佣") @@ -172,10 +171,10 @@ public class StoreProduct implements Serializable { //新增字段 @ApiModelProperty(value = "开始售卖时间") - private DateTime beginTime; + private Date beginTime; @ApiModelProperty(value = "结束售卖时间") - private DateTime endTime; + private Date endTime; @ApiModelProperty(value = "搜索状态:0=售卖中,1=上新预告,2=团购结束") private String searchStatus; @@ -186,5 +185,8 @@ public class StoreProduct implements Serializable { @ApiModelProperty(value = "水果尺寸") private String dimensions; + @ApiModelProperty(value = "是否推荐 0=推荐,1=未推荐") + private String isSuggest; + } diff --git a/crmeb/crmeb-common/src/main/java/com/zbkj/common/token/FrontTokenComponent.java b/crmeb/crmeb-common/src/main/java/com/zbkj/common/token/FrontTokenComponent.java index f75cfab..8bad08d 100644 --- a/crmeb/crmeb-common/src/main/java/com/zbkj/common/token/FrontTokenComponent.java +++ b/crmeb/crmeb-common/src/main/java/com/zbkj/common/token/FrontTokenComponent.java @@ -3,7 +3,6 @@ package com.zbkj.common.token; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.zbkj.common.constants.Constants; -import com.zbkj.common.exception.CrmebException; import com.zbkj.common.model.user.User; import com.zbkj.common.utils.RedisUtil; import com.zbkj.common.utils.RequestUtil; @@ -175,6 +174,7 @@ public class FrontTokenComponent { "api/front/index/get/version", "api/front/image/domain", "api/front/product/leaderboard" + }; return ArrayUtils.contains(routerList, uri); diff --git a/crmeb/crmeb-front/src/main/java/com/zbkj/front/config/WebConfig.java b/crmeb/crmeb-front/src/main/java/com/zbkj/front/config/WebConfig.java index 763f7a7..bece8b3 100644 --- a/crmeb/crmeb-front/src/main/java/com/zbkj/front/config/WebConfig.java +++ b/crmeb/crmeb-front/src/main/java/com/zbkj/front/config/WebConfig.java @@ -68,6 +68,7 @@ public class WebConfig implements WebMvcConfigurer { excludePathPatterns("/api/front/article/**"). excludePathPatterns("/api/front/city/**"). excludePathPatterns("/api/front/product/hot"). + excludePathPatterns("/api/front/pagelist/suggest"). excludePathPatterns("/api/front/product/good"). excludePathPatterns("/api/front/products/**"). excludePathPatterns("/api/front/reply/**"). diff --git a/crmeb/crmeb-front/src/main/java/com/zbkj/front/controller/ProductController.java b/crmeb/crmeb-front/src/main/java/com/zbkj/front/controller/ProductController.java index 8306908..f58c34d 100644 --- a/crmeb/crmeb-front/src/main/java/com/zbkj/front/controller/ProductController.java +++ b/crmeb/crmeb-front/src/main/java/com/zbkj/front/controller/ProductController.java @@ -47,7 +47,7 @@ public class ProductController { * 参数暂定分页对象 */ @ApiOperation(value = "为你推荐") - @RequestMapping(value = "/pageList/suggest", method = RequestMethod.GET) + @RequestMapping(value = "/pagelist/suggest", method = RequestMethod.GET) public CommonResult getProductSuggestionList(ProductSuggestPage param) { IPage list = productService.getProductSuggestionList(param); return CommonResult.success(list,"查询成功!"); diff --git a/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/ProductService.java b/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/ProductService.java index 38dd797..9605bb1 100644 --- a/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/ProductService.java +++ b/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/ProductService.java @@ -28,7 +28,7 @@ import java.util.List; */ public interface ProductService extends IService { - /* + /** * 为你推荐 * @return List */ diff --git a/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/impl/LoginServiceImpl.java b/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/impl/LoginServiceImpl.java index 039caaf..9874db0 100644 --- a/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/impl/LoginServiceImpl.java +++ b/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/impl/LoginServiceImpl.java @@ -9,7 +9,6 @@ import com.zbkj.common.request.LoginMobileRequest; import com.zbkj.common.request.LoginRequest; import com.zbkj.common.response.LoginResponse; import com.zbkj.common.token.FrontTokenComponent; -import com.zbkj.common.utils.CrmebUtil; import com.zbkj.common.utils.DateUtil; import com.zbkj.common.utils.RedisUtil; import com.zbkj.front.service.LoginService; @@ -68,7 +67,8 @@ public class LoginServiceImpl implements LoginService { } // 校验密码 - String password = CrmebUtil.encryptPassword(loginRequest.getPassword(), loginRequest.getPhone()); + //String password = CrmebUtil.encryptPassword(loginRequest.getPassword(), loginRequest.getPhone()); + String password = loginRequest.getPassword(); if (!user.getPwd().equals(password)) { throw new CrmebException("密码错误"); } diff --git a/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/impl/ProductServiceImpl.java b/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/impl/ProductServiceImpl.java index e85909d..3fa4857 100644 --- a/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/impl/ProductServiceImpl.java +++ b/crmeb/crmeb-front/src/main/java/com/zbkj/front/service/impl/ProductServiceImpl.java @@ -3,7 +3,6 @@ package com.zbkj.front.service.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -31,7 +30,6 @@ import com.zbkj.front.service.ProductService; import com.zbkj.service.dao.StoreProductDao; import com.zbkj.service.delete.ProductUtils; import com.zbkj.service.service.*; -import org.apache.commons.lang.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -105,13 +103,11 @@ public class ProductServiceImpl extends ServiceImpl page = new Page<>(param.getCurrentPage(), param.getPageSize()); //构造查询条件 - QueryWrapper query = new QueryWrapper<>(); + /*QueryWrapper query = new QueryWrapper<>(); if(StringUtils.isNotEmpty(param.getStoreName())){ - query.lambda().like(StoreProduct::getStoreName, param.getStoreName()); - } - //按照上架时间降序排列 - query.lambda().orderByDesc(StoreProduct::getBeginTime); - return this.baseMapper.selectPage(page, query); + query.lambda().like(StoreProduct::getStoreName,param.getStoreName()); + }*/ + return this.baseMapper.getProductSuggestionList(page,param); } /** diff --git a/crmeb/crmeb-front/src/main/resources/application.yml b/crmeb/crmeb-front/src/main/resources/application.yml index a39e7f7..4cec8e2 100644 --- a/crmeb/crmeb-front/src/main/resources/application.yml +++ b/crmeb/crmeb-front/src/main/resources/application.yml @@ -4,7 +4,7 @@ crmeb: # 配置端口 server: - port: 8081 + port: 8084 servlet: context-path: / # 访问path tomcat: diff --git a/crmeb/crmeb-service/src/main/java/com/zbkj/service/dao/StoreProductDao.java b/crmeb/crmeb-service/src/main/java/com/zbkj/service/dao/StoreProductDao.java index 0cbb655..977e132 100644 --- a/crmeb/crmeb-service/src/main/java/com/zbkj/service/dao/StoreProductDao.java +++ b/crmeb/crmeb-service/src/main/java/com/zbkj/service/dao/StoreProductDao.java @@ -18,12 +18,13 @@ import org.apache.ibatis.annotations.Param; * | Author: CRMEB Team * +---------------------------------------------------------------------- */ + public interface StoreProductDao extends BaseMapper { /* * 为你推荐 * @return List */ //为你推荐 - IPage getProductSuggestionList(IPage page,@Param("parm") ProductSuggestPage param); + IPage getProductSuggestionList(IPage page, @Param("param") ProductSuggestPage param); } diff --git a/crmeb/crmeb-service/src/main/resources/mapper/store/StoreProductMapper.xml b/crmeb/crmeb-service/src/main/resources/mapper/store/StoreProductMapper.xml index 207dc94..811a297 100644 --- a/crmeb/crmeb-service/src/main/resources/mapper/store/StoreProductMapper.xml +++ b/crmeb/crmeb-service/src/main/resources/mapper/store/StoreProductMapper.xml @@ -2,12 +2,14 @@ - +