Merge remote-tracking branch 'origin/dev' into share-stock
This commit is contained in:
commit
3ecd9c216a
|
|
@ -1,37 +1,19 @@
|
||||||
/*
|
|
||||||
* Copyright 2019-2020 Zheng Jie
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package cn.ysk.cashier.controller.shop;
|
package cn.ysk.cashier.controller.shop;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
||||||
import cn.ysk.cashier.pojo.shop.TbShopUser;
|
import cn.ysk.cashier.pojo.shop.TbShopUser;
|
||||||
import cn.ysk.cashier.service.shop.TbShopUserService;
|
import cn.ysk.cashier.service.shop.TbShopUserService;
|
||||||
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
import io.swagger.annotations.Api;
|
||||||
import cn.ysk.cashier.vo.ShopUserInfoVo;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import com.alipay.api.domain.PageInfo;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import io.swagger.annotations.*;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://eladmin.vip
|
* @website https://eladmin.vip
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,10 @@ public class TbOrderDetail implements Serializable {
|
||||||
@ApiModelProperty(value = "打包费")
|
@ApiModelProperty(value = "打包费")
|
||||||
private BigDecimal packAmount;
|
private BigDecimal packAmount;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@ApiModelProperty(value = "退单数量")
|
||||||
|
private Integer refundNumber;
|
||||||
|
|
||||||
public void copy(TbOrderDetail source){
|
public void copy(TbOrderDetail source){
|
||||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,12 @@ public interface TbOrderDetailRepository extends JpaRepository<TbOrderDetail, In
|
||||||
@Query("SELECT cart FROM TbOrderDetail cart WHERE cart.orderId = :orderId")
|
@Query("SELECT cart FROM TbOrderDetail cart WHERE cart.orderId = :orderId")
|
||||||
List<TbOrderDetail> searchDetailByOrderId(@Param("orderId")Integer orderId);
|
List<TbOrderDetail> searchDetailByOrderId(@Param("orderId")Integer orderId);
|
||||||
|
|
||||||
|
@Query("SELECT cart FROM TbOrderDetail cart WHERE cart.orderId in :ids")
|
||||||
|
List<TbOrderDetail> searchDetailByOrderIds(@Param("ids")List<Integer> ids);
|
||||||
|
|
||||||
|
|
||||||
@Query("SELECT new cn.ysk.cashier.vo.TbOrderSalesCountByDayVo(" +
|
@Query("SELECT new cn.ysk.cashier.vo.TbOrderSalesCountByDayVo(" +
|
||||||
"info.productName, info.productSkuName, cate.name, unit.name," +
|
"info.productName, info.productSkuName, cate.name, unit.name,info.price," +
|
||||||
"SUM(CASE WHEN orders.orderType!='return' THEN info.num ELSE 0 END) as salesNum, " +
|
"SUM(CASE WHEN orders.orderType!='return' THEN info.num ELSE 0 END) as salesNum, " +
|
||||||
"SUM(CASE WHEN orders.orderType='return' THEN info.num ELSE 0 END), " +
|
"SUM(CASE WHEN orders.orderType='return' THEN info.num ELSE 0 END), " +
|
||||||
"SUM(info.num), " +
|
"SUM(info.num), " +
|
||||||
|
|
@ -56,7 +59,7 @@ public interface TbOrderDetailRepository extends JpaRepository<TbOrderDetail, In
|
||||||
|
|
||||||
|
|
||||||
@Query("SELECT new cn.ysk.cashier.vo.TbOrderSalesCountByDayVo(" +
|
@Query("SELECT new cn.ysk.cashier.vo.TbOrderSalesCountByDayVo(" +
|
||||||
"info.productName, info.productSkuName, cate.name, unit.name," +
|
"info.productName, info.productSkuName, cate.name, unit.name,info.price," +
|
||||||
"SUM(CASE WHEN orders.orderType!='return' THEN info.num ELSE 0 END) as salesNum, " +
|
"SUM(CASE WHEN orders.orderType!='return' THEN info.num ELSE 0 END) as salesNum, " +
|
||||||
"SUM(CASE WHEN orders.orderType='return' THEN info.num ELSE 0 END), " +
|
"SUM(CASE WHEN orders.orderType='return' THEN info.num ELSE 0 END), " +
|
||||||
"SUM(info.num), " +
|
"SUM(info.num), " +
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,10 @@ public interface TbOrderInfoRepository extends JpaRepository<TbOrderInfo, Intege
|
||||||
" created_at BETWEEN :startTime AND :endTime AND status='closed'AND order_type <>'return' GROUP BY pay_type" ,nativeQuery = true)
|
" created_at BETWEEN :startTime AND :endTime AND status='closed'AND order_type <>'return' GROUP BY pay_type" ,nativeQuery = true)
|
||||||
List<Object[]> countByShopId(@Param("shopId") String shopId, @Param("startTime") Long startTime, @Param("endTime") Long endTime);
|
List<Object[]> countByShopId(@Param("shopId") String shopId, @Param("startTime") Long startTime, @Param("endTime") Long endTime);
|
||||||
|
|
||||||
|
@Query("SELECT info FROM TbOrderInfo info WHERE info.source = :source AND info.shopId=:shopId")
|
||||||
|
List<TbOrderInfo> selTbOrdersBysource(@Param("source")Integer source,@Param("shopId") String shopId);
|
||||||
|
|
||||||
|
|
||||||
@Query("SELECT count(1) FROM TbOrderInfo WHERE source = :source AND shopId=:shopId")
|
@Query("SELECT count(1) FROM TbOrderInfo WHERE source = :source AND shopId=:shopId")
|
||||||
int isRefund(@Param("source")Integer source,@Param("shopId") String shopId);
|
int isRefund(@Param("source")Integer source,@Param("shopId") String shopId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -428,11 +428,12 @@ public class SummaryServiceImpl implements SummaryService {
|
||||||
map.put("商品名称", all.getProductName());
|
map.put("商品名称", all.getProductName());
|
||||||
map.put("单 位", all.getUnitName());
|
map.put("单 位", all.getUnitName());
|
||||||
map.put("商品规格", StringUtils.isBlank(all.getProductSkuName()) ? "" : all.getProductSkuName());
|
map.put("商品规格", StringUtils.isBlank(all.getProductSkuName()) ? "" : all.getProductSkuName());
|
||||||
|
map.put("销 售 额", all.getSalesAmount());
|
||||||
map.put("销 量", all.getSalesNum());
|
map.put("销 量", all.getSalesNum());
|
||||||
map.put("退单量", all.getRefNum());
|
map.put("单 价", all.getPrice());
|
||||||
map.put("销售额", all.getSalesAmount());
|
map.put("退 单 量", all.getRefNum());
|
||||||
map.put("退单额", all.getRefAmount());
|
map.put("退 单 额", all.getRefAmount().compareTo(BigDecimal.ZERO)==0?all.getRefAmount():"-"+all.getRefAmount());
|
||||||
map.put("总 量", all.getNum());
|
map.put("总 量", all.getNum()-all.getRefNum());
|
||||||
list.add(map);
|
list.add(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -464,8 +465,8 @@ public class SummaryServiceImpl implements SummaryService {
|
||||||
list.add(refCount);
|
list.add(refCount);
|
||||||
|
|
||||||
TbOrderSalesCountByDayVo numCount = detailRepository.queryTbOrderSalesCount(Integer.valueOf(shopId), startTime, endTime);
|
TbOrderSalesCountByDayVo numCount = detailRepository.queryTbOrderSalesCount(Integer.valueOf(shopId), startTime, endTime);
|
||||||
TbOrderPayCountVo salesNum =new TbOrderPayCountVo("el-icon-goods","销售量","0",numCount.getSalesNum());
|
TbOrderPayCountVo salesNum =new TbOrderPayCountVo("el-icon-goods","销售量","0",numCount.getSalesNum()-numCount.getRefNum());
|
||||||
TbOrderPayCountVo refNum =new TbOrderPayCountVo("el-icon-goods","销售量","0",numCount.getRefNum());
|
TbOrderPayCountVo refNum =new TbOrderPayCountVo("el-icon-goods","退单量","0",numCount.getRefNum());
|
||||||
list.add(salesNum);
|
list.add(salesNum);
|
||||||
list.add(refNum);
|
list.add(refNum);
|
||||||
return list;
|
return list;
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,6 @@ public class TbOrderInfoServiceImpl implements TbOrderInfoService {
|
||||||
criteria.setOrderType(null);
|
criteria.setOrderType(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Page<TbOrderInfo> page = tbOrderInfoRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder), pageable);
|
|
||||||
Page<TbOrderInfo> page = tbOrderInfoRepository.findAll((root, criteriaQuery, criteriaBuilder) -> {
|
Page<TbOrderInfo> page = tbOrderInfoRepository.findAll((root, criteriaQuery, criteriaBuilder) -> {
|
||||||
Predicate predicate = QueryHelp.getPredicate(root, criteria, criteriaBuilder);
|
Predicate predicate = QueryHelp.getPredicate(root, criteria, criteriaBuilder);
|
||||||
// 追加校验参数 status不为空 且 source不为空 不查询状态为 "refund" 的
|
// 追加校验参数 status不为空 且 source不为空 不查询状态为 "refund" 的
|
||||||
|
|
@ -91,16 +90,29 @@ public class TbOrderInfoServiceImpl implements TbOrderInfoService {
|
||||||
List<TbOrderInfoVo> orderInfoVoList = new ArrayList<>();
|
List<TbOrderInfoVo> orderInfoVoList = new ArrayList<>();
|
||||||
for (TbOrderInfo tbOrderInfo : page.getContent()) {
|
for (TbOrderInfo tbOrderInfo : page.getContent()) {
|
||||||
TbOrderInfoVo orderInfoVo = new TbOrderInfoVo();
|
TbOrderInfoVo orderInfoVo = new TbOrderInfoVo();
|
||||||
List<TbOrderDetail> details = tbOrderDetailRepository.searchDetailByOrderId(tbOrderInfo.getId());
|
|
||||||
BigDecimal refundAmount = BigDecimal.ZERO;
|
BigDecimal refundAmount = BigDecimal.ZERO;
|
||||||
for (TbOrderDetail detail : details) {
|
List<TbOrderDetail> details = tbOrderDetailRepository.searchDetailByOrderId(tbOrderInfo.getId());
|
||||||
if (tbOrderInfo.getStatus().equals("refund")) {
|
if (!tbOrderInfo.getOrderType().equals("return")) {
|
||||||
refundAmount = refundAmount.add(detail.getPriceAmount());
|
List<TbOrderInfo> tbOrderInfos = tbOrderInfoRepository.selTbOrdersBysource(tbOrderInfo.getId(), tbOrderInfo.getShopId());
|
||||||
|
Map<Integer, Integer> map;
|
||||||
|
if (!CollectionUtils.isEmpty(tbOrderInfos)) {
|
||||||
|
List<Integer> ids = tbOrderInfos.stream().map(TbOrderInfo::getId).collect(Collectors.toList());
|
||||||
|
List<TbOrderDetail> refundOrderDetail = tbOrderDetailRepository.searchDetailByOrderIds(ids);
|
||||||
|
map = refundOrderDetail.stream().collect(Collectors.groupingBy(TbOrderDetail::getProductSkuId, Collectors.summingInt(TbOrderDetail::getNum)));
|
||||||
|
refundAmount = tbOrderInfos.stream().map(TbOrderInfo::getOrderAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
} else {
|
} else {
|
||||||
if (detail.getStatus().equals("refund")) {
|
map = new HashMap<>();
|
||||||
refundAmount = refundAmount.add(detail.getPriceAmount());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
details.parallelStream().forEach(detail -> {
|
||||||
|
Integer refundNumber = map.get(detail.getProductSkuId());
|
||||||
|
if (refundNumber != null) {
|
||||||
|
detail.setRefundNumber(refundNumber);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
details.parallelStream().forEach(detail -> {
|
||||||
|
detail.setRefundNumber(detail.getNum());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
orderInfoVo.setDetailList(details);
|
orderInfoVo.setDetailList(details);
|
||||||
BeanUtils.copyProperties(tbOrderInfo, orderInfoVo);
|
BeanUtils.copyProperties(tbOrderInfo, orderInfoVo);
|
||||||
|
|
@ -127,7 +139,9 @@ public class TbOrderInfoServiceImpl implements TbOrderInfoService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbOrderPayCountVo> payCountVoList = tbOrderInfoRepository.queryTbOrderPayCount(criteria.getShopId(), start, end);
|
List<TbOrderPayCountVo> payCountVoList = tbOrderInfoRepository.queryTbOrderPayCount(criteria.getShopId(), start, end);
|
||||||
|
BigDecimal totalPayAmount = BigDecimal.ZERO;
|
||||||
for (TbOrderPayCountVo payCount : payCountVoList) {
|
for (TbOrderPayCountVo payCount : payCountVoList) {
|
||||||
|
totalPayAmount = totalPayAmount.add(new BigDecimal(payCount.getPayAmount().toString()));
|
||||||
if (StringUtils.isNotBlank(payCount.getPayType())) {
|
if (StringUtils.isNotBlank(payCount.getPayType())) {
|
||||||
TbShopPayType byPayType = payTypeRepository.findByPayType(payCount.getPayType(), criteria.getShopId());
|
TbShopPayType byPayType = payTypeRepository.findByPayType(payCount.getPayType(), criteria.getShopId());
|
||||||
if (byPayType != null) {
|
if (byPayType != null) {
|
||||||
|
|
@ -143,10 +157,12 @@ public class TbOrderInfoServiceImpl implements TbOrderInfoService {
|
||||||
}
|
}
|
||||||
TbOrderPayCountVo payRufund = tbOrderInfoRepository.queryTbOrderRefund(criteria.getShopId(), start, end);
|
TbOrderPayCountVo payRufund = tbOrderInfoRepository.queryTbOrderRefund(criteria.getShopId(), start, end);
|
||||||
if (payRufund != null) {
|
if (payRufund != null) {
|
||||||
|
totalPayAmount = totalPayAmount.subtract(new BigDecimal(payRufund.getPayAmount().toString()));
|
||||||
payRufund.setPayType("退单");
|
payRufund.setPayType("退单");
|
||||||
payRufund.setIcon("https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/20240319/5741608662244b878762c61bb37c95c9.png");
|
payRufund.setIcon("https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/20240319/5741608662244b878762c61bb37c95c9.png");
|
||||||
result.add(payRufund);
|
result.add(payRufund);
|
||||||
}
|
}
|
||||||
|
result.add(0, new TbOrderPayCountVo("https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/20240625/fa0e5b24884d4ac2a18973b3855e5309.png", "总金额", null, totalPayAmount));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -189,28 +205,19 @@ public class TbOrderInfoServiceImpl implements TbOrderInfoService {
|
||||||
dto.setPayType(tbOrderInfo.getSendType());
|
dto.setPayType(tbOrderInfo.getSendType());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
if (dto.getStatus().equals("refund")) {
|
if (dto.getStatus().equals("refund")) {
|
||||||
dto.setPayType("退单");
|
dto.setPayType("退单");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbOrderDetail> details = tbOrderDetailRepository.searchDetailByOrderId(tbOrderInfo.getId());
|
List<TbOrderDetail> details = tbOrderDetailRepository.searchDetailByOrderId(tbOrderInfo.getId());
|
||||||
dto.setIsRefund(0);
|
dto.setIsRefund(0);
|
||||||
BigDecimal refundAmount = BigDecimal.ZERO;
|
dto.setRefundAmount(BigDecimal.ZERO);
|
||||||
for (TbOrderDetail detail : details) {
|
List<TbOrderInfo> tbOrderInfos = tbOrderInfoRepository.selTbOrdersBysource(tbOrderInfo.getId(), tbOrderInfo.getShopId());
|
||||||
if (tbOrderInfo.getStatus().equals("refund")) {
|
if(!CollectionUtils.isEmpty(tbOrderInfos)){
|
||||||
refundAmount = refundAmount.add(detail.getPriceAmount());
|
|
||||||
} else {
|
|
||||||
if (detail.getStatus().equals("refund")) {
|
|
||||||
refundAmount = refundAmount.add(detail.getPriceAmount());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int refund = tbOrderInfoRepository.isRefund(id, tbOrderInfo.getShopId());
|
|
||||||
if (refund > 0) {
|
|
||||||
dto.setIsRefund(1);
|
dto.setIsRefund(1);
|
||||||
|
dto.setRefundAmount(tbOrderInfos.stream().map(TbOrderInfo::getOrderAmount).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||||
}
|
}
|
||||||
dto.setRefundAmount(refundAmount);
|
|
||||||
dto.setDetailList(details);
|
dto.setDetailList(details);
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,9 @@
|
||||||
/*
|
|
||||||
* Copyright 2019-2020 Zheng Jie
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package cn.ysk.cashier.service.impl.shopimpl;
|
package cn.ysk.cashier.service.impl.shopimpl;
|
||||||
|
|
||||||
import cn.ysk.cashier.dto.shop.TbShopUserDto;
|
import cn.ysk.cashier.dto.shop.TbShopUserDto;
|
||||||
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
||||||
import cn.ysk.cashier.mapper.shop.TbShopUserMapper;
|
import cn.ysk.cashier.mapper.shop.TbShopUserMapper;
|
||||||
import cn.ysk.cashier.mybatis.entity.TbUserStorage;
|
|
||||||
import cn.ysk.cashier.mybatis.mapper.ShopUserMapper;
|
import cn.ysk.cashier.mybatis.mapper.ShopUserMapper;
|
||||||
import cn.ysk.cashier.mybatis.mapper.TagProductDeptsMapper;
|
|
||||||
import cn.ysk.cashier.pojo.shop.TbShopUser;
|
import cn.ysk.cashier.pojo.shop.TbShopUser;
|
||||||
import cn.ysk.cashier.repository.shop.TbShopUserRepository;
|
import cn.ysk.cashier.repository.shop.TbShopUserRepository;
|
||||||
import cn.ysk.cashier.service.shop.TbShopUserService;
|
import cn.ysk.cashier.service.shop.TbShopUserService;
|
||||||
|
|
@ -29,7 +12,6 @@ import cn.ysk.cashier.utils.PageUtil;
|
||||||
import cn.ysk.cashier.utils.QueryHelp;
|
import cn.ysk.cashier.utils.QueryHelp;
|
||||||
import cn.ysk.cashier.utils.ValidationUtil;
|
import cn.ysk.cashier.utils.ValidationUtil;
|
||||||
import cn.ysk.cashier.vo.ShopUserInfoVo;
|
import cn.ysk.cashier.vo.ShopUserInfoVo;
|
||||||
import com.alipay.api.domain.PageInfo;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,8 @@
|
||||||
/*
|
|
||||||
* Copyright 2019-2020 Zheng Jie
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package cn.ysk.cashier.service.shop;
|
package cn.ysk.cashier.service.shop;
|
||||||
|
|
||||||
import cn.ysk.cashier.pojo.shop.TbShopUser;
|
import cn.ysk.cashier.pojo.shop.TbShopUser;
|
||||||
import cn.ysk.cashier.dto.shop.TbShopUserDto;
|
import cn.ysk.cashier.dto.shop.TbShopUserDto;
|
||||||
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
||||||
import cn.ysk.cashier.vo.ShopUserInfoVo;
|
|
||||||
import com.alipay.api.domain.PageInfo;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ public class TbOrderSalesCountByDayVo {
|
||||||
private String productSkuName;
|
private String productSkuName;
|
||||||
private String cateName;
|
private String cateName;
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
private BigDecimal price;
|
||||||
private Long salesNum;
|
private Long salesNum;
|
||||||
private Long refNum;
|
private Long refNum;
|
||||||
private BigDecimal salesAmount;
|
private BigDecimal salesAmount;
|
||||||
|
|
@ -86,20 +87,37 @@ public class TbOrderSalesCountByDayVo {
|
||||||
this.unitName = unitName;
|
this.unitName = unitName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public BigDecimal getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(BigDecimal price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
public TbOrderSalesCountByDayVo(Long salesNum, Long refNum) {
|
public TbOrderSalesCountByDayVo(Long salesNum, Long refNum) {
|
||||||
this.salesNum = salesNum;
|
this.salesNum = salesNum;
|
||||||
this.refNum = refNum;
|
this.refNum = refNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TbOrderSalesCountByDayVo(String productName, String productSkuName, String cateName,String unitName, Long salesNum, Long refNum, Long num, BigDecimal salesAmount, BigDecimal refAmount) {
|
public TbOrderSalesCountByDayVo(String productName, String productSkuName, String cateName,String unitName,BigDecimal price,
|
||||||
|
Long salesNum, Long refNum, Long num, BigDecimal salesAmount, BigDecimal refAmount) {
|
||||||
this.productName = productName;
|
this.productName = productName;
|
||||||
this.productSkuName = productSkuName;
|
this.productSkuName = productSkuName;
|
||||||
this.cateName = cateName;
|
this.cateName = cateName;
|
||||||
this.unitName = unitName;
|
this.unitName = unitName;
|
||||||
|
this.price = price;
|
||||||
this.salesNum = salesNum;
|
this.salesNum = salesNum;
|
||||||
this.refNum = refNum;
|
this.refNum = refNum;
|
||||||
this.salesAmount = salesAmount;
|
this.salesAmount = salesAmount;
|
||||||
this.refAmount = refAmount;
|
this.refAmount = refAmount;
|
||||||
this.num = num;
|
this.num = num;
|
||||||
|
count();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void count(){
|
||||||
|
salesNum=salesNum-refNum;
|
||||||
|
salesAmount=salesAmount.subtract(refAmount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,6 @@ spring:
|
||||||
url: jdbc:mysql://101.37.12.135:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
|
url: jdbc:mysql://101.37.12.135:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
|
||||||
username: fycashier
|
username: fycashier
|
||||||
password: Twc6MrzzjBiWSsjh
|
password: Twc6MrzzjBiWSsjh
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
|
|
||||||
# username: root
|
|
||||||
# password: gongyijieqp002
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
|
|
|
||||||
|
|
@ -38,23 +38,16 @@ spring:
|
||||||
# port: ${REDIS_PORT:6379}
|
# port: ${REDIS_PORT:6379}
|
||||||
# password: ${REDIS_PWD:111111}
|
# password: ${REDIS_PWD:111111}
|
||||||
|
|
||||||
# redis:
|
|
||||||
# #数据库索引
|
|
||||||
# database: ${REDIS_DB:0}
|
|
||||||
# host: ${REDIS_HOST:127.0.0.1}
|
|
||||||
# port: ${REDIS_PORT:6379}
|
|
||||||
# password: ${REDIS_PWD:111111}
|
|
||||||
# #连接超时时间
|
|
||||||
# timeout: 5000
|
|
||||||
redis:
|
redis:
|
||||||
#数据库索引
|
#数据库索引
|
||||||
database: 0
|
database: ${REDIS_DB:0}
|
||||||
host: 127.0.0.1
|
host: ${REDIS_HOST:127.0.0.1}
|
||||||
port: 6379
|
port: ${REDIS_PORT:6379}
|
||||||
password:
|
password: ${REDIS_PWD:111111}
|
||||||
#连接超时时间
|
#连接超时时间
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
|
|
||||||
|
|
||||||
task:
|
task:
|
||||||
pool:
|
pool:
|
||||||
# 核心线程池大小
|
# 核心线程池大小
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
<groupId>cn.ysk.cashier</groupId>
|
<groupId>cn.ysk.cashier</groupId>
|
||||||
<artifactId>oss-service</artifactId>
|
<artifactId>oss-service</artifactId>
|
||||||
<version>2.6</version>
|
<version>2.6</version>
|
||||||
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--支付宝依赖-->
|
<!--支付宝依赖-->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
@ -44,11 +45,5 @@
|
||||||
<artifactId>alipay-sdk-java</artifactId>
|
<artifactId>alipay-sdk-java</artifactId>
|
||||||
<version>${alipay.version}</version>
|
<version>${alipay.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>cn.ysk.cashier</groupId>
|
|
||||||
<artifactId>oss-service</artifactId>
|
|
||||||
<version>2.6</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue