LIDEXI %!s(int64=4) %!d(string=hai) anos
pai
achega
250e0f430b

+ 2 - 1
doc/xmind/更新日志.txt

@@ -1,4 +1,5 @@
 日期                 修改说明
 20210823             第一版本
 20210824        修复用户余额不足的几种情况没有生成商场以及商家赠送积分记录的bug;增加商家没有商场时的判断
-
+20210826        修复当使用渠道积分支付时商家的总应收信息为0的bug,修复当商家赠送积分,商场赠送积分,两者只有
+                赠送记录,而商家、商场信息的积分成本没有累计的bug

+ 9 - 1
src/main/java/org/springblade/modules/ldt/member/utils/MemberUtil.java

@@ -1,6 +1,7 @@
 package org.springblade.modules.ldt.member.utils;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Assert;
 import org.springblade.common.constant.SystemConstant;
 import org.springblade.modules.ldt.loginuser.dto.PayDto;
 import org.springblade.modules.ldt.mall.entity.Mall;
@@ -25,6 +26,9 @@ public class MemberUtil {
 
 	public static Map<String, Member> getMembers(Shop shop, Long loginUserId, IMemberService memberService,
 												 IShopService shopService, IMallService mallService){
+		if(shop.getIsOpenMember() == 0){
+			Assert.isTrue(false,"该商户未开通会员中心");
+		}
 		Map<String,Member> memberMap = new HashMap<>();
 		//获取该用户在该店的会员信息
 		Member isMember = memberService.getBaseMapper().selectOne(new QueryWrapper<>(new Member()).lambda()
@@ -50,6 +54,10 @@ public class MemberUtil {
 		}
 		//获取该用户在该商场的会员信息
 		if(shop.getMallId() != null){//该商店有商场信息
+			Mall mall = mallService.getById(shop.getMallId());
+			if(mall != null && mall.getIsOpenMember() ==0){
+				Assert.isTrue(false,"该商户所在商场未开通会员中心");
+			}
 			Member isMallMember = memberService.getBaseMapper().selectOne(new QueryWrapper<>(new Member()).lambda()
 				.eq(Member::getMallId,shop.getMallId()).eq(Member::getType,SystemConstant.MALLORSHOP.MALL.getValue())
 				.eq(Member::getUserId,loginUserId));
@@ -63,7 +71,7 @@ public class MemberUtil {
 				mallMember.setType(SystemConstant.MALLORSHOP.MALL.getValue());
 				mallMember.setMallId(shop.getMallId());
 				memberService.save(mallMember);
-				Mall mall = mallService.getById(shop.getMallId());
+
 				mall.setMemberCount(mall.getMemberCount()+1);
 				mallService.updateById(mall);
 				memberMap.put("mallMember",mallMember);

+ 127 - 0
src/main/java/org/springblade/modules/ldt/withdrawconfig/controller/WithdrawConfigController.java

@@ -0,0 +1,127 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.ldt.withdrawconfig.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.ldt.withdrawconfig.entity.WithdrawConfig;
+import org.springblade.modules.ldt.withdrawconfig.vo.WithdrawConfigVO;
+import org.springblade.modules.ldt.withdrawconfig.service.IWithdrawConfigService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2021-08-26
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("cyzh-ldt/withdrawconfig")
+@Api(value = "", tags = "接口")
+public class WithdrawConfigController extends BladeController {
+
+	private final IWithdrawConfigService withdrawConfigService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入withdrawConfig")
+	public R<WithdrawConfig> detail(WithdrawConfig withdrawConfig) {
+		WithdrawConfig detail = withdrawConfigService.getOne(Condition.getQueryWrapper(withdrawConfig));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入withdrawConfig")
+	public R<IPage<WithdrawConfig>> list(WithdrawConfig withdrawConfig, Query query) {
+		IPage<WithdrawConfig> pages = withdrawConfigService.page(Condition.getPage(query), Condition.getQueryWrapper(withdrawConfig));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入withdrawConfig")
+	public R<IPage<WithdrawConfigVO>> page(WithdrawConfigVO withdrawConfig, Query query) {
+		IPage<WithdrawConfigVO> pages = withdrawConfigService.selectWithdrawConfigPage(Condition.getPage(query), withdrawConfig);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入withdrawConfig")
+	public R save(@Valid @RequestBody WithdrawConfig withdrawConfig) {
+		return R.status(withdrawConfigService.save(withdrawConfig));
+	}
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入withdrawConfig")
+	public R update(@Valid @RequestBody WithdrawConfig withdrawConfig) {
+		return R.status(withdrawConfigService.updateById(withdrawConfig));
+	}
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入withdrawConfig")
+	public R submit(@Valid @RequestBody WithdrawConfig withdrawConfig) {
+		return R.status(withdrawConfigService.saveOrUpdate(withdrawConfig));
+	}
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(withdrawConfigService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 34 - 0
src/main/java/org/springblade/modules/ldt/withdrawconfig/dto/WithdrawConfigDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.ldt.withdrawconfig.dto;
+
+import org.springblade.modules.ldt.withdrawconfig.entity.WithdrawConfig;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-08-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class WithdrawConfigDTO extends WithdrawConfig {
+	private static final long serialVersionUID = 1L;
+
+}

+ 58 - 0
src/main/java/org/springblade/modules/ldt/withdrawconfig/entity/WithdrawConfig.java

@@ -0,0 +1,58 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.ldt.withdrawconfig.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-08-26
+ */
+@Data
+@TableName("ldt_withdraw_config")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "WithdrawConfig对象", description = "WithdrawConfig对象")
+public class WithdrawConfig extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* min_balance
+	*/
+		@ApiModelProperty(value = "min_balance")
+		private BigDecimal minBalance;
+	/**
+	* max_balance
+	*/
+		@ApiModelProperty(value = "max_balance")
+		private BigDecimal maxBalance;
+	/**
+	* 费率【百分比】
+	*/
+		@ApiModelProperty(value = "费率【百分比】")
+		private BigDecimal rate;
+
+
+}

+ 42 - 0
src/main/java/org/springblade/modules/ldt/withdrawconfig/mapper/WithdrawConfigMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.ldt.withdrawconfig.mapper;
+
+import org.springblade.modules.ldt.withdrawconfig.entity.WithdrawConfig;
+import org.springblade.modules.ldt.withdrawconfig.vo.WithdrawConfigVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-08-26
+ */
+public interface WithdrawConfigMapper extends BaseMapper<WithdrawConfig> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param withdrawConfig
+	 * @return
+	 */
+	List<WithdrawConfigVO> selectWithdrawConfigPage(IPage page, WithdrawConfigVO withdrawConfig);
+
+}

+ 25 - 0
src/main/java/org/springblade/modules/ldt/withdrawconfig/mapper/WithdrawConfigMapper.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.ldt.withdrawconfig.mapper.WithdrawConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="withdrawConfigResultMap" type="org.springblade.modules.ldt.withdrawconfig.entity.WithdrawConfig">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="min_balance" property="minBalance"/>
+        <result column="max_balance" property="maxBalance"/>
+        <result column="rate" property="rate"/>
+    </resultMap>
+
+
+    <select id="selectWithdrawConfigPage" resultMap="withdrawConfigResultMap">
+        select * from ldt_withdraw_config where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
src/main/java/org/springblade/modules/ldt/withdrawconfig/service/IWithdrawConfigService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.ldt.withdrawconfig.service;
+
+import org.springblade.modules.ldt.withdrawconfig.entity.WithdrawConfig;
+import org.springblade.modules.ldt.withdrawconfig.vo.WithdrawConfigVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2021-08-26
+ */
+public interface IWithdrawConfigService extends BaseService<WithdrawConfig> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param withdrawConfig
+	 * @return
+	 */
+	IPage<WithdrawConfigVO> selectWithdrawConfigPage(IPage<WithdrawConfigVO> page, WithdrawConfigVO withdrawConfig);
+
+}

+ 41 - 0
src/main/java/org/springblade/modules/ldt/withdrawconfig/service/impl/WithdrawConfigServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.ldt.withdrawconfig.service.impl;
+
+import org.springblade.modules.ldt.withdrawconfig.entity.WithdrawConfig;
+import org.springblade.modules.ldt.withdrawconfig.vo.WithdrawConfigVO;
+import org.springblade.modules.ldt.withdrawconfig.mapper.WithdrawConfigMapper;
+import org.springblade.modules.ldt.withdrawconfig.service.IWithdrawConfigService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2021-08-26
+ */
+@Service
+public class WithdrawConfigServiceImpl extends BaseServiceImpl<WithdrawConfigMapper, WithdrawConfig> implements IWithdrawConfigService {
+
+	@Override
+	public IPage<WithdrawConfigVO> selectWithdrawConfigPage(IPage<WithdrawConfigVO> page, WithdrawConfigVO withdrawConfig) {
+		return page.setRecords(baseMapper.selectWithdrawConfigPage(page, withdrawConfig));
+	}
+
+}

+ 36 - 0
src/main/java/org/springblade/modules/ldt/withdrawconfig/vo/WithdrawConfigVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.ldt.withdrawconfig.vo;
+
+import org.springblade.modules.ldt.withdrawconfig.entity.WithdrawConfig;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-08-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "WithdrawConfigVO对象", description = "WithdrawConfigVO对象")
+public class WithdrawConfigVO extends WithdrawConfig {
+	private static final long serialVersionUID = 1L;
+
+}

+ 12 - 3
src/main/java/org/springblade/modules/payment/paystrategy/loginuser/impl/ChannelEnoughStrategy.java

@@ -167,9 +167,11 @@ public class ChannelEnoughStrategy implements IPayStrategy {
 			loginUser.setChannelPointValue(loginUser.getChannelPointValue().subtract(yingfu).subtract(pointDetail.getGxRewardPointValue()));
 			loginUserService.updateById(loginUser);
 
-			//6.增加商家应收明细记录
+			//6.增加商家应收明细记录、增加商家信息的应收款
 			PayUtil.saveShopYingShou(billRecord, pointChannel, pointDetail, shop, shopYingshouService);
-
+			//增加商家的应收款
+			shop.setTotalFunkPrice(shop.getTotalFunkPrice() != null ? shop.getTotalFunkPrice().add(pointDetail.getPointValue()):pointDetail.getPointValue());
+			shopService.updateById(shop);
 			//7.增加商场积分成本
 			if (mall.getIsOpenMember() == 1) {//商场开启会员中心
 				PointDetail mallSendPoint = PayUtil.addMallPointValue(mall, loginUser, billRecord, mallMember, pointDetailService);
@@ -178,13 +180,20 @@ public class ChannelEnoughStrategy implements IPayStrategy {
 				channelUserPoint.setUsablePoint(channelUserPoint.getUsablePoint().add(mallSendPoint.getPoint()));
 				channelUserPoint.setTotalPoint(channelUserPoint.getTotalPoint().add(mallSendPoint.getPoint()));
 				channelUserPointService.updateById(channelUserPoint);
+				//增加该商场信息的积分成本
+				mall.setTotalPointValue(mall.getTotalPointValue() != null?mall.getTotalPointValue().add(mallSendPoint.getPointValue()):mallSendPoint.getPointValue());
+				mallService.updateById(mall);
+
 				//	增加該用戶的渠道总积分价值
 				loginUser.setChannelPointValue(loginUser.getChannelPointValue().add(mallSendPoint.getPointValue()));
 				loginUserService.updateById(loginUser);
 			}
-			//8.新增商家积分成本并新增该用户的积分余额
+			//8.新增商家积分成本、修改商家的总积分成本,并新增该用户的积分余额
 			if (shop.getIsOpenMember() == 1) {//判断该商店是否开启会员中心
 				PointDetail shopPointDetail = PayUtil.addShopPointValue(mall, shop, loginUser, billRecord, pointDetailService);
+				shop.setTotalPointValue(shop.getTotalPointValue() != null ?
+					shop.getTotalPointValue().add(shopPointDetail.getPointValue()):shopPointDetail.getPointValue());
+				shopService.updateById(shop);
 				//新增用户的余额(积分价值)
 				loginUser.setPointValue(loginUser.getPointValue().add(shopPointDetail.getPointValue()));
 				loginUser.setPoint(loginUser.getPoint().add(shopPointDetail.getPoint()));

+ 12 - 4
src/main/java/org/springblade/modules/payment/paystrategy/loginuser/impl/ChannelNoEnoughRareEnoughStrategy.java

@@ -156,8 +156,9 @@ public class ChannelNoEnoughRareEnoughStrategy implements IPayStrategy {
 		//3增加商家应收记录
 		billRecord.setPayStatus(SystemConstant.BillRecordPayStatus.PAYED.getValue());
 		PayUtil.saveShopYingShou(billRecord,pointChannel,channelPointDetail,shop,shopYingshouService);
-
-
+		//更新商家信息的总应收信息
+		shop.setTotalFunkPrice(shop.getTotalFunkPrice()!= null? shop.getTotalFunkPrice().add(channelEnablePointValue):channelEnablePointValue);
+		shopService.updateById(shop);
 		//还应支付余额
 		yingfu = yingfu.subtract(channelEnablePointValue);
 
@@ -185,7 +186,7 @@ public class ChannelNoEnoughRareEnoughStrategy implements IPayStrategy {
 		loginUser.setPointValue(loginUser.getPointValue().subtract(pointDetail.getPointValue()).subtract(pointDetail.getGxRewardPointValue()));
 		loginUserService.updateById(loginUser);
 
-		//66.增加商送积分记录,增加该用户在该渠道的渠道积分,修改用户信息的渠道总积分价值
+		//66.增加商送积分记录,增加该用户在该渠道的渠道积分,修改用户信息的渠道总积分价值,,修改该商场信息的总积分成本
 		if(mall.getIsOpenMember() == 1){//商场开启会员中心
 			PointDetail mallSendPoint = PayUtil.addMallPointValue(mall, loginUser, billRecord, mallMember, pointDetailService);
 			//新增该用户在该商场渠道的积分和积分价值
@@ -196,10 +197,17 @@ public class ChannelNoEnoughRareEnoughStrategy implements IPayStrategy {
 			//	增加該用戶的渠道总积分价值
 			loginUser.setChannelPointValue(loginUser.getChannelPointValue().add(mallSendPoint.getPointValue()));
 			loginUserService.updateById(loginUser);
+			//修改该商场信息的总积分成本
+			mall.setTotalPointValue(mall.getTotalPointValue() != null ? mall.getTotalPointValue().add(mallSendPoint.getPointValue()):mallSendPoint.getPointValue());
+			mallService.updateById(mall);
 		}
-		//7.增加商家的送积分记录,修改用户信息的积分余额
+		//7.增加商家的送积分记录,修改商家的总积分成本,修改用户信息的积分余额
 		if(shop.getIsOpenMember() == 1){//判断该商店是否开启会员中心
 			PointDetail shopPointDetail = PayUtil.addShopPointValue(mall,shop,loginUser,billRecord,pointDetailService);
+			//修改商家的总积分成本
+			shop.setTotalPointValue(shop.getTotalPointValue() != null ?
+				shop.getTotalPointValue().add(shopPointDetail.getPointValue()):shopPointDetail.getPointValue());
+			shopService.updateById(shop);
 			//新增用户的余额(积分价值)
 			loginUser.setPointValue(loginUser.getPointValue().add(shopPointDetail.getPointValue()));
 			loginUser.setPoint(loginUser.getPoint().add(shopPointDetail.getPoint()));