diff --git a/.idea/ApifoxUploaderProjectSetting.xml b/.idea/ApifoxUploaderProjectSetting.xml
new file mode 100644
index 000000000..d528a4442
--- /dev/null
+++ b/.idea/ApifoxUploaderProjectSetting.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 40a2eee23..50b18a6f0 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -6,6 +6,11 @@
+
+
+
+
+
diff --git a/fuintAdmin/src/views/oilConfig/oilPrice/comp/oilcon.vue b/fuintAdmin/src/views/oilConfig/oilPrice/comp/oilcon.vue
index 308de71b1..f0cedb0c2 100644
--- a/fuintAdmin/src/views/oilConfig/oilPrice/comp/oilcon.vue
+++ b/fuintAdmin/src/views/oilConfig/oilPrice/comp/oilcon.vue
@@ -99,7 +99,9 @@ export default {
return new Promise(async (resolve, reject) => {
try {
const response = await getOilNumberList(this.queryParams);
+ console.log('response', response)
this.oilNumberList2 = response.data.records;
+ console.log('oilNumberList2', this.oilNumberList2)
this.total = response.data.total
await this.getAllOilList();
resolve();
@@ -176,7 +178,7 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
var this_ = this
- if (this.oilNumber.id) {
+ if (this.oilNumber.numberId) {
updateOilNumber(this_.oilNumber).then(response => {
var list = response.data
if (list < 0) {
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/controller/CardCouponController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/controller/CardCouponController.java
index 98b3602cd..328752d6b 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/controller/CardCouponController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/controller/CardCouponController.java
@@ -136,5 +136,20 @@ public class CardCouponController extends BaseController {
public ResponseObject isOnLine(@PathVariable Integer id) {
return getSuccessResult(cardCouponService.isOnLine(id));
}
+
+ /**
+ * 分页查询可领取优惠券(uniapp使用)
+ * @param pageNo
+ * @param pageSize
+ * @param cardCoupon
+ * @return
+ */
+ @GetMapping("/queryByPageAndStoreId")
+ public ResponseObject selectAllByPageAndStoreId(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
+ @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, @Param("cardCoupon") CardCoupon cardCoupon) {
+ Page page = new Page(pageNo, pageSize);
+ return getSuccessResult(this.cardCouponService.pageVo(page, cardCoupon));
+
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java
index 88c8c5f94..03146539e 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueDTO;
import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueAppletVO;
+import com.fuint.business.marketingActivity.cardValue.vo.CardValueUniVo;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueVO;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueVOs;
@@ -34,7 +35,7 @@ public interface CardValueService extends IService {
* @param cardValue
* @return
*/
- List selectAppletL(CardValue cardValue);
+ CardValueUniVo selectAppletL(CardValue cardValue);
/**
* 通过主键查询单条数据(充值)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java
index 258cde12b..a0f39268a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java
@@ -26,9 +26,11 @@ import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
import com.fuint.business.marketingActivity.cardValue.service.CardValueChildService;
import com.fuint.business.marketingActivity.cardValue.service.CardValueService;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueAppletVO;
+import com.fuint.business.marketingActivity.cardValue.vo.CardValueUniVo;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueVO;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueVOs;
import com.fuint.business.store.service.StoreService;
+import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils;
@@ -69,6 +71,9 @@ public class CardValueServiceImpl extends ServiceImpl selectAppletL(CardValue cardValue) {
+ public CardValueUniVo selectAppletL(CardValue cardValue) {
+ CardValueUniVo cardValueUniVo = new CardValueUniVo();
+
LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
//构建查询条件
if (ObjectUtils.isNotEmpty(cardValue.getIsonline())){
@@ -171,7 +178,9 @@ public class CardValueServiceImpl extends ServiceImpl cardValueList;
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/vo/CardValueVOs.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/vo/CardValueVOs.java
index fda0cc80d..7c58af474 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/vo/CardValueVOs.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/vo/CardValueVOs.java
@@ -9,4 +9,6 @@ import java.io.Serializable;
public class CardValueVOs extends CardValue implements Serializable {
//卡券数量
private Integer count;
+
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java
index 1f3e889c7..d53b03fa5 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java
@@ -12,6 +12,7 @@ import com.fuint.business.petrolStationManagement.entity.OilNumber;
import com.fuint.business.petrolStationManagement.entity.OilPresetPrices;
import com.fuint.business.petrolStationManagement.service.OilNumberService;
import com.fuint.business.petrolStationManagement.service.OilPresetPricesService;
+import com.fuint.business.petrolStationManagement.vo.OilNumberUniVo;
import com.fuint.business.petrolStationManagement.vo.OilPresetPricesVO;
import com.fuint.business.setting.entity.SysLog;
import com.fuint.business.setting.service.SysLogService;
@@ -19,6 +20,8 @@ import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -36,6 +39,8 @@ import java.util.List;
@RestController
@RequestMapping("/business/petrolStationManagement/oilNumber")
public class OilNumberController extends BaseController {
+ private static final Logger log = LoggerFactory.getLogger(OilNumberController.class);
+
/**
* 服务对象
*/
@@ -57,6 +62,13 @@ public class OilNumberController extends BaseController {
return getSuccessResult(list);
}
+ /**
+ * 小程序端查询油价价格
+ * @param pageNo
+ * @param pageSize
+ * @param oilNumber
+ * @return
+ */
@ApiOperation("查询所有油号")
@GetMapping("getList2")
public ResponseObject selectAll2(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@@ -98,6 +110,7 @@ public class OilNumberController extends BaseController {
*/
@PostMapping
public ResponseObject insert(@RequestBody OilNumber oilNumber) {
+ log.info("新增油号信息:{}",oilNumber);
try {
SysLog sysLog =new SysLog();
sysLog.setSystemName("2");
@@ -116,6 +129,7 @@ public class OilNumberController extends BaseController {
*/
@PutMapping
public ResponseObject update(@RequestBody OilNumber oilNumber) {
+ log.info("修改油号信息:{}", oilNumber);
try {
SysLog sysLog =new SysLog();
sysLog.setSystemName("2");
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilNumber.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilNumber.java
index 242eff35f..9592a2e2c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilNumber.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilNumber.java
@@ -39,6 +39,8 @@ public class OilNumber extends BaseEntity {
private Double oilDensity; //油品密度
@TableField(exist = false)
public Integer id; //id(主键)
+ public Integer upOrDown;//油价涨幅 1-升 2-降
+ public String amplitudeOfChange; //涨幅
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml
index 08727631a..0207a6404 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml
@@ -19,6 +19,8 @@
+
+
@@ -39,7 +41,9 @@
onn.oil_name,
onn.id,
omm.oil_price,
- omm.gb_price
+ omm.gb_price,
+ omm.up_or_down,
+ omm.amplitude_of_change
from oil_number omm
left join oil_name onn on omm.oil_name = onn.id
@@ -110,6 +114,8 @@
remark= #{remark},
update_by= #{updateBy},
unit= #{unit},
+ up_or_down= #{upOrDown},
+ amplitude_of_change= #{amplitudeOfChange },
update_time= NOW()
where number_id = #{numberId}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNumberService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNumberService.java
index 4bfb05a07..ab17f0a4e 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNumberService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNumberService.java
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.petrolStationManagement.entity.OilNumber;
import com.fuint.business.petrolStationManagement.entity.OilPresetPrices;
import com.fuint.business.petrolStationManagement.vo.OilNumberNameVo;
+import com.fuint.business.petrolStationManagement.vo.OilNumberUniVo;
import com.fuint.business.petrolStationManagement.vo.OilPresetPricesVO;
import org.apache.ibatis.annotations.Param;
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java
index e8bbef4f1..72f94e80b 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java
@@ -1,7 +1,7 @@
package com.fuint.business.petrolStationManagement.service.impl;
-
+import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -17,19 +17,25 @@ import com.fuint.business.petrolStationManagement.mapper.OilPresetPricesMapper;
import com.fuint.business.petrolStationManagement.service.OilNameService;
import com.fuint.business.petrolStationManagement.service.OilNumberService;
import com.fuint.business.petrolStationManagement.vo.OilNumberNameVo;
+import com.fuint.business.petrolStationManagement.vo.OilNumberUniVo;
import com.fuint.business.petrolStationManagement.vo.OilPresetPricesVO;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
+import static cn.hutool.core.util.NumberUtil.decimalFormat;
+
/**
* (OilNumber)表服务实现类
*
@@ -39,15 +45,18 @@ import java.util.stream.Collectors;
@Service("OilNumberService")
public class OilNumberServiceImpl extends ServiceImpl implements OilNumberService {
+ private static final Logger log = LoggerFactory.getLogger(OilNumberServiceImpl.class);
+
@Resource
private OilPresetPricesMapper oilPresetPricesMapper;
@Resource
private OilNameService oilNameService;
+
@Override
public IPage selectOilNumberList(Page page, OilNumber oilNumber) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
oilNumber.setStoreId(nowAccountInfo.getStoreId());
- return baseMapper.selectOilNumberList(page,oilNumber);
+ return baseMapper.selectOilNumberList(page, oilNumber);
}
@Override
@@ -57,7 +66,9 @@ public class OilNumberServiceImpl extends ServiceImpl oilNumberIPage = baseMapper.selectOilNumberList2(page, oilNumber);
+
+ return oilNumberIPage;
}
@Override
@@ -74,7 +85,7 @@ public class OilNumberServiceImpl extends ServiceImpl= 1) {
+ if (i >= 1) {
return -1;
}
+ oilNumber.setUpOrDown(3);
+ oilNumber.setAmplitudeOfChange("0%");
+
+
return baseMapper.insertOilNumber(oilNumber);
}
@@ -110,10 +125,28 @@ public class OilNumberServiceImpl extends ServiceImpl 1) {
+ if (i > 1) {
return -1;
}
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(OilNumber::getNumberId, oilNumber.getNumberId());
+ OilNumber oilNumber1 = baseMapper.selectOne(queryWrapper);
+ if (oilNumber1 != null) {
+ if (oilNumber1.getOilPrice() == oilNumber.getOilPrice()) {
+ oilNumber.setUpOrDown(3);
+ oilNumber.setAmplitudeOfChange("0%");
+ }else if (oilNumber1.getOilPrice() > oilNumber.getOilPrice()) {
+ oilNumber.setUpOrDown(2);
+ String s = calculatePercentageChange(oilNumber.getOilPrice(), oilNumber1.getOilPrice());
+ oilNumber.setAmplitudeOfChange(s);
+ }else if (oilNumber1.getOilPrice() < oilNumber.getOilPrice()) {
+ oilNumber.setUpOrDown(1);
+ String s = calculatePercentageChange(oilNumber.getOilPrice(), oilNumber1.getOilPrice());
+ oilNumber.setAmplitudeOfChange(s);
+ }
+ }
+
return baseMapper.updateOilNumber(oilNumber);
}
@@ -132,7 +165,7 @@ public class OilNumberServiceImpl extends ServiceImpl selectOilNumberNameByStoreId(Integer storeId) {
- if (storeId==null){
+ if (storeId == null) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
storeId = nowAccountInfo.getStoreId();
}
@@ -142,8 +175,8 @@ public class OilNumberServiceImpl extends ServiceImpl();
- queryWrapper.eq("oil_name",oilName);
- queryWrapper.eq("store_id",storeId);
+ queryWrapper.eq("oil_name", oilName);
+ queryWrapper.eq("store_id", storeId);
OilNumber oilNumber = baseMapper.selectOne(queryWrapper);
return oilNumber;
}
@@ -152,11 +185,30 @@ public class OilNumberServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(OilNumber::getStoreId,nowAccountInfo.getStoreId());
- queryWrapper.eq(OilNumber::getOilName,oilName);
+ queryWrapper.eq(OilNumber::getStoreId, nowAccountInfo.getStoreId());
+ queryWrapper.eq(OilNumber::getOilName, oilName);
OilNumber one = getOne(queryWrapper);
return one;
}
+ //计算变化幅度
+ public static String calculatePercentageChange(double original, double newValue) {
+ if (original == 0) {
+ throw new IllegalArgumentException("");
+ }
+
+ // 计算变化幅度 (newValue - original) / original * 100
+ double change = ((original - newValue) / newValue) * 100;
+
+
+ //如果变化幅度小于0 取反
+ if (change < 0) {
+ change = -change;
+ }
+
+ // 将结果格式化为带百分号的字符串,并保留两位小数
+ return String.format("%.2f%%", change);
+ }
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/vo/OilNumberUniVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/vo/OilNumberUniVo.java
new file mode 100644
index 000000000..07a2d97f2
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/vo/OilNumberUniVo.java
@@ -0,0 +1,48 @@
+package com.fuint.business.petrolStationManagement.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fuint.repository.model.base.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 油号表控制层
+ *
+ * @author wangh
+ * @since 2023-10-11 16:36:02
+ */
+@ApiModel("油品数据")
+@Data
+public class OilNumberUniVo extends BaseEntity {
+ @ApiModelProperty("商户名")
+ @TableId(value = "number_id", type = IdType.AUTO)
+ public Integer numberId; //id(主键)
+ private String oilType; // 油品类型
+ private String oilName; //油品名称
+ private Double oilPrice; //油品单价
+ private Double gbPrice; //国标价格
+ private String receivingUnits; //收款单位
+// private String createTime; //创建时间
+// private String updateTime; //更新时间
+ private String state; // 状态 启用或禁用(0禁用1启用)
+ private String sort; //排序
+ private String remark; //
+ private String ifDelete; //
+ private String unit; //
+ private Integer storeId; //
+ @TableField(exist = false)
+ private Double oilDensity; //油品密度
+ @TableField(exist = false)
+ public Integer id; //id(主键)
+ /**
+ * 1-升 2-降
+ */
+ public Integer upOrDown;//油价涨幅 1-升 2-降
+ public String amplitudeOfChange; //涨幅
+
+
+
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java
index dcde6c408..cb0129049 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.business.userManager.vo.UserBalanceVo;
+import com.fuint.business.userManager.vo.UserBlanceUniVo;
import java.util.List;
import java.util.Map;
@@ -64,7 +65,7 @@ public interface UserBalanceService extends IService {
* @return
*/
UserBalance getUserBalance();
- UserBalance getUserBalanceApplet(UserBalance userBalance);
+ UserBlanceUniVo getUserBalanceApplet(UserBalance userBalance);
int initBalance(Integer userId , Integer chainStoreId);
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java
index aa367a2b3..0161ad818 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java
@@ -1,5 +1,6 @@
package com.fuint.business.userManager.service.impl;
+import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
@@ -22,6 +23,7 @@ import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.business.userManager.vo.UserBalanceVo;
+import com.fuint.business.userManager.vo.UserBlanceUniVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.RedisLock;
import com.fuint.common.util.TokenUtil;
@@ -318,13 +320,15 @@ public class UserBalanceServiceImpl extends ServiceImpl();
queryWrapper.eq("mt_user_id",nowAccountInfo.getId());
queryWrapper.eq("chain_store_id",userBalance.getChainStoreId());
UserBalance balance = baseMapper.selectOne(queryWrapper);
- return balance;
+ UserBlanceUniVo userBlanceUniVo = BeanUtil.copyProperties(balance, UserBlanceUniVo.class);
+ userBlanceUniVo.setAllBalance(balance.getCardBalance()+balance.getGiveAmount());
+ return userBlanceUniVo;
}
/**
* 初始化用户余额信息
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/vo/UserBlanceUniVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/vo/UserBlanceUniVo.java
new file mode 100644
index 000000000..ad07feea3
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/vo/UserBlanceUniVo.java
@@ -0,0 +1,10 @@
+package com.fuint.business.userManager.vo;
+
+import com.fuint.business.userManager.entity.UserBalance;
+import lombok.Data;
+
+@Data
+public class UserBlanceUniVo extends UserBalance {
+ //总余额
+ private Double allBalance;
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/config/RedissonConfig.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/config/RedissonConfig.java
index 6738a2f15..0dffa8e4b 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/config/RedissonConfig.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/config/RedissonConfig.java
@@ -44,6 +44,7 @@ public class RedissonConfig {
public RedissonClient redissonClient()
{
Config config = new Config();
+ config.useSingleServer().setPassword(password);
config.useSingleServer().setAddress("redis://" + host + ":" + port); // 更多.set
return Redisson.create(config);
}