Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop
This commit is contained in:
commit
2aaf677605
@ -24,13 +24,13 @@ spring:
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
url: http://192.168.0.108:8000
|
||||
url: http://127.0.0.1:8000
|
||||
cache:
|
||||
type: redis
|
||||
# Redis
|
||||
redis:
|
||||
host: 192.168.0.108
|
||||
port: 30379
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password: lilishop
|
||||
lettuce:
|
||||
pool:
|
||||
@ -60,7 +60,7 @@ spring:
|
||||
default-datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.0.108:30306/kuaidi100?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: lilishop
|
||||
maxActive: 50
|
||||
@ -241,16 +241,16 @@ lili:
|
||||
sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
|
||||
#域名
|
||||
domain:
|
||||
pc: http://192.168.0.108:8888
|
||||
wap: http://192.168.0.108:8888
|
||||
seller: http://192.168.0.108:8888
|
||||
admin: http://192.168.0.108:8888
|
||||
pc: http://127.0.0.1:8888
|
||||
wap: http://127.0.0.1:8888
|
||||
seller: http://127.0.0.1:8888
|
||||
admin: http://127.0.0.1:8888
|
||||
#api地址
|
||||
api:
|
||||
buyer: https://z171l91606.51mypc.cn
|
||||
base: http://192.168.0.108:8888
|
||||
manager: http://192.168.0.108:8888
|
||||
seller: http://192.168.0.108:8888
|
||||
base: http://127.0.0.1:8888
|
||||
manager: http://127.0.0.1:8888
|
||||
seller: http://127.0.0.1:8888
|
||||
|
||||
# jwt 细节设定
|
||||
jwt-setting:
|
||||
@ -269,7 +269,7 @@ lili:
|
||||
data:
|
||||
elasticsearch:
|
||||
cluster-name: elasticsearch
|
||||
cluster-nodes: 192.168.0.108:30920
|
||||
cluster-nodes: 127.0.0.1:9200
|
||||
index:
|
||||
number-of-replicas: 0
|
||||
number-of-shards: 3
|
||||
@ -301,7 +301,7 @@ lili:
|
||||
after-sale-topic: lili_after_sale_topic
|
||||
after-sale-group: lili_after_sale_group
|
||||
rocketmq:
|
||||
name-server: 192.168.0.108:30876
|
||||
name-server: 127.0.0.1:9876
|
||||
isVIPChannel: false
|
||||
producer:
|
||||
group: lili_group
|
||||
@ -310,7 +310,7 @@ rocketmq:
|
||||
xxl:
|
||||
job:
|
||||
admin:
|
||||
addresses: http://192.168.0.108:9001/xxl-job-admin
|
||||
addresses: http://127.0.0.1:9001/xxl-job-admin
|
||||
executor:
|
||||
appname: xxl-job-executor-lilishop
|
||||
address:
|
||||
|
@ -1,12 +1,21 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.cache.CachePrefix;
|
||||
import cn.lili.event.GoodsCommentCompleteEvent;
|
||||
import cn.lili.event.StoreSettingChangeEvent;
|
||||
import cn.lili.modules.goods.entity.dos.GoodsSku;
|
||||
import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
|
||||
import cn.lili.modules.goods.service.GoodsSkuService;
|
||||
import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
import cn.lili.modules.store.entity.dos.Store;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品SKU变化
|
||||
*
|
||||
@ -14,7 +23,7 @@ import org.springframework.stereotype.Service;
|
||||
* @since 2020-07-03 11:20
|
||||
*/
|
||||
@Service
|
||||
public class GoodsSkuExecute implements GoodsCommentCompleteEvent {
|
||||
public class GoodsSkuExecute implements GoodsCommentCompleteEvent, StoreSettingChangeEvent {
|
||||
|
||||
/**
|
||||
* 商品
|
||||
@ -22,9 +31,23 @@ public class GoodsSkuExecute implements GoodsCommentCompleteEvent {
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
@Override
|
||||
public void goodsComment(MemberEvaluation memberEvaluation) {
|
||||
goodsSkuService.updateGoodsSkuCommentNum(memberEvaluation.getSkuId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void storeSettingChange(Store store) {
|
||||
//修改数据后,清除商品索引
|
||||
GoodsSearchParams goodsSearchParams = new GoodsSearchParams();
|
||||
goodsSearchParams.setStoreId(store.getId());
|
||||
List<String> goodsSkuKeys = new ArrayList<>();
|
||||
for (GoodsSku goodsSku : goodsSkuService.getGoodsSkuByList(goodsSearchParams)) {
|
||||
goodsSkuKeys.add(CachePrefix.GOODS_SKU.getPrefix()+goodsSku.getId());
|
||||
}
|
||||
cache.multiDel(goodsSkuKeys);
|
||||
}
|
||||
}
|
||||
|
@ -202,8 +202,8 @@ public enum ResultCode {
|
||||
ORDER_BATCH_DELIVER_ERROR(31013, "批量发货,文件读取失败"),
|
||||
ORDER_ITEM_NOT_EXIST(31014, "当前订单项不存在!"),
|
||||
POINT_NOT_ENOUGH(31015, "当前会员积分不足购买当前积分商品!"),
|
||||
|
||||
ORDER_LABEL_ORDER_ERROR(31016, "订单不能打印电子面单"),
|
||||
ORDER_PRICE_ERROR(31017,"订单金额不能小于等于0"),
|
||||
|
||||
|
||||
/**
|
||||
|
@ -98,7 +98,7 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
|
||||
|
||||
@Override
|
||||
public EsGoodsRelatedInfo getSelector(EsGoodsSearchDTO goodsSearch, PageVO pageVo) {
|
||||
NativeSearchQueryBuilder builder = createSearchQueryBuilder(goodsSearch, null);
|
||||
NativeSearchQueryBuilder builder = createSearchQueryBuilder(goodsSearch, pageVo);
|
||||
//分类
|
||||
AggregationBuilder categoryNameBuilder = AggregationBuilders.terms("categoryNameAgg").field("categoryNamePath.keyword");
|
||||
builder.addAggregation(AggregationBuilders.terms("categoryAgg").field("categoryPath").subAggregation(categoryNameBuilder));
|
||||
|
@ -82,7 +82,7 @@ public class Store extends BaseEntity {
|
||||
@ApiModelProperty(value = "服务评分")
|
||||
private Double serviceScore;
|
||||
|
||||
@ApiModelProperty(value = "物流描述")
|
||||
@ApiModelProperty(value = "物流评分")
|
||||
private Double deliveryScore;
|
||||
|
||||
@ApiModelProperty(value = "商品数量")
|
||||
|
@ -189,7 +189,7 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店铺详细细腻
|
||||
* 修改店铺详细信息
|
||||
*
|
||||
* @param storeEditDTO 修改店铺信息
|
||||
*/
|
||||
@ -304,7 +304,7 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
|
||||
|
||||
//获取当前操作的店铺
|
||||
Store store = getStoreByMember();
|
||||
//校验迪纳普状态
|
||||
//校验店铺状态
|
||||
checkStoreStatus(store);
|
||||
StoreDetail storeDetail = storeDetailService.getStoreDetail(store.getId());
|
||||
//设置店铺的银行信息
|
||||
@ -317,7 +317,7 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
|
||||
//获取当前操作的店铺
|
||||
Store store = getStoreByMember();
|
||||
|
||||
//校验迪纳普状态
|
||||
//校验店铺状态
|
||||
checkStoreStatus(store);
|
||||
BeanUtil.copyProperties(storeOtherInfoDTO, store);
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
package cn.lili.controller.order;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dto.MemberAddressDTO;
|
||||
@ -96,7 +99,11 @@ public class OrderManagerController {
|
||||
@PutMapping(value = "/update/{orderSn}/price")
|
||||
public ResultMessage<Order> updateOrderPrice(@PathVariable String orderSn,
|
||||
@NotNull(message = "订单价格不能为空") @RequestParam Double price) {
|
||||
return ResultUtil.data(orderPriceService.updatePrice(orderSn, price));
|
||||
if (NumberUtil.isGreater(Convert.toBigDecimal(price), Convert.toBigDecimal(0))) {
|
||||
return ResultUtil.data(orderPriceService.updatePrice(orderSn, price));
|
||||
} else {
|
||||
return ResultUtil.error(ResultCode.ORDER_PRICE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package cn.lili.controller.order;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.context.ThreadContextHolder;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
@ -103,7 +105,11 @@ public class OrderStoreController {
|
||||
@PutMapping(value = "/update/{orderSn}/price")
|
||||
public ResultMessage<Object> updateOrderPrice(@PathVariable String orderSn,
|
||||
@NotNull(message = "订单价格不能为空") @RequestParam Double orderPrice) {
|
||||
return ResultUtil.data(orderPriceService.updatePrice(orderSn, orderPrice));
|
||||
if (NumberUtil.isGreater(Convert.toBigDecimal(orderPrice), Convert.toBigDecimal(0))) {
|
||||
return ResultUtil.data(orderPriceService.updatePrice(orderSn, orderPrice));
|
||||
} else {
|
||||
return ResultUtil.error(ResultCode.ORDER_PRICE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
|
@ -82,7 +82,7 @@ public class LogisticsStoreController {
|
||||
@DeleteMapping(value = "/{id}")
|
||||
public ResultMessage<Object> cancel(@PathVariable String id) {
|
||||
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
|
||||
boolean remove = storeLogisticsService.remove(new LambdaQueryWrapper<StoreLogistics>().eq(StoreLogistics::getId, id).eq(StoreLogistics::getStoreId, storeId));
|
||||
boolean remove = storeLogisticsService.remove(new LambdaQueryWrapper<StoreLogistics>().eq(StoreLogistics::getLogisticsId, id).eq(StoreLogistics::getStoreId, storeId));
|
||||
return ResultUtil.data(remove);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user