Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop

This commit is contained in:
Chopper 2022-04-11 14:18:42 +08:00
commit 2720f5c0bb
7 changed files with 54 additions and 15 deletions

View File

@ -1,9 +1,5 @@
## Lilishop B2B2C商城系统
##### 开源不易如有帮助请点Star
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,进群先看文档后提问)
@ -28,13 +24,13 @@
Lilishop商城系统支持商家入驻后端基于SpringBoot 研发,前端使用 Vue、uniapp开发 **系统全端全部代码开源**
商城前后端分离支持分布式部署支持Docker各个API独立并且有独立的消费者。
前后端分离支持分布式部署支持Docker各个API独立并且有独立的消费者。
### 商城 API/消费者 聚合版
api不需要单独部署只需启动一个jar包就可以正常运转 如有需要,可以点击跳转
https://gitee.com/beijing_hongye_huicheng/lilishop-simplify
### 商城 开发/使用/常见问题 帮助文档
### 开发/使用/常见问题 帮助文档
https://docs.pickmall.cn
@ -61,7 +57,7 @@ PS手机验证码为 111111
![image-20210511171611793](https://pickmall.cn/assets/imgs/h5-qrcode.png)
### 快速部署本地商城
### 快速本地部署
[点击跳转](https://docs.pickmall.cn/deploy/%E8%BF%90%E8%A1%8C%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87.html)
@ -138,11 +134,19 @@ PS手机验证码为 111111
### 版本升级
```
商城后续会持续版本升级修复bug完善功能覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
后续会考虑推出微服务商城系统/商城中台等
系统后续会提供多场景解决方案。
更多架构微服务、Saas、中台等都会支持。 支持差价升级商业授权
```
### 商业授权
商业版本与开源版本代码一致,没有区分
商业使用需要授权授权方式可选择联系官网客服或者qq群联系群主。
商业授权模式为永久授权,支持永久升级。
商业案例由于涉及部分多层二开关系,如需了解可以咨询销售。
### 开源须知
1.仅允许用于个人学习研究使用.
@ -151,7 +155,8 @@ PS手机验证码为 111111
3.软件受国家计算机软件著作权保护登记号2021SR0805085
4.限制商用如果需要商业使用请联系我们。QQ3409056806.
4.限制商用如果需要商业使用请联系我们。QQ3409056806.或者加入qq群联系群主。
### 交流群

View File

@ -2,9 +2,9 @@ package cn.lili.controller.common;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.system.service.RegionService;
import cn.lili.modules.system.entity.dos.Region;
import cn.lili.modules.system.entity.vo.RegionVO;
import cn.lili.modules.system.service.RegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -38,6 +38,11 @@ public class RegionController {
return ResultUtil.data(regionService.getRegion(cityCode,townName));
}
@GetMapping(value = "/name")
@ApiOperation(value = "根据名字获取地区地址id")
public ResultMessage<String> getItemByLastName(String lastName) {
return ResultUtil.data(regionService.getItemByLastName(lastName));
}
@GetMapping(value = "/item/{id}")
@ApiImplicitParam(name = "id", value = "地区ID", required = true, dataType = "String", paramType = "path")

View File

@ -184,6 +184,7 @@ public class SeckillApplyServiceImpl extends ServiceImpl<SeckillApplyMapper, Sec
//保存促销活动商品信息
if (!promotionGoodsList.isEmpty()) {
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
searchParams.setPromotionId(seckillId);
searchParams.setStoreId(storeId);
searchParams.setPromotionType(PromotionTypeEnum.SECKILL.name());
searchParams.setSkuIds(promotionGoodsList.stream().map(PromotionGoods::getSkuId).collect(Collectors.toList()));

View File

@ -562,7 +562,8 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
*/
private List<FunctionScoreQueryBuilder.FilterFunctionBuilder> buildKeywordSearch(String keyword) {
List<FunctionScoreQueryBuilder.FilterFunctionBuilder> filterFunctionBuilders = new ArrayList<>();
MatchQueryBuilder goodsNameQuery = QueryBuilders.matchQuery("goodsName", keyword).operator(Operator.AND);
// operator AND 需全部分词匹配 OR 需配置 minimumShouldMatch最小分词匹配数不设置默认为1
MatchQueryBuilder goodsNameQuery = QueryBuilders.matchQuery("goodsName", keyword).operator(Operator.OR).minimumShouldMatch("2");
//分词匹配
filterFunctionBuilders.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(goodsNameQuery,
ScoreFunctionBuilders.weightFactorFunction(10)));

View File

@ -36,6 +36,14 @@ public interface RegionService extends IService<Region> {
@Cacheable(key = "#id")
List<Region> getItem(String id);
/**
* 根据最后一级名称获取改所有上级地区id
*
* @param lastName 最后一级名称
* @return 全部地区id
*/
String getItemByLastName(String lastName);
/**
* 获取地址
*

View File

@ -61,6 +61,25 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
}
}
/**
* 根据最后一级名称获取改所有上级地区id
*
* @param lastName 最后一级名称
* @return 全部地区id
*/
@Override
public String getItemByLastName(String lastName) {
StringBuilder sql = new StringBuilder();
LambdaQueryWrapper<Region> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(Region::getName, lastName);
Region region = this.getOne(lambdaQueryWrapper, false);
if (region != null) {
sql.append(region.getPath()).append(",").append(region.getId());
return sql.toString().replace(",0,","");
}
return null;
}
@Override
public List<Region> getItem(String id) {
LambdaQueryWrapper<Region> lambdaQueryWrapper = new LambdaQueryWrapper<>();

View File

@ -87,14 +87,14 @@ public class WechatMessageServiceImpl extends ServiceImpl<WechatMessageMapper, W
oldList.add(JSONUtil.parseObj(item).getStr("template_id"));
});
}
if (oldList.size() != 0) {
/* if (oldList.size() != 0) {
oldList.forEach(templateId -> {
Map<String, Object> params = new HashMap<>(1);
params.put("template_id", templateId);
String message = WechatMessageUtil.wechatHandler(HttpUtils.doPostWithJson(delMsgTpl + accessToken, params));
log.info("删除模版请求:{},删除模版响应:{}", params, message);
});
}
}*/
//加入数据
List<WechatMessageData> tmpList = initData();