This commit is contained in:
许允枞 2024-09-12 19:23:30 +08:00
parent b38f572218
commit c2bbf67a68
18 changed files with 221 additions and 19 deletions

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ApifoxUploaderProjectSetting">
<option name="apiAccessToken" value="APS-7sVwcf15GIEFsfvgul8y3dd7N3tedf6H" />
<option name="apiApiOverwriteMode" value="覆盖所有字段" />
<option name="apiProjectIds">
<array>
<option value="&lt;byte-array&gt;rO0ABXNyADZjb20uaXRhbmdjZW50LmlkZWEucGx1Z2luLmFwaS5hY2NvdW50LlByb2plY3RBbmRNb2R1bGUAAAAAAAAAAQIAFVoABmVuYWJsZUwACG1vZHVsZUlkdAASTGphdmEvbGFuZy9TdHJpbmc7TAAGb3RoZXIxcQB+AAFMAAdvdGhlcjEwcQB+AAFMAAdvdGhlcjExcQB+AAFMAAdvdGhlcjEycQB+AAFMAAZvdGhlcjJxAH4AAUwABm90aGVyM3EAfgABTAAGb3RoZXI0cQB+AAFMAAZvdGhlcjVxAH4AAUwABm90aGVyNnEAfgABTAAGb3RoZXI3cQB+AAFMAAZvdGhlcjhxAH4AAUwABm90aGVyOXEAfgABTAAKcGF0aEJlZm9yZXEAfgABTAANcHJvamVjdEZvbGRlcnEAfgABTAAPcHJvamVjdEZvbGRlcklkcQB+AAFMAAlwcm9qZWN0SWRxAH4AAUwAC3Byb2plY3ROYW1lcQB+AAFMAAxzY2hlbWFGb2xkZXJxAH4AAUwACHNjaGVtYUlkcQB+AAF4cAB0AAZoaWRkZW5wcHBwcHBwcHBwcHB0AApwYXRoQmVmb3JldAANcHJvamVjdEZvbGRlcnQAD3Byb2plY3RGb2xkZXJJZHQAC3Byb2plY3ROYW1ldAAIaGlkZGVuSWR0AABxAH4ACQ==&lt;/byte-array&gt;" />
<option value="&lt;byte-array&gt;rO0ABXNyADZjb20uaXRhbmdjZW50LmlkZWEucGx1Z2luLmFwaS5hY2NvdW50LlByb2plY3RBbmRNb2R1bGUAAAAAAAAAAQIAFVoABmVuYWJsZUwACG1vZHVsZUlkdAASTGphdmEvbGFuZy9TdHJpbmc7TAAGb3RoZXIxcQB+AAFMAAdvdGhlcjEwcQB+AAFMAAdvdGhlcjExcQB+AAFMAAdvdGhlcjEycQB+AAFMAAZvdGhlcjJxAH4AAUwABm90aGVyM3EAfgABTAAGb3RoZXI0cQB+AAFMAAZvdGhlcjVxAH4AAUwABm90aGVyNnEAfgABTAAGb3RoZXI3cQB+AAFMAAZvdGhlcjhxAH4AAUwABm90aGVyOXEAfgABTAAKcGF0aEJlZm9yZXEAfgABTAANcHJvamVjdEZvbGRlcnEAfgABTAAPcHJvamVjdEZvbGRlcklkcQB+AAFMAAlwcm9qZWN0SWRxAH4AAUwAC3Byb2plY3ROYW1lcQB+AAFMAAxzY2hlbWFGb2xkZXJxAH4AAUwACHNjaGVtYUlkcQB+AAF4cAF0ABFmdWludC1hcHBsaWNhdGlvbnBwcHBwcHBwcHBwcHQAAHQACeagueebruW9lXQAATB0AAk1MTQ5MzA4LjB0AAbmsrnnq5lxAH4ABXEAfgAG&lt;/byte-array&gt;" />
</array>
</option>
<option name="apiSyncFolder" value="true" />
<option name="treeNodes" value="&lt;byte-array&gt;rO0ABXNyABdqYXZhLnV0aWwuTGlua2VkSGFzaE1hcDTATlwQbMD7AgABWgALYWNjZXNzT3JkZXJ4cgARamF2YS51dGlsLkhhc2hNYXAFB9rBwxZg0QMAAkYACmxvYWRGYWN0b3JJAAl0aHJlc2hvbGR4cD9AAAAAAAAMdwgAAAAQAAAAAnQACTIwNDc3MDQuMHNyAC5jb20uaXRhbmdjZW50LmlkZWEucGx1Z2luLmFwaS5hY2NvdW50LlRyZWVOb2RlAAAAAAAAAAECAAtMAAdhbGxQYXRodAASTGphdmEvbGFuZy9TdHJpbmc7TAAIY2hpbGRyZW50AA9MamF2YS91dGlsL01hcDtMAAhmdWxsUGF0aHEAfgAFTAADa2V5cQB+AAVMAARuYW1lcQB+AAVMAAhwYXJlbnRJZHEA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AAJ1cQB+AA0AAAAKdAAEcm9vdHEAfgAJcHBwcHBwcHB4eA==&lt;/byte-array&gt;" />
</component>
</project>

View File

@ -6,6 +6,11 @@
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://maven.aliyun.com/repository/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />

View File

@ -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) {

View File

@ -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));
}
}

View File

@ -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<CardValue> {
* @param cardValue
* @return
*/
List<CardValueVOs> selectAppletL(CardValue cardValue);
CardValueUniVo selectAppletL(CardValue cardValue);
/**
* 通过主键查询单条数据(充值)

View File

@ -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<CardValueMapper, CardValue
@Resource
private ActiveAppletService activeAppletService;
@Resource
private ILJStoreService ljStoreService;
/**
* 分页查询所有数据
* @param page
@ -121,7 +126,9 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
* @return
*/
@Override
public List<CardValueVOs> selectAppletL(CardValue cardValue) {
public CardValueUniVo selectAppletL(CardValue cardValue) {
CardValueUniVo cardValueUniVo = new CardValueUniVo();
LambdaQueryWrapper<CardValue> queryWrapper = new LambdaQueryWrapper<>();
//构建查询条件
if (ObjectUtils.isNotEmpty(cardValue.getIsonline())){
@ -171,7 +178,9 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
}
}
//page1.setRecords(cardValueVOs);
return cardValueVOs;
cardValueUniVo.setCardValueList(cardValueVOs);
cardValueUniVo.setStoreName(ljStoreService.queryStoreById(cardValue.getStoreId()).getName());
return cardValueUniVo;
}
public IPage selectAll(Page page, CardValue cardValue) {

View File

@ -0,0 +1,13 @@
package com.fuint.business.marketingActivity.cardValue.vo;
import lombok.Data;
import java.util.List;
@Data
public class CardValueUniVo {
//店铺名称
private String storeName;
//卡券列表
private List<CardValueVOs> cardValueList;
}

View File

@ -9,4 +9,6 @@ import java.io.Serializable;
public class CardValueVOs extends CardValue implements Serializable {
//卡券数量
private Integer count;
}

View File

@ -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");

View File

@ -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; //涨幅

View File

@ -19,6 +19,8 @@
<result property="ifDelete" column="if_delete" />
<result property="unit" column="unit"/>
<result property="storeId" column="store_id"/>
<result property="upOrDown" column="up_or_down"/>
<result property="amplitudeOfChange" column="amplitude_of_change"/>
</resultMap>
<sql id="selectOilNumber">
@ -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
<where>
@ -110,6 +114,8 @@
<if test=" remark != null and remark != ''">remark= #{remark},</if>
<if test=" updateBy != null and updateBy != ''">update_by= #{updateBy},</if>
<if test=" unit != null and unit != ''">unit= #{unit},</if>
<if test=" upOrDown != null and unit != ''">up_or_down= #{upOrDown},</if>
<if test=" amplitudeOfChange != null and amplitudeOfChange != ''">amplitude_of_change= #{amplitudeOfChange },</if>
update_time= NOW()
</set>
where number_id = #{numberId}

View File

@ -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;

View File

@ -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<OilNumberMapper, OilNumber> implements OilNumberService {
private static final Logger log = LoggerFactory.getLogger(OilNumberServiceImpl.class);
@Resource
private OilPresetPricesMapper oilPresetPricesMapper;
@Resource
private OilNameService oilNameService;
@Override
public IPage<OilNumber> 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<OilNumberMapper, OilNumber
oilNumber.setStoreId(nowAccountInfo.getStoreId());
}
return baseMapper.selectOilNumberList2(page,oilNumber);
IPage<OilNumber> oilNumberIPage = baseMapper.selectOilNumberList2(page, oilNumber);
return oilNumberIPage;
}
@Override
@ -74,7 +85,7 @@ public class OilNumberServiceImpl extends ServiceImpl<OilNumberMapper, OilNumber
DecimalFormat decimalFormat = new DecimalFormat("#0.00"); // 设置要显示的小数位数
double v = s.getOilPrice() / s.getGbPrice();
String formattedNumber = decimalFormat.format((1-v) * 100);
String formattedNumber = decimalFormat.format((1 - v) * 100);
oilPresetPricesVO.setRate(formattedNumber + "%");
return oilPresetPricesVO;
}).collect(Collectors.toList());
@ -98,9 +109,13 @@ public class OilNumberServiceImpl extends ServiceImpl<OilNumberMapper, OilNumber
oilNumber.setCreateBy(nowAccountInfo.getStaffId().toString());
// 根据id查询这个店铺是否加过该型号的油
int i = baseMapper.selectOilNameByStore(oilNumber);
if ( i >= 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<OilNumberMapper, OilNumber
oilNumber.setUpdateBy(nowAccountInfo.getStaffId().toString());
int i = baseMapper.selectOilNameByStore(oilNumber);
if ( i> 1) {
if (i > 1) {
return -1;
}
LambdaQueryWrapper<OilNumber> 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<OilNumberMapper, OilNumber
@Override
public List<OilNumberNameVo> 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<OilNumberMapper, OilNumber
@Override
public OilNumber selectOilNumberByOilName(String oilName, Integer storeId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
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<OilNumberMapper, OilNumber
public OilNumber getOilPrice(Integer oilName) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
LambdaQueryWrapper<OilNumber> 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);
}
}

View File

@ -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; //涨幅
}

View File

@ -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<UserBalance> {
* @return
*/
UserBalance getUserBalance();
UserBalance getUserBalanceApplet(UserBalance userBalance);
UserBlanceUniVo getUserBalanceApplet(UserBalance userBalance);
int initBalance(Integer userId , Integer chainStoreId);

View File

@ -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<UserBalanceMapper, UserB
* @return
*/
@Override
public UserBalance getUserBalanceApplet(UserBalance userBalance) {
public UserBlanceUniVo getUserBalanceApplet(UserBalance userBalance) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper<>();
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;
}
/**
* 初始化用户余额信息

View File

@ -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;
}

View File

@ -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);
}