Browse Source

修复页面错误,订单报表增加功能

sj
1304317391@qq.com 2 years ago
parent
commit
22c370c7fb
  1. 52
      yudao-server/src/main/resources/application-local.yaml
  2. 4
      zsw-bxg/src/main/java/co/yixiang/app/modules/shop/rest/BxgIndexController.java
  3. 4
      zsw-bxg/src/main/java/co/yixiang/app/modules/shop/vo/IndexVo.java
  4. 1
      zsw-bxg/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java
  5. 2
      zsw-bxg/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java
  6. 4
      zsw-bxg/src/main/java/co/yixiang/modules/activity/vo/YxStoreCombinationQueryVo.java
  7. 8
      zsw-bxg/src/main/java/co/yixiang/modules/cart/service/impl/YxStoreCartServiceImpl.java
  8. 5
      zsw-bxg/src/main/java/co/yixiang/modules/cart/vo/YxStoreCartQueryVo.java
  9. 66
      zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java
  10. 3
      zsw-bxg/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderQueryCriteria.java

52
yudao-server/src/main/resources/application-local.yaml

@ -40,37 +40,63 @@ spring:
test-while-idle: true
test-on-borrow: false
test-on-return: false
# datasource:
# master:
# url: jdbc:p6spy:mysql://192.168.10.250:3306/vue_pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
# username: root
# password: root
# slave: # 模拟从库,可根据自己需要修改
# url: jdbc:p6spy:mysql://192.168.10.250:3306/vue_pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
# username: root
# password: root
# bxg: # 农场数据源
# url: jdbc:p6spy:mysql://192.168.10.250:3306/vue_pro_bxg?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
# username: root
# password: root
# erp: # 进销存
# url: jdbc:p6spy:mysql://192.168.10.250:3306/vue_pro_erp?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
# username: root
# password: root
# farm: # 农场数据源
# url: jdbc:p6spy:mysql://192.168.10.250:3306/zsw-farm?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
# username: root
# password: root
datasource:
master:
url: jdbc:p6spy:mysql://192.168.10.250:3306/vue_pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
url: jdbc:p6spy:mysql://localhost:3306/vue_pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
username: root
password: root
password: 123456
slave: # 模拟从库,可根据自己需要修改
url: jdbc:p6spy:mysql://192.168.10.250:3306/vue_pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
url: jdbc:p6spy:mysql://localhost:3306/vue_pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
username: root
password: root
password: 123456
bxg: # 农场数据源
url: jdbc:p6spy:mysql://192.168.10.250:3306/vue_pro_bxg?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
url: jdbc:p6spy:mysql://localhost:3306/vue_pro_bxg?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
username: root
password: root
password: 123456
erp: # 进销存
url: jdbc:p6spy:mysql://192.168.10.250:3306/vue_pro_erp?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
url: jdbc:p6spy:mysql://localhost/vue_pro_erp?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
username: root
password: root
password: 123456
farm: # 农场数据源
url: jdbc:p6spy:mysql://192.168.10.250:3306/zsw-farm?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
url: jdbc:p6spy:mysql://localhost/zsw-farm?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
username: root
password: root
password: 123456
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis:
host: 192.168.10.250 # 地址
# host: 192.168.10.250 # 地址
host: 127.0.0.1 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
@ -244,7 +270,7 @@ dubbo:
bxg:
shop:
# API_URL: http://192.168.10.113:48080/bxgApp
API_URL: https://09cc-27-19-79-42.jp.ngrok.io
API_URL: https://d85a-113-57-54-241.jp.ngrok.io
SITE_URL: http://192.168.10.113:48080/bxgApp
UNI_SITE_URL: http://192.168.10.113:48080/bxgApp
ADMIN_API_URL: http://192.168.10.113:48080/bxg

4
zsw-bxg/src/main/java/co/yixiang/app/modules/shop/rest/BxgIndexController.java

@ -118,7 +118,7 @@ public class BxgIndexController {
.hotListDTOS(yxStoreHotListService.getList())//首页榜单
.bargainList(yxStoreBargainService.getList(1,10))//砍价活动列表
.seckillConfigVo(yxStoreSeckillService.getStoreSeckil())//秒杀配置
.yxStoreSeckillQueryVoList(yxStoreSeckillService.getIndexList())//秒杀商品
// .yxStoreSeckillQueryVoList(yxStoreSeckillService.getIndexList())//秒杀商品
.bastList(storeProductService.getList(1,100, ProductEnum.TYPE_1.getValue())) //精品推荐
.evaluationList(evaluationService.getList(1,5))
.benefit(storeProductService.getList(1,100,ProductEnum.TYPE_4.getValue())) //猜你喜欢
@ -129,7 +129,7 @@ public class BxgIndexController {
//菜单
.menus(systemGroupDataService.getDatas(ShopConstants.ZSW_HOME_MENUS))
.roll(systemGroupDataService.getDatas(ShopConstants.ZSW_HOME_ROLL_NEWS))
.seckillList(storeSeckillService.getList(1, 6))
.seckillList(storeSeckillService.getList(1, 4))//秒杀商品
.liveList(wechatLiveService.getList(1,4,0))
.build();
return ApiResult.ok(indexVo);

4
zsw-bxg/src/main/java/co/yixiang/app/modules/shop/vo/IndexVo.java

@ -40,8 +40,8 @@ public class IndexVo implements Serializable {
@ApiModelProperty("首页秒杀配置")
private SeckillConfigVo seckillConfigVo;
@ApiModelProperty("首页秒杀产品")
private List<YxStoreSeckillQueryVo> yxStoreSeckillQueryVoList;
// @ApiModelProperty("首页秒杀产品")
// private List<YxStoreSeckillQueryVo> yxStoreSeckillQueryVoList;
//首页按钮
@ApiModelProperty("首页按钮")
private List<JSONObject> menus;

1
zsw-bxg/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java

@ -219,6 +219,7 @@ public class YxStoreCombinationServiceImpl extends BaseServiceImpl<YxStoreCombin
YxStoreCombinationQueryVo yxStoreCombinationQueryVo = new YxStoreCombinationQueryVo();
YxStoreCombination yxStoreCombination=yxStoreCombinationMapper.selectById(i.getCid());
BeanUtils.copyProperties(yxStoreCombination, yxStoreCombinationQueryVo);
yxStoreCombinationQueryVo.setPinkId(i.getId());
return yxStoreCombinationQueryVo;
}).collect(Collectors.toList());
CombinationQueryVo combinationQueryVo = new CombinationQueryVo();

2
zsw-bxg/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java

@ -262,7 +262,7 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
Page<YxStoreSeckill> pageModel = new Page<>(page, limit);
LambdaQueryWrapper<YxStoreSeckill> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(YxStoreSeckill::getStatus, ShopCommonEnum.IS_STATUS_1.getValue())
.eq(YxStoreSeckill::getIsHot,1)
// .eq(YxStoreSeckill::getIsHot,1)
.le(YxStoreSeckill::getStartTime,nowTime)
.ge(YxStoreSeckill::getStopTime,nowTime)
.orderByDesc(YxStoreSeckill::getSort);

4
zsw-bxg/src/main/java/co/yixiang/modules/activity/vo/YxStoreCombinationQueryVo.java

@ -30,6 +30,9 @@ public class YxStoreCombinationQueryVo implements Serializable {
private Long id;
@ApiModelProperty(value = "团的id")
private Long pinkId;
@ApiModelProperty(value = "商品id")
private Long productId;
@ -101,6 +104,7 @@ public class YxStoreCombinationQueryVo implements Serializable {
@ApiModelProperty(value = "单位名")
private String unitName;
/** 是否单独分佣 */
@JsonProperty("is_sub")
private Integer isSub;

8
zsw-bxg/src/main/java/co/yixiang/modules/cart/service/impl/YxStoreCartServiceImpl.java

@ -204,6 +204,10 @@ public class YxStoreCartServiceImpl extends BaseServiceImpl<StoreCartMapper, YxS
storeCartQueryVo.setProductInfo(storeProduct);
//设置真实价格
//设置VIP价格
if (ObjectUtil.isNotNull(storeProduct.getIntegral())){
int integral=storeProduct.getIntegral();
storeCartQueryVo.setIntegral(integral);
}
double vipPrice = userService.setLevelPrice(
productAttrValue.getPrice().doubleValue(), uid);
//砍价金额
@ -234,6 +238,10 @@ public class YxStoreCartServiceImpl extends BaseServiceImpl<StoreCartMapper, YxS
//设置VIP价格,营销商品不参与
double vipPrice = userService.setLevelPrice(
storeProduct.getPrice().doubleValue(), uid);
if (ObjectUtil.isNotNull(storeProduct.getIntegral())){
int integral=storeProduct.getIntegral();
storeCartQueryVo.setIntegral(integral);
}
if (storeCart.getCombinationId() > 0 || storeCart.getSeckillId() > 0
|| storeCart.getBargainId() > 0) {
vipPrice = storeProduct.getPrice().doubleValue();

5
zsw-bxg/src/main/java/co/yixiang/modules/cart/vo/YxStoreCartQueryVo.java

@ -57,6 +57,11 @@ public class YxStoreCartQueryVo implements Serializable {
@JsonSerialize(using = DoubleSerializer.class)
private Double costPrice;
/** 需要多少积分兑换 */
@ApiModelProperty(value = "需要多少积分兑换 只在开启积分兑换时生效")
private Integer integral;
@ApiModelProperty(value = "真实价格")
@JsonSerialize(using = DoubleSerializer.class)
private Double truePrice;

66
zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java

@ -55,6 +55,7 @@ import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@ -121,10 +122,24 @@ public class StoreOrderController {
Pageable pageable,
@RequestParam(name = "orderStatus") String orderStatus,
@RequestParam(name = "orderType") String orderType) {
// String[] orderTypeList=orderType.split(",");
// Map<String,Object> result=new HashMap<>();
// for (String type : orderTypeList) {
// YxStoreOrderQueryCriteria newCriteria = this.handleQuery(criteria,orderStatus,type);
// Map<String,Object> result1=yxStoreOrderService.queryAll(newCriteria, pageable);
// if (result.isEmpty()){
// result.putAll(yxStoreOrderService.queryAll(newCriteria, pageable));
// }else {
// List<YxStoreOrderDto> storeOrderDTOS= (List<YxStoreOrderDto>) result.get("content");
// Long totalElements=(Long)result.get("totalElements")+(Long)result1.get("totalElements");
// storeOrderDTOS.addAll((List<YxStoreOrderDto>) result1.get("content"));
// result.put("content",storeOrderDTOS);
// result.put("totalElements",totalElements);
// }
// }
YxStoreOrderQueryCriteria newCriteria = this.handleQuery(criteria,orderStatus,orderType);
return new ResponseEntity<>(yxStoreOrderService.queryAll(newCriteria, pageable), HttpStatus.OK);
// return new ResponseEntity<>(result,HttpStatus.OK);
}
@ApiOperation(value = "根据订单id获取订单详情")
@ -419,29 +434,30 @@ public class StoreOrderController {
}
//订单类型查询
if (StrUtil.isNotEmpty(orderType)) {
switch (orderType) {
case "1":
criteria.setBargainId(0);
criteria.setCombinationId(0);
criteria.setSeckillId(0);
break;
case "2":
criteria.setNewCombinationId(0);
break;
case "3":
criteria.setNewSeckillId(0);
break;
case "4":
criteria.setNewBargainId(0);
break;
case "5":
criteria.setShippingType(2);
break;
case "6":
criteria.setPayIntegral(new BigDecimal("0.00"));
break;
default:
}
switch (orderType) {
case "1":
criteria.setBargainId(0);
criteria.setCombinationId(0);
criteria.setSeckillId(0);
break;
case "2":
criteria.setNewCombinationId(0);
break;
case "3":
criteria.setNewSeckillId(0);
break;
case "4":
criteria.setNewBargainId(0);
break;
case "5":
criteria.setShippingType(2);
break;
case "6":
criteria.setPayIntegral(new BigDecimal("0.00"));
break;
default:
}
}
return criteria;

3
zsw-bxg/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderQueryCriteria.java

@ -35,6 +35,9 @@ public class YxStoreOrderQueryCriteria{
@Query(type = Query.Type.INNER_LIKE)
private String userPhone;
@Query(type = Query.Type.INNER_LIKE)
private String userAddress;
@Query
private Integer paid;

Loading…
Cancel
Save