Merge remote-tracking branch 'origin/v3.3'
# Conflicts: # pom.xml
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>yshop</artifactId>
|
||||
<groupId>co.yixiang</groupId>
|
||||
<version>3.2</version>
|
||||
<version>3.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>co.yixiang</groupId>
|
||||
<artifactId>yshop-tools</artifactId>
|
||||
<version>3.2</version>
|
||||
<version>3.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
@ -37,11 +37,12 @@ public interface YxStoreBargainUserHelpService extends BaseService<YxStoreBargai
|
||||
|
||||
/**
|
||||
* 获取砍价帮总人数
|
||||
* @param bargainId 砍价产品ID
|
||||
*
|
||||
* @param bargainId 砍价产品ID
|
||||
* @param bargainUserUid 用户参与砍价表id
|
||||
* @return int
|
||||
*/
|
||||
int getBargainUserHelpPeopleCount(Long bargainId,Long bargainUserUid);
|
||||
Long getBargainUserHelpPeopleCount(Long bargainId,Long bargainUserUid);
|
||||
|
||||
|
||||
}
|
||||
|
@ -79,11 +79,12 @@ public interface YxStoreBargainUserService extends BaseService<YxStoreBargainUse
|
||||
|
||||
/**
|
||||
* 获取参与砍价的用户数量
|
||||
*
|
||||
* @param bargainId 砍价id
|
||||
* @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功
|
||||
* @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功
|
||||
* @return int
|
||||
*/
|
||||
int getBargainUserCount(Long bargainId,Integer status);
|
||||
Long getBargainUserCount(Long bargainId,Integer status);
|
||||
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public interface YxStoreCouponUserService extends BaseService<YxStoreCouponUser>
|
||||
* @param uid uid
|
||||
* @return int
|
||||
*/
|
||||
int getUserValidCouponCount(Long uid);
|
||||
Long getUserValidCouponCount(Long uid);
|
||||
|
||||
void useCoupon(int id);
|
||||
|
||||
|
@ -55,10 +55,11 @@ public interface YxStorePinkService extends BaseService<YxStorePink>{
|
||||
|
||||
/**
|
||||
* 返回正在拼团的人数
|
||||
*
|
||||
* @param id 拼团id
|
||||
* @return int
|
||||
*/
|
||||
int pinkIngCount(Long id);
|
||||
Long pinkIngCount(Long id);
|
||||
|
||||
/**
|
||||
* 创建拼团
|
||||
|
@ -46,13 +46,13 @@ public class YxStoreCombinationDto implements Serializable {
|
||||
private List<String> sliderImage;
|
||||
|
||||
//参与人数
|
||||
private Integer countPeopleAll;
|
||||
private Long countPeopleAll;
|
||||
|
||||
//成团人数
|
||||
private Integer countPeoplePink;
|
||||
private Long countPeoplePink;
|
||||
|
||||
//访问人数
|
||||
private Integer countPeopleBrowse;
|
||||
private Long countPeopleBrowse;
|
||||
|
||||
// 活动标题
|
||||
private String title;
|
||||
|
@ -81,5 +81,5 @@ public class YxStorePinkDto implements Serializable {
|
||||
/**
|
||||
* 参团人数
|
||||
*/
|
||||
private int countPeople;
|
||||
private Long countPeople;
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
|
||||
if(storeBargainUser == null) {
|
||||
return BargainCountVo
|
||||
.builder()
|
||||
.count(0)
|
||||
.count(0L)
|
||||
.alreadyPrice(0d)
|
||||
.status(0)
|
||||
.pricePercent(0)
|
||||
@ -216,7 +216,7 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
|
||||
}
|
||||
|
||||
|
||||
int helpCount = storeBargainUserHelpService.lambdaQuery()
|
||||
Long helpCount = storeBargainUserHelpService.lambdaQuery()
|
||||
.eq(YxStoreBargainUserHelp::getBargainUserId,storeBargainUser.getId())
|
||||
.eq(YxStoreBargainUserHelp::getBargainId,bargainId)
|
||||
.eq(YxStoreBargainUserHelp::getUid,myUid)
|
||||
@ -227,7 +227,7 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
|
||||
}
|
||||
|
||||
|
||||
int count = storeBargainUserHelpService
|
||||
Long count = storeBargainUserHelpService
|
||||
.getBargainUserHelpPeopleCount(bargainId,storeBargainUser.getId());
|
||||
//用户可以砍掉的价格
|
||||
double diffPrice = NumberUtil.sub(storeBargainUser.getBargainPrice()
|
||||
@ -345,7 +345,7 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
|
||||
* @param bargainId 砍价id
|
||||
* @return int
|
||||
*/
|
||||
private int getBargainPayCount(Long bargainId) {
|
||||
private Long getBargainPayCount(Long bargainId) {
|
||||
return storeOrderService.lambdaQuery().eq(YxStoreOrder::getBargainId,bargainId)
|
||||
.eq(YxStoreOrder::getPaid,OrderInfoEnum.PAY_STATUS_1.getValue())
|
||||
.eq(YxStoreOrder::getRefundStatus,OrderInfoEnum.REFUND_STATUS_0.getValue())
|
||||
|
@ -92,12 +92,13 @@ public class YxStoreBargainUserHelpServiceImpl extends BaseServiceImpl<YxStoreBa
|
||||
|
||||
/**
|
||||
* 获取砍价帮总人数
|
||||
* @param bargainId 砍价产品ID
|
||||
*
|
||||
* @param bargainId 砍价产品ID
|
||||
* @param bargainUserUid 用户参与砍价表id
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
public int getBargainUserHelpPeopleCount(Long bargainId, Long bargainUserUid) {
|
||||
public Long getBargainUserHelpPeopleCount(Long bargainId, Long bargainUserUid) {
|
||||
return this.lambdaQuery()
|
||||
.eq(YxStoreBargainUserHelp::getBargainUserId,bargainUserUid)
|
||||
.eq(YxStoreBargainUserHelp::getBargainId,bargainId)
|
||||
|
@ -128,7 +128,7 @@ public class YxStoreBargainUserServiceImpl extends BaseServiceImpl<YxStoreBargai
|
||||
if(ObjectUtil.isNull(storeBargainUser) || ObjectUtil.isNull(storeBargain)){
|
||||
return false;
|
||||
}
|
||||
int count = storeBargainUserHelpService.lambdaQuery()
|
||||
Long count = storeBargainUserHelpService.lambdaQuery()
|
||||
.eq(YxStoreBargainUserHelp::getBargainId,bargainId)
|
||||
.eq(YxStoreBargainUserHelp::getBargainUserId,storeBargainUser.getId())
|
||||
.eq(YxStoreBargainUserHelp::getUid,uid)
|
||||
@ -197,12 +197,13 @@ public class YxStoreBargainUserServiceImpl extends BaseServiceImpl<YxStoreBargai
|
||||
|
||||
/**
|
||||
* 获取参与砍价的用户数量
|
||||
*
|
||||
* @param bargainId 砍价id
|
||||
* @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功
|
||||
* @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
public int getBargainUserCount(Long bargainId, Integer status) {
|
||||
public Long getBargainUserCount(Long bargainId, Integer status) {
|
||||
return this.lambdaQuery().eq(YxStoreBargainUser::getBargainId,bargainId)
|
||||
.eq(YxStoreBargainUser::getStatus,status).count();
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ public class YxStoreCombinationServiceImpl extends BaseServiceImpl<YxStoreCombin
|
||||
//评价
|
||||
storeCombinationVo.setReply(replyService
|
||||
.getReply(storeCombinationQueryVo.getProductId()));
|
||||
int replyCount = replyService.productReplyCount(storeCombinationQueryVo.getProductId());
|
||||
Long replyCount = replyService.productReplyCount(storeCombinationQueryVo.getProductId());
|
||||
//总条数
|
||||
storeCombinationVo.setReplyCount(replyCount);
|
||||
//好评比例
|
||||
|
@ -72,7 +72,7 @@ public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl<YxStoreCoupon
|
||||
throw new YshopException("领取的优惠劵已领完或已过期");
|
||||
}
|
||||
|
||||
int count = this.couponCount(id,uid);
|
||||
Long count = this.couponCount(id,uid);
|
||||
if(count > 0) {
|
||||
throw new YshopException("已领取过该优惠劵");
|
||||
}
|
||||
@ -110,7 +110,7 @@ public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl<YxStoreCoupon
|
||||
List<YxStoreCouponIssueQueryVo> list = yxStoreCouponIssueMapper
|
||||
.selecCoupontList(pageModel,type,productId);
|
||||
for (YxStoreCouponIssueQueryVo couponIssue : list) {
|
||||
int count = this.couponCount(couponIssue.getId(),uid);
|
||||
Long count = this.couponCount(couponIssue.getId(),uid);
|
||||
if(count > 0){
|
||||
couponIssue.setIsUse(true);
|
||||
}else{
|
||||
@ -128,7 +128,7 @@ public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl<YxStoreCoupon
|
||||
* @param uid 用户id
|
||||
* @return int
|
||||
*/
|
||||
private int couponCount(Integer id, Long uid) {
|
||||
private Long couponCount(Integer id, Long uid) {
|
||||
return storeCouponIssueUserService.lambdaQuery()
|
||||
.eq(YxStoreCouponIssueUser::getUid,uid)
|
||||
.eq(YxStoreCouponIssueUser::getIssueCouponId,id)
|
||||
|
@ -72,11 +72,12 @@ public class YxStoreCouponUserServiceImpl extends BaseServiceImpl<YxStoreCouponU
|
||||
|
||||
/**
|
||||
* 获取当前用户优惠券数量
|
||||
*
|
||||
* @param uid uid
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
public int getUserValidCouponCount(Long uid) {
|
||||
public Long getUserValidCouponCount(Long uid) {
|
||||
this.checkInvalidCoupon();
|
||||
return this.lambdaQuery()
|
||||
.eq(YxStoreCouponUser::getStatus, CouponEnum.STATUS_0.getValue())
|
||||
|
@ -270,11 +270,12 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
|
||||
|
||||
/**
|
||||
* 返回正在拼团的人数
|
||||
*
|
||||
* @param id 拼团id
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
public int pinkIngCount(Long id) {
|
||||
public Long pinkIngCount(Long id) {
|
||||
return this.lambdaQuery()
|
||||
.eq(YxStorePink::getId,id)
|
||||
.eq(YxStorePink::getStatus,OrderInfoEnum.PINK_STATUS_1.getValue())
|
||||
@ -291,7 +292,7 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
|
||||
YxStoreCombination storeCombination = combinationService.getById(order.getCombinationId());
|
||||
order = storeOrderService.handleOrder(order);
|
||||
YxStoreCart storeCart = yxStoreCartService.getById(order.getCartId());
|
||||
int pinkCount = yxStorePinkMapper.selectCount(Wrappers.<YxStorePink>lambdaQuery()
|
||||
Long pinkCount = yxStorePinkMapper.selectCount(Wrappers.<YxStorePink>lambdaQuery()
|
||||
.eq(YxStorePink::getOrderId,order.getOrderId()));
|
||||
if(pinkCount > 0) {
|
||||
return;
|
||||
@ -363,7 +364,7 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
|
||||
*/
|
||||
@Override
|
||||
public boolean getIsPinkUid(Long id, Long uid) {
|
||||
int count = this.lambdaQuery()
|
||||
Long count = this.lambdaQuery()
|
||||
.eq(YxStorePink::getIsRefund, OrderInfoEnum.PINK_REFUND_STATUS_0.getValue())
|
||||
.eq(YxStorePink::getUid,uid)
|
||||
.and(i->i.eq(YxStorePink::getKId,id).or().eq(YxStorePink::getId,id))
|
||||
@ -503,7 +504,7 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
|
||||
* @return boolean
|
||||
*/
|
||||
private boolean getPinkStatus(List<Long> idAll) {
|
||||
int count = this.lambdaQuery().in(YxStorePink::getId,idAll)
|
||||
Long count = this.lambdaQuery().in(YxStorePink::getId,idAll)
|
||||
.eq(YxStorePink::getIsRefund,OrderInfoEnum.PINK_REFUND_STATUS_1.getValue())
|
||||
.count();
|
||||
if(count == 0) {
|
||||
@ -631,12 +632,12 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
|
||||
* @param people 当前满足拼团的人数
|
||||
* @return int
|
||||
*/
|
||||
private int getPinkPeople(Long kid, int people) {
|
||||
private Long getPinkPeople(Long kid, int people) {
|
||||
LambdaQueryWrapper<YxStorePink> wrapper= new LambdaQueryWrapper<>();
|
||||
wrapper.eq(YxStorePink::getKId,kid)
|
||||
.eq(YxStorePink::getIsRefund, OrderInfoEnum.PINK_REFUND_STATUS_0.getValue());
|
||||
//加上团长自己
|
||||
int count = yxStorePinkMapper.selectCount(wrapper) + 1;
|
||||
Long count = yxStorePinkMapper.selectCount(wrapper) + 1;
|
||||
return people - count;
|
||||
}
|
||||
|
||||
@ -657,7 +658,7 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
|
||||
i.setUserImg(yxUser.getAvatar());
|
||||
i.setProduct(storeCombination.getTitle());
|
||||
i.setImage(storeCombination.getImage());
|
||||
i.setCountPeople( this.count(new LambdaQueryWrapper<YxStorePink>().eq(YxStorePink::getCid,i.getCid())));
|
||||
i.setCountPeople(this.count(new LambdaQueryWrapper<YxStorePink>().eq(YxStorePink::getCid,i.getCid())));
|
||||
});
|
||||
map.put("content", yxStorePinkDtos);
|
||||
map.put("totalElements", page.getTotal());
|
||||
|
@ -14,7 +14,7 @@ import java.io.Serializable;
|
||||
@Builder
|
||||
public class BargainCountVo implements Serializable {
|
||||
private Double alreadyPrice;
|
||||
private Integer count;
|
||||
private Long count;
|
||||
private Integer pricePercent;
|
||||
private Integer status;
|
||||
private Double price; //剩余的砍价金额
|
||||
|
@ -17,5 +17,5 @@ import java.io.Serializable;
|
||||
public class BargainVo implements Serializable {
|
||||
private YxStoreBargainQueryVo bargain;
|
||||
private YxUserQueryVo userInfo;
|
||||
private Integer bargainSumCount;//砍价支付成功订单数量
|
||||
private Long bargainSumCount;//砍价支付成功订单数量
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class PinkInfoVo implements Serializable {
|
||||
private String storeCombinationHost;
|
||||
|
||||
@ApiModelProperty(value = "是否在团内 0不在 1在")
|
||||
private Integer userBool = 0;
|
||||
private Integer userBool;
|
||||
|
||||
@ApiModelProperty(value = "拼团用户信息")
|
||||
private YxUserQueryVo userInfo;
|
||||
|
@ -41,7 +41,7 @@ public class StoreCombinationVo implements Serializable {
|
||||
private YxStoreProductReplyQueryVo reply;
|
||||
|
||||
@ApiModelProperty(value = "拼团评论总条数")
|
||||
private Integer replyCount = 0;
|
||||
private Long replyCount;
|
||||
|
||||
@ApiModelProperty(value = "拼团好评比例")
|
||||
private String replyChance;
|
||||
|
@ -31,7 +31,7 @@ public class StoreSeckillVo implements Serializable {
|
||||
private YxStoreProductReplyQueryVo reply;
|
||||
|
||||
@ApiModelProperty(value = "秒杀产品评论数量")
|
||||
private Integer replyCount;
|
||||
private Long replyCount;
|
||||
|
||||
@ApiModelProperty(value = "秒杀产品信息")
|
||||
private YxStoreSeckillQueryVo storeInfo;
|
||||
|
@ -15,7 +15,7 @@ import java.io.Serializable;
|
||||
public class TopCountVo implements Serializable {
|
||||
private Integer lookCount;
|
||||
private Integer shareCount;
|
||||
private Integer userCount;
|
||||
private Long userCount;
|
||||
|
||||
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ public class YxStoreBargainQueryVo implements Serializable {
|
||||
private Integer share;
|
||||
|
||||
@ApiModelProperty(value = "砍价产品参与人数")
|
||||
private Integer people;
|
||||
private Long people;
|
||||
|
||||
|
||||
}
|
||||
|
@ -72,6 +72,6 @@ public class YxStoreCartQueryVo implements Serializable {
|
||||
private String unique;
|
||||
|
||||
@ApiModelProperty(value = "是否评价")
|
||||
private Integer isReply;
|
||||
private Long isReply;
|
||||
|
||||
}
|
||||
|
@ -26,8 +26,8 @@ public class OrderTimeDataDto implements Serializable {
|
||||
private Integer lastWeekCount;//上周
|
||||
private Double lastWeekPrice; //上周
|
||||
|
||||
private Integer userCount;
|
||||
private Integer orderCount;
|
||||
private Long userCount;
|
||||
private Long orderCount;
|
||||
private Double priceCount;
|
||||
private Integer goodsCount;
|
||||
private Long goodsCount;
|
||||
}
|
||||
|
@ -75,9 +75,9 @@ import co.yixiang.modules.user.service.YxUserLevelService;
|
||||
import co.yixiang.modules.user.service.YxUserService;
|
||||
import co.yixiang.modules.user.service.dto.YxUserDto;
|
||||
import co.yixiang.modules.user.vo.YxUserQueryVo;
|
||||
import co.yixiang.tools.domain.AlipayConfig;
|
||||
import co.yixiang.tools.domain.vo.TradeVo;
|
||||
import co.yixiang.tools.service.AlipayConfigService;
|
||||
import co.yixiang.modules.tools.domain.AlipayConfig;
|
||||
import co.yixiang.modules.tools.domain.vo.TradeVo;
|
||||
import co.yixiang.modules.tools.service.AlipayConfigService;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import co.yixiang.utils.RedisUtils;
|
||||
@ -597,7 +597,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
throw new YshopException("评价产品不存在");
|
||||
}
|
||||
|
||||
int count = productReplyService.count(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||
Long count = productReplyService.count(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||
.eq(YxStoreProductReply::getOid, orderCartInfo.getOid())
|
||||
.eq(YxStoreProductReply::getProductId, orderCartInfo.getProductId()));
|
||||
if (count > 0) {
|
||||
@ -618,9 +618,9 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
|
||||
productReplyService.save(storeProductReply);
|
||||
//获取评价商品数量
|
||||
int replyCount = productReplyService.count(new LambdaQueryWrapper<YxStoreProductReply>().eq(YxStoreProductReply::getOid, orderCartInfo.getOid()));
|
||||
Long replyCount = productReplyService.count(new LambdaQueryWrapper<YxStoreProductReply>().eq(YxStoreProductReply::getOid, orderCartInfo.getOid()));
|
||||
//购买商品数量
|
||||
int cartCount = storeOrderCartInfoService.count(new LambdaQueryWrapper<YxStoreOrderCartInfo>().eq(YxStoreOrderCartInfo::getOid, orderCartInfo.getOid()));
|
||||
Long cartCount = storeOrderCartInfoService.count(new LambdaQueryWrapper<YxStoreOrderCartInfo>().eq(YxStoreOrderCartInfo::getOid, orderCartInfo.getOid()));
|
||||
if (replyCount == cartCount) {
|
||||
YxStoreOrder storeOrder = new YxStoreOrder();
|
||||
storeOrder.setStatus(OrderInfoEnum.STATUS_3.getValue());
|
||||
@ -1316,7 +1316,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
}
|
||||
wrapperOne.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
|
||||
.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue());
|
||||
Integer orderCount = yxStoreOrderMapper.selectCount(wrapperOne);
|
||||
Long orderCount = yxStoreOrderMapper.selectCount(wrapperOne);
|
||||
|
||||
//订单支付没有退款 支付总金额
|
||||
double sumPrice = yxStoreOrderMapper.sumPrice(uid);
|
||||
@ -1329,7 +1329,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
wrapperTwo.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_0.getValue())
|
||||
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
|
||||
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue());
|
||||
Integer unpaidCount = yxStoreOrderMapper.selectCount(wrapperTwo);
|
||||
Long unpaidCount = yxStoreOrderMapper.selectCount(wrapperTwo);
|
||||
|
||||
//订单待发货 数量
|
||||
LambdaQueryWrapper<YxStoreOrder> wrapperThree = new LambdaQueryWrapper<>();
|
||||
@ -1339,7 +1339,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
wrapperThree.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
|
||||
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
|
||||
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue());
|
||||
Integer unshippedCount = yxStoreOrderMapper.selectCount(wrapperThree);
|
||||
Long unshippedCount = yxStoreOrderMapper.selectCount(wrapperThree);
|
||||
|
||||
//订单待收货 数量
|
||||
LambdaQueryWrapper<YxStoreOrder> wrapperFour = new LambdaQueryWrapper<>();
|
||||
@ -1349,7 +1349,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
wrapperFour.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
|
||||
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
|
||||
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_1.getValue());
|
||||
Integer receivedCount = yxStoreOrderMapper.selectCount(wrapperFour);
|
||||
Long receivedCount = yxStoreOrderMapper.selectCount(wrapperFour);
|
||||
|
||||
//订单待评价 数量
|
||||
LambdaQueryWrapper<YxStoreOrder> wrapperFive = new LambdaQueryWrapper<>();
|
||||
@ -1359,7 +1359,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
wrapperFive.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
|
||||
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
|
||||
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_2.getValue());
|
||||
Integer evaluatedCount = yxStoreOrderMapper.selectCount(wrapperFive);
|
||||
Long evaluatedCount = yxStoreOrderMapper.selectCount(wrapperFive);
|
||||
|
||||
//订单已完成 数量
|
||||
LambdaQueryWrapper<YxStoreOrder> wrapperSix = new LambdaQueryWrapper<>();
|
||||
@ -1369,7 +1369,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
wrapperSix.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
|
||||
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
|
||||
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_3.getValue());
|
||||
Integer completeCount = yxStoreOrderMapper.selectCount(wrapperSix);
|
||||
Long completeCount = yxStoreOrderMapper.selectCount(wrapperSix);
|
||||
|
||||
//订单退款
|
||||
LambdaQueryWrapper<YxStoreOrder> wrapperSeven = new LambdaQueryWrapper<>();
|
||||
@ -1379,7 +1379,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
String[] strArr = {"1", "2"};
|
||||
wrapperSeven.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
|
||||
.in(YxStoreOrder::getRefundStatus, Arrays.asList(strArr));
|
||||
Integer refundCount = yxStoreOrderMapper.selectCount(wrapperSeven);
|
||||
Long refundCount = yxStoreOrderMapper.selectCount(wrapperSeven);
|
||||
|
||||
|
||||
return UserOrderCountVo.builder()
|
||||
@ -2083,7 +2083,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
Integer mapKey = entry.getKey();
|
||||
TemplateDto mapValue = entry.getValue();
|
||||
|
||||
int count = shippingTemplatesFreeService.count(Wrappers.<YxShippingTemplatesFree>lambdaQuery()
|
||||
Long count = shippingTemplatesFreeService.count(Wrappers.<YxShippingTemplatesFree>lambdaQuery()
|
||||
.eq(YxShippingTemplatesFree::getTempId, mapValue.getTempId())
|
||||
.eq(YxShippingTemplatesFree::getCityId, mapValue.getCityId())
|
||||
.le(YxShippingTemplatesFree::getNumber, mapValue.getNumber())
|
||||
|
@ -60,15 +60,15 @@ public interface StoreOrderMapper extends CoreMapper<YxStoreOrder> {
|
||||
Double sumTotalPrice();
|
||||
|
||||
@Select("SELECT IFNULL(sum(pay_price),0) as num," +
|
||||
"DATE_FORMAT(create_time, '%m-%d') as time " +
|
||||
"DATE_FORMAT(ANY_VALUE(create_time), '%m-%d') as time " +
|
||||
" FROM yx_store_order where refund_status=0 and is_del=0 and paid=1 and pay_time >= #{time}" +
|
||||
" GROUP BY DATE_FORMAT(create_time,'%Y-%m-%d') " +
|
||||
" ORDER BY create_time ASC")
|
||||
" GROUP BY DATE_FORMAT(ANY_VALUE(create_time),'%Y-%m-%d') " +
|
||||
" ORDER BY ANY_VALUE(create_time) ASC")
|
||||
List<ChartDataDto> chartList(@Param("time") Date time);
|
||||
@Select("SELECT count(id) as num," +
|
||||
"DATE_FORMAT(create_time, '%m-%d') as time " +
|
||||
"DATE_FORMAT(ANY_VALUE(create_time), '%m-%d') as time " +
|
||||
" FROM yx_store_order where refund_status=0 and is_del=0 and paid=1 and pay_time >= #{time}" +
|
||||
" GROUP BY DATE_FORMAT(create_time,'%Y-%m-%d') " +
|
||||
" ORDER BY create_time ASC")
|
||||
" GROUP BY DATE_FORMAT(ANY_VALUE(create_time),'%Y-%m-%d') " +
|
||||
" ORDER BY ANY_VALUE(create_time) ASC")
|
||||
List<ChartDataDto> chartListT(@Param("time") Date time);
|
||||
}
|
||||
|
@ -16,22 +16,22 @@ public class ShoperOrderTimeDataVo implements Serializable {
|
||||
private Double todayPrice;
|
||||
|
||||
/**今日订单数*/
|
||||
private Integer todayCount;
|
||||
private Long todayCount;
|
||||
|
||||
/**昨日成交额*/
|
||||
private Double proPrice;
|
||||
|
||||
/**昨日订单数*/
|
||||
private Integer proCount;
|
||||
private Long proCount;
|
||||
|
||||
/**本月成交额*/
|
||||
private Double monthPrice;
|
||||
|
||||
/**本月订单数*/
|
||||
private Integer monthCount;
|
||||
private Long monthCount;
|
||||
|
||||
/**上周订单数*/
|
||||
private Integer lastWeekCount;
|
||||
private Long lastWeekCount;
|
||||
|
||||
/**上周成交额*/
|
||||
private Double lastWeekPrice;
|
||||
|
@ -23,7 +23,7 @@ public class UserOrderCountVo implements Serializable {
|
||||
|
||||
/**订单支付没有退款 数量*/
|
||||
@ApiModelProperty(value = "订单支付没有退款数量")
|
||||
private Integer orderCount;
|
||||
private Long orderCount;
|
||||
|
||||
/**订单支付没有退款 支付总金额*/
|
||||
@ApiModelProperty(value = "订单支付没有退款支付总金额")
|
||||
@ -31,25 +31,25 @@ public class UserOrderCountVo implements Serializable {
|
||||
|
||||
/**订单待支付 数量*/
|
||||
@ApiModelProperty(value = "订单待支付数量")
|
||||
private Integer unpaidCount;
|
||||
private Long unpaidCount;
|
||||
|
||||
/**订单待发货数量*/
|
||||
@ApiModelProperty(value = "订单待发货数量")
|
||||
private Integer unshippedCount;
|
||||
private Long unshippedCount;
|
||||
|
||||
/**订单待收货数量*/
|
||||
@ApiModelProperty(value = "订单待收货数量")
|
||||
private Integer receivedCount;
|
||||
private Long receivedCount;
|
||||
|
||||
/**订单待评价数量*/
|
||||
@ApiModelProperty(value = "订单待评价数量")
|
||||
private Integer evaluatedCount;
|
||||
private Long evaluatedCount;
|
||||
|
||||
/**订单已完成数量*/
|
||||
@ApiModelProperty(value = "订单已完成数量")
|
||||
private Integer completeCount;
|
||||
private Long completeCount;
|
||||
|
||||
/**订单退款数量*/
|
||||
@ApiModelProperty(value = "订单退款数量")
|
||||
private Integer refundCount;
|
||||
private Long refundCount;
|
||||
}
|
||||
|
@ -58,11 +58,11 @@ public interface YxStoreProductReplyService extends BaseService<YxStoreProductR
|
||||
*/
|
||||
List<YxStoreProductReplyQueryVo> getReplyList(long productId,int type,int page, int limit);
|
||||
|
||||
int getInfoCount(Integer oid, String unique);
|
||||
Long getInfoCount(Integer oid, String unique);
|
||||
|
||||
int productReplyCount(long productId);
|
||||
Long productReplyCount(long productId);
|
||||
|
||||
int replyCount(String unique);
|
||||
Long replyCount(String unique);
|
||||
|
||||
String replyPer(long productId);
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class YxStoreProductAttrResultServiceImpl extends BaseServiceImpl<StorePr
|
||||
yxStoreProductAttrResult.setResult(JSON.toJSONString(map));
|
||||
yxStoreProductAttrResult.setChangeTime(new Date());
|
||||
|
||||
int count = this.count(Wrappers.<YxStoreProductAttrResult>lambdaQuery()
|
||||
long count = this.count(Wrappers.<YxStoreProductAttrResult>lambdaQuery()
|
||||
.eq(YxStoreProductAttrResult::getProductId,productId));
|
||||
if(count > 0) {
|
||||
this.remove(Wrappers.<YxStoreProductAttrResult>lambdaQuery()
|
||||
|
@ -103,6 +103,14 @@ public class YxStoreProductAttrServiceImpl extends BaseServiceImpl<StoreProductA
|
||||
}
|
||||
List<String> stringList = new ArrayList<>(productFormatDto.getDetail().values());
|
||||
Collections.sort(stringList);
|
||||
YxStoreProductAttrValue oldAttrValue = storeProductAttrValueService.getOne(new LambdaQueryWrapper<YxStoreProductAttrValue>()
|
||||
.eq(YxStoreProductAttrValue::getSku, productFormatDto.getSku())
|
||||
.eq(YxStoreProductAttrValue::getProductId, productId));
|
||||
|
||||
String unique = IdUtil.simpleUUID();
|
||||
if (Objects.nonNull(oldAttrValue)) {
|
||||
unique = oldAttrValue.getUnique();
|
||||
}
|
||||
|
||||
YxStoreProductAttrValue oldAttrValue = storeProductAttrValueService.getOne(new LambdaQueryWrapper<YxStoreProductAttrValue>()
|
||||
.eq(YxStoreProductAttrValue::getSku, productFormatDto.getSku())
|
||||
@ -135,7 +143,6 @@ public class YxStoreProductAttrServiceImpl extends BaseServiceImpl<StoreProductA
|
||||
.seckillStock(productFormatDto.getSeckillStock()==null?0:productFormatDto.getSeckillStock())
|
||||
.build();
|
||||
|
||||
|
||||
valueGroup.add(yxStoreProductAttrValue);
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class YxStoreProductRelationServiceImpl extends BaseServiceImpl<YxStorePr
|
||||
*/
|
||||
@Override
|
||||
public Boolean isProductRelation(long productId, long uid) {
|
||||
int count = yxStoreProductRelationMapper
|
||||
Long count = yxStoreProductRelationMapper
|
||||
.selectCount(Wrappers.<YxStoreProductRelation>lambdaQuery()
|
||||
.eq(YxStoreProductRelation::getUid,uid)
|
||||
.eq(YxStoreProductRelation::getType,"collect")
|
||||
|
@ -73,25 +73,25 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
|
||||
*/
|
||||
@Override
|
||||
public ReplyCountVo getReplyCount(long productId) {
|
||||
int sumCount = productReplyCount(productId);
|
||||
Long sumCount = productReplyCount(productId);
|
||||
|
||||
if(sumCount == 0) {
|
||||
return new ReplyCountVo();
|
||||
}
|
||||
|
||||
//好评
|
||||
int goodCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||
Long goodCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||
.eq(YxStoreProductReply::getProductId,productId)
|
||||
.eq(YxStoreProductReply::getProductScore,5));
|
||||
|
||||
//中评
|
||||
int inCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||
Long inCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||
.eq(YxStoreProductReply::getProductId,productId)
|
||||
.lt(YxStoreProductReply::getProductScore,5)
|
||||
.gt(YxStoreProductReply::getProductScore,2));
|
||||
|
||||
//差评
|
||||
int poorCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||
Long poorCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||
.eq(YxStoreProductReply::getProductId,productId)
|
||||
.lt(YxStoreProductReply::getProductScore,2));
|
||||
|
||||
@ -185,14 +185,14 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInfoCount(Integer oid, String unique) {
|
||||
LambdaQueryWrapper<YxStoreProductReply> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(YxStoreProductReply::getUnique,unique).eq(YxStoreProductReply::getOid,oid);
|
||||
public Long getInfoCount(Integer oid, String unique) {
|
||||
LambdaQueryWrapper<YxStoreProductReply> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(YxStoreProductReply::getUnique, unique).eq(YxStoreProductReply::getOid, oid);
|
||||
return this.baseMapper.selectCount(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int productReplyCount(long productId) {
|
||||
public Long productReplyCount(long productId) {
|
||||
|
||||
return this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||
.eq(YxStoreProductReply::getProductId,productId));
|
||||
@ -200,7 +200,7 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
|
||||
}
|
||||
|
||||
@Override
|
||||
public int replyCount(String unique) {
|
||||
public Long replyCount(String unique) {
|
||||
LambdaQueryWrapper<YxStoreProductReply> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(YxStoreProductReply::getUnique,unique);
|
||||
return this.baseMapper.selectCount(wrapper);
|
||||
@ -217,8 +217,8 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
|
||||
wrapper.eq(YxStoreProductReply::getProductId,productId)
|
||||
.eq(YxStoreProductReply::getIsDel,ShopCommonEnum.DELETE_0.getValue())
|
||||
.eq(YxStoreProductReply::getProductScore,5);
|
||||
int productScoreCount = this.baseMapper.selectCount(wrapper);
|
||||
int count = productReplyCount(productId);
|
||||
Long productScoreCount = this.baseMapper.selectCount(wrapper);
|
||||
Long count = productReplyCount(productId);
|
||||
if(count > 0){
|
||||
return ""+NumberUtil.round(NumberUtil.mul(NumberUtil.div(productScoreCount,count),100),2);
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ public class YxStoreProductServiceImpl extends BaseServiceImpl<StoreProductMappe
|
||||
storeProductQueryVo.setUserCollect(isCollect);
|
||||
}
|
||||
//总条数
|
||||
int totalCount = replyService.productReplyCount(id);
|
||||
Long totalCount = replyService.productReplyCount(id);
|
||||
productVo.setReplyCount(totalCount);
|
||||
|
||||
//评价
|
||||
|
@ -39,7 +39,7 @@ public class ProductVo{
|
||||
private String replyChance;
|
||||
|
||||
@ApiModelProperty(value = "回复数")
|
||||
private Integer replyCount = 0;
|
||||
private Long replyCount;
|
||||
|
||||
//todo
|
||||
private List similarity = new ArrayList();
|
||||
|
@ -22,16 +22,16 @@ import java.io.Serializable;
|
||||
public class ReplyCountVo implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "总的评论数")
|
||||
private Integer sumCount;
|
||||
private Long sumCount;
|
||||
|
||||
@ApiModelProperty(value = "好评数")
|
||||
private Integer goodCount;
|
||||
private Long goodCount;
|
||||
|
||||
@ApiModelProperty(value = "中评数")
|
||||
private Integer inCount;
|
||||
private Long inCount;
|
||||
|
||||
@ApiModelProperty(value = "差评数")
|
||||
private Integer poorCount;
|
||||
private Long poorCount;
|
||||
|
||||
@ApiModelProperty(value = "好评率")
|
||||
private String replyChance;
|
||||
|
@ -247,7 +247,7 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl<StoreAfterSalesM
|
||||
storeAfterSales.setSalesState(1);
|
||||
|
||||
YxStoreOrder yxStoreOrder = storeOrderMapper.selectOne(Wrappers.<YxStoreOrder>lambdaQuery().eq(YxStoreOrder::getOrderId, key));
|
||||
yxStoreOrder.setStatus(OrderInfoEnum.STATUS_0.getValue());
|
||||
// yxStoreOrder.setStatus(OrderInfoEnum.STATUS_0.getValue());
|
||||
yxStoreOrder.setRefundStatus(OrderInfoEnum.STATUS_0.getValue());
|
||||
storeOrderMapper.updateById(yxStoreOrder);
|
||||
|
||||
@ -323,7 +323,7 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl<StoreAfterSalesM
|
||||
storeAfterSalesStatusMapper.insert(storeAfterSalesStatus);
|
||||
|
||||
} else {
|
||||
storeAfterSales.setState(AfterSalesStatusEnum.STATUS_1.getValue());
|
||||
storeAfterSales.setState(AfterSalesStatusEnum.STATUS_3.getValue());
|
||||
storeAfterSales.setSalesState(2);
|
||||
//操作记录
|
||||
StoreAfterSalesStatus storeAfterSalesStatus = new StoreAfterSalesStatus();
|
||||
|
@ -1,8 +1,6 @@
|
||||
package co.yixiang.modules.sales.service.vo;
|
||||
|
||||
import co.yixiang.modules.cart.vo.YxStoreCartQueryVo;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -19,7 +17,6 @@ import java.util.List;
|
||||
public class StoreAfterSalesVo {
|
||||
|
||||
/** id */
|
||||
@TableId(value = "uid", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 订单号 */
|
||||
|
@ -25,7 +25,7 @@ import lombok.EqualsAndHashCode;
|
||||
public class YxMaterial extends BaseDomain {
|
||||
|
||||
/** PK */
|
||||
@TableId(type = IdType.UUID)
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ import lombok.EqualsAndHashCode;
|
||||
public class YxMaterialGroup extends BaseDomain {
|
||||
|
||||
/** PK */
|
||||
@TableId(type = IdType.UUID)
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
|
||||
|
@ -55,14 +55,14 @@ public class YxSystemConfigServiceImpl extends BaseServiceImpl<SystemConfigMappe
|
||||
@Override
|
||||
public String getData(String name) {
|
||||
String result = redisUtils.getY(name);
|
||||
if(StrUtil.isNotBlank(result)) {
|
||||
if (StrUtil.isNotBlank(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<YxSystemConfig> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(YxSystemConfig::getMenuName,name);
|
||||
LambdaQueryWrapper<YxSystemConfig> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(YxSystemConfig::getMenuName, name);
|
||||
YxSystemConfig systemConfig = this.baseMapper.selectOne(wrapper);
|
||||
if(systemConfig == null) {
|
||||
if (systemConfig == null) {
|
||||
return "";
|
||||
}
|
||||
return systemConfig.getValue();
|
||||
|
@ -142,7 +142,7 @@ public class YxShippingTemplatesServiceImpl extends BaseServiceImpl<YxShippingTe
|
||||
return;
|
||||
}
|
||||
|
||||
int count = yxShippingTemplatesFreeService.count(Wrappers
|
||||
Long count = yxShippingTemplatesFreeService.count(Wrappers
|
||||
.<YxShippingTemplatesFree>lambdaQuery()
|
||||
.eq(YxShippingTemplatesFree::getTempId,tempId));
|
||||
if(count > 0) {
|
||||
@ -194,7 +194,7 @@ public class YxShippingTemplatesServiceImpl extends BaseServiceImpl<YxShippingTe
|
||||
* @param tempId 运费模板id
|
||||
*/
|
||||
private void saveRegion(ShippingTemplatesDto yxShippingTemplates,Integer tempId){
|
||||
int count = yxShippingTemplatesRegionService.count(Wrappers
|
||||
Long count = yxShippingTemplatesRegionService.count(Wrappers
|
||||
.<YxShippingTemplatesRegion>lambdaQuery()
|
||||
.eq(YxShippingTemplatesRegion::getTempId,tempId));
|
||||
if(count > 0) {
|
||||
|
@ -147,7 +147,7 @@ public class YxUser extends BaseDomain {
|
||||
|
||||
|
||||
/** 下级人数 */
|
||||
private Integer spreadCount;
|
||||
private Long spreadCount;
|
||||
|
||||
|
||||
|
||||
|
@ -29,11 +29,12 @@ public interface YxSystemUserTaskService extends BaseService<YxSystemUserTask>{
|
||||
|
||||
/**
|
||||
* 获取已经完成的任务数量
|
||||
*
|
||||
* @param levelId 等级id
|
||||
* @param uid uid
|
||||
* @param uid uid
|
||||
* @return int
|
||||
*/
|
||||
int getTaskComplete(int levelId,Long uid);
|
||||
Long getTaskComplete(int levelId,Long uid);
|
||||
|
||||
/**
|
||||
* 获取等级会员任务列表
|
||||
|
@ -12,7 +12,6 @@ import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.user.domain.YxUserBill;
|
||||
import co.yixiang.modules.user.service.dto.YxUserBillDto;
|
||||
import co.yixiang.modules.user.service.dto.YxUserBillQueryCriteria;
|
||||
import co.yixiang.modules.user.vo.BillVo;
|
||||
import co.yixiang.modules.user.vo.YxUserBillQueryVo;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
@ -53,7 +52,7 @@ public interface YxUserBillService extends BaseService<YxUserBill>{
|
||||
void income(Long uid,String title,String category,String type,double number,
|
||||
double balance,String mark,String linkid);
|
||||
|
||||
int cumulativeAttendance(Long uid);
|
||||
Long cumulativeAttendance(Long uid);
|
||||
|
||||
/**
|
||||
* 获取推广订单列表
|
||||
|
@ -47,10 +47,11 @@ public interface YxUserService extends BaseService<YxUser>{
|
||||
|
||||
/**
|
||||
* 统计分销人员
|
||||
*
|
||||
* @param uid uid
|
||||
* @return map
|
||||
*/
|
||||
Map<String,Integer> getSpreadCount(Long uid);
|
||||
Map<String,Long> getSpreadCount(Long uid);
|
||||
|
||||
/**
|
||||
* 获取我的分销下人员列表
|
||||
|
@ -15,6 +15,6 @@ import java.util.List;
|
||||
@Data
|
||||
public class TaskDto implements Serializable {
|
||||
private List<YxSystemUserTaskQueryVo> list;
|
||||
private Integer reachCount;
|
||||
private Long reachCount;
|
||||
private List<YxSystemUserTaskQueryVo> task;
|
||||
}
|
||||
|
@ -82,12 +82,13 @@ public class YxSystemUserTaskServiceImpl extends BaseServiceImpl<SystemUserTaskM
|
||||
|
||||
/**
|
||||
* 获取已经完成的任务数量
|
||||
*
|
||||
* @param levelId 等级id
|
||||
* @param uid uid
|
||||
* @param uid uid
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
public int getTaskComplete(int levelId, Long uid) {
|
||||
public Long getTaskComplete(int levelId, Long uid) {
|
||||
List<YxSystemUserTask> list = this.lambdaQuery()
|
||||
.eq(YxSystemUserTask::getLevelId,levelId)
|
||||
.eq(YxSystemUserTask::getIsShow,ShopCommonEnum.SHOW_1.getValue())
|
||||
@ -95,10 +96,10 @@ public class YxSystemUserTaskServiceImpl extends BaseServiceImpl<SystemUserTaskM
|
||||
List<Integer> taskIds = list.stream().map(YxSystemUserTask::getId)
|
||||
.collect(Collectors.toList());
|
||||
if(taskIds.isEmpty()) {
|
||||
return 0;
|
||||
return 0L;
|
||||
}
|
||||
|
||||
int count = yxUserTaskFinishMapper.selectCount(Wrappers.<YxUserTaskFinish>lambdaQuery()
|
||||
Long count = yxUserTaskFinishMapper.selectCount(Wrappers.<YxUserTaskFinish>lambdaQuery()
|
||||
.in(YxUserTaskFinish::getTaskId,taskIds)
|
||||
.eq(YxUserTaskFinish::getUid,uid));
|
||||
return count;
|
||||
@ -136,7 +137,7 @@ public class YxSystemUserTaskServiceImpl extends BaseServiceImpl<SystemUserTaskM
|
||||
*/
|
||||
private List<YxSystemUserTaskQueryVo> tidyTask(List<YxSystemUserTaskQueryVo> task,Long uid) {
|
||||
for (YxSystemUserTaskQueryVo taskQueryVo : task) {
|
||||
int count = userTaskFinishService.lambdaQuery()
|
||||
Long count = userTaskFinishService.lambdaQuery()
|
||||
.eq(YxUserTaskFinish::getTaskId,taskQueryVo.getId())
|
||||
.eq(YxUserTaskFinish::getUid,uid)
|
||||
.count();
|
||||
|
@ -41,7 +41,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@ -114,11 +113,12 @@ public class YxUserBillServiceImpl extends BaseServiceImpl<UserBillMapper, YxUse
|
||||
|
||||
/**
|
||||
* 签到了多少次
|
||||
*
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int cumulativeAttendance(Long uid) {
|
||||
public Long cumulativeAttendance(Long uid) {
|
||||
LambdaQueryWrapper<YxUserBill> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(YxUserBill::getUid,uid).eq(YxUserBill::getCategory,"integral")
|
||||
.eq(YxUserBill::getType,"sign").eq(YxUserBill::getPm,1);
|
||||
@ -142,7 +142,7 @@ public class YxUserBillServiceImpl extends BaseServiceImpl<UserBillMapper, YxUse
|
||||
Page<YxUserBill> pageModel = new Page<>(page, limit);
|
||||
List<String> list = yxUserBillMapper.getBillOrderList(wrapper, pageModel);
|
||||
|
||||
int count = yxUserBillMapper.selectCount(Wrappers.<YxUserBill>lambdaQuery()
|
||||
Long count = yxUserBillMapper.selectCount(Wrappers.<YxUserBill>lambdaQuery()
|
||||
.eq(YxUserBill::getUid, uid)
|
||||
.eq(YxUserBill::getType, BillDetailEnum.TYPE_2.getValue())
|
||||
.eq(YxUserBill::getCategory, BillDetailEnum.CATEGORY_1.getValue()));
|
||||
|
@ -72,7 +72,7 @@ public class YxUserLevelServiceImpl extends BaseServiceImpl<YxUserLevelMapper, Y
|
||||
return false;
|
||||
}
|
||||
|
||||
int finishCount = systemUserTaskService.getTaskComplete(nextLevelId,uid);
|
||||
Long finishCount = systemUserTaskService.getTaskComplete(nextLevelId,uid);
|
||||
|
||||
//目前任务固定,如果增加任务需要自己增加逻辑,目前每个会员任务固定3
|
||||
if(finishCount == ShopConstants.TASK_FINISH_COUNT){
|
||||
|
@ -197,15 +197,16 @@ public class YxUserServiceImpl extends BaseServiceImpl<UserMapper, YxUser> imple
|
||||
|
||||
/**
|
||||
* 统计分销人员
|
||||
*
|
||||
* @param uid uid
|
||||
* @return map
|
||||
*/
|
||||
@Override
|
||||
public Map<String,Integer> getSpreadCount(Long uid) {
|
||||
int countOne = yxUserMapper.selectCount(Wrappers.<YxUser>lambdaQuery()
|
||||
public Map<String, Long> getSpreadCount(Long uid) {
|
||||
Long countOne = yxUserMapper.selectCount(Wrappers.<YxUser>lambdaQuery()
|
||||
.eq(YxUser::getSpreadUid,uid));
|
||||
|
||||
int countTwo = 0;
|
||||
Long countTwo = 0L;
|
||||
List<YxUser> userList = yxUserMapper.selectList((Wrappers.<YxUser>lambdaQuery()
|
||||
.eq(YxUser::getSpreadUid,uid)));
|
||||
List<Long> userIds = userList.stream().map(YxUser::getUid)
|
||||
@ -215,7 +216,7 @@ public class YxUserServiceImpl extends BaseServiceImpl<UserMapper, YxUser> imple
|
||||
.in(YxUser::getSpreadUid,userIds));
|
||||
}
|
||||
|
||||
Map<String,Integer> map = new LinkedHashMap<>(2);
|
||||
Map<String,Long> map = new LinkedHashMap<>(2);
|
||||
map.put("first",countOne); //一级
|
||||
map.put("second",countTwo);//二级
|
||||
|
||||
@ -556,7 +557,7 @@ public class YxUserServiceImpl extends BaseServiceImpl<UserMapper, YxUser> imple
|
||||
* @param yxUser user
|
||||
*/
|
||||
private void setUserSpreadCount(YxUser yxUser) {
|
||||
int count = yxUserMapper.selectCount(Wrappers.<YxUser>lambdaQuery()
|
||||
Long count = yxUserMapper.selectCount(Wrappers.<YxUser>lambdaQuery()
|
||||
.eq(YxUser::getSpreadUid,yxUser.getUid()));
|
||||
yxUser.setSpreadCount(count);
|
||||
yxUserMapper.updateById(yxUser);
|
||||
|
@ -87,8 +87,10 @@ public class YxUserSignServiceImpl extends BaseServiceImpl<YxUserSignMapper, YxU
|
||||
if(isDaySign) {
|
||||
throw new YshopException("已签到");
|
||||
}
|
||||
int signNumber = 0; //积分
|
||||
int userSignNum = yxUser.getSignNum(); //签到次数
|
||||
//积分
|
||||
int signNumber = 0;
|
||||
//签到次数
|
||||
int userSignNum = yxUser.getSignNum();
|
||||
if(getYesterDayIsSign(yxUser.getUid())){
|
||||
if(yxUser.getSignNum() > (list.size() - 1)){
|
||||
userSignNum = 0;
|
||||
@ -99,7 +101,7 @@ public class YxUserSignServiceImpl extends BaseServiceImpl<YxUserSignMapper, YxU
|
||||
int index = 0;
|
||||
for (Map<String,Object> map : list) {
|
||||
if(index == userSignNum){
|
||||
signNumber = Integer.valueOf(map.get("sign_num").toString());
|
||||
signNumber = Integer.parseInt(map.get("sign_num").toString());
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
@ -162,7 +164,7 @@ public class YxUserSignServiceImpl extends BaseServiceImpl<YxUserSignMapper, YxU
|
||||
public YxUserQueryVo userSignInfo(YxUser yxUser) {
|
||||
YxUserQueryVo userQueryVo = generator.convert(yxUser,YxUserQueryVo.class);
|
||||
Long uid = yxUser.getUid();
|
||||
int sumSignDay = this.getSignSumDay(uid);
|
||||
Long sumSignDay = this.getSignSumDay(uid);
|
||||
boolean isDaySign = this.getToDayIsSign(uid);
|
||||
boolean isYesterDaySign = this.getYesterDayIsSign(uid);
|
||||
userQueryVo.setSumSignDay(sumSignDay);
|
||||
@ -181,7 +183,7 @@ public class YxUserSignServiceImpl extends BaseServiceImpl<YxUserSignMapper, YxU
|
||||
*/
|
||||
private boolean getToDayIsSign(Long uid) {
|
||||
Date today = DateUtil.beginOfDay(new Date());
|
||||
int count = this.lambdaQuery().eq(YxUserSign::getUid,uid)
|
||||
Long count = this.lambdaQuery().eq(YxUserSign::getUid,uid)
|
||||
.ge(YxUserSign::getCreateTime,today)
|
||||
.count();
|
||||
if(count > 0) {
|
||||
@ -199,7 +201,7 @@ public class YxUserSignServiceImpl extends BaseServiceImpl<YxUserSignMapper, YxU
|
||||
Date today = DateUtil.beginOfDay(new Date());
|
||||
Date yesterday = DateUtil.beginOfDay(DateUtil.yesterday());
|
||||
|
||||
int count = this.lambdaQuery().eq(YxUserSign::getUid,uid)
|
||||
Long count = this.lambdaQuery().eq(YxUserSign::getUid,uid)
|
||||
.lt(YxUserSign::getCreateTime,today)
|
||||
.ge(YxUserSign::getCreateTime,yesterday)
|
||||
.count();
|
||||
@ -214,7 +216,7 @@ public class YxUserSignServiceImpl extends BaseServiceImpl<YxUserSignMapper, YxU
|
||||
* @param uid 用户id
|
||||
* @return int
|
||||
*/
|
||||
private int getSignSumDay(Long uid) {
|
||||
private Long getSignSumDay(Long uid) {
|
||||
return this.lambdaQuery().eq(YxUserSign::getUid,uid).count();
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class YxUserTaskFinishServiceImpl extends BaseServiceImpl<YxUserTaskFinis
|
||||
*/
|
||||
@Override
|
||||
public void setFinish(Long uid, int taskId) {
|
||||
int count = this.lambdaQuery()
|
||||
Long count = this.lambdaQuery()
|
||||
.eq(YxUserTaskFinish::getUid,uid)
|
||||
.eq(YxUserTaskFinish::getTaskId,taskId)
|
||||
.count();
|
||||
|
@ -33,7 +33,7 @@ public class YxUserQueryVo implements Serializable {
|
||||
private String account;
|
||||
|
||||
@ApiModelProperty(value = "优惠券数量")
|
||||
private Integer couponCount = 0;
|
||||
private Long couponCount = 0L;
|
||||
|
||||
@ApiModelProperty(value = "订单详情数据")
|
||||
private UserOrderCountVo orderStatusNum;
|
||||
@ -42,7 +42,7 @@ public class YxUserQueryVo implements Serializable {
|
||||
private Integer statu;
|
||||
|
||||
@ApiModelProperty(value = "总的签到天数")
|
||||
private Integer sumSignDay;
|
||||
private Long sumSignDay;
|
||||
|
||||
@ApiModelProperty(value = "当天是否签到")
|
||||
private Boolean isDaySign;
|
||||
|
Reference in New Issue
Block a user